From c181ed02e46fbf43678521ef7ccc5d9dec196cfc Mon Sep 17 00:00:00 2001 From: The3D Date: Wed, 14 Oct 2020 14:24:01 +0200 Subject: [PATCH 1/2] Fixed configurator --- contracts/lendingpool/LendingPoolConfigurator.sol | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/contracts/lendingpool/LendingPoolConfigurator.sol b/contracts/lendingpool/LendingPoolConfigurator.sol index c122730d..2da31b29 100644 --- a/contracts/lendingpool/LendingPoolConfigurator.sol +++ b/contracts/lendingpool/LendingPoolConfigurator.sol @@ -413,12 +413,10 @@ contract LendingPoolConfigurator is VersionedInitializable { function deactivateReserve(address asset) external onlyAaveAdmin { ReserveLogic.ReserveData memory reserveData = pool.getReserveData(asset); - uint256 availableLiquidity = IERC20Detailed(reserveData.aTokenAddress).totalSupply(); - uint256 totalStableDebt = IERC20Detailed(reserveData.stableDebtTokenAddress).totalSupply(); - uint256 totalVariableDebt = IERC20Detailed(reserveData.variableDebtTokenAddress).totalSupply(); + uint256 availableLiquidity = IERC20Detailed(asset).balanceOf(reserveData.aTokenAddress); require( - availableLiquidity == 0 && totalStableDebt == 0 && totalVariableDebt == 0, + availableLiquidity == 0 && reserveData.currentLiquidityRate == 0, Errors.RESERVE_LIQUIDITY_NOT_0 ); From 1ca88ec0ae7232abdac8bd596732f07054b23ce9 Mon Sep 17 00:00:00 2001 From: The3D Date: Wed, 14 Oct 2020 14:34:17 +0200 Subject: [PATCH 2/2] Fixed comment on getUserConfiguration --- contracts/lendingpool/LendingPool.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/lendingpool/LendingPool.sol b/contracts/lendingpool/LendingPool.sol index 688f3eb3..ab07c5ce 100644 --- a/contracts/lendingpool/LendingPool.sol +++ b/contracts/lendingpool/LendingPool.sol @@ -724,7 +724,7 @@ contract LendingPool is VersionedInitializable, ILendingPool, LendingPoolStorage } /** - * @dev returns the configuration of the user for the specific reserve + * @dev returns the configuration of the user across all the reserves * @param user the user * @return the configuration of the user **/