Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

watchAsset for NFT does not exist #1193

Open
dirtycajunrice opened this issue Apr 16, 2023 · 0 comments
Open

watchAsset for NFT does not exist #1193

dirtycajunrice opened this issue Apr 16, 2023 · 0 comments

Comments

@dirtycajunrice
Copy link

As NFTs are now globally available both in the mobile as well as the desktop extension, the watchAsset logic has now fallen out of date. The watchAsset function only binds to the tokensController for watchAsset and no such function exists in the NFTController.

try {
switch (type) {
case 'ERC20':
validateTokenToWatch(asset);
break;
default:
throw new Error(`Asset of type ${type} not supported`);
}
} catch (error) {
this.failSuggestedAsset(suggestedAssetMeta, error);
return Promise.reject(error);
}

This does not check, nor have any validation logic, for ERC1155 or ERC721 assets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants