fix: protected against disable as collateral + withdraw

This commit is contained in:
Hadrien Charlanes 2021-06-30 18:31:43 +02:00
parent 8bf4b0acf4
commit 9f110e1d19

View File

@ -498,6 +498,7 @@ contract LendingPool is VersionedInitializable, ILendingPool, LendingPoolStorage
ltv, ltv,
currentLiquidationThreshold, currentLiquidationThreshold,
healthFactor, healthFactor,
) = GenericLogic.getUserAccountData( ) = GenericLogic.getUserAccountData(
user, user,
_reserves, _reserves,
@ -875,7 +876,7 @@ contract LendingPool is VersionedInitializable, ILendingPool, LendingPoolStorage
reserveCache.nextLiquidityIndex reserveCache.nextLiquidityIndex
); );
if (userConfig.isUsingAsCollateral(reserve.id)) { if (reserve.configuration.getLtv() > 0) {
if (userConfig.isBorrowingAny()) { if (userConfig.isBorrowingAny()) {
ValidationLogic.validateHFAndExposureCap( ValidationLogic.validateHFAndExposureCap(
asset, asset,