Skip to content

feat: use hw wallet error for ledger keyring and add getAppNameAndVersion and getAppConfiguration#446

Merged
montelaidev merged 24 commits into
mainfrom
feat/ledger-use-hardware-wallet-error
Feb 5, 2026
Merged

feat: use hw wallet error for ledger keyring and add getAppNameAndVersion and getAppConfiguration#446
montelaidev merged 24 commits into
mainfrom
feat/ledger-use-hardware-wallet-error

Conversation

@montelaidev

@montelaidev montelaidev commented Jan 25, 2026

Copy link
Copy Markdown
Contributor

This PR add a new method getAppNameAndVersion and getAppConfiguration to the ledger keyring and uses the hardware wallet errors.

Examples


Note

Medium Risk
Touches Ledger signing error handling and public error shapes/messages, which can affect downstream consumers’ error parsing and UX; adds new bridge commands that depend on correct iframe/mobile transport support.

Overview
Switches @metamask/eth-ledger-bridge-keyring from its custom LedgerStatusError flow to standardized @metamask/hw-wallet-sdk error mapping, introducing createLedgerError/handleLedgerTransportError that consistently throws HardwareWalletError (with selective Ledger: message prefixing for compatibility) and updating tests/messages accordingly.

Extends the Ledger bridge/keyring surface area with getAppNameAndVersion() and getAppConfiguration() across iframe and mobile bridges (new iframe message actions included), and wires workspace dependency/build references so the keyring consumes the shared SDK types/mappings (including exporting the new ErrorMapping type from the SDK).

Written by Cursor Bugbot for commit 61d895d. This will update automatically on new commits. Configure here.

@montelaidev montelaidev requested a review from a team as a code owner January 25, 2026 08:53
@montelaidev

Copy link
Copy Markdown
Contributor Author

@metamaskbot publish-preview

@github-actions

Copy link
Copy Markdown

Preview builds have been published. See these instructions (from the core monorepo) for more information about preview builds.

Expand for full list of packages and versions.
{
  "@metamask-previews/account-api": "0.12.0-412b185",
  "@metamask-previews/hw-wallet-sdk": "0.2.0-412b185",
  "@metamask-previews/keyring-api": "21.3.0-412b185",
  "@metamask-previews/eth-hd-keyring": "13.0.0-412b185",
  "@metamask-previews/eth-ledger-bridge-keyring": "11.1.2-412b185",
  "@metamask-previews/eth-qr-keyring": "1.1.0-412b185",
  "@metamask-previews/eth-simple-keyring": "11.0.0-412b185",
  "@metamask-previews/eth-trezor-keyring": "9.0.0-412b185",
  "@metamask-previews/keyring-internal-api": "9.1.1-412b185",
  "@metamask-previews/keyring-internal-snap-client": "8.0.1-412b185",
  "@metamask-previews/eth-snap-keyring": "18.0.2-412b185",
  "@metamask-previews/keyring-snap-client": "8.1.1-412b185",
  "@metamask-previews/keyring-snap-sdk": "7.1.1-412b185",
  "@metamask-previews/keyring-utils": "3.1.0-412b185"
}

Comment thread packages/keyring-eth-ledger-bridge/src/index.ts
Comment thread packages/keyring-eth-ledger-bridge/src/ledger-bridge.ts Outdated
Comment thread packages/keyring-eth-ledger-bridge/src/ledger-iframe-bridge.test.ts
@montelaidev montelaidev changed the title feat: use hw wallet error for ledger keyring and add GetAppNameAndVersion feat: use hw wallet error for ledger keyring and add getAppNameAndVersion and getAppConfiguration Feb 2, 2026
Comment thread packages/keyring-eth-ledger-bridge/src/ledger-keyring.ts
Comment thread packages/keyring-eth-ledger-bridge/src/ledger-bridge.ts
Comment thread packages/keyring-eth-ledger-bridge/src/errors.ts Outdated
@montelaidev montelaidev enabled auto-merge February 2, 2026 12:29
Comment thread packages/keyring-eth-ledger-bridge/src/errors.ts Outdated
Comment thread packages/keyring-eth-ledger-bridge/src/index.ts Outdated
Comment thread packages/keyring-eth-ledger-bridge/src/ledger-mobile-bridge.ts
Comment thread packages/keyring-eth-ledger-bridge/CHANGELOG.md Outdated
Comment thread packages/keyring-eth-ledger-bridge/src/ledger-error-handler.test.ts Outdated
Comment thread packages/keyring-eth-ledger-bridge/CHANGELOG.md Outdated

@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.

Comment thread packages/keyring-eth-ledger-bridge/CHANGELOG.md Outdated
@montelaidev montelaidev added this pull request to the merge queue Feb 5, 2026
Merged via the queue into main with commit 0b3f823 Feb 5, 2026
37 checks passed
@montelaidev montelaidev deleted the feat/ledger-use-hardware-wallet-error branch February 5, 2026 14:25
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.

4 participants