From 3c52924d5bd447fb3faa8513f874d352bd48dd4c Mon Sep 17 00:00:00 2001 From: Sam Vitello Date: Wed, 7 Mar 2018 18:01:40 +0100 Subject: [PATCH] fix(dispute): fixes for displaying and voting on disputes (#9) Merges #9 --- package.json | 2 +- src/containers/dispute/index.js | 30 ++++++++++++++---------------- src/sagas/dispute.js | 2 +- yarn.lock | 6 +++--- 4 files changed, 19 insertions(+), 21 deletions(-) diff --git a/package.json b/package.json index 970b6d4..b1652f8 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/containers/dispute/index.js b/src/containers/dispute/index.js index ad2504f..9da3572 100644 --- a/src/containers/dispute/index.js +++ b/src/containers/dispute/index.js @@ -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 ) } @@ -139,21 +139,19 @@ class Dispute extends PureComponent { } }), dispute.data.appealJuror[dispute.data.numberOfAppeals] - .canRule && [ - { - anchor: 'Vote', - element: ( -
- - -
- ) - } - ] + .canRule && { + anchor: 'Vote', + element: ( +
+ + +
+ ) + } ]} /> ) diff --git a/src/sagas/dispute.js b/src/sagas/dispute.js index 57c495b..ffe3652 100644 --- a/src/sagas/dispute.js +++ b/src/sagas/dispute.js @@ -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) diff --git a/yarn.lock b/yarn.lock index 1ad242e..bd8783a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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"