From 79556ca4e2976dd8e109127c1cfd3e014d9417fd Mon Sep 17 00:00:00 2001 From: Hau Nguyen Van Date: Wed, 11 Dec 2024 18:24:50 +0700 Subject: [PATCH] fix route --- src/pages/Balance/index.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pages/Balance/index.tsx b/src/pages/Balance/index.tsx index 2c4be3017..f35ace6aa 100644 --- a/src/pages/Balance/index.tsx +++ b/src/pages/Balance/index.tsx @@ -443,7 +443,8 @@ const Balance: React.FC = () => { const isFromTonToCosmos = from.chainId === TonChainId && toNetworkChainId !== TonChainId; const isFromCosmosToTON = from.cosmosBased && toNetworkChainId === TonChainId; const findToNetwork = flattenTokens.find((flat) => flat.chainId === toNetworkChainId); - const isFromCosmosToCosmos = from.cosmosBased && findToNetwork.cosmosBased; + const isFromCosmosToCosmos = + from.cosmosBased && findToNetwork.cosmosBased && from.coinGeckoId === 'the-open-network'; return { isFromTonToCosmos, isFromCosmosToTON, isFromCosmosToCosmos }; }; @@ -600,6 +601,8 @@ const Balance: React.FC = () => { // check transfer TON <=> ORAICHAIN,Osmosis const { isFromTonToCosmos, isFromCosmosToTON, isFromCosmosToCosmos } = await checkTransferTon(toNetworkChainId); + console.log({ isFromTonToCosmos, isFromCosmosToTON, isFromCosmosToCosmos }); + if (isFromCosmosToCosmos || isFromTonToCosmos || isFromCosmosToTON) { return await handleTransferTon({ isTonToCosmos: isFromTonToCosmos,