diff --git a/contracts/ResolutionManager/ResolutionManagerBase.sol b/contracts/ResolutionManager/ResolutionManagerBase.sol index 334b2d7..d409692 100644 --- a/contracts/ResolutionManager/ResolutionManagerBase.sol +++ b/contracts/ResolutionManager/ResolutionManagerBase.sol @@ -383,6 +383,7 @@ abstract contract ResolutionManagerBase { //if (!resolution.hasVoted[msg.sender]) { // Did sender's delegate vote? if ( + !resolution.hasVoted[msg.sender] && resolution.hasVoted[delegate] && resolution.hasVotedYes[delegate] ) { diff --git a/test/Integration.ts b/test/Integration.ts index ac14d9e..79c9aeb 100644 --- a/test/Integration.ts +++ b/test/Integration.ts @@ -284,6 +284,28 @@ describe("Integration", async () => { expect(resolutionResult).equal(true); }); + it("bug #10", async () => { + await _makeContributor(user1, 65); + await _makeContributor(user2, 32); + + await _delegate(user1, user2); // yesTotalVote == 33 + + const resolutionId = await _prepareResolution(); + await _makeVotable(resolutionId); + + await _vote(user1, false, resolutionId); + await _vote(user2, true, resolutionId); + await _vote(user1, true, resolutionId); + + await _endResolution(); + + const resolutionResult = await resolutionManager.getResolutionResult( + resolutionId + ); + + expect(resolutionResult).equal(true); + }); + // Mint token to a multiple shareholder // Promote them to contributor // Self-delegate