Skip to content

[Payment due @gijoe0295] Update Add to Apple Wallet (IOS only) - #100404

Merged
AndrewGable merged 16 commits into
Expensify:mainfrom
hungvu193:feat-678322
Sep 21, 2026
Merged

AndrewGable merged 16 commits into
Expensify:mainfrom
hungvu193:feat-678322

Conversation

@hungvu193

Copy link
Copy Markdown
Contributor

Explanation of Change

Update Add to Wallet button and a screen to show the confirmation page once the Apple Wallet is added.

Fixed Issues

$ https://github.com/Expensify/Expensify/issues/678322
PROPOSAL: N/A

Tests

  1. You have a virtual card.
  2. Click on your card.
  3. Verify that Add to apple wallet button is placed correctly.
  4. Click on that > Verify that if you add sucessfully confirmation page will display correctly.
  • Verify that no errors appear in the JS console

Offline tests

N/A

QA Steps

// TODO: These must be filled out, or the issue title must include "[No QA]."

  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

iOS: Native
Screen.Recording.2026-09-04.at.21.02.17.mov

@hungvu193
hungvu193 requested review from a team as code owners September 4, 2026 14:06
@melvin-bot

melvin-bot Bot commented Sep 4, 2026

Copy link
Copy Markdown

Hey, I noticed you changed src/languages/en.ts in a PR from a fork. For security reasons, translations are not generated automatically for PRs from forks.

If you want to automatically generate translations for other locales, an Expensify employee will have to:

  1. Look at the code and make sure there are no malicious changes.
  2. Run the Generate static translations GitHub workflow. If you have write access and the K2 extension, you can simply click: [this button]

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 --help

Typically, you'd want to translate only what you changed by running npx bun ./scripts/generateTranslations.ts --compare-ref main

@melvin-bot
melvin-bot Bot requested a review from gijoe0295 September 4, 2026 14:06
@melvin-bot

melvin-bot Bot commented Sep 4, 2026

Copy link
Copy Markdown

@gijoe0295 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]

@melvin-bot
melvin-bot Bot requested review from dylanexpensify and removed request for a team September 4, 2026 14:06
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

⚠️ This PR is possibly changing native code and/or updating libraries, it may cause problems with HybridApp. Please check if any patch updates are required in the HybridApp repo and run an AdHoc build to verify that HybridApp will not break. Ask Contributor Plus for help if you are not sure how to handle this. ⚠️

@melvin-bot
melvin-bot Bot removed the request for review from a team September 4, 2026 14:06

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ea2add2441

ℹ️ 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".

@hungvu193 hungvu193 changed the title Update Add to Apple Wallet Update Add to Apple Wallet (IOS only) Sep 4, 2026
@codecov

codecov Bot commented Sep 4, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.

Files with missing lines Coverage Δ
src/SCREENS.ts 100.00% <ø> (ø)
...ToWalletButton/AddToWalletStatusText/index.ios.tsx 100.00% <100.00%> (ø)
...rc/components/Icon/chunks/expensify-icons.chunk.ts 0.00% <ø> (ø)
src/components/Icon/chunks/illustrations.chunk.ts 0.00% <ø> (ø)
src/libs/Navigation/linkingConfig/config.ts 62.50% <ø> (ø)
.../pages/settings/Wallet/ExpensifyCardPage/index.tsx 70.32% <100.00%> (+0.16%) ⬆️
src/ROUTES.ts 29.17% <0.00%> (-0.17%) ⬇️
...gation/AppNavigator/ModalStackNavigators/index.tsx 5.96% <0.00%> (-0.05%) ⬇️
...lletButton/AddToWalletStatusText/index.android.tsx 0.00% <0.00%> (ø)
.../AddToWalletButton/AddToWalletStatusText/index.tsx 0.00% <0.00%> (ø)
... and 4 more
... and 627 files with indirect coverage changes

@gijoe0295

gijoe0295 commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

Reviewer Checklist

  • I have verified the author checklist is complete (all boxes are checked off).
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the steps for local testing are in the Tests section
    • I verified the steps for Staging and/or Production testing are in the QA steps section
    • I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
  • I checked that screenshots or videos are included for tests on all platforms
  • I included screenshots or videos for tests on all platforms
  • I verified that the composer does not automatically focus or open the keyboard on mobile unless explicitly intended. This includes checking that returning the app from the background does not unexpectedly open the keyboard.
  • I verified tests pass on all platforms & I tested again on:
    • Android: HybridApp
    • Android: mWeb Chrome
    • iOS: HybridApp
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
  • I verified proper code patterns were followed (see Reviewing the code)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I verified that this PR follows the guidelines as stated in the Review Guidelines
  • I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • For any bug fix or new feature in this PR, I verified that sufficient unit tests are included to prevent regressions in this flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Android: HybridApp Screenshot_1789547112
Screen.Recording.2026-09-16.at.15.23.22.mov
Android: mWeb Chrome
iOS: HybridApp Simulator Screenshot - iPhone 17e - 2026-09-16 at 15 16 35
Screen.Recording.2026-09-16.at.15.19.11.mov
iOS: mWeb Safari Simulator Screenshot - iPhone 17e - 2026-09-16 at 15 20 32
MacOS: Chrome / Safari Screenshot 2026-09-16 at 15 16 44

@gijoe0295 gijoe0295 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good & tests well. Still needs Design confirmation on UI change.

Comment thread src/languages/en.ts Resolved
@gijoe0295

Copy link
Copy Markdown
Contributor

BUG: If the card is added successfully, this text has wide spacing:

Simulator Screenshot - iPhone 17 - 2026-09-07 at 16 50 14

if (isInWallet) {
return (
<View style={style}>
<Text style={[styles.textLabelSupporting, styles.mt6]}>{translate('cardPage.cardAddedToWallet', {platform})}</Text>
</View>
);
}

@shawnborton

Copy link
Copy Markdown
Contributor

If the card is added successfully, this text has wide spacing:

Does that only show when you first come back to the view? Almost wondering if we should just use a growl for that and not worry about putting it right into the RHP UI? cc @Expensify/design for thoughts.

@gijoe0295

Copy link
Copy Markdown
Contributor

Does that only show when you first come back to the view?

It'll show permanently every time you open the card detail RHP.

@shawnborton

Copy link
Copy Markdown
Contributor

Interesting, what does it currently look like (before this PR)? I kinda think we wouldn't want to keep that information so high up in the RHP... let's see what Danny and Jon think though.

@hungvu193

Copy link
Copy Markdown
Contributor Author

Fixed the review comments, except this one: #100404 (comment)

@MelvinBot

Copy link
Copy Markdown
Contributor

Conflicts resolved and pushed to feat-678322 — the PR is MERGEABLE again as of e1afbba.

What happened: main added its own wallet screen — CARD_ADD_TO_DIGITAL_WALLET / AddCardToDigitalWalletPage (the approve/deny flow for a pending digital-wallet addition) — on the exact lines where this PR adds CARD_ADDED_TO_WALLET / CardAddedToWalletPage. All three conflicts were that same one-line collision, not a logic clash.

Resolution: kept both sides in all three files. They're distinct features, and ROUTES.ts auto-merged to non-colliding paths (.../add-to-digital-wallet vs .../added-to-wallet).

File Resolution
src/SCREENS.ts:183-184 Both screen constants
src/libs/Navigation/AppNavigator/ModalStackNavigators/index.tsx:456-457 Both page registrations
src/libs/Navigation/linkingConfig/config.ts:305-313 Both linking entries

src/libs/Navigation/types.ts auto-merged with both param-list entries, and HOME_TO_RHP correctly lists only CARD_ADD_TO_DIGITAL_WALLET — your screen is opened from the wallet card page, not the Home time-sensitive section, so it doesn't belong there.

Verification
  • npm run typecheck — passed
  • npm run lint on the three resolved files — clean (the 7 no-unsafe-type-assertion errors a raw eslint run reports are pre-existing, on untouched lines, and grandfathered by the seatbelt ratchet)
  • npm test -- tests/unit/Navigation — 33 suites, 604 tests, all passing

I did not run a browser test: AddToWalletButton/index.tsx returns null on web, so this flow can't be exercised outside iOS native.

⚠️ Two things worth your attention before merging:

  1. Please re-verify on an iOS device. main's new flow touches the same card surface, and I could only verify this statically.
  2. The naming is easy to mix up. CARD_ADD_TO_DIGITAL_WALLET vs CARD_ADDED_TO_WALLET, and AddCardToDigitalWalletPage vs CardAddedToWalletPage, now sit on adjacent lines in four files. Worth considering a rename to something like CARD_APPLE_WALLET_SUCCESS so the next person touching this doesn't wire up the wrong one.

@gijoe0295 gijoe0295 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. @hungvu193 Can you merge main to fix the tests? Latest screenshots are in this

@melvin-bot melvin-bot Bot changed the title Update Add to Apple Wallet (IOS only) [Payment due @gijoe0295] Update Add to Apple Wallet (IOS only) Sep 16, 2026
@melvin-bot

melvin-bot Bot commented Sep 16, 2026

Copy link
Copy Markdown

🎯 @gijoe0295, thanks for reviewing and testing this PR! 🎉

A payment issue will be created for your review once this PR is deployed to production.
E/E issue linked to the PR - https://www.github.com/Expensify/Expensify/issues/678322.

If payment is not needed (e.g., regression PR review fix etc), react with 👎 to this comment to prevent the payment issue from being created.

@hungvu193

Copy link
Copy Markdown
Contributor Author

@MelvinBot Merge main please

Co-authored-by: Hans Vu <hungvu193@users.noreply.github.com>
@MelvinBot

Copy link
Copy Markdown
Contributor

🤖 Merged main into feat-678322 — no conflicts.

The branch was 947 commits behind. Merge commit: 0a80d6cc267b910499c92138587be34f47057eba. The branch is now up to date with main, and checks are re-running.


view run

@hungvu193

Copy link
Copy Markdown
Contributor Author

@gijoe0295 Can you approve again? There was no internal engineer was auto assign 😅

@gijoe0295 gijoe0295 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@AndrewGable
AndrewGable self-requested a review September 17, 2026 18:37

import type AddToWalletStatusTextProps from './types';

const platform = getPlatform() === CONST.PLATFORM.IOS ? 'Apple' : 'Google';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use platform specific files here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say no. Minor change and we already use platform-specific here (.native.ts), we also use the same approach with AddToWalletButton

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"No" we can't or "no" you'd rather not?

I think we should, per the guidelines

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool. Updated

@melvin-bot

melvin-bot Bot commented Sep 19, 2026

Copy link
Copy Markdown

I could not review this diff, so I did not approve the workflow runs. An Expensify employee will review it and approve them manually.

@AndrewGable
AndrewGable merged commit e29a3b4 into Expensify:main Sep 21, 2026
37 of 39 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

🚧 AndrewGable has triggered a test Expensify/App build. You can view the workflow run here.

@OSBotify

Copy link
Copy Markdown
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@github-actions

Copy link
Copy Markdown
Contributor

🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
Built from App PR #100404.

Android 🤖 iOS 🍎
https://ad-hoc-expensify-cash.s3.us-east-1.amazonaws.com/rock-artifacts/ad-hoc/rock-android-Adhoc-e29a3b4-6c6b64c-b09d020abd0274ff69151bb24c008ff70a1cb246/index.html ❌ FAILED ❌
Android The QR code can't be generated, because the iOS build failed
Web 🕸️
https://100404.pr-testing.expensify.com
Web

👀 View the workflow run that generated this build 👀

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/AndrewGable in version: 9.4.91-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@MelvinBot

Copy link
Copy Markdown
Contributor

🤖 Yes — help site changes are required. Draft PR: Docs updates for E/A#100404 Apple Wallet confirmation screen and added-to-wallet label

Two cardholder-visible changes in this PR were undocumented:

  1. iPhone confirmation screen — after a successful add, CardAddedToWalletPage.tsx shows You're all set! with "Your card has been added to Apple Wallet." and a Got it button.
  2. Button now hides once the card is in the wallet — AddToWalletButton/index.native.tsx returns null when isInWallet, and the separate AddToWalletStatusText renders Added to Apple Wallet / Added to Google Wallet on the card details page instead.

Only one article covers this flow: docs/articles/new-expensify/expensify-card/Add-Expensify-Card-to-Apple-Pay-or-Google-Wallet.md. It described tapping Add to Apple Wallet and nothing after that, so the docs PR adds the closing steps, the replaced-button behavior, and an FAQ for cardholders who can no longer find the button.

What changed in the article, and how labels were verified
  • How to add your Expensify Card from the Expensify mobile app — added steps 5 and 6, covering the wallet prompts and the iPhone You're all set! screen with Got it.
  • What happens after you add your Expensify Card to Apple Pay or Google Wallet — added a line noting the button is replaced by the Added to Apple Wallet / Added to Google Wallet label.
  • FAQ — added "Why don't I see the Add to Apple Wallet or Add to Google Wallet button on my card?"
  • Added Added to Apple Wallet to keywords.

Every label is copied verbatim from the strings this PR added to src/languages/en.ts (cardAddedToWallet, cardAddedToWalletPage.title, .description, .buttonText), so capitalization matches what ships. I could not confirm them against a running UI: the whole flow is native-only (the web AddToWalletButton entry point renders null), and the forced test platform for this run is web, so the button and confirmation screen are not reachable there. A reviewer with an iPhone build should sanity-check the two screens.

No changes were made to Cardholder-Settings-and-Features.md. It has a stale Add to Google Pay label and a broken cross-link to Add-Expensify-Card-to-Apple-or-Google-Pay, but both predate this PR — worth a separate cleanup rather than folding into this one.

@MelvinBot, please review the linked help site PR and confirm it reflects the current behavior. Then mark the linked help site PR Ready for review

@IuliiaHerets

Copy link
Copy Markdown

Hey @hungvu193. The confirmation screen is not displayed on our side. Instead, we see a modal saying “Failed to…”, but it’s the same behavior as shown in the video attached to the PR.
Do we need to use a specific account for this? Or are we missing something?

100404I.mp4

cc @AndrewGable @dylanexpensify

@hungvu193

Copy link
Copy Markdown
Contributor Author

Hey @hungvu193. The confirmation screen is not displayed on our side. Instead, we see a modal saying “Failed to…”, but it’s the same behavior as shown in the video attached to the PR. Do we need to use a specific account for this? Or are we missing something?

100404I.mp4
cc @AndrewGable @dylanexpensify

I'm using purely code to make it successful on dev so I'm not sure to do it on Prod 👀

@AndrewGable

Copy link
Copy Markdown
Contributor

I think this is going to have to be tested on production

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/lakchote in version: 9.4.91-3 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

Bundle Size Analysis (Sentry):

@melvin-bot

melvin-bot Bot commented Sep 23, 2026

Copy link
Copy Markdown

🤖 Payment issue created: #101978

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants