From 5b45be6a44181db110035d8c96bda743dc338be2 Mon Sep 17 00:00:00 2001 From: Jason Raymond Bell Date: Thu, 20 May 2021 14:38:24 +0100 Subject: [PATCH] Don't ignore return value of withdraw Fixes MixBytes Warning 4. --- contracts/adapters/BaseParaSwapAdapter.sol | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/contracts/adapters/BaseParaSwapAdapter.sol b/contracts/adapters/BaseParaSwapAdapter.sol index 2ef5314a..849e1f1e 100644 --- a/contracts/adapters/BaseParaSwapAdapter.sol +++ b/contracts/adapters/BaseParaSwapAdapter.sol @@ -102,7 +102,10 @@ abstract contract BaseParaSwapAdapter is FlashLoanReceiverBase, Ownable { IERC20(reserveAToken).safeTransferFrom(user, address(this), amount); // withdraw reserve - LENDING_POOL.withdraw(reserve, amount, address(this)); + require( + LENDING_POOL.withdraw(reserve, amount, address(this)) == amount, + 'UNEXPECTED_AMOUNT_WITHDRAWN' + ); } /**