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

Provide votes/finalVotes information in GET proposals/proposalId response #6107

Open
gaurav137 opened this issue Apr 5, 2024 · 1 comment

Comments

@gaurav137
Copy link

For building a user experience around proposals we needed the following ability:

  1. For open proposals show the yes/no vote status for each member that has voted till now.
  2. For closed proposals show the yes/no vote status for how each member had voted
  3. For open proposals show which members are yet to vote.

Based on a discussion with @eddyashton it looks like that 1. and 2. might require some changes from CCF's end to expose the "votes" or "finalVotes" property in the GET proposals/proposalId response. And 3. is something we'd have to deduce by say enumerating all current members and picking members that are not present in the votes/finalVotes object.

@eddyashton
Copy link
Member

eddyashton commented Apr 8, 2024

Update after further discussion:

  1. It's tricky to show votes for open proposals, since the votes (boolean result) might change at any time. But we can show the IDs of the members who have voted (and separately, we retain the separate endpoint that returns the maybe-large ballot script they submitted).
  2. We can and should do this - looks like a bug that it's occasionally omitted, which we'll fix.
  3. This is out-of-scope at the framework level, as the set of appropriate members depends on the resolve logic. Simpler for the client logic to construct this from its list of all (appropriate) members, and a hasVoted list we should include in part 1.

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

No branches or pull requests

2 participants