Skip to content
Permalink
Browse files

fix: evidences -> evidence

  • Loading branch information...
satello committed Jun 5, 2018
1 parent 9c7b813 commit 684faa6a9a87449b84d30759ed1836aa9e683b8f
@@ -121,14 +121,14 @@ class ArbitrableContract extends AbstractContract {
)

const partyAEvidence = (partyAContractData
? partyAContractData.evidences
? partyAContractData.evidence
: []
).map(evidence => {
evidence.submitter = arbitrableContractData.partyA
return evidence
})
const partyBEvidence = (partyBContractData
? partyBContractData.evidences
? partyBContractData.evidence
: []
).map(evidence => {
evidence.submitter = arbitrableContractData.partyB
@@ -114,13 +114,17 @@ class Disputes {
// **************************** //
/**
* Fetch the shared dispute data from the store.
* @param {string} account - The users account.
* @param {string} disputeId - The index of the dispute.
* @returns {Promise} The dispute data in the store.
*/
getDisputeFromStore = disputeId => {
getDisputeFromStore = (account, disputeId) => {
const arbitratorAddress = this._ArbitratorInstance.getContractAddress()

return this._StoreProviderInstance.getDispute(arbitratorAddress, disputeId)
return this._StoreProviderInstance.getDispute(
account,
arbitratorAddress,
disputeId
)
}

/**
@@ -343,7 +343,7 @@ describe('Dispute Resolution', () => {
expect(web3.eth.getBalance(partyA).toNumber()).toEqual(partyABalance)
}

const netPNK = await KlerosPOCInstance.getNetTokensForDispute(0, partyA)
// const netPNK = await KlerosPOCInstance.getNetTokensForDispute(0, partyA)

const updatedContractData = await ArbitrableTransactionInstance.getData()
expect(parseInt(updatedContractData.status, 10)).toEqual(4)
@@ -29,14 +29,14 @@ describe('ArbitrableContract', async () => {
const mockGetContractByAddress = jest.fn()
// return partyA then partyB contract
mockGetContractByAddress.mockReturnValueOnce({
evidences: [
evidence: [
{
name: 'testPartyA'
}
]
})
mockGetContractByAddress.mockReturnValueOnce({
evidences: [
evidence: [
{
name: 'testPartyB'
}
@@ -70,7 +70,7 @@ describe('ArbitrableContract', async () => {
const mockGetContractByAddress = jest.fn()
// return partyA then partyB contract
mockGetContractByAddress.mockReturnValueOnce({
evidences: [
evidence: [
{
name: 'testPartyA'
}
@@ -68,10 +68,12 @@ describe('Disputes', () => {
currentRulingForDispute: jest.fn().mockReturnValue(0),
canRuleDispute: jest.fn().mockReturnValue(false),
getContractAddress: jest.fn().mockReturnValue(arbitratorAddress),
getDisputeCreationEvent: jest.fn().mockReturnValue({blockNumber: 1}),
getDisputeCreationEvent: jest.fn().mockReturnValue({ blockNumber: 1 }),
getNetTokensForDispute: jest.fn().mockReturnValue(0),
getAppealRuledAtTimestamps: jest.fn().mockReturnValue(appealRuledAt),
getDisputeDeadlineTimestamps: jest.fn().mockReturnValue(appealDeadlines),
getDisputeDeadlineTimestamps: jest
.fn()
.mockReturnValue(appealDeadlines),
getAppealCreationTimestamps: jest.fn().mockReturnValue(appealCreatedAt)
}
disputesInstance._ArbitratorInstance = mockArbitrator
@@ -161,10 +163,12 @@ describe('Disputes', () => {
currentRulingForDispute: jest.fn().mockReturnValue(2),
canRuleDispute: jest.fn().mockReturnValue(true),
getContractAddress: jest.fn().mockReturnValue(arbitratorAddress),
getDisputeCreationEvent: jest.fn().mockReturnValue({blockNumber: 1}),
getDisputeCreationEvent: jest.fn().mockReturnValue({ blockNumber: 1 }),
getNetTokensForDispute: jest.fn().mockReturnValue(0),
getAppealRuledAtTimestamps: jest.fn().mockReturnValue(appealRuledAt),
getDisputeDeadlineTimestamps: jest.fn().mockReturnValue(appealDeadlines),
getDisputeDeadlineTimestamps: jest
.fn()
.mockReturnValue(appealDeadlines),
getAppealCreationTimestamps: jest.fn().mockReturnValue(appealCreatedAt)
}
disputesInstance._ArbitratorInstance = mockArbitrator
@@ -274,10 +278,12 @@ describe('Disputes', () => {
currentRulingForDispute: jest.fn().mockReturnValue(2),
canRuleDispute: jest.fn().mockReturnValue(false),
getContractAddress: jest.fn().mockReturnValue(arbitratorAddress),
getDisputeCreationEvent: jest.fn().mockReturnValue({blockNumber: 1}),
getDisputeCreationEvent: jest.fn().mockReturnValue({ blockNumber: 1 }),
getNetTokensForDispute: jest.fn().mockReturnValue(0),
getAppealRuledAtTimestamps: jest.fn().mockReturnValue(appealRuledAt),
getDisputeDeadlineTimestamps: jest.fn().mockReturnValue(appealDeadlines),
getDisputeDeadlineTimestamps: jest
.fn()
.mockReturnValue(appealDeadlines),
getAppealCreationTimestamps: jest.fn().mockReturnValue(appealCreatedAt)
}
disputesInstance._ArbitratorInstance = mockArbitrator
@@ -389,10 +395,12 @@ describe('Disputes', () => {
currentRulingForDispute: jest.fn().mockReturnValue(2),
canRuleDispute: jest.fn().mockReturnValue(false),
getContractAddress: jest.fn().mockReturnValue(arbitratorAddress),
getDisputeCreationEvent: jest.fn().mockReturnValue({blockNumber: 1}),
getDisputeCreationEvent: jest.fn().mockReturnValue({ blockNumber: 1 }),
getNetTokensForDispute: jest.fn().mockReturnValue(0),
getAppealRuledAtTimestamps: jest.fn().mockReturnValue(appealRuledAt),
getDisputeDeadlineTimestamps: jest.fn().mockReturnValue(appealDeadlines),
getDisputeDeadlineTimestamps: jest
.fn()
.mockReturnValue(appealDeadlines),
getAppealCreationTimestamps: jest.fn().mockReturnValue(appealCreatedAt)
}
disputesInstance._ArbitratorInstance = mockArbitrator

0 comments on commit 684faa6

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