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
[HOLD for payment 2024-04-15] [$500] Wallet - Back button returns to the same page after adding a bank account in Wallet page #38558
The Wallet Page is a Central Pane and not a RHP hence we can put the correct route inside of goBack, this won't cause any regression with the animation of pages as it is with RHP pages.
Please re-state the problem that we are trying to solve in this issue.
Pressing back button from wallet page returns to the add personal bank account page again.
What is the root cause of that problem?
When we press the continue button after successfully add the bank account, it will call exitFlow which will call goBack with fallback route of wallet page.
Because the add bank account is the only page in the route, it will use the fallback route and push it to the nav stack.
[wallet page, add personal bank account page, wallet page]
So, when we press back, we will arrive at add personal bank account page again.
What changes do you think we should make in order to solve the problem?
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
[@eVoloshchak] The PR that introduced the bug has been identified. Link to the PR:
[@eVoloshchak] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
[@eVoloshchak] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
[@eVoloshchak] Determine if we should create a regression test for this bug.
[@eVoloshchak] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
[@alexpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: this is a very simple bug, additional discussion isn't needed
Regression Test Proposal
Go to Settings > Wallet.
Tap Add bank account > Personal bank account.
Add a bank account and complete the process until you see the success screen.
Press continue, it will bring you back to wallet page.
After returning to the Wallet page, tap the back button on the top left.
Activity
melvin-bot commentedon Mar 19, 2024
Triggered auto assignment to @alexpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.izarutskaya commentedon Mar 19, 2024
We think that this bug might be related to the #collect project.
allgandalf commentedon Mar 19, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Back button returns to the same page after adding a bank account in Wallet page
What is the root cause of that problem?
For
Wallet Page, We haveNavigation.goBackdefined to go back to the last fallback:App/src/pages/settings/Wallet/WalletPage/WalletPage.tsx
Lines 357 to 360 in 34fa987
But when we verify the bank account, the fallback route itself is the wallet page as we were redirected to the wallet page when we added bank account
What changes do you think we should make in order to solve the problem?
We can set
shouldEnforceFallbackto true:App/src/libs/Navigation/Navigation.ts
Line 185 in 34fa987
Also we need to update
Navigation.goBackto make it fallback to the profile settings page.What alternative solutions did you explore? (Optional)
Or, Simply update the goBack route to profile settings page:
Note
The Wallet Page is a
Central Paneand not aRHPhence we can put the correct route inside ofgoBack, this won't cause any regression with the animation of pages as it is withRHPpages.Result Video:
2024-03-19-19.07.33.515936459.mp4
bernhardoj commentedon Mar 19, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Pressing back button from wallet page returns to the add personal bank account page again.
What is the root cause of that problem?
When we press the continue button after successfully add the bank account, it will call
exitFlowwhich will callgoBackwith fallback route of wallet page.App/src/pages/AddPersonalBankAccountPage.tsx
Lines 44 to 55 in 34fa987
Because the add bank account is the only page in the route, it will use the fallback route and push it to the nav stack.
[wallet page, add personal bank account page, wallet page]
So, when we press back, we will arrive at add personal bank account page again.
What changes do you think we should make in order to solve the problem?
Remove the fallback route from
goBack.App/src/pages/AddPersonalBankAccountPage.tsx
Line 54 in 34fa987
btw, a separate thing, I think we can force the fallback here
allgandalf commentedon Mar 19, 2024
Proposal Updated
Updated my proposal to add result video and a side note
alexpensify commentedon Mar 20, 2024
I'll try to test this one tomorrow.
alexpensify commentedon Mar 22, 2024
No update yet
alexpensify commentedon Mar 26, 2024
On my testing list
31 remaining items
melvin-bot commentedon Apr 8, 2024
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
alexpensify commentedon Apr 12, 2024
I confirmed there is an Upwork job here and will continue with the payment process on Monday.
alexpensify commentedon Apr 15, 2024
Payouts due:
Upwork job is here.
eVoloshchak commentedon Apr 25, 2024
Regression Test Proposal
Do we agree 👍 or 👎
JmillsExpensify commentedon Apr 29, 2024
$500 approved for @eVoloshchak though re-opening for Al to handle the regression test.
alexpensify commentedon Apr 29, 2024
I'll work on the regression test.
alexpensify commentedon Apr 30, 2024
Closing - the test request has been created