Skip to content
Permalink
Browse files

fix(notifications): error in stateful notifications

  • Loading branch information...
epiqueras authored and satello committed Mar 16, 2018
1 parent 858723d commit 2155f60686b13f58c1fd3138e4c14b6f53bc21dd
Showing with 18 additions and 16 deletions.
  1. +18 −16 src/abstractWrappers/Notifications.js
@@ -94,23 +94,25 @@ class Notifications extends AbstractWrapper {
} else if (currentPeriod === arbitratorConstants.PERIOD.VOTE) {
for (let dispute of userProfile.disputes) {
const draws = dispute.appealDraws[dispute.appealDraws.length - 1]
const canVote = await this._Arbitrator.canRuleDispute(
dispute.arbitratorAddress,
dispute.disputeId,
draws,
account
)
if (canVote) {
notifications.push(
this._createNotification(
notificationConstants.TYPE.CAN_VOTE,
'Need to vote on dispute',
{
disputeId: dispute.disputeId,
arbitratorAddress: dispute.arbitratorAddress
}
)
if (draws) {
const canVote = await this._Arbitrator.canRuleDispute(
dispute.arbitratorAddress,
dispute.disputeId,
draws,
account
)
if (canVote) {
notifications.push(
this._createNotification(
notificationConstants.TYPE.CAN_VOTE,
'Need to vote on dispute',
{
disputeId: dispute.disputeId,
arbitratorAddress: dispute.arbitratorAddress
}
)
)
}
}
}
}

0 comments on commit 2155f60

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