Wallet - Fix operator cost in playground (#3021)

* remove upper limit restriction

* update validation
This commit is contained in:
Fouad
2023-02-14 12:13:19 +00:00
committed by GitHub
parent d23fb366e4
commit a925c39642
@@ -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;
}),
});