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

Create use thresholds hook and use correct thresholds for reject origin #4588

Closed
wants to merge 12 commits into from

Conversation

ekowalsk
Copy link
Collaborator

@ekowalsk ekowalsk commented Feb 3, 2021

No description provided.

ekowalsk and others added 2 commits February 5, 2021 11:13
# Conflicts:
#	packages/page-bounties/src/BountyActions/ProposeCuratorAction.tsx
@jacogr
Copy link
Member

jacogr commented Feb 6, 2021

I think it looks fine as-is with the use.

However need to just be awake and go through line-by-line where used and compare to the originals to ensure the logic still matches where used. Will get to it this weekend.

}

export function getAtLeastThresholdMembersCount (membersCount: number, thresholdRatio: number): number {
return Math.ceil(membersCount * thresholdRatio);

Choose a reason for hiding this comment

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

shall we add if (membersCount === 0) { return 0; } here, as it's done above?

};
export interface Threshold {
value: number;
option: 'AtLeast' | 'MoreThan';

Choose a reason for hiding this comment

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

does it make sense to create an enum for these options? for simplifying further maintaining and exclude typos

@jacogr
Copy link
Member

jacogr commented Jan 10, 2023

Closing. Will pull in relevant ideas into #6924

The linked PR in itself also needs to get up-to-date with master. It may actually just get "some" fixes and not be fully completed since the ecosystem is moving to the gov 2 model with less reliance on these configs.

@jacogr jacogr closed this Jan 10, 2023
@jacogr jacogr deleted the ek-use-thresholds branch January 10, 2023 12:05
@polkadot-js-bot
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@polkadot-js polkadot-js locked as resolved and limited conversation to collaborators Jan 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants