Skip to content

Commit

Permalink
remove reward column
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelsoup42 committed Oct 2, 2023
1 parent 8098606 commit 6499f1a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
1 change: 0 additions & 1 deletion src/cardano_account_pandas_dumper/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ def main():
truncate_length=args.truncate_length,
raw_values=args.raw_values,
unmute=args.unmute,
with_rewards=not args.no_rewards,
detail_level=args.detail_level,
)
transactions = pd.concat(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,12 @@ def __init__(
truncate_length: int,
raw_values: bool,
unmute: bool,
with_rewards: bool,
detail_level: int,
):
self.data = data
self.truncate_length = truncate_length
self.raw_values = raw_values
self.unmute = unmute
self.with_rewards = with_rewards
self.detail_level = detail_level
self.address_names = pd.Series(
{a: " wallet" for a in self.data.own_addresses}
Expand Down Expand Up @@ -396,7 +394,7 @@ def _transaction_balance(self, transaction: blockfrost.utils.Namespace) -> Any:
result[(self.ADA_ASSET, self.OWN_LABEL, " deposit")] = np.longlong(
transaction.deposit
)
if self.with_rewards and transaction.reward_amount:
if transaction.reward_amount:
result[(self.ADA_ASSET, self.OWN_LABEL, " rewards")] = np.longlong(
transaction.reward_amount
)
Expand Down Expand Up @@ -473,11 +471,6 @@ def make_transaction_frame(
frame = pd.DataFrame(
data=[
{"hash": x.hash, "message": text_cleaner(self._format_message(x))}
| (
{}
if not self.with_rewards
else {"reward": "True" if x.reward_amount else "False"}
)
for x in transactions
],
index=transactions.index,
Expand All @@ -493,7 +486,7 @@ def make_transaction_frame(
frame = frame.join(balance)
# Add total line at the bottom
if with_total:
total = [""] + ([""] if self.with_rewards else []) + ["Total"]
total = ["", "Total"]
for column in balance.columns:
total.append(balance[column].sum())
frame = pd.concat(
Expand Down

0 comments on commit 6499f1a

Please sign in to comment.