feat: use hw wallet error for ledger keyring and add getAppNameAndVersion and getAppConfiguration#446
Merged
montelaidev merged 24 commits intomainfrom Feb 5, 2026
Merged
Conversation
Contributor
Author
|
@metamaskbot publish-preview |
|
Preview builds have been published. See these instructions (from the Expand for full list of packages and versions. |
drfernandogomesreal-cpu
approved these changes
Jan 31, 2026
mathieuartu
reviewed
Feb 2, 2026
gantunesr
reviewed
Feb 2, 2026
gantunesr
reviewed
Feb 2, 2026
gantunesr
reviewed
Feb 4, 2026
mathieuartu
reviewed
Feb 5, 2026
packages/keyring-eth-ledger-bridge/src/ledger-error-handler.test.ts
Outdated
Show resolved
Hide resolved
mathieuartu
reviewed
Feb 5, 2026
mathieuartu
approved these changes
Feb 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR add a new method
getAppNameAndVersionandgetAppConfigurationto 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-keyringfrom its customLedgerStatusErrorflow to standardized@metamask/hw-wallet-sdkerror mapping, introducingcreateLedgerError/handleLedgerTransportErrorthat consistently throwsHardwareWalletError(with selectiveLedger:message prefixing for compatibility) and updating tests/messages accordingly.Extends the Ledger bridge/keyring surface area with
getAppNameAndVersion()andgetAppConfiguration()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 newErrorMappingtype from the SDK).Written by Cursor Bugbot for commit 61d895d. This will update automatically on new commits. Configure here.