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:
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user