-
-
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
Bump eth-keyring-controller version to @metamask/eth-keyring-controller v10 #1072
Conversation
069d401
to
67b8f76
Compare
const currentState = await keyringController.createNewVaultAndRestore( | ||
password, | ||
currentSeedWord.toString(), | ||
currentSeedWord, |
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.
currentSeedWord
is now exported as a Uint8Array
and createNewVaultAndRestore
can receive it in this form (or still as a string as well).
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.
Hmm, so this would be a breaking change then. Pretty sneaky, since there is no change on that line because the return type is implicit.
Do you know of any other examples of breaking changes? It would be great to have those listed in the PR description.
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.
Do you know of any other examples of breaking changes?
🤔 I'll poke around a bit more and see if I can find others!
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.
Reading through this I'm not detecting any other breaking changes. But good catch for sure. We will definitely want very thorough QA on both products before these KeyringController updates are pushed to prod.
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.
I guess this would also include any breaking changes to eth-hd-keyring
introduced in v5 and v6. Prior to this PR, v4 was used.
The keyring itself is part of the public API, since it's directly in the controller state.
const additionalKeyringBuilders = additionalKeyrings.map((keyringType) => | ||
keyringBuilderFactory(keyringType), | ||
); | ||
const baseConfig: Partial<KeyringConfig> = { | ||
encryptor: new MockEncryptor(), | ||
keyringTypes: additionalKeyrings, | ||
keyringBuilders: additionalKeyringBuilders, |
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.
Relevant changelog entry in @metamask/eth-keyring-controller
: https://github.com/MetaMask/KeyringController/blame/main/CHANGELOG.md#L22
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!
…er v10 (#1072) Fixes: #774 (not an initial target of this work) Pulls in latest version - v10.0.0 - of `eth-keyring-controller` (now `@metamask/eth-keyring-controller`) and adapts according. **BREAKING:** `exportSeedPhrase` now returns a `Uint8Array` typed SRP (can be converted to a string using [this approach](https://github.com/MetaMask/eth-hd-keyring/blob/main/index.js#L40)). It was previously a Buffer.
…er v10 (#1072) Fixes: #774 (not an initial target of this work) Pulls in latest version - v10.0.0 - of `eth-keyring-controller` (now `@metamask/eth-keyring-controller`) and adapts according. **BREAKING:** `exportSeedPhrase` now returns a `Uint8Array` typed SRP (can be converted to a string using [this approach](https://github.com/MetaMask/eth-hd-keyring/blob/main/index.js#L40)). It was previously a Buffer.
…er v10 (#1072) Fixes: #774 (not an initial target of this work) Pulls in latest version - v10.0.0 - of `eth-keyring-controller` (now `@metamask/eth-keyring-controller`) and adapts according. **BREAKING:** `exportSeedPhrase` now returns a `Uint8Array` typed SRP (can be converted to a string using [this approach](https://github.com/MetaMask/eth-hd-keyring/blob/main/index.js#L40)). It was previously a Buffer.
Fixes: #774 (not an initial target of this work)
Pulls in latest version - v10.0.0 - of
eth-keyring-controller
(now@metamask/eth-keyring-controller
) and adapts according.BREAKING:
exportSeedPhrase
now returns aUint8Array
typed SRP (can be converted to a string using this approach). It was previously a Buffer.