From 4c7692771564f989f91e5d89db02b1c81dec358d Mon Sep 17 00:00:00 2001 From: Sam Vitello Date: Tue, 31 Jul 2018 13:09:51 -0600 Subject: [PATCH] feat(dispute): show juror rulings --- package.json | 2 +- src/containers/dispute/components/ruling/index.js | 13 ++++++++++++- src/containers/dispute/index.js | 3 +++ src/containers/tokens/index.js | 2 +- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 6c86992..4d14c2b 100644 --- a/package.json +++ b/package.json @@ -82,7 +82,7 @@ "create-redux-form": "^0.1.2", "ethjs": "^0.3.3", "history": "^4.7.2", - "kleros-api": "^0.12.2", + "kleros-api": "^0.13.0", "lessdux": "^0.7.3", "normalize.css": "^7.0.0", "react": "^16.2.0", diff --git a/src/containers/dispute/components/ruling/index.js b/src/containers/dispute/components/ruling/index.js index 450c8fe..f85ae90 100644 --- a/src/containers/dispute/components/ruling/index.js +++ b/src/containers/dispute/components/ruling/index.js @@ -14,6 +14,7 @@ const Ruling = ({ votesForPartyA, votesForPartyB, netPNK, + rulings, disputeID, appeals, appealNumber, @@ -21,6 +22,13 @@ const Ruling = ({ }) => { const inProgress = date === null const won = netPNK >= 0 + // For now assume all draws for juror had the same ruling + const jurorRuling = + rulings.length > 0 + ? rulings[0] > 0 + ? `You ruled: ${metaEvidence.rulingOptions.titles[rulings[0] - 1]}` + : 'No Ruling' + : '' return (

@@ -30,6 +38,7 @@ const Ruling = ({ {inProgress ? 'In Progress' : dateToString(date, { withTime: false })}

{appealNumber ? `Appeal #${appealNumber}` : ''} Ruling

+ {jurorRuling} {!inProgress && (