fix: predict claim back dismissal cleanup#30474
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. |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: Changes analyzed:
Tag dependency chain:
Not selected: SmokeStake (staking-claim/withdrawal/deposit already had useClearConfirmationOnBackSwipe — no change there), SmokeSwap (no swap-specific changes), SmokeAccounts/SmokeIdentity/SmokeNetworkAbstractions/SmokeNetworkExpansion/SmokeMultiChainAPI/SmokeBrowser/SmokeSnaps/SmokeSeedlessOnboarding/SmokePerps (no relevant changes). Performance Test Selection: |
|



Summary
This PR prevents Predict claim confirmations from being stranded when the user dismisses the full-screen confirmation with a back gesture instead of the close button.
The Predict claim screen now opts into the existing full-screen confirmation back-swipe cleanup hook, so gesture and Android hardware-back dismissals reject the active confirmation instead of only removing the route. The shared confirmation loader also disables gestures and consumes Android back presses while there is no approval request yet, so users cannot leave the loading screen before there is a request that can be rejected.
Root Cause
Predict claim used a custom close button that called the normal reject path, but the screen did not install the existing back-swipe cleanup hook used by other full-screen confirmations. A route-level back dismissal could therefore remove the confirmation UI while leaving the approval and unapproved transaction in controller state. In the real claim flow, that can leave the Predict pending claim entry active, causing later claim attempts to be treated as already in progress.
Original ticket: https://consensyssoftware.atlassian.net/browse/CONF-1375
Note
Medium Risk
Changes navigation gesture/back-button handling in the confirmations flow, which could affect user ability to exit confirmations if conditions are wrong. Main behavioral change is gated to the pre-
approvalRequestloading state and full-screen Predict claim dismissals, with added tests to reduce regressions.Overview
Prevents users from dismissing the
Confirmloading state before anapprovalRequestexists by disabling navigation gestures and consuming Android hardware back presses until there’s something to reject.Updates the Predict claim confirmation info screen to opt into the shared
useClearConfirmationOnBackSwipecleanup so back-swipe/hardware-back dismissals trigger the normal reject path, and adds focused unit tests for both behaviors. Also updates fixture validation ignore lists to excludeengine.backgroundState.MoneyAccountController.moneyAccountsfrom schema comparisons.Reviewed by Cursor Bugbot for commit 86388d2. Bugbot is set up for automated code reviews on this repo. Configure here.