Wallet - Fix operator cost in playground (#3021)
* remove upper limit restriction * update validation
This commit is contained in:
@@ -35,7 +35,9 @@ export const inputValidationSchema = Yup.object().shape({
|
||||
.test('Is valid operator cost value', (value, ctx) => {
|
||||
const stringValueToNumber = Math.round(Number(value));
|
||||
|
||||
if (isGreaterThan(stringValueToNumber, -1) && isLessThan(stringValueToNumber, 101)) return true;
|
||||
return ctx.createError({ message: 'Operator cost must be a valid number' });
|
||||
if (isLessThan(stringValueToNumber, 0))
|
||||
return ctx.createError({ message: 'Operator cost must be a valid number' });
|
||||
|
||||
return true;
|
||||
}),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user