Skip to content

Commit

Permalink
Set maximum WG budget increase amount (Joystream#2327)
Browse files Browse the repository at this point in the history
  • Loading branch information
Joystream Stats committed Dec 4, 2022
1 parent fb7b166 commit 2b13801
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/ui/src/proposals/modals/AddNewProposal/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,9 @@ export const schemaFactory = (api?: ProxyApi) => {
updateWorkingGroupBudget: Yup.object().shape({
isPositive: Yup.boolean(),
groupId: Yup.string().required('Field is required'),
budgetUpdate: BNSchema.test(moreThanMixed(0, 'Amount must be greater than zero')).required('Field is required'),
budgetUpdate: BNSchema.test(moreThanMixed(0, 'Amount must be greater than zero.'))
.test(maxMixed(new BN(999999999999999), 'Amount must be less than 99999.', true))
.required('Field is required'),
}),
setInitialInvitationCount: Yup.object().shape({
invitationCount: BNSchema.test(moreThanMixed(0, 'Amount must be greater than zero', false)).required(
Expand Down

0 comments on commit 2b13801

Please sign in to comment.