Update contracts/optimism/connectors/connext/main.sol

Co-authored-by: Thrilok kumar <thrilok2000@gmail.com>
This commit is contained in:
wanglonghong 2023-03-27 16:35:09 +08:00 committed by GitHub
parent 07395bf419
commit 91c24842d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,7 +34,8 @@ abstract contract ConnextResolver is Helpers {
if (isNative) {
_amount = _amount == uint256(-1) ? sub(address(this).balance, params.relayerFee) : _amount;
params.asset = wethAddr;
tokenContract = TokenInterface(params.asset);
// xcall does not take native asset, must wrap
convertEthToWeth(true, tokenContract, _amount);