Skip to content

fix: expose missing methods in hardware keyrings wrappers#551

Merged
hmalik88 merged 8 commits into
mainfrom
hm/update-hardware-v2-wrappers
May 13, 2026
Merged

fix: expose missing methods in hardware keyrings wrappers#551
hmalik88 merged 8 commits into
mainfrom
hm/update-hardware-v2-wrappers

Conversation

@hmalik88

@hmalik88 hmalik88 commented May 13, 2026

Copy link
Copy Markdown
Contributor

There's some missing methods that are needed by the clients.


Note

Medium Risk
Moderate risk because it adds new public surface area and changes forgetDevice behavior to also clear the V2 account registry, which could affect client state/caching around device resets.

Overview
Exposes missing device-management APIs on the V2 wrapper keyrings so clients can manage paired hardware devices directly via the wrapper.

LedgerKeyring, QrKeyring, and TrezorKeyring (and thus OneKeyKeyring) now pass through getters/methods like hdPath, bridge, paging (getFirstPage/getNextPage/getPreviousPage), and device reset (forgetDevice), plus device-specific calls (e.g. Ledger get/setDeviceId, attemptMakeApp, getAppNameAndVersion, Trezor getModel, isUnlocked). forgetDevice also clears the V2 registry to keep wrapper accounts in sync with the inner keyring, and new unit tests/changelog entries cover these additions.

Reviewed by Cursor Bugbot for commit 56e782c. Bugbot is set up for automated code reviews on this repo. Configure here.

@hmalik88 hmalik88 marked this pull request as ready for review May 13, 2026 16:16
@hmalik88 hmalik88 requested a review from a team as a code owner May 13, 2026 16:16

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 61a7dea. Configure here.

Comment thread packages/keyring-eth-ledger-bridge/src/v2/ledger-keyring.ts
@hmalik88 hmalik88 added this pull request to the merge queue May 13, 2026
Merged via the queue into main with commit 13773c7 May 13, 2026
40 checks passed
@hmalik88 hmalik88 deleted the hm/update-hardware-v2-wrappers branch May 13, 2026 19:39
@hmalik88 hmalik88 mentioned this pull request May 13, 2026
aUsABuisnessman pushed a commit to aUsABuisnessman/accounts that referenced this pull request Jun 23, 2026
## Summary

Releases hardware-keyring V2 wrapper additions from MetaMask#551. Bumps the
monorepo version to `110.0.0`.

### Included

- `@metamask/eth-ledger-bridge-keyring`: `12.0.3` → `12.1.0`
- **Added**: Expose device-management pass-throughs on the V2
`LedgerKeyring` wrapper: `hdPath` (getter), `bridge` (getter),
`getDeviceId`, `setDeviceId`, `setHdPath`, `getFirstPage`,
`getNextPage`, `getPreviousPage`, `forgetDevice`, `isUnlocked`,
`attemptMakeApp`, `getAppNameAndVersion`. `forgetDevice` additionally
clears the V2 account registry to keep it in sync with the inner
keyring. ([MetaMask#551](MetaMask#551))

- `@metamask/eth-qr-keyring`: `2.0.2` → `2.1.0`
- **Added**: Expose device-management pass-throughs on the V2
`QrKeyring` wrapper: `getName`, `getMode`, `getFirstPage`,
`getNextPage`, `getPreviousPage`, `forgetDevice`. `forgetDevice`
additionally clears the V2 account registry to keep it in sync with the
inner keyring. ([MetaMask#551](MetaMask#551))
- **Changed**: Bump `@metamask/keyring-sdk` from `^2.0.2` to `^2.1.1`
([MetaMask#544](MetaMask#544),
[MetaMask#546](MetaMask#546))
- **Changed**: Bump `@metamask/keyring-utils` from `^3.2.0` to `^3.3.1`
([MetaMask#544](MetaMask#544),
[MetaMask#546](MetaMask#546))

- `@metamask/eth-trezor-keyring`: `10.0.2` → `10.1.0`
- **Added**: Expose device-management pass-throughs on the V2
`TrezorKeyring` wrapper (inherited by the V2 `OneKeyKeyring`):
`getModel`, `hdPath` (getter), `bridge` (getter), `setHdPath`,
`getFirstPage`, `getNextPage`, `getPreviousPage`, `forgetDevice`,
`isUnlocked`. `forgetDevice` additionally clears the V2 account registry
to keep it in sync with the inner keyring.
([MetaMask#551](MetaMask#551))
- **Changed**: Bump `@metamask/keyring-sdk` from `^2.0.2` to `^2.1.1`
([MetaMask#544](MetaMask#544),
[MetaMask#546](MetaMask#546))
- **Changed**: Bump `@metamask/keyring-utils` from `^3.2.0` to `^3.3.1`
([MetaMask#544](MetaMask#544),
[MetaMask#546](MetaMask#546))

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> This is a release bookkeeping change limited to version bumps and
changelog entries, with no functional code changes. Risk is low aside
from potential publishing/versioning coordination issues.
> 
> **Overview**
> Bumps the monorepo version to `110.0.0` and increments package
versions for `@metamask/eth-ledger-bridge-keyring` (`12.1.0`),
`@metamask/eth-qr-keyring` (`2.1.0`), and `@metamask/eth-trezor-keyring`
(`10.1.0`).
> 
> Updates the keyring changelogs to add the corresponding release
sections and adjust the *Unreleased* compare links for the new tags.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
d79577c. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants