Skip to content

Commit

Permalink
Restore canUseNewVbbaFlow while BE is not deployed
Browse files Browse the repository at this point in the history
  • Loading branch information
nkuoch committed Feb 16, 2024
1 parent 2908c4f commit b65abec
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/libs/API/parameters/AcceptACHContractForBankAccount.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type {ACHContractStepProps} from '@src/types/form/ReimbursementAccountForm';

type AcceptACHContractForBankAccount = ACHContractStepProps & {bankAccountID: number; policyID: string};
type AcceptACHContractForBankAccount = ACHContractStepProps & {bankAccountID: number; policyID: string; canUseNewVbbaFlow?: boolean};

export default AcceptACHContractForBankAccount;
1 change: 1 addition & 0 deletions src/libs/API/parameters/ConnectBankAccountParams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ type ConnectBankAccountParams = {
plaidMask?: string;
isSavings?: boolean;
policyID?: string;
canUseNewVbbaFlow?: boolean;
};

export default ConnectBankAccountParams;
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ type OpenReimbursementAccountPageParams = {
stepToOpen: ReimbursementAccountStep;
subStep: ReimbursementAccountSubStep;
localCurrentStep: ReimbursementAccountStep;
canUseNewVbbaFlow?: boolean;
policyID: string;
};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type {BeneficialOwnersStepProps} from '@src/types/form/ReimbursementAccountForm';

type UpdateBeneficialOwnersForBankAccountParams = BeneficialOwnersStepProps & {bankAccountID: number; policyID: string};
type UpdateBeneficialOwnersForBankAccountParams = BeneficialOwnersStepProps & {bankAccountID: number; policyID: string; canUseNewVbbaFlow?: boolean};

export default UpdateBeneficialOwnersForBankAccountParams;
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type {CompanyStepProps} from '@src/types/form/ReimbursementAccountForm';

type UpdateCompanyInformationForBankAccountParams = CompanyStepProps & {bankAccountID: number; policyID: string};
type UpdateCompanyInformationForBankAccountParams = CompanyStepProps & {bankAccountID: number; policyID: string; canUseNewVbbaFlow?: boolean};

export default UpdateCompanyInformationForBankAccountParams;
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type {RequestorStepProps} from '@src/types/form/ReimbursementAccountForm';

type UpdatePersonalInformationForBankAccountParams = RequestorStepProps & {bankAccountID: number; policyID: string};
type UpdatePersonalInformationForBankAccountParams = RequestorStepProps & {bankAccountID: number; policyID: string; canUseNewVbbaFlow: boolean};

export default UpdatePersonalInformationForBankAccountParams;
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ type VerifyIdentityForBankAccountParams = {
bankAccountID: number;
onfidoData: string;
policyID: string;
canUseNewVbbaFlow?: boolean;
};
export default VerifyIdentityForBankAccountParams;
8 changes: 8 additions & 0 deletions src/libs/actions/BankAccounts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ function connectBankAccountWithPlaid(bankAccountID: number, selectedPlaidBankAcc
plaidAccessToken: selectedPlaidBankAccount.plaidAccessToken,
plaidMask: selectedPlaidBankAccount.mask,
isSavings: selectedPlaidBankAccount.isSavings,
canUseNewVbbaFlow: true,
policyID,
};

Expand Down Expand Up @@ -261,6 +262,7 @@ function updatePersonalInformationForBankAccount(bankAccountID: number, params:
...params,
bankAccountID,
policyID,
canUseNewVbbaFlow: true,
},
getVBBADataForOnyx(CONST.BANK_ACCOUNT.STEP.REQUESTOR),
);
Expand Down Expand Up @@ -354,6 +356,7 @@ function openReimbursementAccountPage(stepToOpen: ReimbursementAccountStep, subS
subStep,
localCurrentStep,
policyID,
canUseNewVbbaFlow: true,
};

return API.read(READ_COMMANDS.OPEN_REIMBURSEMENT_ACCOUNT_PAGE, parameters, onyxData);
Expand All @@ -370,6 +373,7 @@ function updateCompanyInformationForBankAccount(bankAccountID: number, params: C
...params,
bankAccountID,
policyID,
canUseNewVbbaFlow: true,
},
getVBBADataForOnyx(CONST.BANK_ACCOUNT.STEP.COMPANY),
);
Expand All @@ -386,6 +390,7 @@ function updateBeneficialOwnersForBankAccount(bankAccountID: number, params: Ben
...params,
bankAccountID,
policyID,
canUseNewVbbaFlow: true,
},
getVBBADataForOnyx(),
);
Expand All @@ -402,6 +407,7 @@ function acceptACHContractForBankAccount(bankAccountID: number, params: ACHContr
...params,
bankAccountID,
policyID,
canUseNewVbbaFlow: true,
},
getVBBADataForOnyx(),
);
Expand All @@ -420,6 +426,7 @@ function connectBankAccountManually(bankAccountID: number, bankAccount: PlaidBan
plaidAccessToken: bankAccount.plaidAccessToken,
plaidMask: bankAccount.mask,
isSavings: bankAccount.isSavings,
canUseNewVbbaFlow: true,
policyID,
};

Expand All @@ -434,6 +441,7 @@ function verifyIdentityForBankAccount(bankAccountID: number, onfidoData: Record<
bankAccountID,
onfidoData: JSON.stringify(onfidoData),
policyID,
canUseNewVbbaFlow: true,
};

API.write(WRITE_COMMANDS.VERIFY_IDENTITY_FOR_BANK_ACCOUNT, parameters, getVBBADataForOnyx());
Expand Down

0 comments on commit b65abec

Please sign in to comment.