Skip to content
Permalink
Browse files

fix: check session of jurors last vote

  • Loading branch information...
satello committed Mar 7, 2018
1 parent 00295d9 commit bf4fde552b8fc5911dbce929e12472b825b531ee
Showing with 12 additions and 1 deletion.
  1. +12 −1 src/contractWrappers/KlerosWrapper.js
@@ -460,7 +460,18 @@ class KlerosWrapper extends ContractWrapper {
canRuleDispute = async (arbitratorAddress, disputeId, draws, account) => {
const contractInstance = await this.load(arbitratorAddress)

return contractInstance.validDraws(account, disputeId, draws)
const validDraws = await contractInstance.validDraws(
account,
disputeId,
draws
)
const lastRuling = (await contractInstance.getLastSessionVote(
disputeId,
account
)).toNumber()
const currentSession = await this.getSession(arbitratorAddress)

return validDraws && lastRuling !== currentSession
}

/**

0 comments on commit bf4fde5

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