-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Setup "Connect bank account" workspace flow #5703
Setup "Connect bank account" workspace flow #5703
Conversation
}; | ||
|
||
const WorkspaceBankAccountPage = (props) => { | ||
// If we have no bank account in setup then we will immediately redirect the user to /bank-account to begin setup |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe worth noting that I am not trying to fetch the bank account here. If it doesn't exist in Onyx we'll just fetch it when we redirect instead of showing you this "Almost done" page. IMO this is fine because if you were setting up the account and are still logged in should still be in Onyx.
The reason I'm doing it this way is because fetching the bank account will trigger an immediate redirect to the step. And in this case we don't want to redirect we just need to know if the account exists.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another alternative would be to just fetch the bank account twice but add a param to not redirect.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And yet another would be to just check if this user has a expensify_freePlanBankAccountID
NVP without fetching the rest of the data we need.
@@ -64,7 +64,7 @@ function goToWithdrawalAccountSetupStep(stepID, achData) { | |||
if (!newACHData.useOnfido && stepID === CONST.BANK_ACCOUNT.STEP.REQUESTOR) { | |||
delete newACHData.questions; | |||
delete newACHData.answers; | |||
if (lodashHas(achData, CONST.BANK_ACCOUNT.VERIFICATIONS.EXTERNAL_API_RESPONSES)) { | |||
if (lodashHas(newACHData, CONST.BANK_ACCOUNT.VERIFICATIONS.EXTERNAL_API_RESPONSES)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed this because it was breaking on the next line and preventing the redirect logic I added. I don't think this should matter since we aren't using the questions and answers from expectID yet. Maybe @ctkochan22 can double check I'm not doing anything dumb here.
@tgolen taking this out of draft so we can start the reviews |
@@ -167,21 +169,32 @@ class BankAccountStep extends React.Component { | |||
return ( | |||
<View style={[styles.flex1, styles.justifyContentBetween]}> | |||
<HeaderWithCloseButton | |||
title={this.props.translate('bankAccount.addBankAccount')} | |||
title={this.props.translate('workspace.common.bankAccount')} | |||
stepCounter={subStep && {step: 1, total: 5}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is showing error when subStep
is null
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
propTypes
warning maybe? probably we should be passing either undefined
or an Object
. I don't think it will affect the code, but should be cleaned up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
App/src/components/HeaderWithCloseButton.js
Lines 43 to 47 in a860c59
/** Data to display a step counter in the header */ | |
stepCounter: PropTypes.shape({ | |
step: PropTypes.number, | |
total: PropTypes.number, | |
}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stepCounter={subStep ? {step: 1, total: 5} : undefined}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I cleaned this up already.
Just to follow up here. I did some testing on iOS and Android and things seem to be working well. However, one thing to watch out for is the transition from the Ultimately, I couldn't come up with a perfect solution here but there is logic that will detect the screen getting focus and we'll go back one more screen if it's blank otherwise show the "Continue with setup" content. In an earlier solution, I tried popping the screen from the stack before navigating to the |
We're testing the first flow on all environments but for the Edit: ignore this, I missed that this was internal QA before. My apologies🤦 |
This was my bad, I missed the Internal QA under QA 🤦 On the good side, we tested the first flow on iOS Web and Android and it was a pass Edit: forgot to mention that we also tested the 3 amount verification part here https://expensify.slack.com/archives/C9YU7BX5M/p1634347327277400?thread_ts=1634329844.247700&cid=C9YU7BX5M |
|
🚀 Deployed to production by @roryabraham in version: 1.1.8-9 🚀
|
Details
There's a lot of cleanup that needs to happen here (translation / style issues) + still waiting for assets but mostly done.
Fixed Issues
$ #5697
$ #5168
$ #5707
Tests
x
herebank: chase, user: user_good, pass: pass_good
Repeat flow with new account and test
VERIFYING
accountQA Steps
Internal QA
Tested On
Screenshots
Web
Mobile Web
Desktop
iOS
Android