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