Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/CONST.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const CONST = {
MISSING_INCORPORATION_STATE: '402 Missing incorporationState in additionalData',
MISSING_INCORPORATION_TYPE: '402 Missing incorporationType in additionalData',
MAX_VALIDATION_ATTEMPTS_REACHED: 'Validation for this bank account has been disabled due to too many incorrect attempts. Please contact us.',
INCORRECT_VALIDATION_AMOUNTS: 'The validate code you entered is incorrect, please try again.',
},
STEP: {
// In the order they appear in the VBA flow
Expand Down
1 change: 1 addition & 0 deletions src/languages/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@ export default {
noDefaultDepositAccountOrDebitCardAvailable: 'Please add a default deposit bank account or debit card',
fixTheErrors: 'fix the errors',
inTheFormBeforeContinuing: 'in the form before continuing',
validationAmounts: 'The validation amounts you entered are incorrect. Please double-check your bank statement and try again.',
},
},
addPersonalBankAccountPage: {
Expand Down
1 change: 1 addition & 0 deletions src/languages/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@ export default {
noDefaultDepositAccountOrDebitCardAvailable: 'Por favor agrega una cuenta bancaria para depósitos o una tarjeta de débito',
fixTheErrors: 'corrige los errores',
inTheFormBeforeContinuing: 'en el formulario antes de continuar',
validationAmounts: 'Los montos de validación que ingresaste son incorrectos. Verifica tu cuenta de banco e intenta de nuevo.',
},
},
addPersonalBankAccountPage: {
Expand Down
9 changes: 8 additions & 1 deletion src/libs/actions/BankAccounts.js
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,14 @@ function validateBankAccount(bankAccountID, validateCode) {
return;
}

// We are generically showing any backend errors that might pop up in the validate step
// If the validation amounts entered were incorrect, show specific error
if (response.message === CONST.BANK_ACCOUNT.ERROR.INCORRECT_VALIDATION_AMOUNTS) {
showBankAccountErrorModal(translateLocal('bankAccount.error.validationAmounts'));
Onyx.merge(ONYXKEYS.REIMBURSEMENT_ACCOUNT, {loading: false});
return;
}

// We are generically showing any other backend errors that might pop up in the validate step
showBankAccountErrorModal(response.message);
Onyx.merge(ONYXKEYS.REIMBURSEMENT_ACCOUNT, {loading: false});
});
Expand Down