mirror of
https://github.com/Instadapp/dsa-polygon-migration.git
synced 2024-07-29 22:27:58 +00:00
WETH fix
This commit is contained in:
parent
433534aaea
commit
11bfdbf7f4
|
@ -89,7 +89,15 @@ contract LiquidityResolver is Helpers, Events {
|
|||
address _token = _tokens[i] == ethAddr ? wethAddr : _tokens[i];
|
||||
aave.withdraw(_token, _amts[i], address(this));
|
||||
IERC20(_token).safeApprove(erc20Predicate, _amts[i]);
|
||||
rootChainManager.depositFor(polygonReceiver, _token, abi.encode(_amts[i]));
|
||||
|
||||
if (_tokens[i] == ethAddr) {
|
||||
TokenInterface wethContract = TokenInterface(wethAddr);
|
||||
uint wethBal = wethContract.balanceOf(address(this));
|
||||
wethContract.approve(wethAddr, wethBal);
|
||||
wethContract.withdraw(wethBal);
|
||||
}
|
||||
|
||||
rootChainManager.depositFor(polygonReceiver, _tokens[i], abi.encode(_amts[i]));
|
||||
|
||||
isPositionSafe();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user