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

Commit 5081f07

Browse files
committed
fix(Kleros):missed name changes from arbitrableContracts -> arbitrable
1 parent a530550 commit 5081f07

File tree

2 files changed

+38
-4
lines changed

2 files changed

+38
-4
lines changed

src/kleros.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,13 @@ class Kleros {
6969
// DISPUTES
7070
this.disputes = new resources.Disputes(
7171
this.arbitrator,
72-
this.arbitrableContracts,
72+
this.arbitrable,
7373
this.storeWrapper
7474
)
7575
// NOTIFICATIONS
7676
this.notifications = new resources.Notifications(
7777
this.arbitrator,
78-
this.arbitrableContracts,
78+
this.arbitrable,
7979
this.storeWrapper
8080
)
8181
}
@@ -85,7 +85,7 @@ class Kleros {
8585
* @param {string} contractAddress - Address of arbitrable contract
8686
*/
8787
setArbitrableContractAddress = contractAddress => {
88-
this.arbitrableContracts.setContractInstance(contractAddress)
88+
this.arbitrable.setContractInstance(contractAddress)
8989
}
9090

9191
/**
@@ -134,7 +134,7 @@ class Kleros {
134134
this.storeWrapper = new StoreProviderWrapper(storeUri)
135135

136136
this.disputes.setStoreProviderInstance(this.storeWrapper)
137-
this.arbitrableContract.setStoreProviderInstance(this.storeWrapper)
137+
this.arbitrable.setStoreProviderInstance(this.storeWrapper)
138138
this.arbitrator.setStoreProviderInstance(this.storeWrapper)
139139
this.notifications.setStoreProviderInstance(this.storeWrapper)
140140
}

tests/integration/kleros.test.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import Web3 from 'web3'
2+
3+
import Kleros from '../../src/kleros'
4+
import * as ethConstants from '../../src/constants/eth'
5+
6+
describe('Kleros', () => {
7+
it('can be created', () => {
8+
const mockStoreUri = ''
9+
const ethProvider = new Web3.providers.HttpProvider(
10+
ethConstants.LOCALHOST_ETH_PROVIDER
11+
)
12+
const mockArbitrator = '0x0'
13+
const mockArbitrable = '0x1'
14+
15+
const klerosInstance = new Kleros(
16+
ethProvider,
17+
mockStoreUri,
18+
mockArbitrator,
19+
mockArbitrable
20+
)
21+
22+
expect(klerosInstance.arbitrator).toBeTruthy()
23+
expect(klerosInstance.arbitrable).toBeTruthy()
24+
expect(klerosInstance.disputes).toBeTruthy()
25+
expect(klerosInstance.notifications).toBeTruthy()
26+
27+
expect(klerosInstance.arbitrator.getContractAddress()).toEqual(
28+
mockArbitrator
29+
)
30+
expect(klerosInstance.arbitrable.getContractAddress()).toEqual(
31+
mockArbitrable
32+
)
33+
})
34+
})

0 commit comments

Comments
 (0)