-
Notifications
You must be signed in to change notification settings - Fork 3.7k
fix: Do not display errors in the Start screen of USD VBA flow #57776
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,7 +18,7 @@ import ValidateCodeActionModal from '@components/ValidateCodeActionModal'; | |
| import useLocalize from '@hooks/useLocalize'; | ||
| import useTheme from '@hooks/useTheme'; | ||
| import useThemeStyles from '@hooks/useThemeStyles'; | ||
| import {getEarliestErrorField, getLatestErrorField} from '@libs/ErrorUtils'; | ||
| import {getEarliestErrorField, getLatestError, getLatestErrorField} from '@libs/ErrorUtils'; | ||
| import getPlaidDesktopMessage from '@libs/getPlaidDesktopMessage'; | ||
| import {REIMBURSEMENT_ACCOUNT_ROUTE_NAMES} from '@libs/ReimbursementAccountUtils'; | ||
| import WorkspaceResetBankAccountModal from '@pages/workspace/WorkspaceResetBankAccountModal'; | ||
|
|
@@ -219,57 +219,55 @@ function VerifiedBankAccountFlowEntryPoint({ | |
| </Text> | ||
| </View> | ||
| )} | ||
| <OfflineWithFeedback | ||
| errors={errors} | ||
| shouldShowErrorMessages | ||
| onClose={resetReimbursementAccount} | ||
| > | ||
| {shouldShowContinueSetupButton === true ? ( | ||
| <> | ||
| <MenuItem | ||
| title={translate('workspace.bankAccount.continueWithSetup')} | ||
| icon={Connect} | ||
| iconFill={theme.icon} | ||
| onPress={onContinuePress} | ||
| shouldShowRightIcon | ||
| wrapperStyle={[styles.cardMenuItem, styles.mt4]} | ||
| disabled={!!pendingAction || !isEmptyObject(errors)} | ||
| /> | ||
| <MenuItem | ||
| title={translate('workspace.bankAccount.startOver')} | ||
| icon={RotateLeft} | ||
| iconFill={theme.icon} | ||
| // TODO add method for non USD accounts in next issue - https://github.com/Expensify/App/issues/50912 | ||
| onPress={requestResetFreePlanBankAccount} | ||
| shouldShowRightIcon | ||
| wrapperStyle={[styles.cardMenuItem, styles.mt4]} | ||
| disabled={!!pendingAction || !isEmptyObject(errors)} | ||
| /> | ||
| </> | ||
| ) : ( | ||
| <> | ||
| {!hasForeignCurrency && !shouldShowContinueSetupButton && ( | ||
| <MenuItem | ||
| title={translate('bankAccount.connectOnlineWithPlaid')} | ||
| icon={Bank} | ||
| iconFill={theme.icon} | ||
| disabled={!!isPlaidDisabled} | ||
| onPress={handleConnectPlaid} | ||
| shouldShowRightIcon | ||
| wrapperStyle={[styles.cardMenuItem, styles.mt4]} | ||
| /> | ||
| )} | ||
| {shouldShowContinueSetupButton === true ? ( | ||
| <OfflineWithFeedback | ||
| errors={getLatestError(errors)} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have a small concern with this function call. Since it relies on timestamps and one error comes from the client and the other from the server, if the client's clock is one second ahead, the order will be reversed.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think we need to worry about such an extreme edge case. If you can find a flow which is causing that error somewhat regularly then you can report it as a separate bug. |
||
| shouldShowErrorMessages | ||
| onClose={resetReimbursementAccount} | ||
| > | ||
| <MenuItem | ||
| title={translate('workspace.bankAccount.continueWithSetup')} | ||
| icon={Connect} | ||
| iconFill={theme.icon} | ||
| onPress={onContinuePress} | ||
| shouldShowRightIcon | ||
| wrapperStyle={[styles.cardMenuItem, styles.mt4]} | ||
| disabled={!!pendingAction || !isEmptyObject(errors)} | ||
| /> | ||
| <MenuItem | ||
| title={translate('workspace.bankAccount.startOver')} | ||
| icon={RotateLeft} | ||
| iconFill={theme.icon} | ||
| // TODO add method for non USD accounts in next issue - https://github.com/Expensify/App/issues/50912 | ||
| onPress={requestResetFreePlanBankAccount} | ||
| shouldShowRightIcon | ||
| wrapperStyle={[styles.cardMenuItem, styles.mt4]} | ||
| disabled={!!pendingAction || !isEmptyObject(errors)} | ||
| /> | ||
| </OfflineWithFeedback> | ||
| ) : ( | ||
| <> | ||
| {!hasForeignCurrency && !shouldShowContinueSetupButton && ( | ||
| <MenuItem | ||
| title={translate('bankAccount.connectManually')} | ||
| icon={Connect} | ||
| title={translate('bankAccount.connectOnlineWithPlaid')} | ||
| icon={Bank} | ||
| iconFill={theme.icon} | ||
| onPress={handleConnectManually} | ||
| disabled={!!isPlaidDisabled} | ||
| onPress={handleConnectPlaid} | ||
| shouldShowRightIcon | ||
| wrapperStyle={[styles.cardMenuItem, styles.mt4]} | ||
| /> | ||
| </> | ||
| )} | ||
| </OfflineWithFeedback> | ||
| )} | ||
| <MenuItem | ||
| title={translate('bankAccount.connectManually')} | ||
| icon={Connect} | ||
| iconFill={theme.icon} | ||
| onPress={handleConnectManually} | ||
| shouldShowRightIcon | ||
| wrapperStyle={[styles.cardMenuItem, styles.mt4]} | ||
| /> | ||
| </> | ||
| )} | ||
| </Section> | ||
| <View style={[styles.mv0, styles.mh5, styles.flexRow, styles.justifyContentBetween]}> | ||
| <TextLink href={CONST.OLD_DOT_PUBLIC_URLS.PRIVACY_URL}>{translate('common.privacy')}</TextLink> | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.