Skip to content

Comments

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

Merged
montelaidev merged 24 commits intomainfrom
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 intomainfrom
feat/ledger-use-hardware-wallet-error

Conversation

@montelaidev
Copy link
Contributor

@montelaidev montelaidev commented Jan 25, 2026

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
Contributor Author

@metamaskbot publish-preview

@github-actions
Copy link

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"
}

@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
@montelaidev montelaidev enabled auto-merge February 2, 2026 12:29
Copy link

@cursor cursor bot left a comment

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.

@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