TP-Lab / tp-js-sdk

TokenPocket JS API for Dapp of ETH, IOST, TRON, COSMOS, SOLANA, EOS etc. (mobile only)
200 stars 61 forks source link

🙏🏻 Need support ERC721 ERC1155 method Add token #24

Closed Tyler-Franklin closed 2 years ago

Tyler-Franklin commented 2 years ago
const wasAdded = await ethereum.request({
    method: 'wallet_watchAsset',
    params: {
      type: 'ERC20', // Initially only supports ERC20, but eventually more!
      options: {
        address: tokenAddress, // The address that the token is at.
        symbol: tokenSymbol, // A ticker symbol or shorthand, up to 5 chars.
        decimals: tokenDecimals, // The number of decimals in the token
        image: tokenImage, // A string url of the token logo
      },
    },
  });

As you know NFT is popular right now, we recommend adding this method to support for ERC721 and 1155. ASAP and thanks a lot. :heartpulse:

chendatony31 commented 2 years ago

Been supported at the last release.