Update contracts/mainnet/connectors/basic/main.sol

This commit is contained in:
Thrilok kumar 2022-05-04 03:26:00 +05:30 committed by GitHub
parent 83bd25883c
commit 1d887e3d35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -62,7 +62,7 @@ abstract contract BasicResolver is Events, DSMath, Basic {
uint256 setId
) public payable returns (string memory _eventName, bytes memory _eventParam) {
uint _amt = getUint(getId, amt);
require(token != ethAddr, "Use deposit function to send ether");
require(token != ethAddr, "eth-not-supported");
IERC20 tokenContract = IERC20(token);
_amt = _amt == uint(-1) ? tokenContract.balanceOf(from) : _amt;
tokenContract.safeTransferFrom(from, address(this), _amt);