MetaMask / metamask-extension

:globe_with_meridians: :electric_plug: The MetaMask browser extension enables browsing Ethereum blockchain enabled websites
https://metamask.io
Other
12.08k stars 4.93k forks source link

[Bug]: Token detection doesn't work with custom network after bumping assets controller to v34.0.0 #25762

Open davibroc opened 4 months ago

davibroc commented 4 months ago

Describe the bug

After adding Tenderly as a custom network I see token detection not working anymore please watch videos below to understand the issue. While this might seems as a minor issue, in the swap team we often use Tenderly for functionality testing and that allows us to save money. So making sure Tenderly works a custom network is important.

I was able to pinpoint the issue starting with this commit https://github.com/MetaMask/metamask-extension/commit/f353f0c316a18510a71ac3c4d45b765f78475028

If I go back to this commit the problem doesn't happen https://github.com/MetaMask/metamask-extension/commit/58082f542b950f979ac362d7aa428f8181e80b9b

Expected behavior

No response

Screenshots/Recordings

Before the changes

https://github.com/MetaMask/metamask-extension/assets/6082863/c07db8cf-1072-4a49-a5ee-18ea733161ba

After

https://github.com/MetaMask/metamask-extension/assets/6082863/353aecc8-e5f2-430b-a7e5-107192e0578f

Steps to reproduce

  1. Register with Metamask by importing an existing account with the follow seed phrase
    ancient cloth onion decline gloom air scare addict action exhaust neck auto
  2. After the accout is setup add Tenderly as a custom newtork with the following settings name: 'Tenderly', url: 'https://rpc.tenderly.co/fork/cdbcd795-097d-4624-aa16-680374d89a43', chainID: '1', symbol: 'ETH',
    1. After switching to network notice that token detection doesn't work

Error messages or log output

No response

Version

develop

Build type

None

Browser

Chrome

Operating system

MacOS

Hardware wallet

No response

Additional context

No response

Severity

No response

bergeron commented 4 months ago

The v34 bump of assets controllers in https://github.com/MetaMask/metamask-extension/pull/25540 did break some token detection cases. I reported this to Monte Lai and he fixed the repro that I had. Mine wasn't tenderly specific tho, so could you try on latest develop? It's on v36 now

github-actions[bot] commented 1 month ago

This issue has been automatically marked as stale because it has not had recent activity in the last 90 days. It will be closed in 45 days if there is no further activity. The MetaMask team intends on reviewing this issue before close, and removing the stale label if it is still a bug. We welcome new comments on this issue. We do not intend on closing issues if they report bugs that are still reproducible. Thank you for your contributions.