-
-
Notifications
You must be signed in to change notification settings - Fork 178
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 addNewAccountWithoutUpdate method #288
Conversation
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!
6e7432f
to
a83f725
Compare
a83f725
to
91b5b07
Compare
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 approach would certainly work, but it is a departure from how the rest of the methods in this controller are designed. In the rest of the methods, all of the required "side-effects" of the action are handled as part of the same function. This controller was a port of various functions in the extension that are directly in metamask-controller.js
that interact with the underlying eth-keyring-controller
library that both projects use.
So to stay in line with existing patterns, the natural place to find and add new accounts would be during createVaultAndRestore
, which is where it's done in the extension. So instead of adding this new method, you'd move this detect-and-add-accounts logic from MetaMask/metamask-mobile#1879 into this controller instead.
I don't feel strongly either way about this so I won't block on it, but because this was how it was done before I thought it should be considered.
I see that Maybe there should be two methods - This might be a good idea for the extension as well 🤔 |
This adds a new method for adding accounts without updating identities in the preferences controller
this is currently being used in MetaMask/metamask-mobile#1879