feat: Clear stuck pending perps withdraws from app state cp-7.62.0#24449
feat: Clear stuck pending perps withdraws from app state cp-7.62.0#24449
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. |
f2d9a2a
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsThe changes are focused on Perps functionality:
The E2E tests in The Reset Account modal change is a minor addition that calls the new Perps method, but there are no E2E tests specifically for Reset Account functionality (the settings E2E tests don't cover this feature). Risk is medium because:
|
|



Description
This PR addresses multiple scenarios where Perps withdrawal requests could get stuck in a "pending" or "bridging" state, causing stuck loading indicators in the UI.
Problem
Solution
Changelog
CHANGELOG entry: Fixed stuck pending withdrawal indicators in Perps trading by clearing stale transaction requests on app upgrade and account switch
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/TAT-2365
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Fix stuck Perps transaction indicators and improve state hygiene
PerpsController.clearPendingTransactionRequests(and action type) to removepending/bridgingentries fromwithdrawalRequestsanddepositRequests, and resetwithdrawalProgress. Exposed viausePerpsFirstTimeUser(clearPendingTransactionRequests) and invoked fromResetAccountModalalongsideresetFirstTimeUserState.migration 112to automatically clear persisted PerpswithdrawalRequestswithpending/bridgingstatuses and resetwithdrawalProgress, preservingcompleted/failed. Comprehensive tests included.useWithdrawalRequestsnow filters by selected account withuseStableArray, clearsupdatedWithdrawalIdsRefon account switch, and logs only meaningful events (initialized/status-changed/completed) instead of verbose dumps. Updated tests accordingly.clearPendingTransactionRequests; updatesusePerpsFirstTimeUsertests to cover new method and undefined controller handling.Written by Cursor Bugbot for commit d14cb75. This will update automatically on new commits. Configure here.