From 57fb45e380189001947946f69d1d8c2dad590a39 Mon Sep 17 00:00:00 2001 From: andyk Date: Thu, 20 Aug 2020 16:31:52 +0300 Subject: [PATCH] remove named return in calculateAvailableCollateralToLiquidate --- contracts/lendingpool/LendingPoolLiquidationManager.sol | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/contracts/lendingpool/LendingPoolLiquidationManager.sol b/contracts/lendingpool/LendingPoolLiquidationManager.sol index 539edde1..bd354938 100644 --- a/contracts/lendingpool/LendingPoolLiquidationManager.sol +++ b/contracts/lendingpool/LendingPoolLiquidationManager.sol @@ -293,9 +293,9 @@ contract LendingPoolLiquidationManager is ReentrancyGuard, VersionedInitializabl address _principalAddress, uint256 _purchaseAmount, uint256 _userCollateralBalance - ) internal view returns (uint256 collateralAmount, uint256 principalAmountNeeded) { - collateralAmount = 0; - principalAmountNeeded = 0; + ) internal view returns (uint256, uint256) { + uint256 collateralAmount = 0; + uint256 principalAmountNeeded = 0; IPriceOracleGetter oracle = IPriceOracleGetter(addressesProvider.getPriceOracle()); // Usage of a memory struct of vars to avoid "Stack too deep" errors due to local variables @@ -330,7 +330,6 @@ contract LendingPoolLiquidationManager is ReentrancyGuard, VersionedInitializabl collateralAmount = vars.maxAmountCollateralToLiquidate; principalAmountNeeded = _purchaseAmount; } - return (collateralAmount, principalAmountNeeded); } }