-
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
refactor: use core profile syncing controllers. #26370
refactor: use core profile syncing controllers. #26370
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. |
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: npm/@metamask/[email protected], npm/[email protected] |
🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎ To accept the risk, merge this PR and you will not be notified again.
Next stepsWhat is network access?This module accesses the network. Packages should remove all network access that is functionally unnecessary. Consumers should audit network access to ensure legitimate use. Take a deeper look at the dependencyTake a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev. Remove the packageIf you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency. Mark a package as acceptable riskTo ignore an alert, reply with a comment starting with
|
@metamaskbot update-policies |
Policies updated |
@@ -365,7 +366,6 @@ | |||
"@metamask/user-operation-controller": "^13.0.0", | |||
"@metamask/utils": "^8.2.1", | |||
"@ngraveio/bc-ur": "^1.1.12", | |||
"@noble/ciphers": "^0.5.2", |
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.
This package was only used as part of our controllers. Now that we are using these shared controllers, we can remove this dep.
|
||
type AppState = { | ||
metamask: AuthenticationControllerState & { | ||
metamask: AuthenticationController.AuthenticationControllerState & { |
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.
Yep I get it, this syntax is weird. We were fighting to get multiple file exports working for this package, but ran into issues and time constraints, so opted for named exports/namespaced exports.
In near future we will support multiple exports. E.g.
import { AuthenticationControllerState } from '@metamask/profile-sync-controller/auth'
// Temporary add missing methods (due to notification controller migration) | ||
this.controllerMessenger.registerActionHandler( | ||
'NotificationServicesController:disableNotificationServices', | ||
() => this.metamaskNotificationsController.disableMetamaskNotifications(), | ||
); | ||
this.controllerMessenger.registerActionHandler( | ||
'NotificationServicesController:selectIsNotificationServicesEnabled', | ||
() => | ||
this.metamaskNotificationsController.selectIsMetamaskNotificationsEnabled(), | ||
); |
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.
We are slowly migrating controllers to use the shared controllers.
This addition is so that this PR works standalone (there was some controller renaming that was done in shared libraries)
Builds ready [ee2b73e]
Page Load Metrics (356 ± 313 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #26370 +/- ##
===========================================
- Coverage 70.13% 69.98% -0.16%
===========================================
Files 1435 1422 -13
Lines 50309 49937 -372
Branches 13897 13862 -35
===========================================
- Hits 35283 34944 -339
+ Misses 15026 14993 -33 ☔ View full report in Codecov by Sentry. |
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.
LGTM
Builds ready [5ad6097]
Page Load Metrics (281 ± 278 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.
YESSS
Quality Gate passedIssues Measures |
Builds ready [190c72c]
Page Load Metrics (60 ± 7 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Description
1st migration to shared controllers. This adds the reusable controllers from core. Migrated
AuthenticationController
andUserStorageController
Related issues
Fixes: N/A
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist