-
-
Notifications
You must be signed in to change notification settings - Fork 183
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
Add getKeyringsByType
method
#1376
Conversation
a9b8b2d
to
e49d428
Compare
e49d428
to
87e8264
Compare
@Gudahtt I think that we should somehow discourage the use of this method, along with any direct interaction with keyrings. If for example Do you think we should expose it with a method on |
837a473
to
835ad30
Compare
Great point @mikesposito . Calling In the short term, perhaps we could just deprecate this method and explain why it's dangerous? Then we can be mindful of these dangers in the few places we need it in the extension until we can get rid of it completely. I am unsure about exposing |
835ad30
to
54e3bf1
Compare
Makes sense, I added a deprecation notice for |
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!
* feat: add getKeyringsByType method * fix: use type unknown instead of Keyring * chore: add deprecation tags
Description
This PR adds the
getKeyringsByType
method toKeyringController
.This method can be used to get keyrings of a given type.
To support types from the extension that are not supported by mobile, this function accepts also a string in addition to
KeyringTypes
- an alternative to this would be to edit theKeyringTypes
enum itself but in this controller we don't explicitly support all hardware keyrings.Note:
getKeyringsByType
andgetKeyringForAccount
have been marked as deprecated as their usage is unsafe at the moment: actions executed directly on keyring instances are not being reflected onEthKeyringController
andKeyringController
statesChanges
getKeyringsByType
method to list keyrings for a given typegetKeyringsByType
has been marked as deprecated as it is currently unsafegetKeyringForAccount
has been marked as deprecated as it is currently unsafeReferences
getKeyringsByType
method #1255Checklist