-
Notifications
You must be signed in to change notification settings - Fork 50
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
Approval voting #576
Approval voting #576
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
…ick vote refactor
…format to introduce options, refactor existing tests and components
…lidating and condition
… choice and refactor the ballot reverse logic
Refactor tally
pages/api/polling/all-tallies.ts
Outdated
@@ -0,0 +1,39 @@ | |||
import invariant from 'tiny-invariant'; | |||
import { NextApiRequest, NextApiResponse } from 'next'; | |||
import { getPolls } from 'modules/polling/api/fetchPolls'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file will be deleted
package.json
Outdated
@@ -1,7 +1,7 @@ | |||
{ | |||
"name": "governance-portal-v2", | |||
"license": "AGPL-3.0-only", | |||
"version": "0.7.3", | |||
"version": "0.7.3-test", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be removed, i changed it to not collide with the other caches (since we use the version number on the cache string name)
if (rawValue) { | ||
const ballotBuffer = toBuffer(rawValue, { endian: 'little' }); | ||
const ballot = paddedArray(32 - ballotBuffer.length, ballotBuffer); | ||
rankedChoiceOption = ballot.reverse().filter(choice => choice !== 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
attention here, we removed the "filter" that removed before all the 0 options, since this assumed 0 is abstain and has to be ignored.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Text updates for approval voting branch
I had an issue when filtering the polls, the |
Approval voting
choose-free
input formatapproval
approval-breakdown
displayPoll parameters
Button changed if you don't have mkr to vote
Approval voting poll card
Approval vote poll summary