Add hasFailedOnfido to acceptWalletTerms failureData#85579
Add hasFailedOnfido to acceptWalletTerms failureData#85579allgandalf wants to merge 1 commit intoExpensify:mainfrom
Conversation
|
@thesahindia 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] |
|
Sorry for the ping @thesahindia @heyjennahay , you can ignore this ping, thanks 🙇 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 75af8dc0e8
ℹ️ 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".
| value: { | ||
| isPendingOnfidoResult: null, | ||
| shouldShowFailedKYC: true, | ||
| hasFailedOnfido: true, |
There was a problem hiding this comment.
Gate hasFailedOnfido update to KYC-specific failures
failureData is applied on every non-200 API response (see applyHTTPSOnyxUpdates in src/libs/actions/OnyxUpdates.ts, which runs request.failureData whenever response.jsonCode !== 200), so this unconditional hasFailedOnfido: true merge will also run for transient/non-KYC failures of ACCEPT_WALLET_TERMS (e.g., server errors). In those cases the wallet gets marked as failed and the UI redirects/hides activation based on hasFailedOnfido, which blocks normal retry behavior for users who did not actually fail Onfido.
Useful? React with 👍 / 👎.
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
Explanation of Change
As part of migrating
Onyx::pushUpdatesToClientsfrom Web-Expensify to Auth (parent issue), the PHP error-path push ofhasFailedOnfido: trueinBankAccountAPI::acceptWalletTermsis being removed.This adds
hasFailedOnfido: trueto thefailureDatainacceptWalletTermsso the frontend handles the error case directly, rather than relying on a server push.Related PRs:
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/612517
PROPOSAL:
Tests
hasFailedOnfido: trueis set on theuserWalletOnyx keyEnablePaymentsPagecorrectly navigates away whenhasFailedOnfidois trueOffline tests
N/A — wallet activation requires network connectivity.
QA Steps
Same as tests.
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
N/A — no UI changes
Android: mWeb Chrome
N/A — no UI changes
iOS: Native
N/A — no UI changes
iOS: mWeb Safari
N/A — no UI changes
MacOS: Chrome / Safari
N/A — no UI changes