-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Update @metamask/eth-ledger-bridge-keyring
#21149
Conversation
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
Waiting for #21145 |
Updated dependencies detected. Learn more about Socket for GitHub ↗︎
|
👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎ This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. |
58035d2
to
afb031b
Compare
Builds ready [afb031b]
Page Load Metrics (957 ± 405 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #21149 +/- ##
===========================================
- Coverage 68.59% 68.48% -0.11%
===========================================
Files 1046 1013 -33
Lines 41612 40582 -1030
Branches 11110 10846 -264
===========================================
- Hits 28542 27790 -752
+ Misses 13070 12792 -278
☔ View full report in Codecov by Sentry. |
I'll also need this one soon. So let me know when i cna review : ) |
Also MetaMask/eth-ledger-bridge-keyring#202 or preferred doing the updates separate? |
a5a1c22
to
37b7f33
Compare
## **Description** This PR updates the `@metamask/eth-trezor-keyring` version to latest (`^2.0.0`). This brings a major breaking change: the transport logic (the way Metamask connects to the device) has been split from the keyring logic (the interface supported by our KeyringController). Due to this, `@metamask/eth-trezor-keyring` ([and soon `@metamask/eth-ledger-bridge-keyring`](#21149)) needs a transport bridge to be passed on construction and successively initialized calling `Keyring.init()`. As this is a new behavior compared to the usual way we build keyrings, we have to use a different keyring builder factory, specific for this kind of "bridged keyring". That is, a keyring that needs a bridge class instance as a constructor option. The bridge initialization is, instead, done outside the keyring builder (as it is async) by `@metamask/eth-keyring-controller` after the keyring construction **Note** Test coverage for hardware wallets is insufficient: I did some manual smoke tests with my Trezor Model One (account unlock, send eth transaction sign), but this likely needs additional QA ## **Manual testing steps** - Connect a new Trezor hardware wallet - Signing transaction should work as before ## **Related issues** * Fixes #21143 ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Coding Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md). - [x] I've clearly explained: - [x] What problem this PR is solving. - [x] How this problem was solved. - [x] How reviewers can test my changes. - [x] I’ve indicated what issue this PR is linked to: Fixes #??? - [x] I’ve included tests if applicable. - [x] I’ve documented any added code. - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)). - [x] I’ve properly set the pull request status: - [x] In case it's not yet "ready for review", I've set it to "draft". - [x] In case it's "ready for review", I've changed it from "draft" to "non-draft". ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. --------- Co-authored-by: MetaMask Bot <[email protected]> Co-authored-by: Brad Decker <[email protected]>
@mikesposito could we update this to upgrade to 2.0.0 that was released recently? |
afb031b
to
beab905
Compare
@metamaskbot update-policies |
Policy update failed. You can review the logs or retry the policy update here |
That would be it yeah, now that it is released. |
@mikesposito This should be good to go after a rebase on |
5be2ffb
to
e3d5427
Compare
@metamaskbot update-policies |
Policies updated |
Builds ready [c671ed8]
Page Load Metrics (298 ± 205 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
Description
This PR updates the
@metamask/eth-ledger-bridge-keyring
version to latest (^1.0.0
).This brings a major breaking change: the transport logic (the way Metamask connects to the device) has been split from the keyring logic (the interface supported by our KeyringController).
Due to this,
@metamask/eth-ledger-bridge-keyring
needs a transport bridge to be passed on construction and successively initialized callingKeyring.init()
.As this is a new behavior compared to the usual way we build keyrings, we have to use a different keyring builder factory, specific for this kind of "bridged keyring". That is, a keyring that needs a bridge class instance as a constructor option.
The bridge initialization is, instead, done outside the keyring builder (as it is async).
Note
Test coverage for hardware wallets is insufficient: I did some manual smoke tests with my Ledger Nano X (account unlock, send eth transaction sign), but this likely needs additional QA
Related issues
@metamask/eth-ledger-bridge-keyring
#21144Manual testing steps
Screenshots/Recordings
Before
n/a
After
n/a
Pre-merge author checklist
Pre-merge reviewer checklist