Removed unneeded conditions

This commit is contained in:
The3D 2020-11-10 17:15:36 +01:00
parent 751ecf6fa3
commit f125eeb0c5

View File

@ -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;