From 28a63237635dafc304f6219b59d216feed85ba12 Mon Sep 17 00:00:00 2001 From: emilio Date: Tue, 27 Oct 2020 16:57:05 +0100 Subject: [PATCH] fixed condition, local variable name --- contracts/libraries/logic/GenericLogic.sol | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/contracts/libraries/logic/GenericLogic.sol b/contracts/libraries/logic/GenericLogic.sol index a5801b9d..04aab7b2 100644 --- a/contracts/libraries/logic/GenericLogic.sol +++ b/contracts/libraries/logic/GenericLogic.sol @@ -33,7 +33,7 @@ library GenericLogic { uint256 borrowBalanceETH; uint256 avgLiquidationThreshold; uint256 amountToDecreaseETH; - uint256 collateralBalancefterDecrease; + uint256 collateralBalanceAfterDecrease; uint256 liquidationThresholdAfterDecrease; uint256 healthFactorAfterDecrease; bool reserveUsageAsCollateralEnabled; @@ -91,10 +91,10 @@ library GenericLogic { 10**vars.decimals ); - vars.collateralBalancefterDecrease = vars.collateralBalanceETH.sub(vars.amountToDecreaseETH); + vars.collateralBalanceAfterDecrease = vars.collateralBalanceETH.sub(vars.amountToDecreaseETH); //if there is a borrow, there can't be 0 collateral - if (vars.collateralBalancefterDecrease == 0) { + if (vars.collateralBalanceAfterDecrease == 0) { return false; } @@ -110,7 +110,7 @@ library GenericLogic { vars.liquidationThresholdAfterDecrease ); - return healthFactorAfterDecrease > GenericLogic.HEALTH_FACTOR_LIQUIDATION_THRESHOLD; + return healthFactorAfterDecrease >= GenericLogic.HEALTH_FACTOR_LIQUIDATION_THRESHOLD; } struct CalculateUserAccountDataVars {