Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
adonesky1 committed Jul 15, 2021
1 parent 96b5e2d commit 5882088
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/assets/TokensController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ export class TokensController extends BaseController<
*
* @param {string} tokensAddress - the token contract address.
* @returns boolean indicating whether the token address passed in supports the EIP-721 interface.
*
*
*/
async _detectIsERC721(tokenAddress: string) {
const checksumAddress = toChecksumHexAddress(tokenAddress);
Expand All @@ -333,15 +333,14 @@ export class TokensController extends BaseController<
abiERC721,
this.ethersProvider,
);

return await tokenContract
.supportsInterface(ERC721_INTERFACE_ID)
.catch((error: { code: string, method: string }) => {
if(error.code === "UNPREDICTABLE_GAS_LIMIT"){
.catch((error: { code: string; method: string }) => {
if (error.code === 'UNPREDICTABLE_GAS_LIMIT') {
return false;
} else {
throw error;
}
throw error;
});
}

Expand Down

0 comments on commit 5882088

Please sign in to comment.