Fix duplicate Limit type row after revealing virtual card details#94068
Fix duplicate Limit type row after revealing virtual card details#94068MelvinBot wants to merge 1 commit into
Conversation
Co-authored-by: Bernhard Owen Josephus <bernhardoj@users.noreply.github.com>
|
The two failing checks are both unrelated to this PR's code changes — I won't push a fix. This PR only changes two frontend TS files ( 1. The path has a double slash because the 2.
This is the human-author checklist. MelvinBot intentionally does not fill out the human No code change is warranted. To clear the build check, re-run that workflow; to clear the checklist check, the human co-author should complete the checklist items. |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@MelvinBot the QA test already looks good, mark this PR as ready for review |
|
@bernhardoj 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] |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6330d146cf
ℹ️ 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".
| } | ||
| Navigation.navigate(ROUTES.SETTINGS_WALLET_CARD_DIGITAL_DETAILS_UPDATE_ADDRESS.getRoute(domain)); | ||
| }} | ||
| limitType={card?.nameValuePairs?.limitType} | ||
| cardHintText={getCardHintText( | ||
| card?.nameValuePairs?.validFrom, | ||
| card?.nameValuePairs?.validThru, | ||
| personalDetails?.[card?.accountID ?? CONST.DEFAULT_NUMBER_ID]?.timezone?.selected, | ||
| translate, | ||
| )} | ||
| /> |
There was a problem hiding this comment.
Preserve virtual card limit type on combo pages
When the Wallet entry opens a grouped physical+virtual card via the physical card ID, currentCard is the physical card while this virtualCards.map renders the companion virtual card. The top-level “Limit type” row above is therefore for currentCard, not for this revealed virtual card, so dropping the card.nameValuePairs.limitType data here removes the virtual card’s own limit type/dates after reveal rather than only removing a duplicate. Please keep rendering the virtual card’s limit metadata when the revealed card is not the current card, or otherwise conditionally suppress only the true duplicate case.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Interesting. @flaviadefaria how can I have a grouped physical card with multiple virtual cards?
Are their limit type can be different?
|
Re-checked — the failing checks are unchanged and none require a code fix, so there's nothing for me to push:
Separately, I see the request above to mark this PR ready for review — I'll leave that action to you, as I don't change PR draft/ready state automatically. |
|
Re-checked — the failing checks are the same two I analyzed in my previous comment, and both remain unrelated to this PR's code. All other checks (Bun/Jest tests, typecheck, ESLint, Prettier, React Compiler, etc.) now pass.
No push from me — there's no code-level failure to fix. |

Explanation of Change
On the Expensify Card page (Account > Wallet > virtual card), a "Limit type" row was shown twice after revealing card details. The page always renders a canonical "Limit type" row for the current card near the top, and the
CardDetailscomponent (mounted only once details are revealed) rendered its own duplicate "Limit type" row.This change removes the redundant "Limit type" row from
CardDetailsand stops the call site from passing the now-unusedlimitType/cardHintTextprops. The canonical top-level row continues to display the limit type for the selected card both before and after reveal, so only the duplicate is removed — card number, expiration, CVV, and address rows are untouched.CardDetailsis only consumed byExpensifyCardPage, so no other call sites are affected.Fixed Issues
$ #93465
PROPOSAL: #93465 (comment)
Tests
// TODO: The human co-author must fill out the tests they ran before marking this PR as "ready for review".
Offline tests
N/A — this is a pure UI rendering change.
QA Steps
// TODO: The human co-author must fill out the QA tests before marking this PR as "ready for review".
AI Tests (run by MelvinBot)
npm run lint-changed— passednpm run typecheck-tsgo— passednpm run react-compiler-compliance-check check <changed files>— both files COMPILEDnpm test -- tests/ui/WalletExpensifyCardPageTest.tsx— 6 passedprettier— no changes neededPR Author Checklist
### Fixed Issuessection aboveScreenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari