Skip to content

Commit

Permalink
Merge 88eda16 into c4b779a
Browse files Browse the repository at this point in the history
  • Loading branch information
facuspagnuolo committed Sep 21, 2020
2 parents c4b779a + 88eda16 commit ecaa3bd
Show file tree
Hide file tree
Showing 2 changed files with 134 additions and 110 deletions.
8 changes: 4 additions & 4 deletions apps/voting-disputable/contracts/DisputableVoting.sol
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ contract DisputableVoting is IForwarderWithContext, DisputableAragonApp {
Vote storage vote_ = _getVote(_voteId);
require(_canVote(vote_, msg.sender), ERROR_CANNOT_VOTE);

_castVote(vote_, _voteId, _supports, msg.sender, address(0));
_castVote(vote_, _voteId, _supports, msg.sender, msg.sender);
}

/**
Expand Down Expand Up @@ -804,8 +804,8 @@ contract DisputableVoting is IForwarderWithContext, DisputableAragonApp {
_vote.yea = yeas;
_vote.nay = nays;
castVote.state = _voterStateFor(_supports);
castVote.caster = _caster;
emit CastVote(_voteId, _voter, _supports, _caster == address(0) ? _voter : _caster);
castVote.caster = _caster == _voter ? address(0) : _caster;
emit CastVote(_voteId, _voter, _supports, _caster);
}

/**
Expand Down Expand Up @@ -1142,7 +1142,7 @@ contract DisputableVoting is IForwarderWithContext, DisputableAragonApp {
* @return True if the representative currently represents the voter
*/
function _isRepresentativeOf(address _voter, address _representative) internal view returns (bool) {
return representatives[_voter] == _representative;
return representatives[_voter] == _representative || _voter == _representative;
}

/**
Expand Down

0 comments on commit ecaa3bd

Please sign in to comment.