diff --git a/apps/dapp/components/ProposalDetailsSidebar.tsx b/apps/dapp/components/ProposalDetailsSidebar.tsx index efb9de6cf..1272b3c63 100644 --- a/apps/dapp/components/ProposalDetailsSidebar.tsx +++ b/apps/dapp/components/ProposalDetailsSidebar.tsx @@ -271,9 +271,13 @@ export const ProposalDetailsVoteStatus = ({ ? expirationAtTimeToSecondsFromNow(proposal.expires) : undefined + // TODO: Change this wen v1 contracts launch, since the conditions + // will change. In v1, all abstain fails instead of passes. const thresholdReached = !!threshold && - (quorum ? turnoutYesPercent : totalYesPercent) >= threshold.percent + yesVotes >= + ((quorum ? turnoutTotal : totalWeight) - abstainVotes) * + (threshold.percent / 100) const quorumMet = !!quorum && turnoutPercent >= quorum.percent const helpfulStatusText = @@ -287,6 +291,11 @@ export const ProposalDetailsVoteStatus = ({ : undefined : undefined + // When only abstain votes have been cast and there is no quorum, + // align the abstain progress bar to the right to line up with Abstain + // text. + const onlyAbstain = yesVotes === 0 && noVotes === 0 && abstainVotes > 0 + return (