From 12469686299aaafdc20476939a73564d83a0f9d6 Mon Sep 17 00:00:00 2001 From: epiqueras Date: Wed, 14 Feb 2018 20:52:55 -0800 Subject: [PATCH] feat(disputes): return appealsRepartitioned --- src/abstractWrappers/Disputes.js | 25 ++++++++++++++++--------- src/contractWrappers/KlerosWrapper.js | 2 ++ 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/src/abstractWrappers/Disputes.js b/src/abstractWrappers/Disputes.js index 5b92896..96a87ee 100644 --- a/src/abstractWrappers/Disputes.js +++ b/src/abstractWrappers/Disputes.js @@ -541,27 +541,34 @@ class Disputes extends AbstractWrapper { const ruling = await this._Arbitrator.currentRulingForDispute(arbitratorAddress, disputeId) return ({ + // Arbitrable Contract Data // FIXME hash not being stored in contract atm hash: arbitrableContractAddress, - partyA: arbitrableContractData.partyA, - partyB: arbitrableContractData.partyB, - arbitrableContractStatus: arbitrableContractData.status, - disputeState: dispute.state, - disputeStatus: dispute.status, arbitrableContractAddress: arbitrableContractAddress, + arbitrableContractStatus: arbitrableContractData.status, arbitratorAddress: arbitratorAddress, - fee: dispute.arbitrationFeePerJuror, + partyA: arbitrableContractData.partyA, + partyB: arbitrableContractData.partyB, + + // Dispute Data disputeId: disputeId, session: dispute.firstSession + dispute.numberOfAppeals, + numberOfAppeals: dispute.numberOfAppeals, + fee: dispute.arbitrationFeePerJuror, deadline: deadline, - // store data + disputeState: dispute.state, + disputeStatus: dispute.status, + voteCounters: dispute.voteCounters, + appealsRepartitioned: dispute.appealsRepartitioned, + + // Store Data description: constractStoreData ? constractStoreData.description : undefined, email: constractStoreData ? constractStoreData.email : undefined, - votes: votes, + evidence: evidence, isJuror: isJuror, + votes: votes, hasRuled: hasRuled, ruling: ruling, - evidence: evidence }) } } diff --git a/src/contractWrappers/KlerosWrapper.js b/src/contractWrappers/KlerosWrapper.js index a27733a..90c2457 100644 --- a/src/contractWrappers/KlerosWrapper.js +++ b/src/contractWrappers/KlerosWrapper.js @@ -382,6 +382,8 @@ class KlerosWrapper extends ContractWrapper { initialNumberJurors: dispute[4].toNumber(), arbitrationFeePerJuror: this._Web3Wrapper.fromWei(dispute[5], 'ether'), state: dispute[6].toNumber(), + voteCounters: dispute[8], + appealsRepartitioned: dispute[11], status: (await contractInstance.disputeStatus(disputeId)).toNumber() } } catch (e) {