Skip to content

Commit 6294665

Browse files
committed
fix: lint
1 parent 024a7f2 commit 6294665

9 files changed

Lines changed: 18 additions & 17 deletions

File tree

src/CONST/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,7 @@ const CONST = {
490490
SUBSTEP: {
491491
MANUAL: 'manual',
492492
PLAID: 'plaid',
493+
EMPTY: '',
493494
},
494495
VERIFICATIONS: {
495496
ERROR_MESSAGE: 'verifications.errorMessage',
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type {ACHContractStepProps} from '@src/types/form/ReimbursementAccountForm';
22

3-
type AcceptACHContractForBankAccount = ACHContractStepProps & {bankAccountID: number; policyID: string};
3+
type AcceptACHContractForBankAccount = ACHContractStepProps & {bankAccountID: number; policyID: string | undefined};
44

55
export default AcceptACHContractForBankAccount;

src/libs/actions/BankAccounts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,7 @@ function updateBeneficialOwnersForBankAccount(bankAccountID: number, params: Par
742742
* Accept the ACH terms and conditions and verify the accuracy of the information provided
743743
* @param params - Verification step form params
744744
*/
745-
function acceptACHContractForBankAccount(bankAccountID: number, params: ACHContractStepProps, policyID: string) {
745+
function acceptACHContractForBankAccount(bankAccountID: number, params: ACHContractStepProps, policyID: string | undefined) {
746746
API.write(
747747
WRITE_COMMANDS.ACCEPT_ACH_CONTRACT_FOR_BANK_ACCOUNT,
748748
{

src/pages/ReimbursementAccount/USD/BankInfo/subSteps/Manual.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ const BANK_INFO_STEP_KEYS = INPUT_IDS.BANK_INFO_STEP;
2323
const STEP_FIELDS = [BANK_INFO_STEP_KEYS.ROUTING_NUMBER, BANK_INFO_STEP_KEYS.ACCOUNT_NUMBER];
2424

2525
function Manual({onNext}: ManualProps) {
26-
const [reimbursementAccount] = useOnyx(ONYXKEYS.REIMBURSEMENT_ACCOUNT);
27-
const [reimbursementAccountDraft] = useOnyx(ONYXKEYS.FORMS.REIMBURSEMENT_ACCOUNT_FORM_DRAFT);
26+
const [reimbursementAccount] = useOnyx(ONYXKEYS.REIMBURSEMENT_ACCOUNT, {canBeMissing: false});
27+
const [reimbursementAccountDraft] = useOnyx(ONYXKEYS.FORMS.REIMBURSEMENT_ACCOUNT_FORM_DRAFT, {canBeMissing: true});
2828

2929
const {translate} = useLocalize();
3030
const styles = useThemeStyles();

src/pages/ReimbursementAccount/USD/BeneficialOwnerInfo/BeneficialOwnersStep.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ function BeneficialOwnersStep({onBackButtonPress}: BeneficialOwnersStepProps) {
3333
const {translate} = useLocalize();
3434
const styles = useThemeStyles();
3535

36-
const [reimbursementAccount] = useOnyx(ONYXKEYS.REIMBURSEMENT_ACCOUNT);
37-
const [reimbursementAccountDraft] = useOnyx(ONYXKEYS.FORMS.REIMBURSEMENT_ACCOUNT_FORM_DRAFT);
36+
const [reimbursementAccount] = useOnyx(ONYXKEYS.REIMBURSEMENT_ACCOUNT, {canBeMissing: false});
37+
const [reimbursementAccountDraft] = useOnyx(ONYXKEYS.FORMS.REIMBURSEMENT_ACCOUNT_FORM_DRAFT, {canBeMissing: true});
3838

3939
const companyName = reimbursementAccount?.achData?.companyName ?? '';
4040
const policyID = reimbursementAccount?.achData?.policyID;

src/pages/ReimbursementAccount/USD/BusinessInfo/BusinessInfo.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ const bodyContent: Array<React.ComponentType<SubStepProps>> = [
4848

4949
function BusinessInfo({onBackButtonPress}: BusinessInfoProps) {
5050
const {translate} = useLocalize();
51-
const [reimbursementAccount] = useOnyx(ONYXKEYS.REIMBURSEMENT_ACCOUNT);
52-
const [reimbursementAccountDraft] = useOnyx(ONYXKEYS.FORMS.REIMBURSEMENT_ACCOUNT_FORM_DRAFT);
51+
const [reimbursementAccount] = useOnyx(ONYXKEYS.REIMBURSEMENT_ACCOUNT, {canBeMissing: false});
52+
const [reimbursementAccountDraft] = useOnyx(ONYXKEYS.FORMS.REIMBURSEMENT_ACCOUNT_FORM_DRAFT, {canBeMissing: true});
5353

5454
const getBankAccountFields = useCallback(
5555
(fieldNames: string[]) => ({

src/pages/ReimbursementAccount/USD/CompleteVerification/CompleteVerification.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import useOnyx from '@hooks/useOnyx';
66
import useSubStep from '@hooks/useSubStep';
77
import type {SubStepProps} from '@hooks/useSubStep/types';
88
import getSubStepValues from '@pages/ReimbursementAccount/utils/getSubStepValues';
9-
import * as BankAccounts from '@userActions/BankAccounts';
9+
import {acceptACHContractForBankAccount} from '@userActions/BankAccounts';
1010
import CONST from '@src/CONST';
1111
import ONYXKEYS from '@src/ONYXKEYS';
1212
import INPUT_IDS from '@src/types/form/ReimbursementAccountForm';
@@ -23,15 +23,15 @@ const bodyContent: Array<ComponentType<SubStepProps>> = [ConfirmAgreements];
2323
function CompleteVerification({onBackButtonPress}: CompleteVerificationProps) {
2424
const {translate} = useLocalize();
2525

26-
const [reimbursementAccount] = useOnyx(ONYXKEYS.REIMBURSEMENT_ACCOUNT);
27-
const [reimbursementAccountDraft] = useOnyx(ONYXKEYS.FORMS.REIMBURSEMENT_ACCOUNT_FORM_DRAFT);
26+
const [reimbursementAccount] = useOnyx(ONYXKEYS.REIMBURSEMENT_ACCOUNT, {canBeMissing: false});
27+
const [reimbursementAccountDraft] = useOnyx(ONYXKEYS.FORMS.REIMBURSEMENT_ACCOUNT_FORM_DRAFT, {canBeMissing: true});
2828

2929
const values = useMemo(() => getSubStepValues(COMPLETE_VERIFICATION_KEYS, reimbursementAccountDraft, reimbursementAccount), [reimbursementAccount, reimbursementAccountDraft]);
30-
const policyID = reimbursementAccount?.achData?.policyID ?? '-1';
30+
const policyID = reimbursementAccount?.achData?.policyID;
3131

3232
const submit = useCallback(() => {
33-
BankAccounts.acceptACHContractForBankAccount(
34-
Number(reimbursementAccount?.achData?.bankAccountID ?? '-1'),
33+
acceptACHContractForBankAccount(
34+
Number(reimbursementAccount?.achData?.bankAccountID),
3535
{
3636
isAuthorizedToUseBankAccount: values.isAuthorizedToUseBankAccount,
3737
certifyTrueInformation: values.certifyTrueInformation,

src/pages/ReimbursementAccount/USD/Requestor/PersonalInfo/PersonalInfo.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ const bodyContent: Array<React.ComponentType<SubStepProps>> = [FullName, DateOfB
2929
function PersonalInfo({onBackButtonPress}: PersonalInfoProps, ref: React.ForwardedRef<View>) {
3030
const {translate} = useLocalize();
3131

32-
const [reimbursementAccount] = useOnyx(ONYXKEYS.REIMBURSEMENT_ACCOUNT);
33-
const [reimbursementAccountDraft] = useOnyx(ONYXKEYS.FORMS.REIMBURSEMENT_ACCOUNT_FORM_DRAFT);
32+
const [reimbursementAccount] = useOnyx(ONYXKEYS.REIMBURSEMENT_ACCOUNT, {canBeMissing: false});
33+
const [reimbursementAccountDraft] = useOnyx(ONYXKEYS.FORMS.REIMBURSEMENT_ACCOUNT_FORM_DRAFT, {canBeMissing: true});
3434

3535
const policyID = reimbursementAccount?.achData?.policyID;
3636
const values = useMemo(() => getSubStepValues(PERSONAL_INFO_STEP_KEYS, reimbursementAccountDraft, reimbursementAccount), [reimbursementAccount, reimbursementAccountDraft]);

src/pages/ReimbursementAccount/USD/USDVerifiedBankAccountFlow.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function USDVerifiedBankAccountFlow({
3030
setUSDBankAccountStep,
3131
setShouldShowConnectedVerifiedBankAccount,
3232
}: USDVerifiedBankAccountFlowProps) {
33-
const [reimbursementAccount] = useOnyx(ONYXKEYS.REIMBURSEMENT_ACCOUNT);
33+
const [reimbursementAccount] = useOnyx(ONYXKEYS.REIMBURSEMENT_ACCOUNT, {canBeMissing: false});
3434

3535
switch (USDBankAccountStep) {
3636
case CONST.BANK_ACCOUNT.STEP.COUNTRY:

0 commit comments

Comments
 (0)