replaced exception catching by version-management

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
This commit is contained in:
Jürgen Eckel 2022-12-12 12:52:58 +01:00
parent 5734a29756
commit 425061a230
No known key found for this signature in database

View File

@ -146,11 +146,7 @@ class Planetmint(object):
for tx in transactions: for tx in transactions:
transaction = tx.tx_dict if tx.tx_dict else rapidjson.loads(rapidjson.dumps(tx.to_dict())) transaction = tx.tx_dict if tx.tx_dict else rapidjson.loads(rapidjson.dumps(tx.to_dict()))
try: tx_assets = transaction.pop(Transaction.get_assets_tag(tx.version))
tx_assets = transaction.pop("assets")
except KeyError:
tx_assets = transaction.pop("asset")
metadata = transaction.pop("metadata") metadata = transaction.pop("metadata")
tx_assets = backend.convert.prepare_asset( tx_assets = backend.convert.prepare_asset(