mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
Fixed configurator
This commit is contained in:
parent
543c3f5c9c
commit
c181ed02e4
|
@ -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