-
-
Notifications
You must be signed in to change notification settings - Fork 255
feat: use withKeyring to get notification accounts for main keyring #5459
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: use withKeyring to get notification accounts for main keyring #5459
Conversation
94b73c7 to
bf2ca24
Compare
…d' and 'main' of github.com:MetaMask/core into MMASSETS-618/feat-add-get-notification-accounts-method
|
@metamaskbot publish-preview |
|
Preview builds have been published. See these instructions for more information about preview builds. Expand for full list of packages and versions. |
we can instead just use state to find accounts
c2a9ad3 to
8c51c6e
Compare
| 'KeyringController:withKeyring', | ||
| { | ||
| type: KeyringTypes.hd, | ||
| index: 0, |
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.
why are we hardcoding index to 0 here ?
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.
Aha, copied from Identity Profile Sync Controllers.
The Keyring controller now supports multiple keyrings (importing multiple SRPs). So this indicates that we only want the first/main keyring.
Explanation
For notification settings, we only want to fetch accounts that our on the main keyring.
References
Changelog
@metamask/notification-services-controllerKeyringController:getAccountswithKeyringController:withKeyringChecklist