diff --git a/app/components/UI/CryptoAmountInput.js b/app/components/UI/CryptoAmountInput.js index 84b8d390..27bf0f97 100644 --- a/app/components/UI/CryptoAmountInput.js +++ b/app/components/UI/CryptoAmountInput.js @@ -121,13 +121,13 @@ class WrappedCryptoAmountInputAsField extends React.Component { return } try { - const validator = yup + let validator = yup .number() .positive() .min(0) .typeError('A number is required') if (required) { - validator.required() + validator = validator.required().moreThan(0) } validator.validateSync(Number(value)) } catch (error) { diff --git a/app/components/UI/FiatAmountInput.js b/app/components/UI/FiatAmountInput.js index 37e1aa05..d2453cd4 100644 --- a/app/components/UI/FiatAmountInput.js +++ b/app/components/UI/FiatAmountInput.js @@ -103,13 +103,13 @@ class WrappedFiatAmountInputAsField extends React.Component { return } try { - const validator = yup + let validator = yup .number() .positive() .min(0) .typeError('A number is required') if (required) { - validator.required() + validator = validator.required().moreThan(0) } validator.validateSync(Number(value)) } catch (error) {