From dfe865fc76fd2be1c5da9ce8f7bdadc6bfc39068 Mon Sep 17 00:00:00 2001 From: The3D Date: Mon, 24 Aug 2020 01:46:15 +0200 Subject: [PATCH] Removed unused code in tests --- test/helpers/utils/calculations.ts | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/test/helpers/utils/calculations.ts b/test/helpers/utils/calculations.ts index b3511282..4d1c55e4 100644 --- a/test/helpers/utils/calculations.ts +++ b/test/helpers/utils/calculations.ts @@ -1421,31 +1421,3 @@ const calcExpectedVariableBorrowIndex = (reserveData: ReserveData, timestamp: Bi return cumulatedInterest.rayMul(reserveData.variableBorrowIndex); }; - -export const calculateHealthFactorFromBalances = ( - collateralBalanceETH: BigNumber, - borrowBalanceETH: BigNumber, - currentLiquidationThreshold: BigNumber -): BigNumber => { - if (borrowBalanceETH.eq(0)) { - return strToBN('-1'); // invalid number - } - return collateralBalanceETH.multipliedBy(currentLiquidationThreshold).div(borrowBalanceETH); -}; - -const calculateAvailableBorrowsETH = ( - collateralBalanceETH: BigNumber, - borrowBalanceETH: BigNumber, - currentLtv: BigNumber -): BigNumber => { - if (currentLtv.eq(0)) { - return strToBN('0'); - } - let availableBorrowsETH = collateralBalanceETH.multipliedBy(currentLtv); - if (availableBorrowsETH.lt(borrowBalanceETH)) { - return strToBN('0'); - } - availableBorrowsETH = availableBorrowsETH.minus(borrowBalanceETH); - const borrowFee = availableBorrowsETH.multipliedBy(0.0025); - return availableBorrowsETH.minus(borrowFee); -};