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

Commit

Permalink
fix(dispute): fixes for displaying and voting on disputes (#9)
Browse files Browse the repository at this point in the history
Merges #9
  • Loading branch information
satello authored and epiqueras committed Mar 7, 2018
1 parent 7fb7139 commit 3c52924
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 21 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"ethjs": "^0.3.3",
"ethjs-unit": "^0.1.6",
"history": "^4.7.2",
"kleros-api": "^0.0.64",
"kleros-api": "^0.0.67",
"normalize.css": "^7.0.0",
"react": "^16.2.0",
"react-addons-css-transition-group": "^15.6.2",
Expand Down
30 changes: 14 additions & 16 deletions src/containers/dispute/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class Dispute extends PureComponent {
const { dispute, voteOnDispute } = this.props
voteOnDispute(
dispute.data.disputeId,
dispute.data.votes,
dispute.data.appealJuror[dispute.data.latestAppealForJuror].draws,
event.currentTarget.id
)
}
Expand Down Expand Up @@ -139,21 +139,19 @@ class Dispute extends PureComponent {
}
}),
dispute.data.appealJuror[dispute.data.numberOfAppeals]
.canRule && [
{
anchor: 'Vote',
element: (
<div key={today} className="Dispute-vote">
<Button id={0} onClick={this.handleVoteButtonClick}>
Vote for Party A
</Button>
<Button id={1} onClick={this.handleVoteButtonClick}>
Vote for Party B
</Button>
</div>
)
}
]
.canRule && {
anchor: 'Vote',
element: (
<div key={today} className="Dispute-vote">
<Button id={0} onClick={this.handleVoteButtonClick}>
Vote for Party A
</Button>
<Button id={1} onClick={this.handleVoteButtonClick}>
Vote for Party B
</Button>
</div>
)
}
]}
/>
)
Expand Down
2 changes: 1 addition & 1 deletion src/sagas/dispute.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const parseDispute = d => {
type: EVENT_TYPE_ENUM[1],
date: new Date(e.submittedAt)
})),
...d.appealJuror.slice(1).map(a => ({
...d.appealRulings.map(a => ({
...a,
type: EVENT_TYPE_ENUM[2],
date: new Date(a.ruledAt)
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6538,9 +6538,9 @@ klaw@^1.0.0:
optionalDependencies:
graceful-fs "^4.1.9"

kleros-api@^0.0.64:
version "0.0.64"
resolved "https://registry.yarnpkg.com/kleros-api/-/kleros-api-0.0.64.tgz#207c87b790f5d0ebe715596264c46f50edc313ee"
kleros-api@^0.0.67:
version "0.0.67"
resolved "https://registry.yarnpkg.com/kleros-api/-/kleros-api-0.0.67.tgz#d02a006409fdca0536dca9f3a3025c0b859df4df"
dependencies:
babel-runtime "^6.26.0"
kleros "^0.0.5"
Expand Down

0 comments on commit 3c52924

Please sign in to comment.