From 4f283c9876167ac090ff007bda493328b484e657 Mon Sep 17 00:00:00 2001 From: Thrilok kumar Date: Wed, 21 Apr 2021 23:43:28 +0530 Subject: [PATCH] Update contracts/senders/aave-v2-migrator/main.sol Co-authored-by: Samyak Jain <34437877+KaymasJain@users.noreply.github.com> --- contracts/senders/aave-v2-migrator/main.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contracts/senders/aave-v2-migrator/main.sol b/contracts/senders/aave-v2-migrator/main.sol index 3b34da0..9c2ad7e 100644 --- a/contracts/senders/aave-v2-migrator/main.sol +++ b/contracts/senders/aave-v2-migrator/main.sol @@ -89,7 +89,7 @@ contract LiquidityResolver is Helpers, Events { address _token = _tokens[i] == ethAddr ? wethAddr : _tokens[i]; aave.withdraw(_token, _amts[i], address(this)); - if (_tokens[i] == ethAddr) { + if (_token == wethAddr) { TokenInterface wethContract = TokenInterface(wethAddr); uint wethBal = wethContract.balanceOf(address(this)); wethContract.approve(wethAddr, wethBal); @@ -201,4 +201,4 @@ contract InstaAaveV2MigratorSenderImplementation is MigrateResolver { flashloanContract.initiateFlashLoan(data, ethAmt); } -} \ No newline at end of file +}