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
Please re-state the problem that we are trying to solve in this issue.
When a user with Central Travel Invoicing enabled goes to Profile > Wallet > Travel CVV and taps "Reveal details", then enters the magic code, the CVV is not displayed. It should show the actual CVV value after successful verification.
What is the root cause of that problem?
The Travel CVV reveal flow reuses the RevealExpensifyCardDetails backend API command (via revealVirtualCardDetails in src/libs/actions/Card.ts:583-646), which was designed for regular Expensify virtual cards. The API response is unsafely cast as ExpensifyCardDetails (response as ExpensifyCardDetails at Card.ts:641) which expects {pan, expiration, cvv}.
For travel invoicing cards (feedCountry=TRAVEL_US), the backend likely does not return the cvv field in the response (or returns it differently), since these are a different card type. When this happens, cardDetails.cvv is undefined, and the code at TravelCVVVerifyAccountPage.tsx:46:
setCvv(cardDetails.cvv ?? null);
evaluates to setCvv(null). The page then navigates back to TravelCVVPage, which displays '•••' because cvv is still null (line 98: title={cvv ?? '•••'}), and the "Reveal details" button remains visible (line 105: !cvv).
This bug is masked in development/staging because getTravelInvoicingCard() in src/libs/TravelInvoicingUtils.ts:181-182 has a fallback that uses a regular Expensify card when isTravelCVVTestingEnabled() is true and no actual travel card exists. Regular Expensify cards do return cvv from the API, so the flow works in testing.
There is also a secondary issue: if travelCard?.cardID is falsy when the verify page renders (e.g., the card list hasn't loaded), handleRevealCardDetails at TravelCVVVerifyAccountPage.tsx:35-37 silently returns without making the API call or showing any error.
What changes do you think we should make in order to solve the problem?
Backend fix (primary): The RevealExpensifyCardDetails backend command needs to support travel invoicing cards and return the cvv field in the response for cards with feedCountry=TRAVEL_US. This is the core fix.
Client-side resilience in TravelCVVVerifyAccountPage.tsx:
After the API succeeds, check if cardDetails.cvv is actually present before navigating back. If it's missing, show an error to the user instead of silently setting null and navigating back.
When travelCard?.cardID is falsy (line 35-37), show an error instead of silently returning.
Client-side resilience in Card.ts:
After the API returns success (jsonCode === SUCCESS), validate that the expected fields (cvv at minimum for the travel flow) are present before resolving. If cvv is missing from the response, reject with an appropriate error message.
What alternative solutions did you explore? (Optional)
Creating a separate API command for travel cards: Rather than extending RevealExpensifyCardDetails, a dedicated RevealTravelCardCVV command could be created. This would avoid modifying the existing command's behavior but would add maintenance overhead. Extending the existing command is simpler if the backend can distinguish card types.
Storing the full response (pan + expiration + cvv) like ExpensifyCardPage: The regular card flow stores all details in context. However, the current approach of only storing CVV is correct for the travel flow since PAN/expiration aren't displayed. The issue is purely that the backend isn't returning CVV for these card types.
Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.
Initial Analysis:
Based on the reproduction steps, the CVV should be revealed after the user clicks “Reveal details” and enters the magic code, but it remains hidden. This suggests that the UI state responsible for toggling the CVV visibility may not be updating correctly after successful verification.
Proposed Fix:
Identify the component responsible for rendering the Travel CVV field in the Wallet settings screen.
Review the logic that handles the “Reveal details” action and the magic code verification flow.
Ensure that once the verification succeeds, the state controlling the CVV visibility (e.g., reveal flag) is correctly updated.
Update the conditional rendering logic so the component switches from the masked value to the actual CVV.
Verify that the API response containing the CVV is properly passed and stored in the component state.
Test the fix across supported platforms to confirm the reveal functionality works consistently.
I will also ensure that the change does not introduce regressions to other sensitive fields that rely on masking logic.
📣 @JasimMalook! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:
Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
Activity
MelvinBot commentedon Mar 16, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a user with Central Travel Invoicing enabled goes to Profile > Wallet > Travel CVV and taps "Reveal details", then enters the magic code, the CVV is not displayed. It should show the actual CVV value after successful verification.
What is the root cause of that problem?
The Travel CVV reveal flow reuses the
RevealExpensifyCardDetailsbackend API command (viarevealVirtualCardDetailsinsrc/libs/actions/Card.ts:583-646), which was designed for regular Expensify virtual cards. The API response is unsafely cast asExpensifyCardDetails(response as ExpensifyCardDetailsatCard.ts:641) which expects{pan, expiration, cvv}.For travel invoicing cards (
feedCountry=TRAVEL_US), the backend likely does not return thecvvfield in the response (or returns it differently), since these are a different card type. When this happens,cardDetails.cvvisundefined, and the code atTravelCVVVerifyAccountPage.tsx:46:evaluates to
setCvv(null). The page then navigates back toTravelCVVPage, which displays'•••'becausecvvis stillnull(line 98:title={cvv ?? '•••'}), and the "Reveal details" button remains visible (line 105:!cvv).This bug is masked in development/staging because
getTravelInvoicingCard()insrc/libs/TravelInvoicingUtils.ts:181-182has a fallback that uses a regular Expensify card whenisTravelCVVTestingEnabled()is true and no actual travel card exists. Regular Expensify cards do returncvvfrom the API, so the flow works in testing.There is also a secondary issue: if
travelCard?.cardIDis falsy when the verify page renders (e.g., the card list hasn't loaded),handleRevealCardDetailsatTravelCVVVerifyAccountPage.tsx:35-37silently returns without making the API call or showing any error.What changes do you think we should make in order to solve the problem?
Backend fix (primary): The
RevealExpensifyCardDetailsbackend command needs to support travel invoicing cards and return thecvvfield in the response for cards withfeedCountry=TRAVEL_US. This is the core fix.Client-side resilience in
TravelCVVVerifyAccountPage.tsx:cardDetails.cvvis actually present before navigating back. If it's missing, show an error to the user instead of silently settingnulland navigating back.travelCard?.cardIDis falsy (line 35-37), show an error instead of silently returning.Client-side resilience in
Card.ts:jsonCode === SUCCESS), validate that the expected fields (cvvat minimum for the travel flow) are present before resolving. Ifcvvis missing from the response, reject with an appropriate error message.What alternative solutions did you explore? (Optional)
Creating a separate API command for travel cards: Rather than extending
RevealExpensifyCardDetails, a dedicatedRevealTravelCardCVVcommand could be created. This would avoid modifying the existing command's behavior but would add maintenance overhead. Extending the existing command is simpler if the backend can distinguish card types.Storing the full response (pan + expiration + cvv) like
ExpensifyCardPage: The regular card flow stores all details in context. However, the current approach of only storing CVV is correct for the travel flow since PAN/expiration aren't displayed. The issue is purely that the backend isn't returning CVV for these card types.Next Steps for Contributor+ team: Reply with
@MelvinBot implement thisto create a draft PR,@MelvinBot <your feedback>to refine this analysis, or explain why you are rejecting Melvin's proposal.melvin-bot commentedon Mar 16, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @Krishna2323 (
External)[-][BUG] Reveal CVV details doesn't reveal it[/-][+][$250] [BUG] Reveal CVV details doesn't reveal it[/+]melvin-bot commentedon Mar 16, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022033528002037544860
[-][$250] [BUG] Reveal CVV details doesn't reveal it[/-][+][BUG] Reveal CVV details doesn't reveal it[/+]JasimMalook commentedon Mar 16, 2026
Hi, I would like to work on this issue.
Initial Analysis:
Based on the reproduction steps, the CVV should be revealed after the user clicks “Reveal details” and enters the magic code, but it remains hidden. This suggests that the UI state responsible for toggling the CVV visibility may not be updating correctly after successful verification.
Proposed Fix:
I will also ensure that the change does not introduce regressions to other sensitive fields that rely on masking logic.
melvin-bot commentedon Mar 16, 2026
📣 @JasimMalook! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:
Format:
JasimMalook commentedon Mar 16, 2026
Contributor details
Your Expensify account email: jasimmalook@gmail.com
Upwork Profile Link: https://www.upwork.com/freelancers/~014c25762fc2275193
melvin-bot commentedon Mar 16, 2026
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
blimpich commentedon Mar 16, 2026
Sorry @JasimMalook this issue is not taking proposals right now. Please see our contributing guidelines on how to find issues to work on
blimpich commentedon Mar 18, 2026
I tested this on latest staging and it works, closing