Repository navigation
Add the Wallet entry points for the pending digital wallet approval - #101282
Conversation
|
Hey, I noticed you changed If you want to automatically generate translations for other locales, an Expensify employee will have to:
Alternatively, if you are an external contributor, you can run the translation script locally with your own OpenAI API key. To learn more, try running: npx bun ./scripts/generateTranslations.ts --helpTypically, you'd want to translate only what you changed by running |
|
@aimane-chnaif Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 77ffd9b1c1
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
I will test 👍 |
|
🚧 joekaufmanexpensify has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
|
🤖 Code review. The feature logic reads well and the helper extraction into 1. This adds a new
|
| Surface | State filter |
|---|---|
LHN / Wallet menu green dot — hasCardPendingDigitalWalletApproval |
isActiveExpensifyCard |
Home task — useTimeSensitiveCards |
isActiveExpensifyCard |
Wallet page row — PaymentMethodList.tsx:464,520 |
list pre-filter only (ACTIVE_STATES and not expired) |
Card details row — ExpensifyCardPage/index.tsx:150 |
none |
Concretely: a card that gets closed or terminated while an approval is pending keeps the pendingDigitalWalletApproval NVP, so the card details page shows a Review CTA with no green dot and no Home task backing it. Conversely an expired-but-active-state card gets the dot and the Home task but no Wallet page row. Adding isActiveExpensifyCard(card) && to the ExpensifyCardPage find (and ideally a shared getCardPendingDigitalWalletApproval(cards) that all four call) makes the four agree.
3. Header back and dismiss diverge when there is no backTo
goBackToEntryPoint falls back to SETTINGS_WALLET_DOMAIN_CARD.getRoute(cardID), but your own test asserts that with no backTo the background page is the Wallet root, and DOMAIN_CARD is itself an RHP screen over that root. So on a refresh or a cold link, the header back button pushes the card details RHP, while Escape / overlay click / swipe-back / Android back dismiss to the Wallet page. Worth deciding which one is right — a dynamic route (item 1) makes both paths agree for free.
Nits
- Naming collision.
isActiveExpensifyCard(CardUtils.ts:1733) meansACTIVE_STATES.includes(state), butisActiveCardin the same file (CardUtils.ts:1275) means "not closed/deactivated, suspended only if frozen" — a strictly wider set. Same forhasActiveExpensifyCardSelectorsitting next tohasIssuedExpensifyCardSelector, which uses the other definition. Something likeisExpensifyCardInActiveStatewould stop the next reader picking the wrong one. - Dead field.
digitalWalletProvideris assigned unconditionally at PaymentMethodList.tsx:521 even whendigitalWalletApprovalCardIDisundefined. Harmless, but the grouped branch just above sets the pair together — worth matching. - Untested.
navigateToAddCardToDigitalWalletis the most fragile new logic (it decides the entry point by string-comparing the active route), and it has no test. The navigation tests cover the URL, not this. - No throttle on the focus read.
useRefreshPendingDigitalWalletApprovalnow firesGetExpensifyCardPendingWalletApprovalfrom three screens, so a Wallet → card details → Wallet round trip is three reads.RAM_ONLY_IS_CHECKING_PENDING_WALLET_APPROVALalready tracks in-flight state and could gate it. - Duplicate copy key.
addCardToDigitalWallet.reviewduplicatescommon.review, which already returns'Review'when called with no amount. Not a regression (you moved the old…confirmDigitalWalletAddition.cta), just one fewer string to translate.
Everything else looks right to me: all 11 locales updated consistently, typographic quotes preserved byte-for-byte on the moved strings, no stale references to the removed homePage.timeSensitiveSection.confirmDigitalWalletAddition.* keys, and the new CardUtils unit tests cover the interesting branches including the closed-card case.
|
🤖 Code quality pass. Separate from my earlier review — I'm not repeating the 1. The new row duplicates one that already exists 20 lines above it, and renders in a different colour
Your version is the better one — it reuses One thing blocks that today, and it's worth fixing either way: 2.
|
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppios.moviOS: mWeb SafariMacOS: Chrome / Safariweb.movupdated: web.mov |
|
🤖 Regression hunt on 1. The already-shipped
|
| Step | Status |
|---|---|
| ✅ | |
| ✅ | |
| ✅ | |
No JavaScript console errors across Home, Settings, and Settings > WalletPartial check only — the web harness has no console-capture API. Used the network log as a proxy: every request across all three surfaces returned 200. |
The precondition for the feature itself — an account with a pending-approval Expensify Card — isn't something I can produce, so items 1 and 4 above are from reading the code, not from reproducing them.
The digital wallet approval row and the connection-status message in the Wallet list differ in many ways.Context: the Wallet page's assigned-cards list is the only list that shows cards, and it always passes Structural
Visual
Rendering differences
The hover highlight doesn't cover the Review row:
Vertical spacing:
Gap between dot and text:
Screen.Recording.2026-09-17.at.9.28.55.AM.movSince this is already pre-existing, we can consider this out of scope. Follow-up if needed. |
|
Central pane is inconsistent between
Screen.Recording.2026-09-17.at.10.05.46.AM.movScreen.Recording.2026-09-17.at.10.06.43.AM.mov |
aimane-chnaif
left a comment
There was a problem hiding this comment.
There are inconsistency issues above. (not sure blocker or not)
Otherwise looks good.
|
I'm going to hold off from testing on adhoc until the above issues are resolved. Please ping me once this is ready @dukenv0307 |
|
@Expensify/design any feedback on this PR? I feel like this error message is not exactly as we would want it to look like #101282 (comment) |
I agree, but I'm not sure which one we should show? Does it make sense to only show the error on the Confirm your request screen so we don't double up dots on the main screen? |
| hasAssignedCardMatching(cardsList, (card) => card.bank === CONST.EXPENSIFY_CARD.BANK && isActiveCard(card)); | ||
|
|
||
| /** Reduces the card list to a boolean so consumers don't re-render on unrelated card changes. */ | ||
| const hasActiveExpensifyCardSelector = (cardList: OnyxEntry<CardList>): boolean => hasActiveExpensifyCard(cardList ?? undefined); |
There was a problem hiding this comment.
Can you add unit test for this selector?
|
Nice, going to test today! |
|
Tested and working pretty well. Only issue is when I approve I'm seeing an error on the wallet page. It doesn't block the apple pay approval, the card was successfully added. But is confusing from UX perspective. Here are logs. Codex thinks we are incorrectly sending a duplicate request, and the rejection of it after the first one's approved is resulting in the error.
|
|
@MelvinBot Investigate #101282 (comment) |
Root causeTwo The screenshot proves the source: the first red line is There are two separate bugs here, and both need fixing. 1. Nothing stops a second sendThe only re-entry guard is Worse, 2. A late failure is guaranteed to leak to the Wallet pageEven one stray error lands where you can't dismiss it in context:
Recommended fix
Evidence, what I could not verify, and two related things I noticedNot verified: I could not query VictoriaLogs in this run, so I have no production confirmation of the exact trigger for the duplicate. What is confirmed from code is that (a) the error can only come from a failed Ruled out: I checked whether the new Also worth fixing while you're here:
I did not run the flow — reproducing it needs an account with a pending-approval Expensify Card, which the test account doesn't have. This is a static analysis. Next Steps: Reply with |
|
I could not review this diff, so I did not approve the workflow runs. An Expensify employee will review it and approve them manually. |
|
@joekaufmanexpensify I fixed, could you please test it 1 more time 🙏 ? |
|
🚧 mountiny has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
|
Ran into an issue trying to setup testing, discussing here |
joekaufmanexpensify
left a comment
There was a problem hiding this comment.
I tried again, and I was able to successfully retest. Working well, all good from my perspective. 👍
|
@mountiny All yours |
|
🚧 mountiny has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.4.93-0 🚀
|
|
Yes — help site changes are required, and the draft PR is up: Docs updates for E/A#101282 Wallet entry points for digital wallet approval.
What I changedOne file:
How I mapped the code to the docs, and what I verifiedThe entry points this PR added. All three render the same component:
Copy. Every bolded string in the article is verbatim from I also documented the Digital wallet fallback: Live UI. Verified on dev NewDot web that the Account tab opens the settings menu, the item is labeled Wallet, and the card list sits under the Cards section heading. I could not reproduce the approval state itself — it needs a card whose tokenization was routed for extra authentication — so the approval-specific strings come from Prior art. [No QA] Docs updates for E/A#99044 Approving Expensify Card additions to digital wallets documented the Home entry point from Part 1. Not changed. The Classic and NewDot @dukenv0307, please review the linked help site PR and confirm it reflects the current behavior. Then mark the linked help site PR |
|
Just tested, working well on staging 👍 |
|
🚀 Deployed to production by https://github.com/lakchote in version: 9.4.93-3 🚀
Bundle Size Analysis (Sentry): |











Explanation of Change
Add the Wallet entry points for the pending digital wallet approval
Fixed Issues
$ #98617
PROPOSAL:
Tests
Precondition: have an account with a pending-approval Expensify card
Offline tests
Same as above
QA Steps
Same as above
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)Avatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2026-09-15.at.17.16.49.mov
Screen.Recording.2026-09-15.at.17.17.33.mov
Screen.Recording.2026-09-15.at.17.21.44.mov