You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: Add delay in checkPermissions for iOS to prevent UI crash (#14602)
## **Description**
This PR addresses a UI crash on iOS in `AccountConnect.tsx` caused by a
race condition in `permissionsController.getPermissions()`.
- Added `await wait(100)` in `checkPermissions` for iOS to resolve the
race condition.
#### Debugging Notes
This issue was tricky to debug as it occurred more frequently in live
DEV environments. Eventually, I tracked it down by launching the app via
Xcode instead of the regular React Native CLI, which provided access to
all native logs and revealed the race condition.
## **Related issues**
Fixes:
## **Manual testing steps**
- Verified on iOS: UI crash no longer occurs.
- Confirmed no impact on Android.
## **Screenshots/Recordings**
<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->
### **Before**

### **After**
- normal connection flow
## **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**
- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] 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.
0 commit comments