Conversation
…d and closed, which could leave confirmation flows in a blocked state with unrejected pending approvals
|
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. |
2ff9b53 to
a8dacac
Compare
…after-switching-payment-tokens-quickly-on-custom-convert-screen
…after-switching-payment-tokens-quickly-on-custom-convert-screen
…after-switching-payment-tokens-quickly-on-custom-convert-screen
8964038
536eb51 to
8964038
Compare
…after-switching-payment-tokens-quickly-on-custom-convert-screen
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: Potential risks include:
Because BottomSheet is a shared foundational UI component, the blast radius is high and spans nearly all major wallet flows. To safely validate navigation and dismissal behavior across critical user journeys, a broad E2E sweep is required. All dependent tag requirements have been respected:
Performance Test Selection: |
|
✅ E2E Fixture Validation — Schema is up to date |
|



Description
Fixes a bug where rapidly tapping UI elements that open a BottomSheet (e.g. PayWithRow → PayWithModal) could cause an extra
navigation.goBack()to fire after the BottomSheet's screen was already popped. For the mUSD conversion flow, this caused theonRejectto not be called leaving stale pending approvals and incorrectly disabling the Quick Convert view.Adds a
navigation.isFocused()guard beforegoBack()inBottomSheet.onCloseCBso that stale close callbacks from Reanimated animations become no-ops when the screen is no longer active.Changes
BottomSheet.tsx: Guardnavigation.goBack()withnavigation.isFocused()check inonCloseCBChangelog
CHANGELOG entry: fixed BottomSheet dismissing the wrong screen when rapidly opened and closed, which could leave mUSD conversion confirmation flows in a blocked state with unrejected pending approvals
Related issues
Fixes: MUSD-400: Quick convert buttons disabled after switching payment tokens quickly on custom convert screen
Manual testing steps
Screenshots/Recordings
Before
Convert.buttons.freeze.1.mp4
After
Screen_Recording_20260304_170111_MetaMask.mp4
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Touches shared
BottomSheetclose/back-handling behavior, so regressions could affect navigation dismissal across many screens, though the change is a narrowisFocused()guard.Overview
Prevents rapid open/close interactions from popping the wrong screen by guarding
BottomSheet'sonCloseand Android hardware back handling withnavigation.isFocused()before attempting dismissal.Updates a broad set of Jest navigation mocks/snapshots to include
isFocused()so tests align with the newBottomSheetnavigation dependency.Written by Cursor Bugbot for commit 583f2a0. This will update automatically on new commits. Configure here.