metamask-extension
metamask-extension copied to clipboard
[Bug]: Multichain - `Failed to load decimals` when switching asset from send ETH to send NFT ERC721/ERC1155
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
- Deploy an NFT
- Add the NFt to your wallet
- Start a Send ETH tx
- Open the UI console
- Add a recipient address
- Change the asset from ETH to NFT
- 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
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)
Important to note that this error does not break send functionality, simply throws this warning.