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

Set maximum WG budget increase amount (#2327) #3920

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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'),
Copy link
Member

Choose a reason for hiding this comment

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

@traumschule please remove this change. The budget can be over this amount and it won't cause any issue since: #4018.

FYI Zeeshan recently solved the underlying cause in Hydra here: Joystream/hydra#515. I'm not sure if this is deployed yet but either way everything will be fine as long as the value is less than 2⁶⁴

traumschule marked this conversation as resolved.
Show resolved Hide resolved
}),
setInitialInvitationCount: Yup.object().shape({
invitationCount: BNSchema.test(moreThanMixed(0, 'Amount must be greater than zero', false)).required(
Expand Down