diff --git a/contracts/interfaces/ILendingPool.sol b/contracts/interfaces/ILendingPool.sol index c5801065..4f3d172e 100644 --- a/contracts/interfaces/ILendingPool.sol +++ b/contracts/interfaces/ILendingPool.sol @@ -459,9 +459,7 @@ interface ILendingPool { function paused() external view returns (bool); - function authorizeFlashBorrower(address flashBorrower) external; - - function unauthorizeFlashBorrower(address flashBorrower) external; + function updateFlashBorrowerAuthorization(address flashBorrower, bool authorized) external; function isFlashBorrowerAuthorized(address flashBorrower) external view returns (bool); } diff --git a/contracts/protocol/lendingpool/LendingPool.sol b/contracts/protocol/lendingpool/LendingPool.sol index 777b47bf..83497d58 100644 --- a/contracts/protocol/lendingpool/LendingPool.sol +++ b/contracts/protocol/lendingpool/LendingPool.sol @@ -822,20 +822,12 @@ contract LendingPool is VersionedInitializable, ILendingPool, LendingPoolStorage } } - function authorizeFlashBorrower(address flashBorrower) + function updateFlashBorrowerAuthorization(address flashBorrower, bool authorized) external override onlyLendingPoolConfigurator { - _authorizedFlashBorrowers[flashBorrower] = true; - } - - function unauthorizeFlashBorrower(address flashBorrower) - external - override - onlyLendingPoolConfigurator - { - _authorizedFlashBorrowers[flashBorrower] = false; + _authorizedFlashBorrowers[flashBorrower] = authorized; } function isFlashBorrowerAuthorized(address flashBorrower) external view override returns (bool) { diff --git a/contracts/protocol/lendingpool/LendingPoolConfigurator.sol b/contracts/protocol/lendingpool/LendingPoolConfigurator.sol index 5c8e8f46..2730937f 100644 --- a/contracts/protocol/lendingpool/LendingPoolConfigurator.sol +++ b/contracts/protocol/lendingpool/LendingPoolConfigurator.sol @@ -487,13 +487,13 @@ contract LendingPoolConfigurator is VersionedInitializable, ILendingPoolConfigur /// @inheritdoc ILendingPoolConfigurator function authorizeFlashBorrower(address flashBorrower) external override onlyPoolAdmin { - _pool.authorizeFlashBorrower(flashBorrower); + _pool.updateFlashBorrowerAuthorization(flashBorrower, true); emit FlashBorrowerAuthorized(flashBorrower); } /// @inheritdoc ILendingPoolConfigurator function unauthorizeFlashBorrower(address flashBorrower) external override onlyPoolAdmin { - _pool.unauthorizeFlashBorrower(flashBorrower); + _pool.updateFlashBorrowerAuthorization(flashBorrower, false); emit FlashBorrowerUnauthorized(flashBorrower); }