mirror of
https://github.com/Instadapp/dsa-polygon-migration.git
synced 2024-07-29 22:27:58 +00:00
change to ierc20
This commit is contained in:
parent
6a05db360e
commit
4fd8768f84
|
@ -59,11 +59,11 @@ contract LiquidityResolver is Helpers, Events {
|
|||
bool isEth = tokens[i] == ethAddr;
|
||||
address _token = isEth ? wethAddr : tokens[i];
|
||||
|
||||
TokenInterface tokenContract = TokenInterface(_token);
|
||||
IERC20 tokenContract = IERC20(_token);
|
||||
|
||||
if (isEth) {
|
||||
require(msg.value == amts[i]);
|
||||
tokenContract.deposit{value: msg.value}();
|
||||
TokenInterface(wethAddr).deposit{value: msg.value}();
|
||||
_amt = msg.value;
|
||||
} else {
|
||||
_amt = amts[i] == uint(-1) ? tokenContract.balanceOf(msg.sender) : amts[i];
|
||||
|
|
Loading…
Reference in New Issue
Block a user