Skip to content

Commit a2c8842

Browse files
authored
Merge pull request #54729 from Expensify/revert-52322-intl-bank-account
Revert "Implemented International Bank Account flow"
2 parents 3e13343 + bde7ae7 commit a2c8842

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+199
-1738
lines changed

src/CONST.ts

-45
Original file line numberDiff line numberDiff line change
@@ -940,7 +940,6 @@ const CONST = {
940940
CONFIGURE_REIMBURSEMENT_SETTINGS_HELP_URL: 'https://help.expensify.com/articles/expensify-classic/workspaces/Configure-Reimbursement-Settings',
941941
COPILOT_HELP_URL: 'https://help.expensify.com/articles/expensify-classic/copilots-and-delegates/Assign-or-remove-a-Copilot',
942942
DELAYED_SUBMISSION_HELP_URL: 'https://help.expensify.com/articles/expensify-classic/reports/Automatically-submit-employee-reports',
943-
ENCRYPTION_AND_SECURITY_HELP_URL: 'https://help.expensify.com/articles/new-expensify/settings/Encryption-and-Data-Security',
944943
PLAN_TYPES_AND_PRICING_HELP_URL: 'https://help.expensify.com/articles/new-expensify/billing-and-subscriptions/Plan-types-and-pricing',
945944
// Use Environment.getEnvironmentURL to get the complete URL with port number
946945
DEV_NEW_EXPENSIFY_URL: 'https://dev.new.expensify.com:',
@@ -6444,50 +6443,6 @@ const CONST = {
64446443
},
64456444
},
64466445

6447-
CORPAY_FIELDS: {
6448-
BANK_ACCOUNT_DETAILS_FIELDS: ['accountNumber', 'localAccountNumber', 'routingCode', 'localRoutingCode', 'swiftBicCode'] as string[],
6449-
ACCOUNT_TYPE_KEY: 'BeneficiaryAccountType',
6450-
BANK_INFORMATION_FIELDS: ['bankName', 'bankAddressLine1', 'bankAddressLine2', 'bankCity', 'bankRegion', 'bankPostal', 'BeneficiaryBankBranchName'] as string[],
6451-
ACCOUNT_HOLDER_FIELDS: [
6452-
'accountHolderName',
6453-
'accountHolderAddress1',
6454-
'accountHolderAddress2',
6455-
'accountHolderCity',
6456-
'accountHolderRegion',
6457-
'accountHolderCountry',
6458-
'accountHolderPostal',
6459-
'accountHolderPhoneNumber',
6460-
'accountHolderEmail',
6461-
'ContactName',
6462-
'BeneficiaryCPF',
6463-
'BeneficiaryRUT',
6464-
'BeneficiaryCedulaID',
6465-
'BeneficiaryTaxID',
6466-
] as string[],
6467-
SPECIAL_LIST_REGION_KEYS: ['bankRegion', 'accountHolderRegion'] as string[],
6468-
SPECIAL_LIST_ADDRESS_KEYS: ['bankAddressLine1', 'accountHolderAddress1'] as string[],
6469-
STEPS_NAME: {
6470-
COUNTRY_SELECTOR: 'CountrySelector',
6471-
BANK_ACCOUNT_DETAILS: 'BankAccountDetails',
6472-
ACCOUNT_TYPE: 'AccountType',
6473-
BANK_INFORMATION: 'BankInformation',
6474-
ACCOUNT_HOLDER_INFORMATION: 'AccountHolderInformation',
6475-
CONFIRMATION: 'Confirmation',
6476-
SUCCESS: 'Success',
6477-
},
6478-
INDEXES: {
6479-
MAPPING: {
6480-
COUNTRY_SELECTOR: 0,
6481-
BANK_ACCOUNT_DETAILS: 1,
6482-
ACCOUNT_TYPE: 2,
6483-
BANK_INFORMATION: 3,
6484-
ACCOUNT_HOLDER_INFORMATION: 4,
6485-
CONFIRMATION: 5,
6486-
SUCCESS: 6,
6487-
},
6488-
},
6489-
},
6490-
64916446
HYBRID_APP: {
64926447
REORDERING_REACT_NATIVE_ACTIVITY_TO_FRONT: 'reorderingReactNativeActivityToFront',
64936448
},

src/ONYXKEYS.ts

-3
Original file line numberDiff line numberDiff line change
@@ -601,8 +601,6 @@ const ONYXKEYS = {
601601
HOME_ADDRESS_FORM_DRAFT: 'homeAddressFormDraft',
602602
PERSONAL_DETAILS_FORM: 'personalDetailsForm',
603603
PERSONAL_DETAILS_FORM_DRAFT: 'personalDetailsFormDraft',
604-
INTERNATIONAL_BANK_ACCOUNT_FORM: 'internationalBankAccountForm',
605-
INTERNATIONAL_BANK_ACCOUNT_FORM_DRAFT: 'internationalBankAccountFormDraft',
606604
NEW_ROOM_FORM: 'newRoomForm',
607605
NEW_ROOM_FORM_DRAFT: 'newRoomFormDraft',
608606
ROOM_SETTINGS_FORM: 'roomSettingsForm',
@@ -828,7 +826,6 @@ type OnyxFormValuesMapping = {
828826
[ONYXKEYS.FORMS.RULES_MAX_EXPENSE_AGE_FORM]: FormTypes.RulesMaxExpenseAgeForm;
829827
[ONYXKEYS.FORMS.SEARCH_SAVED_SEARCH_RENAME_FORM]: FormTypes.SearchSavedSearchRenameForm;
830828
[ONYXKEYS.FORMS.DEBUG_DETAILS_FORM]: FormTypes.DebugReportForm | FormTypes.DebugReportActionForm | FormTypes.DebugTransactionForm | FormTypes.DebugTransactionViolationForm;
831-
[ONYXKEYS.FORMS.INTERNATIONAL_BANK_ACCOUNT_FORM]: FormTypes.InternationalBankAccountForm;
832829
[ONYXKEYS.FORMS.WORKSPACE_PER_DIEM_FORM]: FormTypes.WorkspacePerDiemForm;
833830
};
834831

src/ROUTES.ts

-1
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,6 @@ const ROUTES = {
200200
},
201201
SETTINGS_ADD_DEBIT_CARD: 'settings/wallet/add-debit-card',
202202
SETTINGS_ADD_BANK_ACCOUNT: 'settings/wallet/add-bank-account',
203-
SETTINGS_ADD_US_BANK_ACCOUNT: 'settings/wallet/add-us-bank-account',
204203
SETTINGS_ENABLE_PAYMENTS: 'settings/wallet/enable-payments',
205204
SETTINGS_WALLET_CARD_DIGITAL_DETAILS_UPDATE_ADDRESS: {
206205
route: 'settings/wallet/card/:domain/digital-details/update-address',

src/SCREENS.ts

-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ const SCREENS = {
6969
ADD_DEBIT_CARD: 'Settings_Add_Debit_Card',
7070
ADD_PAYMENT_CARD_CHANGE_CURRENCY: 'Settings_Add_Payment_Card_Change_Currency',
7171
ADD_BANK_ACCOUNT: 'Settings_Add_Bank_Account',
72-
ADD_US_BANK_ACCOUNT: 'Settings_Add_US_Bank_Account',
7372
CLOSE: 'Settings_Close',
7473
TWO_FACTOR_AUTH: 'Settings_TwoFactorAuth',
7574
REPORT_CARD_LOST_OR_DAMAGED: 'Settings_ReportCardLostOrDamaged',

src/components/CurrencyPicker.tsx

-86
This file was deleted.

src/components/Form/FormProvider.tsx

+2-7
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,6 @@ type FormProviderProps<TFormID extends OnyxFormKey = OnyxFormKey> = FormProps<TF
6969

7070
/** Whether HTML is allowed in form inputs */
7171
allowHTML?: boolean;
72-
73-
/** Whether the form is loading */
74-
isLoading?: boolean;
7572
};
7673

7774
function FormProvider(
@@ -85,7 +82,6 @@ function FormProvider(
8582
onSubmit,
8683
shouldTrimValues = true,
8784
allowHTML = false,
88-
isLoading = false,
8985
...rest
9086
}: FormProviderProps,
9187
forwardedRef: ForwardedRef<FormRef>,
@@ -193,7 +189,7 @@ function FormProvider(
193189
const submit = useDebounceNonReactive(
194190
useCallback(() => {
195191
// Return early if the form is already submitting to avoid duplicate submission
196-
if (!!formState?.isLoading || isLoading) {
192+
if (formState?.isLoading) {
197193
return;
198194
}
199195

@@ -214,7 +210,7 @@ function FormProvider(
214210
}
215211

216212
KeyboardUtils.dismiss().then(() => onSubmit(trimmedStringValues));
217-
}, [enabledWhenOffline, formState?.isLoading, inputValues, isLoading, network?.isOffline, onSubmit, onValidate, shouldTrimValues]),
213+
}, [enabledWhenOffline, formState?.isLoading, inputValues, network?.isOffline, onSubmit, onValidate, shouldTrimValues]),
218214
1000,
219215
{leading: true, trailing: false},
220216
);
@@ -410,7 +406,6 @@ function FormProvider(
410406
onSubmit={submit}
411407
inputRefs={inputRefs}
412408
errors={errors}
413-
isLoading={isLoading}
414409
enabledWhenOffline={enabledWhenOffline}
415410
>
416411
{typeof children === 'function' ? children({inputValues}) : children}

src/components/Form/FormWrapper.tsx

+1-6
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ type FormWrapperProps = ChildrenProps &
3636

3737
/** Callback to submit the form */
3838
onSubmit: () => void;
39-
40-
/** Whether the form is loading */
41-
isLoading?: boolean;
4239
};
4340

4441
function FormWrapper({
@@ -60,7 +57,6 @@ function FormWrapper({
6057
shouldHideFixErrorsAlert = false,
6158
disablePressOnEnter = false,
6259
isSubmitDisabled = false,
63-
isLoading = false,
6460
}: FormWrapperProps) {
6561
const styles = useThemeStyles();
6662
const {paddingBottom: safeAreaInsetPaddingBottom} = useStyledSafeAreaInsets();
@@ -116,7 +112,7 @@ function FormWrapper({
116112
buttonText={submitButtonText}
117113
isDisabled={isSubmitDisabled}
118114
isAlertVisible={((!isEmptyObject(errors) || !isEmptyObject(formState?.errorFields)) && !shouldHideFixErrorsAlert) || !!errorMessage}
119-
isLoading={!!formState?.isLoading || isLoading}
115+
isLoading={!!formState?.isLoading}
120116
message={isEmptyObject(formState?.errorFields) ? errorMessage : undefined}
121117
onSubmit={onSubmit}
122118
footerContent={footerContent}
@@ -147,7 +143,6 @@ function FormWrapper({
147143
formState?.isLoading,
148144
shouldHideFixErrorsAlert,
149145
errorMessage,
150-
isLoading,
151146
onSubmit,
152147
footerContent,
153148
onFixTheErrorsLinkPressed,

src/components/SelectionList/BaseSelectionList.tsx

+1-3
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ function BaseSelectionList<TItem extends ListItem>(
6767
showScrollIndicator = true,
6868
showLoadingPlaceholder = false,
6969
showConfirmButton = false,
70-
isConfirmButtonDisabled = false,
7170
shouldUseDefaultTheme = false,
7271
shouldPreventDefaultFocusOnSelectRow = false,
7372
containerStyle,
@@ -766,7 +765,7 @@ function BaseSelectionList<TItem extends ListItem>(
766765
{
767766
captureOnInputs: true,
768767
shouldBubble: !flattenedSections.allOptions.at(focusedIndex) || focusedIndex === -1,
769-
isActive: !disableKeyboardShortcuts && isFocused && !isConfirmButtonDisabled,
768+
isActive: !disableKeyboardShortcuts && isFocused,
770769
},
771770
);
772771

@@ -849,7 +848,6 @@ function BaseSelectionList<TItem extends ListItem>(
849848
onPress={onConfirm}
850849
pressOnEnter
851850
enterKeyEventListenerPriority={1}
852-
isDisabled={isConfirmButtonDisabled}
853851
/>
854852
</FixedFooter>
855853
)}

src/components/SelectionList/types.ts

-3
Original file line numberDiff line numberDiff line change
@@ -485,9 +485,6 @@ type BaseSelectionListProps<TItem extends ListItem> = Partial<ChildrenProps> & {
485485
/** Whether to show the default confirm button */
486486
showConfirmButton?: boolean;
487487

488-
/** Whether to show the default confirm button disabled */
489-
isConfirmButtonDisabled?: boolean;
490-
491488
/** Whether to use the default theme for the confirm button */
492489
shouldUseDefaultTheme?: boolean;
493490

src/components/TextPicker/index.tsx

+2-10
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,11 @@ import CONST from '@src/CONST';
77
import TextSelectorModal from './TextSelectorModal';
88
import type {TextPickerProps} from './types';
99

10-
function TextPicker(
11-
{value, description, placeholder = '', errorText = '', onInputChange, furtherDetails, rightLabel, disabled = false, interactive = true, ...rest}: TextPickerProps,
12-
forwardedRef: ForwardedRef<View>,
13-
) {
10+
function TextPicker({value, description, placeholder = '', errorText = '', onInputChange, furtherDetails, rightLabel, ...rest}: TextPickerProps, forwardedRef: ForwardedRef<View>) {
1411
const styles = useThemeStyles();
1512
const [isPickerVisible, setIsPickerVisible] = useState(false);
1613

1714
const showPickerModal = () => {
18-
if (disabled) {
19-
return;
20-
}
2115
setIsPickerVisible(true);
2216
};
2317

@@ -36,7 +30,7 @@ function TextPicker(
3630
<View>
3731
<MenuItemWithTopDescription
3832
ref={forwardedRef}
39-
shouldShowRightIcon={!disabled}
33+
shouldShowRightIcon
4034
title={value ?? placeholder ?? ''}
4135
description={description}
4236
onPress={showPickerModal}
@@ -45,15 +39,13 @@ function TextPicker(
4539
brickRoadIndicator={errorText ? CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR : undefined}
4640
errorText={errorText}
4741
style={[styles.moneyRequestMenuItem]}
48-
interactive={interactive}
4942
/>
5043
<TextSelectorModal
5144
value={value}
5245
isVisible={isPickerVisible}
5346
description={description}
5447
onClose={hidePickerModal}
5548
onValueSelected={updateInput}
56-
disabled={disabled}
5749
// eslint-disable-next-line react/jsx-props-no-spreading
5850
{...rest}
5951
/>

src/components/TextPicker/types.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ type TextPickerProps = {
4242

4343
/** Whether to show the tooltip text */
4444
shouldShowTooltips?: boolean;
45-
} & Pick<MenuItemBaseProps, 'rightLabel' | 'subtitle' | 'description' | 'interactive'> &
45+
} & Pick<MenuItemBaseProps, 'rightLabel' | 'subtitle' | 'description'> &
4646
TextProps;
4747

4848
export type {TextSelectorModalProps, TextPickerProps};

src/hooks/useInternationalBankAccountFormSubmit.ts

-27
This file was deleted.

0 commit comments

Comments
 (0)