-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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: Upgrade assets controllers to 43 with multichain polling for token lists + detection #28447
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. |
@metamaskbot update-policies |
Policies updated. 🧠 Learn how: https://lavamoat.github.io/guides/policy-diff/#what-to-look-for-when-reviewing-a-policy-diff |
@@ -7205,14 +7222,14 @@ export default class MetamaskController extends EventEmitter { | |||
|
|||
this.tokenListController.updatePreventPollingOnNetworkRestart(!newEnabled); |
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.
I've never understood the purpose of preventPollingOnNetworkRestart
, so I don't know whether it still makes sense. When it's set to true, all it seems to do is reset the state when switching chains. Keeping it around for now.
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.
I saw this same thing and had similar thoughts. Sounds good
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
|
@metamaskbot update-policies |
Policy update failed. You can review the logs or retry the policy update here |
@metamaskbot update-policies |
Policies updated. 🧠 Learn how: https://lavamoat.github.io/guides/policy-diff/#what-to-look-for-when-reviewing-a-policy-diff |
…Mask/metamask-extension into brian/upgrade-assets-controllers-43
fixing e2e |
await dispatch( | ||
toggleExternalServices(externalServicesOnboardingToggleState), | ||
); |
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.
There was a race condition here.
When you disable basic functionality during onboarding, we don't actually flip the setting until this final page. But the toggle was not awaited, so there was a brief period where:
- completedOnboarding == true
- useExternalServices == true
And then it would quickly flip to false. But with this change useExternalServices will be false immediately upon leaving onboarding.
Accompanying changes in actions.ts
Builds ready [1411c2a]
Page Load Metrics (1939 ± 77 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
diff --git a/dist/TokenDetectionController.cjs b/dist/TokenDetectionController.cjs | ||
index ab23c95d667357db365f925c4c4acce4736797f8..8fd5efde7a3c24080f8a43f79d10300e8c271245 100644 | ||
--- a/dist/TokenDetectionController.cjs | ||
+++ b/dist/TokenDetectionController.cjs |
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.
Builds ready [979a3af]
Page Load Metrics (2213 ± 91 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Description
This upgrades assets controllers to version 43. It allows us to poll for token lists and token detection across chains.
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist