Skip to content
Permalink
Browse files

feat(disputes): return deadline as epoch in ms instead of a date object

  • Loading branch information...
epiqueras authored and satello committed Feb 14, 2018
1 parent 32db45c commit 90d485623d18bfc48f67a14722e91aa384d22122
Showing with 2 additions and 2 deletions.
  1. +1 −1 src/abstractWrappers/Disputes.js
  2. +1 −1 src/test/kleros.test.js
@@ -332,7 +332,7 @@ class Disputes extends AbstractWrapper {
const arbitratorData = await this._Arbitrator.getData(arbitratorAddress)

// Last period change + current period duration = deadline
return new Date(1000 * (arbitratorData.lastPeriodChange + (await this._Arbitrator.getTimeForPeriod(arbitratorAddress, period))))
return 1000 * (arbitratorData.lastPeriodChange + (await this._Arbitrator.getTimeForPeriod(arbitratorAddress, period)))
}

/**
@@ -498,7 +498,7 @@ describe('Kleros', () => {

const disputesForJuror = await KlerosInstance.disputes.getDisputesForUser(klerosCourt.address, juror)
expect(disputesForJuror.length).toEqual(1)
expect(disputesForJuror[0].deadline.getTime()).toBe(1000 * (newState.lastPeriodChange + (await klerosPOCInstance.timePerPeriod(newState.period)).toNumber()))
expect(disputesForJuror[0].deadline).toBe(1000 * (newState.lastPeriodChange + (await klerosPOCInstance.timePerPeriod(newState.period)).toNumber()))
expect(disputesForJuror[0].arbitrableContractAddress).toEqual(contractArbitrableTransactionData.address)
expect(disputesForJuror[0].votes).toEqual([1,2,3])

0 comments on commit 90d4856

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