Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect restriction in withdrawls edit form #1709

Merged
merged 7 commits into from
Jan 24, 2024
2 changes: 1 addition & 1 deletion src/components/admin/withdrawals/EditForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const validationSchema: yup.SchemaOf<WithdrawalData> = yup
.defined()
.shape({
status: yup.string().trim().min(1).max(10).required(),
amount: yup.number().positive().integer().required(),
amount: yup.number().positive().required(),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not that it is an issue considering the amount field can't be edited in EditForm, but maybe for consistency reason we should at least have the number().positive(), rules for amount validation.

reason: yup.string().trim().min(1).max(300).required(),
currency: yup.string().oneOf(Object.values(Currency)).required(),
sourceVaultId: yup.string().uuid().required(),
Expand Down
Loading