Skip to content

Commit bf65710

Browse files
committed
fix: cr fixes
1 parent 3c4f325 commit bf65710

11 files changed

Lines changed: 16 additions & 15 deletions

File tree

src/CONST/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ const CONST = {
505505
SETUP_TYPE: {
506506
MANUAL: 'manual',
507507
PLAID: 'plaid',
508-
EMPTY: '',
508+
NONE: '',
509509
},
510510
REGEX: {
511511
US_ACCOUNT_NUMBER: /^[0-9]{4,17}$/,

src/ONYXKEYS.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ const ONYXKEYS = {
304304
/** Stores Workspace ID that will be tied to reimbursement account during setup */
305305
REIMBURSEMENT_ACCOUNT_WORKSPACE_ID: 'reimbursementAccountWorkspaceID',
306306

307-
/** Stores information about type of connection user wants to perform before showing him validation code modal */
307+
/** Stores the bank connection type user wants to set up before validation code modal */
308308
REIMBURSEMENT_ACCOUNT_OPTION_PRESSED: 'reimbursementAccountOptionPressed',
309309

310310
/** Set when we are loading payment methods */

src/components/SubStepForms/CountryFullStep/CountryFullStep.tsx renamed to src/components/SubStepForms/CountryFullStep/index.tsx

File renamed without changes.

src/components/SubStepForms/CountryFullStep/subSteps/Confirmation.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,9 @@ function Confirmation({onNext, policyID}: ConfirmationStepProps) {
9696
style={[styles.label]}
9797
onPress={handleSettingsPress}
9898
>
99-
{translate('common.settings').toLowerCase()}.
99+
{translate('common.settings').toLowerCase()}
100100
</TextLink>
101+
.
101102
</Text>
102103
<InputWrapper
103104
InputComponent={PushRowWithModal}

src/pages/ReimbursementAccount/NonUSD/Country/Country.tsx renamed to src/pages/ReimbursementAccount/NonUSD/Country/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import CountryFullStep from '@components/SubStepForms/CountryFullStep/CountryFullStep';
2+
import CountryFullStep from '@components/SubStepForms/CountryFullStep';
33

44
type CountryProps = {
55
/** Handles back button press */

src/pages/ReimbursementAccount/NonUSD/NonUSDVerifiedBankAccountFlow.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import Agreements from './Agreements';
66
import BankInfo from './BankInfo/BankInfo';
77
import BeneficialOwnerInfo from './BeneficialOwnerInfo/BeneficialOwnerInfo';
88
import BusinessInfo from './BusinessInfo/BusinessInfo';
9-
import Country from './Country/Country';
9+
import Country from './Country';
1010
import Docusign from './Docusign/Docusign';
1111
import Finish from './Finish';
1212
import SignerInfo from './SignerInfo';

src/pages/ReimbursementAccount/ReimbursementAccountPage.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,10 @@ function ReimbursementAccountPage({route, policy, isLoadingPolicy}: Reimbursemen
9898
const hasConfirmedUSDCurrency = (reimbursementAccountDraft?.[INPUT_IDS.ADDITIONAL_DATA.COUNTRY] ?? '') !== '' || (achData?.accountNumber ?? '') !== '';
9999

100100
/**
101-
currentStep determines the step that is displayed in the USD flow. In the majority of the cases it is based on the
102-
achData?.current step with one exception - the beginning of the flow. There is a step where user confirms the currency
103-
and the country, and it exists purely from FE perspective. We return early in getInitialCurrentStep and ignore
104-
achData?.currentStep value to display very first step.
101+
We main rely on `achData.currentStep` to determine the step to display in USD flow.
102+
This data is synchronized with the BE to know which step to resume/start from.
103+
Except for the CountryStep which exists purely in the FE.
104+
This function is to decide if we should start from the CountryStep.
105105
*/
106106
const getInitialCurrentStep = () => {
107107
if (!hasConfirmedUSDCurrency) {

src/pages/ReimbursementAccount/USD/Country/Country.tsx renamed to src/pages/ReimbursementAccount/USD/Country/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import CountryFullStep from '@components/SubStepForms/CountryFullStep/CountryFullStep';
2+
import CountryFullStep from '@components/SubStepForms/CountryFullStep';
33
import {goToWithdrawalAccountSetupStep} from '@userActions/ReimbursementAccount';
44
import CONST from '@src/CONST';
55

src/pages/ReimbursementAccount/USD/USDVerifiedBankAccountFlow.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import BeneficialOwnersStep from './BeneficialOwnerInfo/BeneficialOwnersStep';
88
import BusinessInfo from './BusinessInfo/BusinessInfo';
99
import CompleteVerification from './CompleteVerification/CompleteVerification';
1010
import ConnectBankAccount from './ConnectBankAccount/ConnectBankAccount';
11-
import Country from './Country/Country';
11+
import Country from './Country';
1212
import RequestorStep from './Requestor/RequestorStep';
1313

1414
type USDVerifiedBankAccountFlowProps = {

src/pages/ReimbursementAccount/VerifiedBankAccountFlowEntryPoint.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,16 +145,16 @@ function VerifiedBankAccountFlowEntryPoint({
145145
if (reimbursementAccountOptionPressed === CONST.BANK_ACCOUNT.SETUP_TYPE.MANUAL) {
146146
if (isNonUSDWorkspace) {
147147
setNonUSDBankAccountStep(CONST.NON_USD_BANK_ACCOUNT.STEP.COUNTRY);
148-
setReimbursementAccountOptionPressed(CONST.BANK_ACCOUNT.SETUP_TYPE.EMPTY);
148+
setReimbursementAccountOptionPressed(CONST.BANK_ACCOUNT.SETUP_TYPE.NONE);
149149
return;
150150
}
151151

152152
prepareNextStep(CONST.BANK_ACCOUNT.SETUP_TYPE.MANUAL);
153-
setReimbursementAccountOptionPressed(CONST.BANK_ACCOUNT.SETUP_TYPE.EMPTY);
153+
setReimbursementAccountOptionPressed(CONST.BANK_ACCOUNT.SETUP_TYPE.NONE);
154154
} else if (reimbursementAccountOptionPressed === CONST.BANK_ACCOUNT.SETUP_TYPE.PLAID) {
155155
openPlaidView();
156156
prepareNextStep(CONST.BANK_ACCOUNT.SETUP_TYPE.PLAID);
157-
setReimbursementAccountOptionPressed(CONST.BANK_ACCOUNT.SETUP_TYPE.EMPTY);
157+
setReimbursementAccountOptionPressed(CONST.BANK_ACCOUNT.SETUP_TYPE.NONE);
158158
}
159159
}, [isAccountValidated, isNonUSDWorkspace, prepareNextStep, reimbursementAccountOptionPressed, setNonUSDBankAccountStep]);
160160

0 commit comments

Comments
 (0)