mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
Check lengths of all the arrays
Fixes ABDK CVF-5.
This commit is contained in:
parent
afeb5fb996
commit
38bec942da
|
@ -40,7 +40,10 @@ contract ParaSwapLiquiditySwapAdapter is BaseParaSwapSellAdapter {
|
|||
bytes calldata params
|
||||
) external override returns (bool) {
|
||||
require(msg.sender == address(LENDING_POOL), 'CALLER_MUST_BE_LENDING_POOL');
|
||||
require(assets.length == 1, 'FLASHLOAN_MULTIPLE_ASSETS_NOT_SUPPORTED');
|
||||
require(
|
||||
assets.length == 1 && amounts.length == 1 && premiums.length == 1,
|
||||
'FLASHLOAN_MULTIPLE_ASSETS_NOT_SUPPORTED'
|
||||
);
|
||||
|
||||
uint256 flashLoanAmount = amounts[0];
|
||||
uint256 premium = premiums[0];
|
||||
|
|
Loading…
Reference in New Issue
Block a user