mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
Merge branch 'fix/62' into feat/data-helpers
This commit is contained in:
commit
0a1c656cc1
|
@ -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
|
* @param user the user
|
||||||
* @return the configuration of the user
|
* @return the configuration of the user
|
||||||
**/
|
**/
|
||||||
|
|
|
@ -413,12 +413,10 @@ contract LendingPoolConfigurator is VersionedInitializable {
|
||||||
function deactivateReserve(address asset) external onlyAaveAdmin {
|
function deactivateReserve(address asset) external onlyAaveAdmin {
|
||||||
ReserveLogic.ReserveData memory reserveData = pool.getReserveData(asset);
|
ReserveLogic.ReserveData memory reserveData = pool.getReserveData(asset);
|
||||||
|
|
||||||
uint256 availableLiquidity = IERC20Detailed(reserveData.aTokenAddress).totalSupply();
|
uint256 availableLiquidity = IERC20Detailed(asset).balanceOf(reserveData.aTokenAddress);
|
||||||
uint256 totalStableDebt = IERC20Detailed(reserveData.stableDebtTokenAddress).totalSupply();
|
|
||||||
uint256 totalVariableDebt = IERC20Detailed(reserveData.variableDebtTokenAddress).totalSupply();
|
|
||||||
|
|
||||||
require(
|
require(
|
||||||
availableLiquidity == 0 && totalStableDebt == 0 && totalVariableDebt == 0,
|
availableLiquidity == 0 && reserveData.currentLiquidityRate == 0,
|
||||||
Errors.RESERVE_LIQUIDITY_NOT_0
|
Errors.RESERVE_LIQUIDITY_NOT_0
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user