Skip to content

Commit

Permalink
Rename onlyExtension modifier to be more accurate
Browse files Browse the repository at this point in the history
  • Loading branch information
area committed Sep 23, 2021
1 parent a92b026 commit 059abe4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions contracts/colony/ColonyFunding.sol
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ import "./ColonyStorage.sol";


contract ColonyFunding is ColonyStorage, PatriciaTreeProofs { // ignore-swc-123
function lockToken() public stoppable onlyExtension returns (uint256) {
function lockToken() public stoppable onlyOwnExtension returns (uint256) {
uint256 lockId = ITokenLocking(tokenLockingAddress).lockToken(token);
tokenLocks[msg.sender][lockId] = true;
return lockId;
}

function unlockTokenForUser(address _user, uint256 _lockId) public stoppable onlyExtension {
function unlockTokenForUser(address _user, uint256 _lockId) public stoppable onlyOwnExtension {
require(tokenLocks[msg.sender][_lockId], "colony-bad-lock-id");
ITokenLocking(tokenLockingAddress).unlockTokenForUser(token, _user, _lockId);
}
Expand Down
2 changes: 1 addition & 1 deletion contracts/colony/ColonyStorage.sol
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ contract ColonyStorage is CommonStorage, ColonyDataTypes, ColonyNetworkDataTypes
_;
}

modifier onlyExtension() {
modifier onlyOwnExtension() {
require(isOwnExtension(msg.sender), "colony-must-be-extension");
_;
}
Expand Down

0 comments on commit 059abe4

Please sign in to comment.