core
core copied to clipboard
fix: hd keyring logic in addNewAccountForKeyring
Explanation
This PR fixes the bug 4157 that also exists for addNewAccountForKeyring
References
Related to #4157
@metamask/keyring-controller
-
FIXED: Hd keyring add account logic in
addNewAccountForKeyring
Checklist
- [x] I've updated the test suite for new or updated code as appropriate
- [ ] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
- [ ] I've highlighted breaking changes using the "BREAKING" category above as appropriate
Unrelated to this PR: I think that this method will probably need more refactoring or to be removed completely, since the current behaviour does not make much sense
We allow consumers to pass in a keyring instance, but we don't know if the instance even belongs to KeyringController. Perhaps with the introduction of #4197 we'll simply be able to remove the method and let the client call the keyring function directly 🤔