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
Expense - Invalid amount error does not show up when amount is 0 when paying user #90654
Version Number: 9.3.74-0 Reproducible in staging?: Yes Reproducible in production?: N/A - new feature, doesn't exist in prod If this was caught during regression testing, add the test name, ID and link from BrowserStack:#87920 Email or phone of affected tester (no customers):sdsdjoijdoisnjodis@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac 26.2 / Chrome App Component: Money Requests
Action Performed:
Precondition:
Run Onyx.merge('betas', ['newManualExpenseFlow']); in console.
Go to staging.new.expensify.com
Open DM with any user.
Click + > Pay.
Enter amount > Next.
On confirm page, change the amount to 0.
Click Mark as paid.
Expected Result:
Invalid amount error will show up because amount is 0.
Actual Result:
Invalid amount error does not show up when amount is 0 when paying user.
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Identify the pull request that introduced this issue and revert it.
PR #87920 introduced a regression in the amount validation for the PAY flow (the "Mark as paid" path). The zero-amount guard in useConfirmationValidation.ts explicitly excludes iouType === CONST.IOU.TYPE.PAY, so when a user changes the amount to 0 on the confirm page and clicks "Mark as paid", no invalid-amount error is raised.
The issue is only reproducible on staging (version 9.3.74-0) and not production — this is a new feature (newManualExpenseFlow beta), confirming the bug was introduced by this PR.
The PR rewrote the amount validation logic at lines 162-168 of the current file.
Root Cause
In useConfirmationValidation.ts, the zero-amount guard added by the PR reads:
// P2P manual submit: $0 is invalid unless scan/time/distanceif(iouType!==CONST.IOU.TYPE.PAY&&!isScanRequestUtil(transaction)&&!isTimeRequest&&!isDistanceRequest&&iouAmount===0&&isP2P){return{errorKey: 'common.error.invalidAmount'};}
The iouType !== CONST.IOU.TYPE.PAY condition explicitly skips zero-amount validation for the Pay/Send Money flow. When the user opens a DM, clicks + > Pay, sets an amount, navigates to the confirm page, changes the amount to 0, and clicks "Mark as paid", the iouType is PAY so the guard above is bypassed entirely. The second guard (!transaction?.isAmountSet) also does not catch this because the user explicitly set the amount (to 0), so isAmountSet is true. As a result, no validation error is shown and the payment proceeds with an invalid $0 amount.
When the user clicks "Mark as paid", iouType is CONST.IOU.TYPE.PAY, so the condition short-circuits and the $0 check is skipped. The PAY branch (lines 257-261) only validates that a payment method is selected — it has no amount check at all, so onSendMoney fires with amount=0.
What changes do you think we should make in order to solve the problem?
Remove iouType !== CONST.IOU.TYPE.PAY from the guard on line 163 so the amount=0 check applies to PAY flows as well:
This ensures PAY transactions get the same invalidAmount error as other P2P flows when the user sets the amount to 0.
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.
Activity
melvin-bot commentedon May 14, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #87920
melvin-bot commentedon May 14, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon May 14, 2026
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
OSBotify commentedon May 14, 2026
Investigation Summary
Classification: Frontend bug
Causing PR: #87920 - "Feat: Manual expense flow UI refactor - r3" by @ChavdaSachin (High confidence)
Related Issues: #82586
Recommendation: REVERT
PR #87920 introduced a regression in the amount validation for the
PAYflow (the "Mark as paid" path). The zero-amount guard inuseConfirmationValidation.tsexplicitly excludesiouType === CONST.IOU.TYPE.PAY, so when a user changes the amount to 0 on the confirm page and clicks "Mark as paid", no invalid-amount error is raised.Assigned: @ChavdaSachin (PR author), @ShridharGoel and @puneetlath (approving reviewers)
Labels:
DeployBlockerCashkept (frontend App PR caused this). No label changes made.Detailed Analysis
Evidence
newManualExpenseFlowbeta), confirming the bug was introduced by this PR.Verification
src/components/MoneyRequestConfirmationList/hooks/useConfirmationValidation.tsRoot Cause
In
useConfirmationValidation.ts, the zero-amount guard added by the PR reads:The
iouType !== CONST.IOU.TYPE.PAYcondition explicitly skips zero-amount validation for the Pay/Send Money flow. When the user opens a DM, clicks+> Pay, sets an amount, navigates to the confirm page, changes the amount to 0, and clicks "Mark as paid", theiouTypeisPAYso the guard above is bypassed entirely. The second guard (!transaction?.isAmountSet) also does not catch this because the user explicitly set the amount (to 0), soisAmountSetistrue. As a result, no validation error is shown and the payment proceeds with an invalid $0 amount.MelvinBot commentedon May 14, 2026
Proposal
What is the root cause of that problem?
The amount=0 validation in
useConfirmationValidation.ts:163explicitly excludesPAYflows:When the user clicks "Mark as paid",
iouTypeisCONST.IOU.TYPE.PAY, so the condition short-circuits and the$0check is skipped. The PAY branch (lines 257-261) only validates that a payment method is selected — it has no amount check at all, soonSendMoneyfires with amount=0.What changes do you think we should make in order to solve the problem?
Remove
iouType !== CONST.IOU.TYPE.PAYfrom the guard on line 163 so the amount=0 check applies to PAY flows as well:This ensures PAY transactions get the same
invalidAmounterror as other P2P flows when the user sets the amount to 0.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.ChavdaSachin commentedon May 14, 2026
Working on a CP
Show invalid amount for iou type pay when amount is 0, Fixes Expensif…
IuliiaHerets commentedon May 14, 2026
Mac/ Chrome
v9.3.74-3
Not Repro
Repro.-.90654.mp4