add LogCancelAndRevoke event

This commit is contained in:
Shivva 2021-08-21 13:11:21 +02:00
parent cd46f4fae8
commit 059412ebcb
2 changed files with 3 additions and 4 deletions

View File

@ -17,4 +17,5 @@ contract Events {
bool isPermanent
);
event LogCancelProtection(address indexed dsa, address indexed action);
event LogCancelAndRevoke(address indexed dsa, address indexed action);
}

View File

@ -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);
}
}