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
{{ message }}
Repository navigation
[READY FOR PAYMENT] [$500] Expensify Card - Magic code error does not appear above Verify button when revealing details #73134
BugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorMonthlyKSv2ReviewingHas a PR in review
Version Number: 9.2.35-0 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail:#72018 Email or phone of affected tester (no customers):#72018 Issue reported by: Applause - Internal Team
Action Performed:
Precondition:
User has assigned themselves a virtual card
Go to staging.new.expensify.com
Go to Account > Wallet
Click on the virtual card
Click Reveal details
Enter wrong magic code
Click RHP back button
Expected Result:
In Step 5, magic code error will appear above Verify button
Actual Result:
In Step 5, magic code error does not appear above Verify button
In Step 6, magic code error appears on the previous page, under Reveal details button
Workaround:
Unknown
Platforms:
Select the officially supported platforms where the issue was reproduced:
Android: App
Android: mWeb Chrome
iOS: App
iOS: mWeb Safari
iOS: mWeb Chrome
Windows: Chrome
MacOS: Chrome / Safari
MacOS: Desktop
Platforms Tested:
On which of our officially supported platforms was this issue tested:
Android: App
Android: mWeb Chrome
iOS: App
iOS: mWeb Safari
iOS: mWeb Chrome
Windows: Chrome
MacOS: Chrome / Safari
MacOS: Desktop
Screenshots/Videos
Add any screenshot/video evidenceBug6980750_1761064131433.Screen_Recording_2025-10-22_at_00.25.40.mp4
Please re-state the problem that we are trying to solve in this issue.
Expensify Card - Magic code error does not appear above Verify button when revealing details
What is the root cause of that problem?
Currently we use validateCodeActionErrorField = "actionVerified", but when an incorrect magic code is entered during card reveal, the actual error field set by the backend is revealExpensifyCardDetails
However, if we change validateCodeActionErrorField to revealExpensifyCardDetails, the clearError function only clears the local state (setValidateError({})) and does not clear the Onyx error fields. This causes rate limiting errors like Failed to send a new magic code. Please wait a bit and try again. to remain visible and not be dismissed when clicking the 'X' button, because the error is stored in the VALIDATE_ACTION_CODE Onyx key
What changes do you think we should make in order to solve the problem?
We need to handle both local and Onyx error clearing with clearValidateCodeActionError to ensure that rate limiting errors like Failed to send a new magic code. Please wait a bit and try again. can be dismissed, and that incorrect magic code errors like Looks like the magic code you entered was incorrect. Please try again. are displayed correctly above the Verify button
changed the title [-]Expensify Card - Magic code error does not appear above Verify button when revealing details[/-][+][$250] Expensify Card - Magic code error does not appear above Verify button when revealing details[/+]on Oct 24, 2025
Since actionVerified error is being used inside BaseValidateCodeForm as a fallback, it makes sense to clear the error when dismissing it inside BaseValidateCodeForm too, so it's fixed globally.
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
PR Review: @bernhardoj [$500] payment via NewDot
Can you complete the checklist for this one?
The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it.
changed the title [-][$500] Expensify Card - Magic code error does not appear above Verify button when revealing details[/-][+][READY FOR PAYMENT] [$500] Expensify Card - Magic code error does not appear above Verify button when revealing details[/+]on Dec 16, 2025
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: N/A
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
Regression Test Proposal Template
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
BugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorMonthlyKSv2ReviewingHas a PR in review
Activity
melvin-bot commentedon Oct 21, 2025
Triggered auto assignment to @abekkala (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.ryntgh commentedon Oct 22, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Expensify Card - Magic code error does not appear above Verify button when revealing details
What is the root cause of that problem?
Currently we use
validateCodeActionErrorField = "actionVerified", but when an incorrect magic code is entered during card reveal, the actual error field set by the backend isrevealExpensifyCardDetailsHowever, if we change
validateCodeActionErrorFieldtorevealExpensifyCardDetails, theclearErrorfunction only clears the local state (setValidateError({})) and does not clear the Onyx error fields. This causes rate limiting errors likeFailed to send a new magic code. Please wait a bit and try again.to remain visible and not be dismissed when clicking the 'X' button, because the error is stored in theVALIDATE_ACTION_CODEOnyx keyApp/src/pages/settings/Wallet/ExpensifyCardPage/ExpensifyCardVerifyAccountPage.tsx
Lines 60 to 73 in 9284d17
What changes do you think we should make in order to solve the problem?
We need to handle both local and Onyx error clearing with
clearValidateCodeActionErrorto ensure that rate limiting errors likeFailed to send a new magic code. Please wait a bit and try again.can be dismissed, and that incorrect magic code errors likeLooks like the magic code you entered was incorrect. Please try again.are displayed correctly above the Verify buttonApp/src/pages/settings/Wallet/ExpensifyCardPage/ExpensifyCardVerifyAccountPage.tsx
Lines 61 to 73 in 9284d17
What alternative solutions did you explore? (Optional)
We can make the
onClosehandler onBaseValidateCodeFormto also clear theactionVerifiederror field when dismissing errorsApp/src/components/ValidateCodeActionModal/ValidateCodeForm/BaseValidateCodeForm.tsx
Lines 320 to 323 in 9284d17
and set
validateCodeActionErrorFieldtorevealExpensifyCardDetailsonExpensifyCardVerifyAccountPage[-]Expensify Card - Magic code error does not appear above Verify button when revealing details[/-][+][$250] Expensify Card - Magic code error does not appear above Verify button when revealing details[/+]melvin-bot commentedon Oct 24, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021981780679028973300
melvin-bot commentedon Oct 24, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @bernhardoj (
External)bernhardoj commentedon Oct 25, 2025
Since
actionVerifiederror is being used insideBaseValidateCodeFormas a fallback, it makes sense to clear the error when dismissing it insideBaseValidateCodeFormtoo, so it's fixed globally.App/src/components/ValidateCodeActionModal/ValidateCodeForm/BaseValidateCodeForm.tsx
Line 129 in bceff96
So, @ryntgh's alternative solution looks good
🎀 👀 🎀 C+ reviewed
melvin-bot commentedon Oct 25, 2025
Triggered auto assignment to @danieldoglas, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
17 remaining items
ryntgh commentedon Nov 20, 2025
The 2nd PR is ready for review @bernhardoj
melvin-bot commentedon Dec 16, 2025
This issue has not been updated in over 15 days. @danieldoglas, @abekkala, @bernhardoj, @ryntgh eroding to Monthly issue.
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
bernhardoj commentedon Dec 16, 2025
@abekkala looks like the automation failed. This should be ready for payment on 18 dec
abekkala commentedon Dec 16, 2025
PAYMENT SUMMARY
Can you complete the checklist for this one?
[-][$500] Expensify Card - Magic code error does not appear above Verify button when revealing details[/-][+][READY FOR PAYMENT] [$500] Expensify Card - Magic code error does not appear above Verify button when revealing details[/+]ryntgh commentedon Dec 16, 2025
Thanks! I've accepted the offer
bernhardoj commentedon Dec 16, 2025
BugZero Checklist:
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment: https://github.com/Expensify/App/pull/72018/files#r2623583501
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: N/A
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
Regression Test Proposal Template
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue: https://github.com/Expensify/Expensify/issues/579357
Regression Test Proposal
Precondition:
Test:
Do we agree 👍 or 👎
bernhardoj commentedon Dec 16, 2025
Requested in ND.
abekkala commentedon Dec 16, 2025
@ryntgh payment sent via Upwork and contract ended - thank you! 🎉
abekkala commentedon Dec 16, 2025
Posting payment summary once more for easier visibility:
Thanks! 🎉
garrettmknight commentedon Dec 18, 2025
$500 approved for @bernhardoj