diff --git a/contracts/ResolutionManager/ResolutionManagerBase.sol b/contracts/ResolutionManager/ResolutionManagerBase.sol index 819e139..a72692c 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 eeb77cd..29004df 100644 --- a/test/Integration.ts +++ b/test/Integration.ts @@ -291,6 +291,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