Skip to content

Commit

Permalink
Merge pull request #26 from DarkFlorist/MicahZoltu-patch-1
Browse files Browse the repository at this point in the history
Fixes a bug that causes ERC-721 contracts without metadata to not work.
  • Loading branch information
MicahZoltu authored Nov 22, 2023
2 parents d859470 + 9c177aa commit 6dc8374
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/ts/library/identifyTokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ export async function itentifyAddress(address: string, id: bigint, provider: Pro
address,
id,
owner: nftInterface.decodeFunctionResult('ownerOf', owner.returnData)[0],
name: hasMetadata.success ? nftInterface.decodeFunctionResult('name', name.returnData)[0] : undefined,
tokenURI: hasMetadata.success ? nftInterface.decodeFunctionResult('tokenURI', tokenURI.returnData)[0] : undefined,
name: hasMetadata.success && nftInterface.decodeFunctionResult('supportsInterface', hasMetadata.returnData)[0] ? nftInterface.decodeFunctionResult('name', name.returnData)[0] : undefined,
tokenURI: hasMetadata.success && nftInterface.decodeFunctionResult('supportsInterface', hasMetadata.returnData)[0] ? nftInterface.decodeFunctionResult('tokenURI', tokenURI.returnData)[0] : undefined,
})
}
} catch (error) {
Expand Down

0 comments on commit 6dc8374

Please sign in to comment.