mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
add error from lib
This commit is contained in:
parent
5e3b6869b5
commit
721e73c36e
|
@ -491,7 +491,6 @@ contract LendingPool is VersionedInitializable, ILendingPool {
|
|||
|
||||
// get user position
|
||||
uint256 userBalance = fromReserveAToken.balanceOf(msg.sender);
|
||||
require(userBalance >= amountToSwap, 'not enough collateral');
|
||||
if (userBalance == amountToSwap) {
|
||||
_usersConfig[msg.sender].setUsingAsCollateral(fromReserve.index, false);
|
||||
}
|
||||
|
@ -523,7 +522,10 @@ contract LendingPool is VersionedInitializable, ILendingPool {
|
|||
_addressesProvider.getPriceOracle()
|
||||
);
|
||||
|
||||
require(healthFactor >= GenericLogic.HEALTH_FACTOR_LIQUIDATION_THRESHOLD, 'low hf');
|
||||
require(
|
||||
healthFactor >= GenericLogic.HEALTH_FACTOR_LIQUIDATION_THRESHOLD,
|
||||
Errors.HEALTH_FACTOR_LOWER_THAN_LIQUIDATION_THRESHOLD
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue
Block a user