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

Co-authored-by: Shriya Tyagi <47134275+shriyatyagii@users.noreply.github.com>
This commit is contained in:
wanglonghong 2023-04-03 10:41:02 +08:00 committed by GitHub
parent 0b757d9cd7
commit 9cd3cec75c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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