Cleaned up same code pattern in two other locs
@@ -56,10 +56,7 @@ def print_created_asset(algodclient, account, assetid):
# response = myindexer.accounts(asset_id = assetid)
# then use 'account_info['created-assets'][0] to get info on the created asset
account_info = algodclient.account_info(account)
- idx = 0;
- for my_account_info in account_info['created-assets']:
- scrutinized_asset = account_info['created-assets'][idx]
- idx = idx + 1
+ for scrutinized_asset in account_info['created-assets']:
if (scrutinized_asset['index'] == assetid):
print("Asset ID: {}".format(scrutinized_asset['index']))
print(json.dumps(my_account_info['params'], indent=4))
@@ -71,10 +68,7 @@ def print_asset_holding(algodclient, account, assetid):
# response = myindexer.accounts(asset_id = assetid)
# then loop thru the accounts returned and match the account you are looking for
account_info = algodclient.account_info(account)
- idx = 0
- for my_account_info in account_info['assets']:
- scrutinized_asset = account_info['assets'][idx]
- idx = idx + 1
+ for scrutinized_asset in account_info['assets']:
if (scrutinized_asset['asset-id'] == assetid):
print("Asset ID: {}".format(scrutinized_asset['asset-id']))
print(json.dumps(scrutinized_asset, indent=4))
