Skip to content
Permalink
Browse files

fix(disputes): fix bug in determining canRule

  • Loading branch information...
satello committed Mar 7, 2018
1 parent 8f361c8 commit 6628fb7493d6f8a84b03529be0e36c47705c1d1b
Showing with 5 additions and 3 deletions.
  1. +4 −3 src/abstractWrappers/Disputes.js
  2. +1 −0 tests/kleros.test.js
@@ -728,11 +728,12 @@ class Disputes extends AbstractWrapper {
const baseFee = dispute.arbitrationFeePerJuror
const draws = appealDraws[appeal] || []
let canRule = false
if (appeal === lastSession && draws.length > 0) {
if (firstSession + appeal === lastSession && draws.length > 0) {
canRule = await this._Arbitrator.canRuleDispute(
account,
arbitratorAddress,
disputeId,
draws
draws,
account
)
}

@@ -673,6 +673,7 @@ describe('Kleros', () => {
expect(disputeForJuror.arbitrableContractAddress).toEqual(
contractArbitrableTransactionData.address
)
expect(disputeForJuror.appealJuror[0].canRule).toBeTruthy()

const jurorForNotifications =
drawA.length > drawB.length ? juror1 : juror2

0 comments on commit 6628fb7

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