metamask-extension icon indicating copy to clipboard operation
metamask-extension copied to clipboard

[Bug]: Multichain - `Failed to load decimals` when switching asset from send ETH to send NFT ERC721/ERC1155

Open seaona opened this issue 1 year ago • 2 comments

Describe the bug

Problem: whenever I start a Send ETH transaction and change the asset for an NFT ERC721/ERC1155, I see the UI console error Failed to load decimals

Expected behavior

We should not get this error. Note that ERC721/ERC1155 lack the decimal field in the contract.

Screenshots/Recordings

https://github.com/MetaMask/metamask-extension/assets/54408225/b5c8f33a-acde-4f08-8f84-daa1d3e741f9

Steps to reproduce

  1. Deploy an NFT
  2. Add the NFt to your wallet
  3. Start a Send ETH tx
  4. Open the UI console
  5. Add a recipient address
  6. Change the asset from ETH to NFT
  7. See error

Error messages or log output

No response

Version

develop - with multichain flag

Build type

None

Browser

Chrome

Operating system

Linux

Hardware wallet

No response

Additional context

No response

Severity

No response

seaona avatar Feb 14 '24 09:02 seaona

Full stack trace:

failed to load decimals for token at 0xD648922586e98bEBF1D8F5833fb6cbe3fcF36Fcc
useTokenTraker.js:71

overrideMethod | @ | backend.js:2045
-- | -- | --
  | _callee5$ | @ | token.js:216
  | tryCatch | @ | regeneratorRuntime.js:45
  | (anonymous) | @ | regeneratorRuntime.js:133
  | (anonymous) | @ | regeneratorRuntime.js:74
  | asyncGeneratorStep | @ | asyncToGenerator.js:3
  | _throw | @ | asyncToGenerator.js:25
  | Promise.then (async) |   |  
  | asyncGeneratorStep | @ | asyncToGenerator.js:12
  | _next | @ | asyncToGenerator.js:22
  | (anonymous) | @ | asyncToGenerator.js:27
  | (anonymous)


darkwing avatar Feb 14 '24 19:02 darkwing

Important to note that this error does not break send functionality, simply throws this warning.

darkwing avatar Feb 14 '24 19:02 darkwing