Repository navigation
Allow Apple Wallet retries after canceling Download Wallet - #95
Conversation
Clear dismissed payment-pass controllers so canceling the Download Wallet prompt doesn't block later enrollment attempts. Preserve active requests, reject missing presenters, and guard delayed dismissal cleanup. Refs: Expensify/App#102403
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@mountiny I see this is tied to an E/App issue. Is it going to be reviewed internally / by C+, or do you want me to handle it? If mine is needed, @francoisl just ping me once it's out of draft. Two things I noticed at first glance:
|
|
Hi @JakubKorytko, yes I was going definitely going to tag you for a review. For now I was waiting for a retest via Expensify/App#103360, because I don't have a physical iPhone to test the entire flow of adding a card to a wallet. I can update the PR with your feedback, though if you feel like taking over, let me know - that's fine with me too. |
|
Oh I didn't mean I want to take over, just review, test, merge. You have much more context than I do about this change, so I think it's better for you to keep the PR. LMK if you feel different though |
Reject pending completions before replacing a stale enrollment controller. Ignore delegate callbacks and queued cleanup from superseded controllers, and clear consumed handlers before invoking them to preserve retries. Address review feedback for #95.
JakubKorytko
left a comment
There was a problem hiding this comment.
Tested on a physical iPhone 11 (iOS 18.7.8), staging, virtual Expensify Card, Wallet app removed:
- Without the fix (ad-hoc from Expensify/App#102774, wallet 0.1.22): Add to Apple Wallet -> "Download Wallet?" -> Cancel, then a second tap shows no prompt and the button spins forever.
- With the fix (ad-hoc from Expensify/App#103360, wallet at 12e1a68): the same steps three times in a row. The prompt comes back every time and the button never gets stuck.
- Wallet reinstalled (fix build): the Apple Pay sheet opens, Cancel works, and Next reaches the issuer step. Apple rejects the staging card as expected; retry inside the sheet works, and closing it shows the "Failed to add card" alert instead of hanging.
fda345f isn't in that build, but the code looks good to me. LGTM.
Details
Allow users to retry adding a card after canceling the Download Wallet prompt on iOS.
When iOS has already dismissed the payment-pass controller,
hideModal()leavesaddPassViewControllerset. The next attempt treats that stale controller as an active presentation and blocks the retry. In the App's pinned wallet version, that request never settles and the button keeps loading.This change:
Related Issues
For Expensify/App#102403
Based on Melvin's approved proposal.
Manual Tests
QA confirmed that the original issue is no longer reproducible in the
App ad-hoc test build.
QA confirmation and video.
Local verification completed:
git diff --checkpasses.No repository tests are added. The repo has no native test target; the temporary harness checks are local verification, not committed regression coverage. The simulator cannot verify the real Download Wallet or payment-card provisioning flow.
Linked PRs
App test PR: pending. It will temporarily pin
@expensify/react-native-walletto this PR's commit so we can build an ad-hoc IPA before merging the wallet fix. The App currently uses0.1.22; this branch is based on0.1.38, so the test build will also include the intervening library changes.After this fix is published, the App dependency-update PR will use the released version.