Skip to content

Commit 4f92496

Browse files
matheusdalexlyp
authored andcommitted
[politeia] Update politeia vote status constants (#1714)
1 parent ab713fd commit 4f92496

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

app/actions/GovernanceActions.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import * as wallet from "wallet";
44
import { push as pushHistory } from "react-router-redux";
55
import { hexReversedHashToArray, reverseRawHash } from "helpers";
66

7-
export const VOTESTATUS_PREVOTE = 1;
8-
export const VOTESTATUS_ACTIVEVOTE = 2;
9-
export const VOTESTATUS_VOTED = 3;
7+
// enum values from politeiawww's v1.PropVoteStatusT
8+
export const VOTESTATUS_ACTIVEVOTE = 3;
9+
export const VOTESTATUS_VOTED = 4;
1010

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

146146
proposals.forEach(p => {
147147
switch (p.voteStatus) {
148-
case VOTESTATUS_PREVOTE: preVote.push(p); break;
149148
case VOTESTATUS_ACTIVEVOTE: activeVote.push(p); break;
150149
case VOTESTATUS_VOTED: voted.push(p); break;
150+
default:
151+
preVote.push(p); break;
151152
}
152153

153154
byToken[p.token] = p;

0 commit comments

Comments
 (0)