-
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
Remove keyringMemStore
from DetectTokensController
#20728
Remove keyringMemStore
from DetectTokensController
#20728
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. |
5bb117f
to
1af59a7
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## develop #20728 +/- ##
========================================
Coverage 68.17% 68.17%
========================================
Files 998 998
Lines 39966 39968 +2
Branches 10686 10684 -2
========================================
+ Hits 27243 27246 +3
+ Misses 12723 12722 -1
☔ View full report in Codecov by Sentry. |
Builds ready [a572703]
Page Load Metrics (1608 ± 54 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
function buildMessenger() { | ||
return new ControllerMessenger().getRestricted({ | ||
name: 'DetectTokensController', | ||
allowedEvents: ['NetworkController:stateChange'], | ||
}); | ||
} |
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 has been substituted with getRestrictedMessenger
which uses the messenger
instance available in the higher scope, as it helps registering a mock handler for the KeyringController:getState
action.
aa5875a
to
2e4fdb9
Compare
Builds ready [2e4fdb9]
Page Load Metrics (1714 ± 70 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
2e4fdb9
to
1fd7479
Compare
Builds ready [1fd7479]
Page Load Metrics (1514 ± 33 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.
LGTM!
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!
747a221
to
af31acf
Compare
Builds ready [af31acf]
Page Load Metrics (1570 ± 55 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
af31acf
to
c3ca98c
Compare
Builds ready [c3ca98c]
Page Load Metrics (1675 ± 114 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Explanation
This PR removes the
keyringMemStore
constructor parameter, as we can now subscribe toKeyringController
events through the messenger. Instead of listening on all Keyring state changes, we can listen to:lock
and:unlock
events.@metamask/eth-keyring-controller
fromDetectTokensController
#20723Pre-merge author checklist
Pre-merge reviewer checklist
If further QA is required (e.g. new feature, complex testing steps, large refactor), add the
Extension QA Board
label.In this case, a QA Engineer approval will be be required.