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

Commit

Permalink
feat(disputes): return appealsRepartitioned
Browse files Browse the repository at this point in the history
  • Loading branch information
epiqueras authored and satello committed Feb 16, 2018
1 parent 98b777d commit 1246968
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
25 changes: 16 additions & 9 deletions src/abstractWrappers/Disputes.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
})
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/contractWrappers/KlerosWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 1246968

Please sign in to comment.