Skip to content
This repository has been archived by the owner on Jul 1, 2022. It is now read-only.

Commit

Permalink
feat(dispute): add netPNK and correct vote counts
Browse files Browse the repository at this point in the history
  • Loading branch information
epiqueras committed Feb 26, 2018
1 parent a340d7d commit 4c66983
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 15 deletions.
27 changes: 14 additions & 13 deletions src/containers/dispute/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,20 +104,21 @@ class Dispute extends PureComponent {
/>
)
})),
{
anchor: 'Ruling',
element: (
<Ruling
key={2}
date={new Date()}
votesForPartyA={dispute.data.ruling}
votesForPartyB={dispute.data.ruling}
netPNK={0}
/>
)
},
...(dispute.data.hasRuled
? []
? [
{
anchor: 'Ruling',
element: (
<Ruling
key={2}
date={new Date()}
votesForPartyA={dispute.data.voteCounters[0][1]}
votesForPartyB={dispute.data.voteCounters[0][2]}
netPNK={dispute.data.netPNK}
/>
)
}
]
: [
{
anchor: 'Vote',
Expand Down
6 changes: 4 additions & 2 deletions src/reducers/dispute.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ const dispute = PropTypes.shape({
deadline: PropTypes.instanceOf(Date).isRequired,
disputeState: PropTypes.number.isRequired,
disputeStatus: PropTypes.number.isRequired,
voteCounters: PropTypes.number.isRequired,
PNKRepartitions: PropTypes.number.isRequired,
voteCounters: PropTypes.arrayOf(
PropTypes.arrayOf(PropTypes.number.isRequired).isRequired
).isRequired,
netPNK: PropTypes.number.isRequired,

// Store Data
description: PropTypes.string.isRequired,
Expand Down

0 comments on commit 4c66983

Please sign in to comment.