-
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: token autodetection multi chain #28553
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. |
615178a
to
e1f4656
Compare
b5a9b82
to
26be2ad
Compare
Builds ready [817e528]
Page Load Metrics (1865 ± 63 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Left couple questions 🙏 Did QA on this looks good! |
83f706b
to
23ec4ee
Compare
@metamaskbot update-policies |
One thing i noticed, is that when i am on a network and i import a token on another network; you would see the import notification but you wont see the token you just imported because its on a different network; |
Policies updated. 🧠 Learn how: https://lavamoat.github.io/guides/policy-diff/#what-to-look-for-when-reviewing-a-policy-diff |
@metamaskbot update-policies |
Policies updated. 🧠 Learn how: https://lavamoat.github.io/guides/policy-diff/#what-to-look-for-when-reviewing-a-policy-diff |
Builds ready [5d51658]
Page Load Metrics (2080 ± 101 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [8194330]
Page Load Metrics (2041 ± 78 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
.yarn/patches/@metamask-assets-controllers-npm-44.0.0-c223d56176.patch
Outdated
Show resolved
Hide resolved
Tested with and without PORTFOLIO_VIEW=1, detections and imports worked as expected |
here's a unit test fix: 954ca55 |
yes just pushed |
Builds ready [ba2c169]
Page Load Metrics (2085 ± 133 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
This comment was marked as resolved.
This comment was marked as resolved.
Builds ready [a48805c]
Page Load Metrics (2545 ± 100 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
ef4f2aa
to
8325697
Compare
8325697
to
0cafd75
Compare
Builds ready [0cafd75]
Page Load Metrics (1873 ± 149 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