Merge branch 'fix/62' into feat/data-helpers

This commit is contained in:
andyk 2020-10-14 17:12:49 +03:00
commit 0a1c656cc1
2 changed files with 3 additions and 5 deletions

View File

@ -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
**/

View File

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