fix:(quick payment receive & made): catch error.

This commit is contained in:
elforjani3
2021-03-16 17:52:51 +02:00
parent 0c88d796a6
commit bad4b548d5
3 changed files with 18 additions and 0 deletions

View File

@@ -21,4 +21,12 @@ export const transformErrors = (errors, { setFieldError }) => {
formatMessage({ id: 'payment_number_is_not_unique' }),
);
}
if (getError('INVALID_PAYMENT_AMOUNT')) {
setFieldError(
'payment_amount',
formatMessage({
id: 'the_payment_amount_bigger_than_invoice_due_amount',
}),
);
}
};

View File

@@ -26,4 +26,12 @@ export const transformErrors = (errors, { setFieldError }) => {
formatMessage({ id: 'payment_receive_number_required' }),
);
}
if (getError('INVALID_PAYMENT_AMOUNT')) {
setFieldError(
'payment_amount',
formatMessage({
id: 'the_payment_amount_bigger_than_invoice_due_amount',
}),
);
}
};