Skip to content

Fix vote percentages when proposal vote counts are sparse#225

Open
ManhND226677 wants to merge 1 commit into
effectai:mainfrom
ManhND226677:fix-proposal-vote-counts
Open

Fix vote percentages when proposal vote counts are sparse#225
ManhND226677 wants to merge 1 commit into
effectai:mainfrom
ManhND226677:fix-proposal-vote-counts

Conversation

@ManhND226677
Copy link
Copy Markdown

Summary

  • calculate proposal vote total from the vote_counts entries that are actually present
  • avoid crashing older proposals that do not include every vote type in vote_counts
  • return 0.00% when there is no available total vote weight

Fixes #184.

Verification

  • npm run lint -- --fix-dry-run (passes with existing repository warnings)
  • npm run build (fails in this local environment because node-sass@4.14.1 does not support Node v24 runtime 137; the repo requires Node 14.21.3)

Bounty payment note: PayPal is available if needed by maintainers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

First proposal doesn't show votes

1 participant