fix: cash-out fields now accepts only positive values
fix: add max values for fields on Cashout, Commissions, Notifications fix: disable adding on the Locales overrides when all of the machines are already overriden
This commit is contained in:
parent
0c3ae801d0
commit
3c6f547349
6 changed files with 37 additions and 8 deletions
|
|
@ -200,20 +200,24 @@ const overrides = (auxData, currency, auxElements) => {
|
|||
return getOverridesFields(getData, currency, auxElements)
|
||||
}
|
||||
|
||||
const percentMax = 100
|
||||
const currencyMax = 9999999
|
||||
const schema = Yup.object().shape({
|
||||
cashIn: Yup.number()
|
||||
.min(0)
|
||||
.max(100)
|
||||
.max(percentMax)
|
||||
.required('Required'),
|
||||
cashOut: Yup.number()
|
||||
.min(0)
|
||||
.max(100)
|
||||
.max(percentMax)
|
||||
.required('Required'),
|
||||
fixedFee: Yup.number()
|
||||
.min(0)
|
||||
.max(currencyMax)
|
||||
.required('Required'),
|
||||
minimumTx: Yup.number()
|
||||
.min(0)
|
||||
.max(currencyMax)
|
||||
.required('Required')
|
||||
})
|
||||
|
||||
|
|
@ -222,17 +226,19 @@ const OverridesSchema = Yup.object().shape({
|
|||
cryptoCurrencies: Yup.array().required('Required'),
|
||||
cashIn: Yup.number()
|
||||
.min(0)
|
||||
.max(100)
|
||||
.max(percentMax)
|
||||
.required('Required'),
|
||||
cashOut: Yup.number()
|
||||
.min(0)
|
||||
.max(100)
|
||||
.max(percentMax)
|
||||
.required('Required'),
|
||||
fixedFee: Yup.number()
|
||||
.min(0)
|
||||
.max(currencyMax)
|
||||
.required('Required'),
|
||||
minimumTx: Yup.number()
|
||||
.min(0)
|
||||
.max(currencyMax)
|
||||
.required('Required')
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue