diff --git a/src/cardano_account_pandas_dumper/__main__.py b/src/cardano_account_pandas_dumper/__main__.py index 3c2eb77..77eb737 100644 --- a/src/cardano_account_pandas_dumper/__main__.py +++ b/src/cardano_account_pandas_dumper/__main__.py @@ -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( diff --git a/src/cardano_account_pandas_dumper/cardano_account_pandas_dumper.py b/src/cardano_account_pandas_dumper/cardano_account_pandas_dumper.py index c29c4a6..ca04562 100644 --- a/src/cardano_account_pandas_dumper/cardano_account_pandas_dumper.py +++ b/src/cardano_account_pandas_dumper/cardano_account_pandas_dumper.py @@ -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} @@ -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 ) @@ -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, @@ -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(