Merge pull request #40 from propeller-heads/router/dc/return-eth
fix: transfer ETH if tokenOut is ETH
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