mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
Delete "if" condition due always will be true. Delete unreachable "else" code at repayWithCollateral.
This commit is contained in:
parent
831bc3d0eb
commit
167f02533f
|
@ -361,14 +361,7 @@ contract LendingPoolLiquidationManager is VersionedInitializable {
|
|||
);
|
||||
}
|
||||
|
||||
if (msg.sender == user || vars.healthFactor < GenericLogic.HEALTH_FACTOR_CRITICAL_THRESHOLD) {
|
||||
vars.maxPrincipalAmountToLiquidate = vars.userStableDebt.add(vars.userVariableDebt);
|
||||
} else {
|
||||
vars.maxPrincipalAmountToLiquidate = vars
|
||||
.userStableDebt
|
||||
.add(vars.userVariableDebt)
|
||||
.percentMul(LIQUIDATION_CLOSE_FACTOR_PERCENT);
|
||||
}
|
||||
vars.maxPrincipalAmountToLiquidate = vars.userStableDebt.add(vars.userVariableDebt);
|
||||
|
||||
vars.actualAmountToLiquidate = principalAmount > vars.maxPrincipalAmountToLiquidate
|
||||
? vars.maxPrincipalAmountToLiquidate
|
||||
|
|
Loading…
Reference in New Issue
Block a user