From 2f8017cfc507c03fa9b55c3a0b41641f2534ea90 Mon Sep 17 00:00:00 2001 From: lukema95 <867273263@qq.com> Date: Wed, 24 Jul 2024 18:52:51 +0800 Subject: [PATCH] check if the token is zeta --- contracts/SwapHelperLib.sol | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/contracts/SwapHelperLib.sol b/contracts/SwapHelperLib.sol index 3351ef9..cf762fb 100644 --- a/contracts/SwapHelperLib.sol +++ b/contracts/SwapHelperLib.sol @@ -127,7 +127,9 @@ library SwapHelperLib { path ); - if (!isSufficientLiquidity) { + bool isZETA = targetZRC20 == systemContract.wZetaContractAddress() || zrc20 == systemContract.wZetaContractAddress(); + + if (!isSufficientLiquidity && !isZETA) { path = new address[](3); path[0] = zrc20; path[1] = systemContract.wZetaContractAddress();