feat: add new hardware wallet signing qr code#29737
Conversation
|
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. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #29737 +/- ##
==========================================
+ Coverage 81.86% 81.98% +0.11%
==========================================
Files 5255 5296 +41
Lines 138980 140318 +1338
Branches 31518 31901 +383
==========================================
+ Hits 113774 115033 +1259
- Misses 17465 17479 +14
- Partials 7741 7806 +65 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
david0xd
left a comment
There was a problem hiding this comment.
Code looks good! I haven't tested due to limitations of the iOS simulator and incapabilities (slowness) of my Android device. Please find someone else to test it manually 🙏
The code is mainly dead code and will only be used in the subsequent pr Attached is a video of the signing Screen_Recording_20260506_195134_MetaMask.mp4 |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ 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 c210658. Configure here.
| import { | ||
| createQRHardwareScanError, | ||
| QRHardwareScanErrorType, | ||
| isQRHardwareScanError as actualIsQRHardwareScanError, |
There was a problem hiding this comment.
Unused import actualIsQRHardwareScanError in test file
Low Severity
isQRHardwareScanError as actualIsQRHardwareScanError is imported but never used anywhere in the test file. This is dead code that adds confusion — it may suggest a missing assertion or test that was intended but forgotten.
Reviewed by Cursor Bugbot for commit c210658. Configure here.
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
No performance-sensitive paths are affected - these are UI/UX and error handling improvements to the hardware wallet flow. No performance tests are warranted. The changes are medium risk: they modify existing behavior (QRWalletAdapter camera permission logic, error handling flow) and add new retry coordination logic that could affect the QR hardware wallet confirmation flow. However, the scope is limited to the HardwareWallet module with no impact on core wallet infrastructure. Performance Test Selection: |
|





Description
Wires the QR scan errors from PR 1 into pairing and signing flows. QR scan failures now surface through the hardware wallet bottom sheet with retry support, signing confirmations can reopen the scanner from the error CTA, and replacement transaction gas params are normalized through the shared helper.
This is PR 2 of 3 and is stacked on #29388.
Changelog
CHANGELOG entry: Improved retry behavior when QR hardware wallet signing scans fail
Related issues
Refs: MUL-1665
Manual testing steps
Screenshots/Recordings
Before
N/A
After
N/A
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
Made with Cursor
Note
Medium Risk
Moderate risk because it changes the hardware-wallet bottom-sheet recovery flow and retry behavior for QR signing, which could affect signing UX/state transitions. Adds new analytics properties for QR scan failures; incorrect classification could skew metrics but not funds.
Overview
Improves QR hardware wallet scan-failure recovery during pairing/signing. QR scan errors now route through the hardware wallet bottom sheet with a dedicated retry path that can reopen the QR scanner for signing retries, plus a provider-level
setQrScanRetryHandler/onRetryQrScanmechanism to coordinate retries outside provider-managed flows.Adds QR scan error-specific UI + analytics.
ErrorContenttreats QR scan errors specially (custom title, Try again + Learn more, no generic icon) and supportsOPEN_SETTINGSrecovery;useHardwareWalletAnalyticsnow attaches QR scan metadata (error_category,is_ur_format, optionalreceived_ur_type) to recovery viewed/CTA/success events.Includes supporting refactors and tests (QR adapter no longer emits
AppOpenedonensureDeviceReady, newisQRHardwareScanError,useQrScanErrorForwarding,useIsConfirmationFromQrAccount, anduseQrConfirm).Reviewed by Cursor Bugbot for commit 31443d4. Bugbot is set up for automated code reviews on this repo. Configure here.