Update contracts/senders/aave-v2-migrator/main.sol

Co-authored-by: Samyak Jain <34437877+KaymasJain@users.noreply.github.com>
This commit is contained in:
Thrilok kumar 2021-04-21 23:43:28 +05:30 committed by GitHub
parent 729f5ab342
commit 4f283c9876
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
}
}
}