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

Commit

Permalink
feat show lastInterraction
Browse files Browse the repository at this point in the history
  • Loading branch information
n1c01a5 committed Feb 14, 2018
1 parent c942f00 commit 4110690
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kleros-api",
"version": "0.0.57",
"version": "0.0.58",
"description": "Kleros API",
"main": "lib/kleros-api.js",
"scripts": {
Expand Down
5 changes: 4 additions & 1 deletion src/contractWrappers/ArbitrableTransactionWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,8 @@ class ArbitrableTransactionWrapper extends ContractWrapper {
arbitratorExtraData,
disputeId,
partyAFee,
partyBFee
partyBFee,
lastInteraction,
] = await Promise.all(
[
contractInstance.arbitrator.call(),
Expand All @@ -372,6 +373,7 @@ class ArbitrableTransactionWrapper extends ContractWrapper {
contractInstance.disputeID.call(),
contractInstance.partyAFee.call(),
contractInstance.partyBFee.call(),
contractInstance.lastInteraction.call(),
]
).catch(err => {
throw new Error(err)
Expand All @@ -390,6 +392,7 @@ class ArbitrableTransactionWrapper extends ContractWrapper {
disputeId: disputeId.toNumber(),
partyAFee: partyAFee.toNumber(),
partyBFee: partyBFee.toNumber(),
lastInteraction,
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions src/test/kleros.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,13 @@ describe('Kleros', () => {
.toBeDefined() // contract address
expect(contractArbitrableTransactionData.arbitrator)
.toEqual(klerosCourt.address)
expect(contractArbitrableTransactionData.timeout)
.toEqual(1)
expect(contractArbitrableTransactionData.partyA)
.toEqual(partyA)
expect(contractArbitrableTransactionData.partyB)
.toEqual(partyB)
// TODO add test for lastInteraction, fix typeof of the var
}, 10000)

test(
Expand Down
2 changes: 1 addition & 1 deletion yarn-error.log
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Platform:
npm manifest:
{
"name": "kleros-api",
"version": "0.0.55",
"version": "0.0.57",
"description": "Kleros API",
"main": "lib/kleros-api.js",
"scripts": {
Expand Down

0 comments on commit 4110690

Please sign in to comment.