MetaMask / metamask-mobile

Mobile web browser providing access to websites that use the Ethereum blockchain
https://metamask.io
Other
2.18k stars 1.12k forks source link

[Bug]: Failing to add a token from the dapp #12501

Open christopherferreira9 opened 5 days ago

christopherferreira9 commented 5 days ago

Describe the bug

Calling wallet_watchAsset is not adding a token to the token list when called from dapps. Call being made:

provider.request({
      method: 'wallet_watchAsset',
      params: {
        type: 'ERC20',
        options: {
          address: '0x2fF9853B6f102f280Ec926936b0b894135bE40Ff',
          symbol: 'TST',
          decimals: 4,
          image: 'https://metamask.github.io/test-dapp/metamask-fox.svg',
        },
      },
    });

Expected behavior

No response

Screenshots/Recordings

https://github.com/user-attachments/assets/6be26f48-0094-4419-8404-cb06254235f7

Steps to reproduce

  1. Go to the MetaMask test dapp on the inapp browser
  2. Connect to the dapp
  3. Deploy an ERC20 token
  4. Tap Add Tokens to Wallet
  5. Approve -> Your token is not added to MetaMask

Error messages or log output

No response

Detection stage

During release testing

Version

7.37.0

Build type

None

Device

iPhone 11

Operating system

iOS, Android

Additional context

No response

Severity

No response

Unik0rnMaggie commented 2 days ago

Reproduced on Android 14 - Pixel 6 Pro.

Unable to add token from test dapp or coinmarketcap:

https://github.com/user-attachments/assets/488707db-2e88-40de-b3db-0de4cbe5dc91

trezorsix commented 1 day ago

Confirming, we have the same issue