Skip to content
Permalink
Browse files

fix(evidences): get evidences

  • Loading branch information...
n1c01a5 committed Oct 3, 2018
1 parent a03d087 commit f69dc5e444226cb42d077a2f540059b767a39922
@@ -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',
@@ -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()
)
}
}
}

0 comments on commit f69dc5e

Please sign in to comment.
You can’t perform that action at this time.