From 47d960231152e48ea6c71567f6569a4152806543 Mon Sep 17 00:00:00 2001 From: Henry Holtzman Date: Tue, 5 Nov 2024 22:46:32 -0800 Subject: [PATCH] python cli status cmd should only display fees for tokens on chain (#1017) --- python/mobilecoin/cli.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/python/mobilecoin/cli.py b/python/mobilecoin/cli.py index 20bab9e4b..7eae98d11 100644 --- a/python/mobilecoin/cli.py +++ b/python/mobilecoin/cli.py @@ -246,11 +246,13 @@ def status(self): print() print('Transaction Fees:') for token in TOKENS: - amount = Amount.from_storage_units( - network_status['fees'][str(token.token_id)], - token - ) - print(indent(amount.format(), ' ')) + fee_storage_units = network_status['fees'].get(str(token.token_id)) + if fee_storage_units is not None: + amount = Amount.from_storage_units( + fee_storage_units, + token + ) + print(indent(amount.format(), ' ')) def list(self): accounts = self.client.get_accounts()