Skip to content

Commit

Permalink
N-14 [Oval] Possible Duplicate Event Emission (#26)
Browse files Browse the repository at this point in the history
Signed-off-by: Reinis Martinsons <reinis@umaproject.org>
  • Loading branch information
Reinis-FRP authored Jun 18, 2024
1 parent 5624e60 commit 6f53172
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/controllers/BaseController.sol
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ abstract contract BaseController is Ownable, Oval {
* @param allowed The unlocker status to set.
*/
function setUnlocker(address unlocker, bool allowed) public onlyOwner {
require(unlockers[unlocker] != allowed, "Unlocker not changed");

unlockers[unlocker] = allowed;

emit UnlockerSet(unlocker, allowed);
Expand Down
2 changes: 2 additions & 0 deletions src/controllers/MutableUnlockersController.sol
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ abstract contract MutableUnlockersController is Ownable, Oval {
* @param allowed The unlocker status to set.
*/
function setUnlocker(address unlocker, bool allowed) public onlyOwner {
require(unlockers[unlocker] != allowed, "Unlocker not changed");

unlockers[unlocker] = allowed;

emit UnlockerSet(unlocker, allowed);
Expand Down

0 comments on commit 6f53172

Please sign in to comment.