feat(hw): add QR signing context and state management hook#29083
Conversation
Add QRSigningContext for QR hardware wallet signing state, useQRSigningState hook for managing QR scan request lifecycle, and export from index files.
|
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. |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
Key findings from investigation:
Why SmokeAccounts: The SmokeAccounts tag explicitly covers "adding QR-based hardware wallet accounts" - this is the feature area these new files are building toward. Running SmokeAccounts validates that the existing QR hardware wallet account flow still works correctly and that these new additions don't inadvertently break anything in the hardware wallet infrastructure. No performance impact: These are new, unused context/hook files with no rendering or data loading changes to existing components. Performance Test Selection: |
|
|
✅ E2E Fixture Validation — Schema is up to date |



Description
Adds:
QRSigningContextfor QR hardware wallet signing stateuseQRSigningStatehook for managing QR scan request lifecycleNote: This is currently dead code until
Changelog
CHANGELOG entry: null
Related issues
Related to: https://consensyssoftware.atlassian.net/browse/MUL-1741
Manual testing steps
This can only be tested via #29087
Screenshots/Recordings
Not applicable
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
Note
Low Risk
Low risk: adds new QR-signing context/hook and tests without modifying existing signing/connection flows; primary risk is incorrect cancellation/completion behavior once wired into navigation.
Overview
Adds a new
QRSigningContext(anduseQRSigning) to standardize access to pending QR keyring scan requests and related lifecycle actions.Introduces
useQRSigningState, which derives the current pending scan request from Redux, tracks per-request completion state, and providescancelQRScanRequestIfPresent()to reject an active SIGN request via the QR keyring scanner. Exports the new context/hook via the HardwareWalletcontexts/hooksindex files and adds unit tests for both the context guard and hook behavior.Reviewed by Cursor Bugbot for commit fbe188d. Bugbot is set up for automated code reviews on this repo. Configure here.