Skip to content

Commit

Permalink
Merge pull request #1076 from oraidex/optimize/ton
Browse files Browse the repository at this point in the history
fix route
  • Loading branch information
haunv3 authored Dec 11, 2024
2 parents d376f85 + 79556ca commit 3e3be36
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/pages/Balance/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,8 @@ const Balance: React.FC<BalanceProps> = () => {
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 };
};

Expand Down Expand Up @@ -600,6 +601,8 @@ const Balance: React.FC<BalanceProps> = () => {

// 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,
Expand Down

0 comments on commit 3e3be36

Please sign in to comment.