fix weth transfer
This commit is contained in:
@@ -103,7 +103,8 @@ contract UniV3Adapter is IDODOAdapter, IUniswapV3SwapCallback, InitializableOwna
|
||||
if (token == _WETH_ && address(this).balance >= value) {
|
||||
// pay with WETH9
|
||||
IWETH(_WETH_).deposit{value: value}(); // wrap only what is needed to pay
|
||||
IWETH(_WETH_).transfer(recipient, value);
|
||||
bool success = IWETH(_WETH_).transfer(recipient, value);
|
||||
require(success, "WETH_TRANSFER_FAIL");
|
||||
} else if (payer == address(this)) {
|
||||
// pay with tokens already in the contract (for the exact input multihop case)
|
||||
SafeERC20.safeTransfer(IERC20(token), recipient, value);
|
||||
|
||||
Reference in New Issue
Block a user