From 6f531729e50761541114b8107994d7fd901dc172 Mon Sep 17 00:00:00 2001 From: Reinis Martinsons <77973553+Reinis-FRP@users.noreply.github.com> Date: Tue, 18 Jun 2024 18:13:30 +0300 Subject: [PATCH] N-14 [Oval] Possible Duplicate Event Emission (#26) Signed-off-by: Reinis Martinsons --- src/controllers/BaseController.sol | 2 ++ src/controllers/MutableUnlockersController.sol | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/controllers/BaseController.sol b/src/controllers/BaseController.sol index 16b4246..a903115 100644 --- a/src/controllers/BaseController.sol +++ b/src/controllers/BaseController.sol @@ -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); diff --git a/src/controllers/MutableUnlockersController.sol b/src/controllers/MutableUnlockersController.sol index af33590..1a28310 100644 --- a/src/controllers/MutableUnlockersController.sol +++ b/src/controllers/MutableUnlockersController.sol @@ -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);