fix: show informative error for Ledger V3 typed data signing#31677
fix: show informative error for Ledger V3 typed data signing#31677dawnseeker8 wants to merge 1 commit into
Conversation
Ledger only supports V4 EIP-712 typed data. When a dApp requested a V3 (or V1) signature, the keyring threw "Ledger: Only version 4 of typed data signing is supported", which the error parser did not recognize and fell through to a generic "Something went wrong" message. Map this keyring error to a dedicated DeviceStateOnlyV4Supported code with an informative, localized message and an ACKNOWLEDGE recovery action (retry cannot succeed for an unsupported signature type). Fixes #29044 Co-authored-by: Cursor <cursoragent@cursor.com>
|
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. |
PR template — items to address before "Ready for review"Warnings — informational, address before merging:
See docs/readme/ready-for-review.md for the full Definition of Ready for Review. |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
SmokeAccounts is selected because it tests QR-based hardware wallet accounts (Ledger on mobile uses QR), including adding hardware wallet accounts and their interactions. SmokeConfirmations is selected because this error specifically occurs during EIP-712 typed data signing flows (V1/V3/V4), which are directly tested in SmokeConfirmations (personal_sign, EIP-712 typed data signing). The new error handling affects what users see when signing typed data with a Ledger device. The changes are purely additive (new error case, no existing behavior modified), making this low risk. No performance-sensitive code paths are affected. Performance Test Selection: |
Ledger only supports V4 EIP-712 typed data. When a dApp requested a V3 (or V1) signature, the keyring threw "Ledger: Only version 4 of typed data signing is supported", which the error parser did not recognize and fell through to a generic "Something went wrong" message.
Map this keyring error to a dedicated DeviceStateOnlyV4Supported code with an informative, localized message and an ACKNOWLEDGE recovery action (retry cannot succeed for an unsupported signature type).
Fixes #29044
Description
Changelog
CHANGELOG entry: Fixed an uninformative "Something went wrong" error shown when signing version 3 (V3) typed data with a Ledger device; the app now explains that Ledger only supports version 4 (V4) typed data signatures.
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist