mirror of
https://github.com/Instadapp/dsa-polygon-migration.git
synced 2024-07-29 22:27:58 +00:00
Update contracts/senders/aave-v2-migrator/main.sol
Co-authored-by: Samyak Jain <34437877+KaymasJain@users.noreply.github.com>
This commit is contained in:
parent
729f5ab342
commit
4f283c9876
|
@ -89,7 +89,7 @@ contract LiquidityResolver is Helpers, Events {
|
||||||
address _token = _tokens[i] == ethAddr ? wethAddr : _tokens[i];
|
address _token = _tokens[i] == ethAddr ? wethAddr : _tokens[i];
|
||||||
aave.withdraw(_token, _amts[i], address(this));
|
aave.withdraw(_token, _amts[i], address(this));
|
||||||
|
|
||||||
if (_tokens[i] == ethAddr) {
|
if (_token == wethAddr) {
|
||||||
TokenInterface wethContract = TokenInterface(wethAddr);
|
TokenInterface wethContract = TokenInterface(wethAddr);
|
||||||
uint wethBal = wethContract.balanceOf(address(this));
|
uint wethBal = wethContract.balanceOf(address(this));
|
||||||
wethContract.approve(wethAddr, wethBal);
|
wethContract.approve(wethAddr, wethBal);
|
||||||
|
@ -201,4 +201,4 @@ contract InstaAaveV2MigratorSenderImplementation is MigrateResolver {
|
||||||
|
|
||||||
flashloanContract.initiateFlashLoan(data, ethAmt);
|
flashloanContract.initiateFlashLoan(data, ethAmt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user