-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Prevent infinite loading in validateBankAccount #4165
Conversation
@@ -553,7 +553,6 @@ function validateBankAccount(bankAccountID, validateCode) { | |||
if (response.jsonCode === 200) { | |||
Growl.show('Bank Account successfully validated!', CONST.GROWL.SUCCESS, 3000); | |||
Navigation.dismissModal(); | |||
return; |
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.
Nice catch!
But I think the intention to early return here is correct as the non 200 case would be error handling logic.
So we just need to set loading to false
and error
to empty string maybe ''
?
Navigation.dismissModal();
Onyx.merge(ONYXKEYS.REIMBURSEMENT_ACCOUNT, {loading: false, error: ''});
return;
}
Updated! |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging in version: 1.0.79-5🚀
|
Prevent.infinite.loading.in.validateBankAccount.movIt was weird to see "Get Started" as the button in Expensify Card when it should read "Finish Setup". That screen did not auto update after entering the validation amounts. I would have expected to see "Manage Cards" at that point. Also "Get Started" brought me to a blank modal before the hard refresh |
@luacmartins @MitchExpensify Should this issue #4165 (comment) be treated as a deploy blocker or can we check off this PR from the list? |
I think it's fine to check it off the list since it solves the issue at hand and the remaining steps are only copy that needs to be updated. I put up another PR to update the button text. |
🚀 Deployed to production in version: 1.0.80-2🚀
|
@luacmartins I ran into the same experience after the So I haven't been able to get to the ValidateBankAccount step, but it looks like we may have similar problems at each step of the process... Should I open a separate GH? And would you want to pick it up since you just knocked this one out? |
Is there a reason this didn't closed if the PR is deployed to production? |
Not sure, for some reason I can't manually close it either... |
Weird, neither can I. |
cc @chiragsalian
Details
Removes
return
statement that kept API calls in an infinite loading state.Fixed Issues
$ https://github.com/Expensify/Expensify/issues/171371
Tests
PENDING
account.QA Steps
Internal QA.
Tested On
Screenshots
Web
web.mov
Mobile Web
Desktop
iOS
Android