Skip to content

Commit

Permalink
skip_verification flag
Browse files Browse the repository at this point in the history
  • Loading branch information
dungeon-master-666 committed Jul 3, 2024
1 parent 0e66dc0 commit 8892c2d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pytonlib/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ async def get_nft_item_address(self, collection_address, item_index):
raise Exception("get_nft_address_by_index failed")
return parse_nft_item_address_data(result['stack'])

async def get_token_data(self, address: str):
async def get_token_data(self, address: str, skip_verification=False):
address = prepare_address(address)

types_methods = {
Expand All @@ -880,14 +880,14 @@ async def get_token_data(self, address: str):
elif contract_type == 'jetton_wallet':
result = parse_jetton_wallet_data(get_method_result_stack)

if await self.get_jetton_wallet_address(result['owner'], result['jetton']) != address:
if not skip_verification and await self.get_jetton_wallet_address(result['owner'], result['jetton']) != address:
raise Exception("Verification with Jetton master failed")
elif contract_type == 'nft_collection':
result = parse_nft_collection_data(get_method_result_stack)
elif contract_type == 'nft_item':
result = parse_nft_item_data(get_method_result_stack)
if result['collection_address'] is not None:
if await self.get_nft_item_address(result['collection_address'], result['index']) != address:
if not skip_verification and await self.get_nft_item_address(result['collection_address'], result['index']) != address:
raise Exception("Verification with NFT collection failed")

individual_content = result.pop('individual_content')
Expand Down

0 comments on commit 8892c2d

Please sign in to comment.