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

Commit

Permalink
fix(disputes): fix bug in determining canRule
Browse files Browse the repository at this point in the history
  • Loading branch information
satello committed Mar 7, 2018
1 parent 8f361c8 commit 6628fb7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/abstractWrappers/Disputes.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
}

Expand Down
1 change: 1 addition & 0 deletions tests/kleros.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6628fb7

Please sign in to comment.