Repository navigation
Conversation
|
@parasharrajat 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] |
|
Hmmm, srikar says this didn't work, closing |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 926c2478c2
ℹ️ 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".
| // Setup is in progress in 2 cases: | ||
| // - account already present on policy is partially setup | ||
| // - account is being connected 'on the spot' while trying to pay for an expense (it won't be linked to policy yet but will appear as reimbursementAccount) | ||
| if (policy !== undefined && (isBankAccountPartiallySetup(policy?.achAccount?.state) || isBankAccountPartiallySetup(reimbursementAccount?.achData?.state))) { |
There was a problem hiding this comment.
Scope KYC partially-setup check to the active policy
This condition now treats any global reimbursementAccount.achData.state in SETUP/VERIFYING/PENDING as “in progress” for the current workspace, but it does not verify that the ACH data belongs to the current policy (or even to a real linked account). Since ReimbursementAccountPage cleanup calls clearReimbursementAccount() and CONST.REIMBURSEMENT_ACCOUNT.DEFAULT_DATA has achData.state = SETUP, users who previously visited the flow can be incorrectly redirected to navigateToBankAccountRoute() here and skip the connect-existing-account path for unrelated workspaces.
Useful? React with 👍 / 👎.
| const hasInProgressVBBA = (achData?: ACHDataReimbursementAccount, isNonUSDWorkspace?: boolean) => { | ||
| if (isNonUSDWorkspace ?? (!!achData?.currency && achData.currency !== CONST.CURRENCY.USD)) { | ||
| return hasInProgressNonUSDVBBA(achData); |
There was a problem hiding this comment.
Restore policy guard in hasInProgressVBBA
Removing the achData.policyID check makes this helper report “in-progress VBBA” for whichever workspace is currently open, even when the cached ACH data came from a different workspace. Callers like WorkspaceWorkflowsPage and WorkspaceInvoiceVBASection use this flag to decide whether to skip the existing-account chooser, so stale data from another policy can send users down the wrong add-bank-account path.
Useful? React with 👍 / 👎.
Explanation of Change
Reverts #81185 which introduced a regression causing the "Add business bank account" flow from Wallet to get stuck on a permanent loading screen.
PR #81185 re-introduced
!hasACHDataBeenLoadedto the loading condition inReimbursementAccountPage.tsx. The Wallet flow navigates to this page withoutpolicyIDorbankAccountIDparams, which meansopenReimbursementAccountPageis never called andhasACHDataBeenLoadedstaysfalseforever — resulting in an infinite loading indicator.Fixed Issues
$ #84325
Tests
Offline tests
N/A - this is a revert
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
N/A - pure revert
Deploy Blocker: #84325
Slack Discussion: https://expensify.slack.com/archives/C01GTK53T8Q/p1772749087220009