diff --git a/contracts/polygon/connectors/gelato/aave-services/protection/events.sol b/contracts/polygon/connectors/gelato/aave-services/protection/events.sol index dc9d7711..813d521c 100644 --- a/contracts/polygon/connectors/gelato/aave-services/protection/events.sol +++ b/contracts/polygon/connectors/gelato/aave-services/protection/events.sol @@ -17,4 +17,5 @@ contract Events { bool isPermanent ); event LogCancelProtection(address indexed dsa, address indexed action); + event LogCancelAndRevoke(address indexed dsa, address indexed action); } diff --git a/contracts/polygon/connectors/gelato/aave-services/protection/main.sol b/contracts/polygon/connectors/gelato/aave-services/protection/main.sol index f6a879c3..b948af67 100644 --- a/contracts/polygon/connectors/gelato/aave-services/protection/main.sol +++ b/contracts/polygon/connectors/gelato/aave-services/protection/main.sol @@ -67,11 +67,9 @@ abstract contract GAaveProtectionResolver is Events, Helpers { /// @dev Function for cancelling and removing allowance /// of aToken to _protectionAction function cancelAndRevoke() external payable { - if (_dsaHasProtection()) { - _cancelProtection(); - emit LogCancelProtection(address(this), _protectionAction); - } + if (_dsaHasProtection()) _cancelProtection(); _revokeAllowance(); + emit LogCancelAndRevoke(address(this), _protectionAction); } }