fix
This commit is contained in:
parent
7dba36f8d8
commit
c595123a65
|
|
@ -28,14 +28,14 @@ class WalletMixin:
|
|||
# TODO: support more than 1000 items
|
||||
async with AsyncClient() as client:
|
||||
response = await client.get(f"https://tonapi.io/v2/accounts/{user_wallet_address}/nfts?limit=1000&offset=0&indirect_ownership=false")
|
||||
response = response.json()
|
||||
assert 'nft_items' in response
|
||||
return response.json()['nft_items']
|
||||
except BaseException as e:
|
||||
make_log(self, f"Error while fetching NFTs: {e}", level='error')
|
||||
await asyncio.sleep(2)
|
||||
return await get_nft_items_list()
|
||||
|
||||
nfts_list = await get_nft_items_list()
|
||||
make_log(self, f"Found {len(nfts_list)} NFTs", level='info')
|
||||
for nft_item in nfts_list:
|
||||
item_address = Address(nft_item['address']).to_string(1, 1, 1)
|
||||
owner_address = Address(nft_item['owner']['address']).to_string(1, 1, 1)
|
||||
|
|
|
|||
Loading…
Reference in New Issue