Skip to content
Permalink
Browse files

feat: fetch parties from arbitrable implementation

  • Loading branch information...
satello committed Sep 4, 2018
1 parent 95d7476 commit 2be78cee4045f4f42a923284996021e52788f354
Showing with 22 additions and 19 deletions.
  1. +14 −0 src/contracts/implementations/arbitrable/ArbitrableTransaction.js
  2. +8 −19 src/resources/Disputes.js
@@ -227,6 +227,20 @@ class ArbitrableTransaction extends Arbitrable {
}
}

getParties = async () => {
await this.loadContract()

const [partyA, partyB] = await Promise.all([
this.contractInstance.partyA(),
this.contractInstance.partyB()
])

return {
partyA,
partyB
}
}

/**
* Data of the contract
* @returns {object} Object Data of the contract.
@@ -312,14 +312,11 @@ class Disputes {
await this._ArbitrableInstance.setContractInstance(
arbitrableContractAddress
)
const [arbitrableContractData, evidence] = await Promise.all([
this._ArbitrableInstance.getContractData(),
this._ArbitrableInstance.getEvidence()
const [metaEvidence, evidence, parties] = await Promise.all([
this._ArbitrableInstance.getMetaEvidence(),
this._ArbitrableInstance.getEvidence(),
this._ArbitrableInstance.getParties()
])
const contractStoreData = await this._StoreProviderInstance.getContractByAddress(
arbitrableContractData.partyA,
arbitrableContractAddress
)

// Get dispute data from the store
let appealDraws = []
@@ -423,8 +420,9 @@ class Disputes {
// Arbitrable Contract Data
arbitrableContractAddress,
arbitratorAddress,
partyA: arbitrableContractData.partyA,
partyB: arbitrableContractData.partyB,
parties,
evidence,
metaEvidence,

// Dispute Data
disputeId,
@@ -435,16 +433,7 @@ class Disputes {
disputeStatus: dispute.status,
appealJuror,
appealRulings,
netPNK,

// Store Data
title: contractStoreData ? contractStoreData.title : undefined,
description: contractStoreData
? contractStoreData.description
: undefined,
email: contractStoreData ? contractStoreData.email : undefined,
evidence,
metaEvidence: arbitrableContractData.metaEvidence
netPNK
}
}
}

0 comments on commit 2be78ce

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