From 059412ebcb471b4e56647c32d441a07a45fb0997 Mon Sep 17 00:00:00 2001 From: Shivva Date: Sat, 21 Aug 2021 13:11:21 +0200 Subject: [PATCH] add LogCancelAndRevoke event --- .../connectors/gelato/aave-services/protection/events.sol | 1 + .../connectors/gelato/aave-services/protection/main.sol | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) 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); } }