-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: multichain token detection #28380
Conversation
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
4583bad
to
1b8fe67
Compare
1b8fe67
to
fde2ca2
Compare
Builds ready [fde2ca2]
Page Load Metrics (2038 ± 79 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [e899713]
Page Load Metrics (1965 ± 125 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
I'm noticing an unexpected behavior. When I am on a network, and I try to import my account's tokens, in the detected-token popover, I only see balances and tokenFiatBalance of the detected tokens on the chain that I am on. Is this expected? I'm not sure if this was a limitation to our previous core dependency. I think we now have the token balances being polled cross-chain, so I wonder if it would be worth it to integrate these cross chain balances on this PR as well. Screen.Recording.2024-11-18.at.6.37.31.PM.mov |
e899713
to
638dadd
Compare
638dadd
to
87722d9
Compare
87722d9
to
5a4fad5
Compare
5a4fad5
to
dce2001
Compare
I'm noticing two bugs, that we've discussed on Slack. Posting them here for tracking:
Screen.Recording.2024-11-20.at.2.39.11.PM.mov
import-bug-1.mov |
9b5a122
to
6012a46
Compare
6012a46
to
c290045
Compare
Builds ready [c290045]
Page Load Metrics (1905 ± 109 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pulled down, tested, LGTM. The bugs I reported earlier now seem to be resolved ✅
Once #28593 gets through the merge queue, I think we can just rebase to develop and get these changes in 🚀
2795d33
to
d25ab6c
Compare
d25ab6c
to
29742fd
Compare
Hey @salimtb Im seeing this behavior where after hiding a token and going back to main page i dnt see the same token list? Screen.Recording.2024-11-21.at.21.14.38.mov |
i couldn't reproduce on my side , i'll try to do it separately and follow up with a PR if needed |
Builds ready [373a8c5]
Page Load Metrics (1757 ± 52 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Description
TokenDetectionController is responsible for detecting and keeping an updated list of all tokens across supported chains. This dataset is stored in the detectedTokens state variable within Metamask’s state. After completing this task, token detection will be enhanced by implementing periodic polling across all networks linked to the wallet, resulting in a more comprehensive dataset available to users.
For each network added to the wallet, the polling loop will receive the network as a parameter and execute token autodetection for it. Once results are available, they will be stored in detectedTokensAllChains, organized by chainId. This approach enables us to retrieve a comprehensive list of detected tokens across all networks.
Related issues
Fixes: #3431
Manual testing steps
yarn
PORTFOLIO_VIEW=1 yarn start
Screenshots/Recordings
Before
After
Screen.Recording.2024-11-08.at.14.27.23.mov
Pre-merge author checklist
Pre-merge reviewer checklist