Skip to content

Commit

Permalink
fix cc vote power
Browse files Browse the repository at this point in the history
  • Loading branch information
Scitz0 committed Nov 3, 2024
1 parent 1897e60 commit 554e98a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/cnode-helper-scripts/cntools.library
Original file line number Diff line number Diff line change
Expand Up @@ -1495,8 +1495,8 @@ getAllGovActions() {

# get list of cc voters based on vote
cc_yes_voters="$(jq '[.committeeVotes | to_entries[] | select(.value=="VoteYes")] | length' <<< "$(base64 -d <<< "${vote_action}")")"
cc_no_voters="$(jq '[.committeeVotes | to_entries[] | select(.value=="VoteYes")] | length' <<< "$(base64 -d <<< "${vote_action}")")"
cc_abstain_voters="$(jq '[.committeeVotes | to_entries[] | select(.value=="VoteYes")] | length' <<< "$(base64 -d <<< "${vote_action}")")"
cc_no_voters="$(jq '[.committeeVotes | to_entries[] | select(.value=="VoteNo")] | length' <<< "$(base64 -d <<< "${vote_action}")")"
cc_abstain_voters="$(jq '[.committeeVotes | to_entries[] | select(.value=="Abstain")] | length' <<< "$(base64 -d <<< "${vote_action}")")"
cc_power_total=$(( cc_power_authorized - cc_abstain_voters ))
cc_no_voters_total=$(( cc_power_total - cc_yes_voters )) # total cc power - proposal abstain - proposal yes
# calculate percentages
Expand Down

0 comments on commit 554e98a

Please sign in to comment.