Skip to content

Commit 5ded4ee

Browse files
fix no-default-id-values
1 parent 9cf6412 commit 5ded4ee

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/pages/ReimbursementAccount/USD/ConnectBankAccount/components/BankAccountValidationForm.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ function BankAccountValidationForm({requiresTwoFactorAuth, reimbursementAccount,
5959
const {translate, toLocaleDigit} = useLocalize();
6060
const styles = useThemeStyles();
6161

62-
const policyID = reimbursementAccount?.achData?.policyID ?? String(CONST.DEFAULT_NUMBER_ID);
62+
const policyID = reimbursementAccount?.achData?.policyID;
6363
const decimalSeparator = toLocaleDigit('.');
6464
const permittedDecimalSeparator = getPermittedDecimalSeparator(decimalSeparator);
6565
const validate = (values: FormOnyxValues<typeof ONYXKEYS.FORMS.REIMBURSEMENT_ACCOUNT_FORM>): FormInputErrors<typeof ONYXKEYS.FORMS.REIMBURSEMENT_ACCOUNT_FORM> => {
@@ -90,7 +90,7 @@ function BankAccountValidationForm({requiresTwoFactorAuth, reimbursementAccount,
9090

9191
// Send valid amounts to BankAccountAPI::validateBankAccount in Web-Expensify
9292
const bankAccountID = Number(reimbursementAccount?.achData?.bankAccountID ?? CONST.DEFAULT_NUMBER_ID);
93-
if (bankAccountID) {
93+
if (bankAccountID && policyID) {
9494
validateBankAccount(bankAccountID, validateCode, policyID);
9595
}
9696
},

0 commit comments

Comments
 (0)