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 = ({
76
76
address,
77
77
enabled = true ,
78
78
} : UseTokenValidationParams ) : TokenValidationResult => {
79
+ // We query the balance for a random non-zero address because many implementations revert on it
79
80
return useTokenValidation ( {
80
81
address,
81
82
enabled,
82
83
abi : ERC20_ERC721_ABI ,
83
- contractCall : ( contract ) => contract . read . balanceOf ( [ "0x0000000000000000000000000000000000000000 " ] ) ,
84
+ contractCall : ( contract ) => contract . read . balanceOf ( [ "0x0000000000000000000000000000000000001234 " ] ) ,
84
85
tokenType : "ERC-20 or ERC-721" ,
85
86
} ) ;
86
87
} ;
@@ -92,11 +93,12 @@ export const useERC20ERC721Validation = ({
92
93
* @returns Validation state including loading, result, and error
93
94
*/
94
95
export const useERC1155Validation = ( { address, enabled = true } : UseTokenValidationParams ) : TokenValidationResult => {
96
+ // We query the balance for a random non-zero address because many implementations revert on it
95
97
return useTokenValidation ( {
96
98
address,
97
99
enabled,
98
100
abi : ERC1155_ABI ,
99
- contractCall : ( contract ) => contract . read . balanceOf ( [ "0x0000000000000000000000000000000000000000 " , 0 ] ) ,
101
+ contractCall : ( contract ) => contract . read . balanceOf ( [ "0x0000000000000000000000000000000000001234 " , 0 ] ) ,
100
102
tokenType : "ERC-1155" ,
101
103
} ) ;
102
104
} ;
You can’t perform that action at this time.
0 commit comments