fix(bridge): restore hardware wallet post-trade modal after swap - #33865
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. |
🧪 Flaky unit test detectionRun history flaky detectionHistorical failure rate is a hint, not proof — review each suggestion in context. See the flaky-test-detection skill for the full pattern reference and manual audit workflow. Failures / runs sampled per window:
AI-detected flaky patterns
|
Hardware Bridge swaps stopped opening the post-trade modal after the software graduation path landed. Carry modal token context through HW submission, wait for settlement (and QR return transition), then open post-trade while keeping Send QR scanner-owned completion.
The prior commit routed Bridge Done through completeSignedFlow, which no-oped while submission was pending and left a dead button. Restore the original Activity navigation and keep Bridge Done coverage on the default renderer.
Use AppStackNavigationProp so transitionEnd is a valid event, and type the test listener mock so mock.calls indexing is not never[].
ed630eb to
ec3c8b0
Compare
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 ec3c8b0. Configure here.
Run the all-signed remount path before the Waiting-only submit gate so Submitted remounts still fall back to legacy completion instead of hanging.
…ing" This reverts commit fdb6b11.
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
Tag Rationale:
Not selected:
Performance Test Selection: |
|




Description
Hardware Bridge swaps stopped opening the post-trade modal after the software graduation path landed in #31688. HW completion kept navigating to Activity with a toast instead of the modal.
This restores HW Bridge post-trade by:
submissionParamsid/hash) and waiting for it before opening the modalcompleteOnScan) and Send toast + Activity behaviortransitionEndto avoid Android view-insert racesChangelog
CHANGELOG entry: Fixed hardware wallet Bridge swaps not opening the post-trade modal after completion
Related issues
Refs: SWAPS-4831
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
Note
Medium Risk
Changes navigation, timing, and completion paths across Bridge vs Send HW flows; QR transition gating and remount fallbacks need careful regression on Android and Ledger/QR devices.
Overview
Hardware Bridge swaps again open the post-trade modal instead of only toast + Activity after HW signing completes.
useBridgeConfirmnow passespostTradeModalParams(amounts and tokens) on HWsubmissionParams. The HW lifecycle waits forsubmitBridgeTxsettlement (submittedTransaction), suppresses duplicate post-trade notifications during submit, and registers a notification surface while the HW Bridge screen is focused. On success it resets bridge state, navigates to Bridge view, then opensPOST_TRADE_MODALwith transaction id/hash—matching the software path.QR Bridge no longer finishes on the last scan in
HwQrScanner; it **goBack()**s so completion runs on the progress screen. Modal navigation waits for the scanner returntransitionEndto avoid Android view-insert races. Send QR keeps scanner-owned completion via optionalcompleteOnScan.Remount with already-signed steps and no local submit metadata still falls back to legacy toast + Activity and does not resubmit.
Reviewed by Cursor Bugbot for commit 8712054. Bugbot is set up for automated code reviews on this repo. Configure here.