From 2a8210fa82e0713a800cc00986534c5445a1ee0f Mon Sep 17 00:00:00 2001 From: Denis Fadeev Date: Wed, 13 Mar 2024 19:16:48 +0500 Subject: [PATCH] fix: BTC mainnet TSS address --- data/addresses.mainnet.json | 2 +- tasks/addresses.ts | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/data/addresses.mainnet.json b/data/addresses.mainnet.json index f827ea05..e05e4dff 100644 --- a/data/addresses.mainnet.json +++ b/data/addresses.mainnet.json @@ -280,7 +280,7 @@ "type": "zrc20" }, { - "address": "0x70e967acFcC17c3941E87562161406d41676FD83", + "address": "bc1qm24wp577nk8aacckv8np465z3dvmu7ry45el6y", "category": "omnichain", "chain_id": 8332, "chain_name": "btc_mainnet", diff --git a/tasks/addresses.ts b/tasks/addresses.ts index f485d721..5aa236f0 100644 --- a/tasks/addresses.ts +++ b/tasks/addresses.ts @@ -49,7 +49,8 @@ const fetchChains = async (network: Network) => { }; const fetchTssData = async (chains: any, addresses: any, network: Network) => { - const URL = `${api[network].rpc}/zeta-chain/observer/get_tss_address/18332`; + const bitcoinChainID = network === "zeta_mainnet" ? "8332" : "18332"; + const URL = `${api[network].rpc}/zeta-chain/observer/get_tss_address/${bitcoinChainID}`; try { const tssResponse: AxiosResponse = await axios.get(URL); @@ -58,7 +59,7 @@ const fetchTssData = async (chains: any, addresses: any, network: Network) => { const { btc, eth } = tssResponse.data; if (chain.chain_name === "zeta_testnet") return; addresses.push({ - address: chain.chain_name === "btc_testnet" ? btc : eth, + address: ["btc_testnet", "btc_mainnet"].includes(chain.chain_name) ? btc : eth, category: "omnichain", chain_id: parseInt(chain.chain_id), chain_name: chain.chain_name,