From eed6e2d2e9669c31aea51a2d4e7920df85bebb10 Mon Sep 17 00:00:00 2001 From: Dalena Date: Tue, 19 Nov 2024 18:15:02 -0500 Subject: [PATCH] fix: add finally --- silverback/_cli.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/silverback/_cli.py b/silverback/_cli.py index b28733a6..b9047469 100644 --- a/silverback/_cli.py +++ b/silverback/_cli.py @@ -553,9 +553,10 @@ def create_payment_stream( try: convert(token, AddressType) token_symbol = Contract(token).symbol() - token = accepted_tokens.get(token_symbol) except ConversionError: - token = accepted_tokens.get(token) + token_symbol = token + finally: + token = accepted_tokens.get(token_symbol) if token is None: raise click.UsageError(f"Token not found in accepted tokens: {accepted_tokens}.")