Skip to content

Commit

Permalink
Fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
vrde committed Nov 1, 2023
1 parent 901de5d commit b643fb6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions contracts/ResolutionManager/ResolutionManagerBase.sol
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,14 @@ abstract contract ResolutionManagerBase {
executionTo.length == executionData.length,
"Resolution: length mismatch"
);
require(
addressedContributor == address(0) ||
_shareholderRegistry.isAtLeast(
_shareholderRegistry.CONTRIBUTOR_STATUS(),
addressedContributor
),
"Resolution: excluded address is not a contributor"
);
uint256 resolutionId = _currentResolutionId++;
emit ResolutionCreated(msg.sender, resolutionId);

Expand Down
4 changes: 2 additions & 2 deletions test/ResolutionManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ describe("Resolution", async () => {
.withArgs(managingBoard.address, resolutionId);
});

it.only("doesn't allow to create a resolution to exclude an address that is not a contributor from votin", async () => {
it("doesn't allow to create a resolution to exclude an address that is not a contributor from voting", async () => {
await expect(
resolution
.connect(managingBoard)
Expand All @@ -258,7 +258,7 @@ describe("Resolution", async () => {
[],
nonContributor.address
)
).revertedWith("Resolution: address is not a contributor");
).revertedWith("Resolution: excluded address is not a contributor");
});

it("doesn't allow non contributors to create an addressable resolution", async () => {
Expand Down

0 comments on commit b643fb6

Please sign in to comment.