feat: add HardwarewalletProvider and HardwareWalletBottomSheet for HW lifecycle and error management#26520
Conversation
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
Since the new code is not yet integrated into the app, most E2E tests would not directly exercise this code. However, I'm selecting SmokeAccounts because:
The risk is medium because while the code is in a critical path ( Performance Test Selection: |
HardwarewalletProvider and HardwareWalletBottomSheet for HW lifecycle and error management
gantunesr
left a comment
There was a problem hiding this comment.
Looks good in general, just left some minor comments
Description
Part 4 of the hardware wallet connection & error management overhaul. This does not introduce user facing changes.
Will close:
Final implementation will look like this (Figma designs):

Reference feature branch: #25519
Changelog
CHANGELOG entry: null
Related issues
Fixes:
Manual testing steps
no manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Moderate risk because it adds new state-management and error/transport handling paths in hardware-wallet connection flows; behavior changes are largely encapsulated but could affect connection/retry UX and edge cases.
Overview
Introduces a new unified hardware wallet connection flow via
HardwareWalletProviderand a state-drivenHardwareWalletBottomSheet, covering scanning/device selection, connecting, awaiting app, awaiting confirmation, error, and success states.The provider now owns adapter lifecycle, device discovery, retry/last-operation tracking, and transport availability monitoring (surfacing transport-disabled errors when availability drops mid-flow), and wires internal actions into the bottom sheet.
Adds the bottom sheet content components (
ConnectingContent,DeviceSelectionContent,AwaitingAppContent,AwaitingConfirmationContent,ErrorContent,SuccessContent), comprehensive unit tests for the provider, sheet, and content behaviors, and newen.jsoni18n strings underhardware_wallet.Written by Cursor Bugbot for commit 69a47be. This will update automatically on new commits. Configure here.