Skip to content
This repository was archived by the owner on Jul 1, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
13 changes: 12 additions & 1 deletion src/containers/dispute/components/ruling/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,21 @@ const Ruling = ({
votesForPartyA,
votesForPartyB,
netPNK,
rulings,
disputeID,
appeals,
appealNumber,
metaEvidence
}) => {
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 (
<div className="Ruling">
<hr />
Expand All @@ -30,6 +38,7 @@ const Ruling = ({
{inProgress ? 'In Progress' : dateToString(date, { withTime: false })}
</small>
<h4>{appealNumber ? `Appeal #${appealNumber}` : ''} Ruling</h4>
<small>{jurorRuling}</small>
{!inProgress && (
<div className="Ruling-outcome">
<div
Expand Down Expand Up @@ -123,6 +132,7 @@ Ruling.propTypes = {
votesForPartyA: PropTypes.number.isRequired,
votesForPartyB: PropTypes.number.isRequired,
netPNK: PropTypes.number.isRequired,
rulings: PropTypes.shape,
disputeID: PropTypes.number.isRequired,
appeals: PropTypes.number.isRequired,
appealNumber: PropTypes.number.isRequired,
Expand All @@ -131,7 +141,8 @@ Ruling.propTypes = {

Ruling.defaultProps = {
// State
date: null
date: null,
rulings: []
}

export default Ruling
3 changes: 3 additions & 0 deletions src/containers/dispute/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,9 @@ class Dispute extends PureComponent {
votesForPartyA={e.voteCounter[1]}
votesForPartyB={e.voteCounter[2]}
netPNK={dispute.data.netPNK}
rulings={
dispute.data.appealJuror[e.appealNumber].rulings
}
disputeID={dispute.data.disputeId}
appeals={dispute.data.numberOfAppeals}
appealNumber={e.appealNumber}
Expand Down
2 changes: 1 addition & 1 deletion src/containers/tokens/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class Tokens extends PureComponent {
if (!withdrawPNKFormIsInvalid && PNKBalance.data.activatedTokens === 0) {
withdrawInvalid = false
}

const forms = [
<div key={0}>
<TransferPNKForm
Expand Down