File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -76,11 +76,12 @@ export const useERC20ERC721Validation = ({
7676 address,
7777 enabled = true ,
7878} : UseTokenValidationParams ) : TokenValidationResult => {
79+ // We query the balance for a random non-zero address because many implementations revert on it
7980 return useTokenValidation ( {
8081 address,
8182 enabled,
8283 abi : ERC20_ERC721_ABI ,
83- contractCall : ( contract ) => contract . read . balanceOf ( [ "0x0000000000000000000000000000000000000000 " ] ) ,
84+ contractCall : ( contract ) => contract . read . balanceOf ( [ "0x0000000000000000000000000000000000001234 " ] ) ,
8485 tokenType : "ERC-20 or ERC-721" ,
8586 } ) ;
8687} ;
@@ -92,11 +93,12 @@ export const useERC20ERC721Validation = ({
9293 * @returns Validation state including loading, result, and error
9394 */
9495export const useERC1155Validation = ( { address, enabled = true } : UseTokenValidationParams ) : TokenValidationResult => {
96+ // We query the balance for a random non-zero address because many implementations revert on it
9597 return useTokenValidation ( {
9698 address,
9799 enabled,
98100 abi : ERC1155_ABI ,
99- contractCall : ( contract ) => contract . read . balanceOf ( [ "0x0000000000000000000000000000000000000000 " , 0 ] ) ,
101+ contractCall : ( contract ) => contract . read . balanceOf ( [ "0x0000000000000000000000000000000000001234 " , 0 ] ) ,
100102 tokenType : "ERC-1155" ,
101103 } ) ;
102104} ;
You can’t perform that action at this time.
0 commit comments