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
This commit is contained in:
Diana Carvalho
2025-01-31 15:58:23 +00:00
parent d153c69b8f
commit 3245ea7295

View File

@@ -177,6 +177,8 @@ contract TychoRouter is
if (unwrapEth) { if (unwrapEth) {
_unwrapETH(amountOut); _unwrapETH(amountOut);
}
if (tokenOut == address(0)) {
// slither-disable-next-line arbitrary-send-eth // slither-disable-next-line arbitrary-send-eth
payable(receiver).transfer(amountOut); payable(receiver).transfer(amountOut);
} else { } else {