Skip to content

Commit

Permalink
[politeia] Update politeia vote status constants (#1714)
Browse files Browse the repository at this point in the history
  • Loading branch information
matheusd authored and alexlyp committed Oct 15, 2018
1 parent ab713fd commit 4f92496
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions app/actions/GovernanceActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import * as wallet from "wallet";
import { push as pushHistory } from "react-router-redux";
import { hexReversedHashToArray, reverseRawHash } from "helpers";

export const VOTESTATUS_PREVOTE = 1;
export const VOTESTATUS_ACTIVEVOTE = 2;
export const VOTESTATUS_VOTED = 3;
// enum values from politeiawww's v1.PropVoteStatusT
export const VOTESTATUS_ACTIVEVOTE = 3;
export const VOTESTATUS_VOTED = 4;

// Aux function to parse the optionsresult member of a votestatus call into
// structures to use within a proposal data.
Expand Down Expand Up @@ -145,9 +145,10 @@ export const getVettedProposals = () => async (dispatch, getState) => {

proposals.forEach(p => {
switch (p.voteStatus) {
case VOTESTATUS_PREVOTE: preVote.push(p); break;
case VOTESTATUS_ACTIVEVOTE: activeVote.push(p); break;
case VOTESTATUS_VOTED: voted.push(p); break;
default:
preVote.push(p); break;
}

byToken[p.token] = p;
Expand Down

0 comments on commit 4f92496

Please sign in to comment.