From f125eeb0c5378e5d0da31bde9d01707b5ec62014 Mon Sep 17 00:00:00 2001 From: The3D Date: Tue, 10 Nov 2020 17:15:36 +0100 Subject: [PATCH] Removed unneeded conditions --- contracts/libraries/logic/ReserveLogic.sol | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/contracts/libraries/logic/ReserveLogic.sol b/contracts/libraries/logic/ReserveLogic.sol index 96cdbc40..85fbe28a 100644 --- a/contracts/libraries/logic/ReserveLogic.sol +++ b/contracts/libraries/logic/ReserveLogic.sol @@ -185,15 +185,9 @@ library ReserveLogic { address interestRateStrategyAddress ) external { require(reserve.aTokenAddress == address(0), Errors.RL_RESERVE_ALREADY_INITIALIZED); - if (reserve.liquidityIndex == 0) { - //if the reserve has not been initialized yet - reserve.liquidityIndex = uint128(WadRayMath.ray()); - } - - if (reserve.variableBorrowIndex == 0) { - reserve.variableBorrowIndex = uint128(WadRayMath.ray()); - } - + + reserve.liquidityIndex = uint128(WadRayMath.ray()); + reserve.variableBorrowIndex = uint128(WadRayMath.ray()); reserve.aTokenAddress = aTokenAddress; reserve.stableDebtTokenAddress = stableDebtTokenAddress; reserve.variableDebtTokenAddress = variableDebtTokenAddress;