refactor: migrate all Ledger paths to useHardwareWallet#26970
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. |
cortisiko
left a comment
There was a problem hiding this comment.
signing off from a QA perspective 🌮 🌮
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.
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: Key changes and their impact:
Why these tags:
No Ledger-specific E2E tests exist (hardware requires physical device), but the changes affect the general confirmation infrastructure that all E2E tests exercise. Performance Test Selection: |
|
|
✅ E2E Fixture Validation — Schema is up to date |
tommasini
left a comment
There was a problem hiding this comment.
We need to review the fact that the providers are not wrapped by the error boundary




Description
This PR enables redesigned HW wallet flows for Ledger.
Changelog
CHANGELOG entry: null
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
dapp-flow.mov
Ledger-select-account.mov
send-flow.mov
swap-flow.mov
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Moderate risk because it rewires Ledger signing/connection flows and modal dismissal logic to the new hardware-wallet provider, which can affect transaction/message approval UX and error handling across navigation paths.
Overview
Migrates Ledger confirmation and signing modals to the unified
useHardwareWalletflow:LedgerConfirmationModalnow runs a one-shotensureDeviceReady+showAwaitingConfirmationsigning sequence (with optionaloperationType) and renders no local step UI.Updates
LedgerMessageSignModalandLedgerTransactionModalto removeReusableModalusage, close via navigationgoBackwith double-navigation guards, and (for transactions) explicitly reject pending approvals on user rejection.Refactors
LedgerSelectAccountto initialize viauseHardwareWallet(setTargetWalletType,ensureDeviceReady), replace the oldLedgerConnect/Bluetooth hook path with a loading state + direct account fetch/pagination/unlock calls, and adjusts analytics/model-name derivation accordingly; adds/updates unit tests and removes obsolete step components, styles, and snapshots.Wraps the app
RootinHardwareWalletProviderso the bottom-sheet driven hardware wallet UX is available globally.Written by Cursor Bugbot for commit d126e19. This will update automatically on new commits. Configure here.