Skip to content

[Due for payment 2025-05-22] [$250] Bank account - RHP back button on Business info does not return to Bank info confirmation page #60519

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
6 of 8 tasks
mitarachim opened this issue Apr 19, 2025 · 23 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@mitarachim
Copy link

mitarachim commented Apr 19, 2025

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 9.1.30-0
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: No, reproducible on hybrid only
If this was caught during regression testing, add the test name, ID and link from TestRail: #56931
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Device used: Mac 15.3 / Chrome
App Component: Workspace Settings

Action Performed:

Precondition:

  • Log in with Expensifail account.
  • Have a workspace with EUR as default currency.
  1. Launch Expensify app.
  2. Go to workspace settings > Workflows.
  3. Click Connect bank account.
  4. Click Connect manually.
  5. Click Country field.
  6. Select Croatia and click Next.
  7. Complete Bank info substeps and reach Bank info confirmation page.
  8. Click Confirm.
  9. Click RHP back button.
  10. Note that app returns to the first substep of Bank info section instead of the previous page which is Bank info confirmation page.
  11. Click Next three times to reach Business info steps.
  12. Complete all Business info substeps and reach Business info confirmation page.
  13. Click Confirm.
  14. Click RHP back button.
  15. Note that app returns to the previous page which is Business info confirmation page.

Expected Result:

In Step 10, RHP back button on the first substep of Business info step will return to the previous page which is Bank info confirmation page.

Actual Result:

In Step 10, RHP back button on the first substep of Business info step returns to the first substep of Bank info section instead of the previous page which is Bank info confirmation page.

This is inconsistent with Step 15 where RHP back button on Owner info page returns to Business info confirmation page.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6806819_1745019095938.20250419_072005.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021914413513155545543
  • Upwork Job ID: 1914413513155545543
  • Last Price Increase: 2025-04-21
Issue OwnerCurrent Issue Owner: @OfstadC
@mitarachim mitarachim added Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 DeployBlocker Indicates it should block deploying the API DeployBlockerCash This issue or pull request should block deployment labels Apr 19, 2025
Copy link

melvin-bot bot commented Apr 19, 2025

Triggered auto assignment to @OfstadC (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.

Copy link

melvin-bot bot commented Apr 19, 2025

Triggered auto assignment to @marcaaron (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Apr 19, 2025
Copy link

melvin-bot bot commented Apr 19, 2025

💬 A slack conversation has been started in #expensify-open-source

Copy link
Contributor

👋 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:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@hungvu193
Copy link
Contributor

hungvu193 commented Apr 19, 2025

Not a blocker. GR is under beta. @mitarachim Can you confirm you can connect EUR bank account with brand new account?

@mitarachim
Copy link
Author

Hello @hungvu193 , i end up in Hang tight... page while connect EUR bank account

Screen.Recording.2025-04-19.at.8.53.39.AM.mp4

@hungvu193
Copy link
Contributor

Hello @hungvu193 , i end up in Hang tight... page while connect EUR bank account

Screen.Recording.2025-04-19.at.8.53.39.AM.mp4

Oh looks like your account is under beta.
Yes this expected if you don't add director/senior information at step 5. It's under progress, we're working on it

@NJ-2020
Copy link
Contributor

NJ-2020 commented Apr 19, 2025

Proposal

Please re-state the problem that we are trying to solve in this issue.

Bank account - RHP back button on Business info does not return to Bank info confirmation page

What is the root cause of that problem?

When we connect to bank using NON-USD currency, we have some few steps screens and each screen will have some substeps which is:

  • Country >> 1 substep screen (country selection)
  • BankInfo >> 3 substep screen (bank account & account holder details & confirmation)
  • BusinessInfo >> 10 substep screen (name, address, contact info, ...etc)
  • More...

When we complete each screen for example in this case BankInfo, we will get redirected to BusinessInfo and when we press the go back button we will redirect back the user to BankInfo

case CONST.NON_USD_BANK_ACCOUNT.STEP.BUSINESS_INFO:
setNonUSDBankAccountStep(CONST.NON_USD_BANK_ACCOUNT.STEP.BANK_INFO);
break;

But why after we press the back button in BusinessInfo step we got redirected to BankInfo into the first substep screen?, actually we already have a logic right here to handle this cases which we will show the substep screen to the user based on the provided data information by the user earlier startFrom

const inputKeys = getInputKeysForBankInfoStep(corpayFields);
const values = useMemo(() => getBankInfoStepValues(inputKeys, reimbursementAccountDraft, reimbursementAccount), [inputKeys, reimbursementAccount, reimbursementAccountDraft]);
const startFrom = getInitialSubStepForBankInfoStep(values, corpayFields);

const {
componentToRender: SubStep,
isEditing,
screenIndex,
nextScreen,
prevScreen,
moveTo,
goToTheLastStep,
} = useSubStep<BankInfoSubStepProps>({bodyContent, startFrom, onFinished: submit});

But the startFrom variable is depends on corpayFields value which is only retrieved from BE

const [corpayFields] = useOnyx(ONYXKEYS.CORPAY_FIELDS, {initWithStoredValues: false, canBeMissing: true});

But in this case why we fail to calculate to correct index of substep screens?, as I said the startFrom is depends on corpayFields value which is only retrieved from BE and we also pass initWithStoredValues: false to the useOnyx function

So corpayFields will be undefined unless it needs to wait until GetCorpayBankAccountFields get called which causes this issue, and when we calculate the substep screen index we return 0 right here because corpayFields is undefined, but when GetCorpayBankAccountFields is done,

if (corpayFields === undefined || hasAnyMissingBankAccountDetails) {
return 0;
}

What changes do you think we should make in order to solve the problem?

This changes was introduced in this PR #58371, I think maybe there's some issues because corpayFields like very stricts meaning if we change the country or currency, we need to re-call the GetCorpayBankAccountFields, so to avoid any cache data and issues they fix it by adding initWithStoredValues: false which causes this issue

To resolve this issue we can remove this option from the useOnyx method initWithStoredValues: false and whenever the user changes the country/currency we can clear the corpayFields value

Alternatively instead of using useOnyx here for the corpayFields value

const [corpayFields] = useOnyx(ONYXKEYS.CORPAY_FIELDS, {initWithStoredValues: false, canBeMissing: true});

const inputKeys = getInputKeysForBankInfoStep(corpayFields);
const values = useMemo(() => getBankInfoStepValues(inputKeys, reimbursementAccountDraft, reimbursementAccount), [inputKeys, reimbursementAccount, reimbursementAccountDraft]);
const startFrom = getInitialSubStepForBankInfoStep(values, corpayFields);

We can use Onyx.connect inside getInputKeysForBankInfoStep for the corpayFields value

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

N/A

What alternative solutions did you explore? (Optional)

@hungvu193
Copy link
Contributor

Also cc @burczu

@melvin-bot melvin-bot bot added the Overdue label Apr 21, 2025
@yuwenmemon
Copy link
Contributor

Coming from the perspective of the Web Deploy, I removed the DeployBlocker label since this is under beta.

@yuwenmemon yuwenmemon removed the DeployBlocker Indicates it should block deploying the API label Apr 21, 2025
@marcaaron marcaaron added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Apr 21, 2025
@melvin-bot melvin-bot bot removed the Overdue label Apr 21, 2025
@marcaaron marcaaron added External Added to denote the issue can be worked on by a contributor Overdue labels Apr 21, 2025
@melvin-bot melvin-bot bot changed the title Bank account - RHP back button on Business info does not return to Bank info confirmation page [$250] Bank account - RHP back button on Business info does not return to Bank info confirmation page Apr 21, 2025
@MrMuzyk
Copy link
Contributor

MrMuzyk commented Apr 22, 2025

I am Michał from Callstack - expert contributor group. I’d like to work on this job.

Im also one of the authors of this whole flow this is now behind beta so I have all the needed context.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Apr 22, 2025
@marcaaron
Copy link
Contributor

Sounds good!

@MrMuzyk
Copy link
Contributor

MrMuzyk commented Apr 24, 2025

Because there were other issues with the flow and they're all relatively small we've decided to fix all of them in one big follow-up issue - #60633

@MrMuzyk
Copy link
Contributor

MrMuzyk commented Apr 28, 2025

Draft PR for this and other related issues is up. However I haven't added solution for this particular issue yet

@marcaaron
Copy link
Contributor

Sounds good. Link us the PR here if you can 🙇

@MrMuzyk
Copy link
Contributor

MrMuzyk commented Apr 29, 2025

Here it is. I'll be working on fixing this particular issue today :)

Copy link

melvin-bot bot commented Apr 29, 2025

@rushatgabhane 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 Overdue labels Apr 30, 2025
@MrMuzyk
Copy link
Contributor

MrMuzyk commented May 8, 2025

PR that fixes it just got merged. This will be ready to be retested soon.

@marcaaron marcaaron assigned madmax330 and unassigned marcaaron May 8, 2025
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels May 15, 2025
@melvin-bot melvin-bot bot changed the title [$250] Bank account - RHP back button on Business info does not return to Bank info confirmation page [Due for payment 2025-05-22] [$250] Bank account - RHP back button on Business info does not return to Bank info confirmation page May 15, 2025
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label May 15, 2025
Copy link

melvin-bot bot commented May 15, 2025

Reviewing label has been removed, please complete the "BugZero Checklist".

Copy link

melvin-bot bot commented May 15, 2025

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.45-21 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2025-05-22. 🎊

For reference, here are some details about the assignees on this issue:

  • @MrMuzyk does not require payment (Contractor)
  • @rushatgabhane requires payment through NewDot Manual Requests

Copy link

melvin-bot bot commented May 15, 2025

@rushatgabhane @OfstadC @rushatgabhane The PR fixing this issue has been merged! 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. If you have the K2 extension, you can simply click: [this button]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
Status: No status
Development

No branches or pull requests

9 participants