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

Commit

Permalink
Merge pull request #180 from kleros/fix/get_evidences
Browse files Browse the repository at this point in the history
fix(evidences): get evidences
  • Loading branch information
n1c01a5 committed Oct 3, 2018
2 parents a03d087 + f69dc5e commit e86d176
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
10 changes: 1 addition & 9 deletions src/contracts/implementations/arbitrable/Arbitrable.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,7 @@ class Arbitrable extends ContractImplementation {
* Get the evidence submitted in a dispute.
* @returns {object[]} An array of evidence objects.
*/
getEvidence = async () => {
await this.loadContract()
const arbitratorAddress = await this.contractInstance.arbitrator()
await this.loadContract()
const disputeID = (await this.contractInstance.disputeID()).toNumber()

// No evidence yet as there is no dispute
if (_.isNull(disputeID)) return []

getEvidence = async (arbitratorAddress, disputeID = 0) => {
const evidenceLogs = await EventListener.getEventLogs(
this,
'Evidence',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,11 @@ class MultipleArbitrableTransaction extends Arbitrable {
buyerFee: this._Web3Wrapper.fromWei(arbitrableTransaction[8], 'ether'),
lastInteraction: arbitrableTransaction[9].toNumber(),
status: arbitrableTransaction[10].toNumber(),
metaEvidence: await this.getMetaEvidence(arbitrableTransactionId)
metaEvidence: await this.getMetaEvidence(arbitrableTransactionId),
evidence: await this.getEvidence(
arbitrableTransaction[5],
arbitrableTransaction[4].toNumber()
)
}
}
}
Expand Down

0 comments on commit e86d176

Please sign in to comment.