diff --git a/contracts/lendingpool/LendingPool.sol b/contracts/lendingpool/LendingPool.sol index 471d986c..7e29b92d 100644 --- a/contracts/lendingpool/LendingPool.sol +++ b/contracts/lendingpool/LendingPool.sol @@ -520,7 +520,7 @@ contract LendingPool is VersionedInitializable, ILendingPool, LendingPoolStorage FlashLoanLocalVars memory vars; - ValidationLogic.validateFlashloan(assets, amounts, modes); + ValidationLogic.validateFlashloan(assets, amounts); address[] memory aTokenAddresses = new address[](assets.length); uint256[] memory premiums = new uint256[](assets.length); diff --git a/contracts/libraries/logic/ValidationLogic.sol b/contracts/libraries/logic/ValidationLogic.sol index cc771f8b..b677f34e 100644 --- a/contracts/libraries/logic/ValidationLogic.sol +++ b/contracts/libraries/logic/ValidationLogic.sol @@ -331,26 +331,11 @@ library ValidationLogic { /** * @dev validates a flashloan action - * @param modes the flashloan modes (0 = classic flashloan, 1 = open a stable rate loan, 2 = open a variable rate loan) * @param assets the assets being flashborrowed * @param amounts the amounts for each asset being borrowed **/ - function validateFlashloan( - address[] calldata assets, - uint256[] calldata amounts, - uint256[] calldata modes - ) external pure { - require( - assets.length == amounts.length && assets.length == modes.length, - Errors.INCONSISTENT_FLASHLOAN_PARAMS - ); - - for (uint256 i = 0; i < modes.length; i++) { - require( - modes[i] <= uint256(ReserveLogic.InterestRateMode.VARIABLE), - Errors.INVALID_FLASHLOAN_MODE - ); - } + function validateFlashloan(address[] memory assets, uint256[] memory amounts) internal pure { + require(assets.length == amounts.length, Errors.INCONSISTENT_FLASHLOAN_PARAMS); } /**