From 425061a230fe4f27706c0852462ee9229df9b885 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Eckel?= Date: Mon, 12 Dec 2022 12:52:58 +0100 Subject: [PATCH] replaced exception catching by version-management MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jürgen Eckel --- planetmint/lib.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/planetmint/lib.py b/planetmint/lib.py index a7142f6..e031edd 100644 --- a/planetmint/lib.py +++ b/planetmint/lib.py @@ -146,11 +146,7 @@ class Planetmint(object): for tx in transactions: transaction = tx.tx_dict if tx.tx_dict else rapidjson.loads(rapidjson.dumps(tx.to_dict())) - try: - tx_assets = transaction.pop("assets") - except KeyError: - tx_assets = transaction.pop("asset") - + tx_assets = transaction.pop(Transaction.get_assets_tag(tx.version)) metadata = transaction.pop("metadata") tx_assets = backend.convert.prepare_asset(