fix: Don't require account validation to mark a report as paid manually#86714
fix: Don't require account validation to mark a report as paid manually#86714luacmartins merged 2 commits intoExpensify:mainfrom
Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 602db0e5fc
ℹ️ 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".
| if (checkForNecessaryAction(paymentType)) { | ||
| return; |
There was a problem hiding this comment.
Preserve validation for policy-based payment selections
Passing paymentType into checkForNecessaryAction() here unintentionally exempts non-manual flows from validation: getActivePaymentType() maps policy-ID selections (the “Pay with workspace” options) to CONST.IOU.PAYMENT_TYPE.ELSEWHERE (see the explicit unit case in tests/unit/PaymentUtilsTest.ts around lines 151-157), so unvalidated users now skip handleUnvalidatedUserNavigation() for workspace payments. This change was meant to unblock explicit “Mark as paid” only, but it also drops validation on policy-based payment paths.
Useful? React with 👍 / 👎.
|
Please fix conflict |
|
|
Code ReviewThe approach is sound — skipping account validation for One potential issue at subMenuItems: buildPaymentSubMenuItems((wp) => {
isSelectionModePaymentRef.current = true;
if (checkForNecessaryAction()) { // ← no paymentMethodType passed
return;
}
kycWallRef.current?.continueAction?.({policy: wp});
}),This callback is only triggered for workspace policy selections (which are Expensify-type payments, not ELSEWHERE), so the behavior is correct in practice. However, for consistency and defensive correctness, consider passing the payment type explicitly: if (checkForNecessaryAction(CONST.IOU.PAYMENT_TYPE.EXPENSIFY)) {This makes the intent clear and avoids silent breakage if the callback scope ever changes. Everything else looks good:
Next Steps: Reply with |
|
@situchan resolved conflict |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppios.moviOS: mWeb Safarimsafari.movMacOS: Chrome / Safariweb.mov |
|
🚧 @luacmartins has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
shouldBlockAction in useSelectionModeReportActions was missing the paymentMethodType parameter added in #86714, causing it to always block unvalidated users even for Elsewhere payments. Co-authored-by: Situ Chandra Shil <situchan@users.noreply.github.com>
|
🚀 Deployed to staging by https://github.com/luacmartins in version: 9.3.58-0 🚀
Bundle Size Analysis (Sentry): |
|
No help site changes are required for this PR. PR change: Removes the account validation requirement when using "Pay elsewhere" (mark as paid manually). Previously, unvalidated users were blocked from all payment methods including manual marking; now validation is only enforced for bank-account-based payment types (ACH, Expensify Wallet, VBBA). Help site review: I checked all relevant articles:
None of these articles ever documented account validation as a requirement for the "Pay elsewhere" flow, so the behavioral fix in this PR doesn't create any discrepancy with the existing documentation. |
Explanation of Change
Fixed Issues
$#86383
PROPOSAL:#86383 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Screen.Recording.2026-03-31.at.15.02.19.mov
Android: mWeb Chrome
Screen.Recording.2026-03-31.at.14.44.07.mov
iOS: Native
ios-resize.mp4
iOS: mWeb Safari
Screen.Recording.2026-03-31.at.14.39.47.mov
MacOS: Chrome / Safari
web.mp4