From b60b3ce133edd2d0aa108b2ba01303df805fbb68 Mon Sep 17 00:00:00 2001 From: Denis Fadeev Date: Mon, 19 Aug 2024 11:45:13 +0300 Subject: [PATCH] fix: CCTX tracking (#170) --- packages/client/src/trackCCTX.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/client/src/trackCCTX.ts b/packages/client/src/trackCCTX.ts index 8bafc233..cb8eb72e 100644 --- a/packages/client/src/trackCCTX.ts +++ b/packages/client/src/trackCCTX.ts @@ -34,7 +34,7 @@ const fetchCCTXByInbound = async ( try { const url = `${API}/zeta-chain/crosschain/inTxHashToCctx/${hash}`; const apiResponseData = await apiFetch(url); - const res = apiResponseData?.inTxHashToCctx?.cctx_index; + const res = apiResponseData?.inboundHashToCctx?.cctx_index; res.forEach((hash: any) => { if (hash && !cctxs[hash] && !spinners[hash]) { cctxs[hash] = []; @@ -58,15 +58,15 @@ const fetchCCTXData = async function ( json: Boolean ) { const cctx = await getCCTX(hash, API); - const receiver_chainId = cctx?.outbound_tx_params[0]?.receiver_chainId; - const outbound_tx_hash = cctx?.outbound_tx_params[0]?.outbound_tx_hash; + const receiver_chainId = cctx?.outbound_params[0]?.receiver_chainId; + const outbound_tx_hash = cctx?.outbound_params[0]?.outbound_tx_hash; let confirmed_on_destination = false; const tx = { confirmed_on_destination, outbound_tx_hash, - outbound_tx_tss_nonce: cctx?.outbound_tx_params[0]?.outbound_tx_tss_nonce, + outbound_tx_tss_nonce: cctx?.outbound_params[0]?.outbound_tx_tss_nonce, receiver_chainId, - sender_chain_id: cctx?.inbound_tx_params?.sender_chain_id, + sender_chain_id: cctx?.outbound_params?.sender_chain_id, status: cctx?.cctx_status?.status, status_message: cctx?.cctx_status?.status_message, };