We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f974315 commit 2e3d300Copy full SHA for 2e3d300
hooks/useProposalVotes.tsx
@@ -197,9 +197,13 @@ export default function useProposalVotes(proposal?: Proposal) {
197
198
const minimumVetoVotes = vetoMaxVoteWeight
199
?.div(new BN(10).pow(new BN(vetoMintInfo.decimals ?? 0)))
200
- .muln(vetoThreshold.value / 100)
+ .mul(new BN(vetoThreshold.value))
201
+ .div(new BN(100))
202
- const vetoVotesRequired = minimumVetoVotes.subn(vetoVoteCount).toString()
203
+ const vetoVotesRequired =
204
+ new BN(vetoVoteCount).gt(minimumVetoVotes) ?
205
+ new BN(0).toString() :
206
+ minimumVetoVotes.sub(new BN(vetoVoteCount)).toString()
207
208
return {
209
_programVersion: programVersion,
0 commit comments