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

First proposal doesn't show votes #184

Open
djstrikanova opened this issue Jan 13, 2023 · 2 comments
Open

First proposal doesn't show votes #184

djstrikanova opened this issue Jan 13, 2023 · 2 comments
Labels
bounty This issue is part of the bounty program good first issue Good for newcomers

Comments

@djstrikanova
Copy link
Contributor

The first proposal doesn't show the vote, I believe it was unanimous.
https://dao.effect.network/proposals/1
It would be good to fix this bug for historical records.

@jeisses jeisses added good first issue Good for newcomers bounty This issue is part of the bounty program labels Jan 15, 2023
@jeisses
Copy link
Member

jeisses commented Jan 15, 2023

Good find. It looks like this is a bug caused by this old bug were empty RAM wasn't allocated for votes.

This proposal did not get any NO votes, only YES (164) and ABSTAIN (58):

cleos -u http://eos.greymass.com get table daoproposals daoproposals proposal -l 2 | jq '.rows[1].vote_counts'
[
  {
    "key": 0,
    "value": 58
  },
  {
    "key": 1,
    "value": 164
  }
]

After this bug got fixed proposals got filled with empty votes, e.g.:

cleos -u http://eos.greymass.com get table daoproposals daoproposals proposal -l 2 | jq '.rows[0].vote_counts'
[
  {
    "key": 0,
    "value": 10000
  },
  {
    "key": 1,
    "value": 4455439
  },
  {
    "key": 2,
    "value": 0
  }
]

Our frontend vote percentage code expects all 3 votes types to be present.

image

@jeisses
Copy link
Member

jeisses commented Jan 15, 2023

This line is the cause of the error:

https://github.com/effectai/effect-dao/blob/main/pages/proposals/_id/index.vue#L378

This should be a quick one to fix; a good opportunity for new comers.

I'm labeling this ticket as bounty & good first issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bounty This issue is part of the bounty program good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants