From 3245ea7295d6659a427fe09d23da720fa9cfe5d6 Mon Sep 17 00:00:00 2001 From: Diana Carvalho Date: Fri, 31 Jan 2025 15:58:23 +0000 Subject: [PATCH] fix: transfer ETH if tokenOut is ETH And not only if unwrapETH is true There might be pools that deal in ETH directly --- don't change below this line --- ENG-4081 Took 7 minutes --- foundry/src/TychoRouter.sol | 2 ++ 1 file changed, 2 insertions(+) diff --git a/foundry/src/TychoRouter.sol b/foundry/src/TychoRouter.sol index fffffb8..0ae1332 100644 --- a/foundry/src/TychoRouter.sol +++ b/foundry/src/TychoRouter.sol @@ -177,6 +177,8 @@ contract TychoRouter is if (unwrapEth) { _unwrapETH(amountOut); + } + if (tokenOut == address(0)) { // slither-disable-next-line arbitrary-send-eth payable(receiver).transfer(amountOut); } else {