Skip to content

Commit 7812ae2

Browse files
committed
Function vs modifier means error less granular
1 parent cf8ec37 commit 7812ae2

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

contracts/colony/ColonyStorage.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ contract ColonyStorage is CommonStorage, ColonyDataTypes, ColonyNetworkDataTypes
239239
}
240240

241241
modifier onlyOwnExtension() {
242-
require(isOwnExtension(msg.sender), "colony-must-be-extension");
242+
require(isOwnExtension(msg.sender), "colony-must-be-own-extension");
243243
_;
244244
}
245245

test/contracts-network/colony-network-extensions.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -324,13 +324,13 @@ contract("Colony Network Extensions", (accounts) => {
324324
it("does not allow non network-managed extensions to lock and unlock tokens", async () => {
325325
const testVotingToken = await TestVotingToken.new();
326326
await testVotingToken.install(colony.address);
327-
await checkErrorRevert(testVotingToken.lockToken(), "colony-must-be-extension");
328-
await checkErrorRevert(testVotingToken.unlockTokenForUser(ROOT, 0), "colony-must-be-extension");
327+
await checkErrorRevert(testVotingToken.lockToken(), "colony-must-be-own-extension");
328+
await checkErrorRevert(testVotingToken.unlockTokenForUser(ROOT, 0), "colony-must-be-own-extension");
329329
});
330330

331331
it("does not allow users to lock and unlock tokens", async () => {
332-
await checkErrorRevert(colony.lockToken(), "colony-sender-must-be-contract");
333-
await checkErrorRevert(colony.unlockTokenForUser(ROOT, 0), "colony-sender-must-be-contract");
332+
await checkErrorRevert(colony.lockToken(), "colony-must-be-own-extension");
333+
await checkErrorRevert(colony.unlockTokenForUser(ROOT, 0), "colony-must-be-own-extension");
334334
});
335335

336336
it("does not allow a colony to unlock a lock placed by another colony", async () => {

0 commit comments

Comments
 (0)