Commit 75f4426
authored
fix: cp-7.51.0 remove InteractionManager blocking account selection callbacks in certain flows (#17002)
## **Description**
### Problem
The account picker was failing to select accounts in certain UI flows
due to `InteractionManager.runAfterInteractions()` blocking critical
selection callbacks. When the UI was busy with animations or
interactions, the callback queue would be deferred indefinitely, leaving
users unable to switch accounts.
### Root Cause
The issue only occurred when `AccountSelector` was rendered inline
within active screens (such as `BuildQuote` or `SwapsAmountView`) rather
than as a modal (like the `NavBar`). In complex UI contexts with ongoing
animations (keypad interactions, focus effects, loading states, etc),
the interaction queue never clears, causing `runAfterInteractions()`
callbacks to wait indefinitely.
Works: `Navbar` → Modal `AccountSelector` (interaction queue clears on
navigation)
Broken: `BuildQuote`, `SwapsAmountView` inline `AccountSelector`
(perpetual interaction queue from parent animations, not sure the EXACT
animations causing the blockage)
### Solution
Removed the `InteractionManager` wrapper around the account selection
logic in `EvmAccountSelectorList`
### Impact
- Account selection now works reliably across all UI states
- Maintains existing functionality while fixing the blocking behavior
- The `InteractionManager` was originally added for performance
optimization unintentionally blocked user experience
## **Changelog**
`CHANGELOG entry: null`
## **Related issues**
Fixes: #16942
## **Manual testing steps**
1. Go to this Swaps or Deposit screens
2. Constantly switch accounts and observe that account selection is no
longer blocked
3. The app MAY crash when quickly switching account but that is due to
another issue logged
[here](#16995)
## **Screenshots/Recordings**
https://github.com/user-attachments/assets/ade8ddd9-62bd-42f0-9f63-797689416655
### **Before**
NA
### **After**
NA
## **Pre-merge author checklist**
- [x] I’ve followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I’ve included tests if applicable
- [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
## **Pre-merge reviewer checklist**
- [x] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [x] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.1 parent eb680d3 commit 75f4426
1 file changed
+14
-16
lines changedLines changed: 14 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
117 | 115 | | |
118 | 116 | | |
119 | 117 | | |
| |||
0 commit comments