mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
Changed return of executeOperation() to bool, as the amount is never used.
This commit is contained in:
parent
273070fada
commit
80bdb0f2b2
|
@ -13,5 +13,5 @@ interface IFlashLoanReceiver {
|
|||
uint256 amount,
|
||||
uint256 fee,
|
||||
bytes calldata params
|
||||
) external returns(uint256);
|
||||
) external returns(bool);
|
||||
}
|
||||
|
|
|
@ -571,7 +571,7 @@ contract LendingPool is VersionedInitializable, ILendingPool, LendingPoolStorage
|
|||
|
||||
//execute action of the receiver
|
||||
require(
|
||||
vars.receiver.executeOperation(asset, amount, vars.premium, params) != 0,
|
||||
vars.receiver.executeOperation(asset, amount, vars.premium, params),
|
||||
Errors.INVALID_FLASH_LOAN_EXECUTOR_RETURN
|
||||
);
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ contract MockFlashLoanReceiver is FlashLoanReceiverBase {
|
|||
uint256 amount,
|
||||
uint256 fee,
|
||||
bytes memory params
|
||||
) public override returns(uint256) {
|
||||
) public override returns(bool) {
|
||||
params;
|
||||
//mint to this contract the specific amount
|
||||
MintableERC20 token = MintableERC20(reserve);
|
||||
|
@ -61,7 +61,7 @@ contract MockFlashLoanReceiver is FlashLoanReceiverBase {
|
|||
|
||||
if (_failExecution) {
|
||||
emit ExecutedWithFail(reserve, amount, fee);
|
||||
return (_simulateEOA) ? 0 : amountToReturn;
|
||||
return !_simulateEOA;
|
||||
}
|
||||
|
||||
//execution does not fail - mint tokens and return them to the _destination
|
||||
|
@ -73,6 +73,6 @@ contract MockFlashLoanReceiver is FlashLoanReceiverBase {
|
|||
|
||||
emit ExecutedWithSuccess(reserve, amount, fee);
|
||||
|
||||
return amountToReturn;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user