change to ierc20

This commit is contained in:
Mubaris NK 2021-04-11 15:58:05 +05:30
parent 6a05db360e
commit 4fd8768f84
No known key found for this signature in database
GPG Key ID: 9AC09AD0F8D68561

View File

@ -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];