From 5fe4603e3de122e4e0304e0b44c6a1c4924f88b6 Mon Sep 17 00:00:00 2001 From: Zer0dot Date: Wed, 10 Feb 2021 18:23:30 -0500 Subject: [PATCH] Fixed deprecated /test/ test suite --- test/helpers/utils/calculations.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/test/helpers/utils/calculations.ts b/test/helpers/utils/calculations.ts index a4db008f..aeb9d74e 100644 --- a/test/helpers/utils/calculations.ts +++ b/test/helpers/utils/calculations.ts @@ -1243,29 +1243,29 @@ export const calcExpectedInterestRates = ( ]; let stableBorrowRate: BigNumber = marketStableRate; - let variableBorrowRate: BigNumber = new BigNumber(reserveConfiguration.baseVariableBorrowRate); + let variableBorrowRate: BigNumber = new BigNumber(reserveConfiguration.strategy.baseVariableBorrowRate); - const optimalRate = new BigNumber(reserveConfiguration.optimalUtilizationRate); + const optimalRate = new BigNumber(reserveConfiguration.strategy.optimalUtilizationRate); const excessRate = new BigNumber(RAY).minus(optimalRate); if (utilizationRate.gt(optimalRate)) { const excessUtilizationRateRatio = utilizationRate - .minus(reserveConfiguration.optimalUtilizationRate) + .minus(reserveConfiguration.strategy.optimalUtilizationRate) .rayDiv(excessRate); stableBorrowRate = stableBorrowRate - .plus(reserveConfiguration.stableRateSlope1) + .plus(reserveConfiguration.strategy.stableRateSlope1) .plus( - new BigNumber(reserveConfiguration.stableRateSlope2).rayMul(excessUtilizationRateRatio) + new BigNumber(reserveConfiguration.strategy.stableRateSlope2).rayMul(excessUtilizationRateRatio) ); variableBorrowRate = variableBorrowRate - .plus(reserveConfiguration.variableRateSlope1) + .plus(reserveConfiguration.strategy.variableRateSlope1) .plus( - new BigNumber(reserveConfiguration.variableRateSlope2).rayMul(excessUtilizationRateRatio) + new BigNumber(reserveConfiguration.strategy.variableRateSlope2).rayMul(excessUtilizationRateRatio) ); } else { stableBorrowRate = stableBorrowRate.plus( - new BigNumber(reserveConfiguration.stableRateSlope1).rayMul( + new BigNumber(reserveConfiguration.strategy.stableRateSlope1).rayMul( utilizationRate.rayDiv(new BigNumber(optimalRate)) ) ); @@ -1273,7 +1273,7 @@ export const calcExpectedInterestRates = ( variableBorrowRate = variableBorrowRate.plus( utilizationRate .rayDiv(optimalRate) - .rayMul(new BigNumber(reserveConfiguration.variableRateSlope1)) + .rayMul(new BigNumber(reserveConfiguration.strategy.variableRateSlope1)) ); }