Skip to content

Commit

Permalink
fix: BTC mainnet TSS address (#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
fadeev authored Mar 19, 2024
1 parent 5b9717f commit 48c45aa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion data/addresses.mainnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@
"type": "zrc20"
},
{
"address": "0x70e967acFcC17c3941E87562161406d41676FD83",
"address": "bc1qm24wp577nk8aacckv8np465z3dvmu7ry45el6y",
"category": "omnichain",
"chain_id": 8332,
"chain_name": "btc_mainnet",
Expand Down
5 changes: 3 additions & 2 deletions tasks/addresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<any> = await axios.get(URL);

Expand All @@ -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,
Expand Down

0 comments on commit 48c45aa

Please sign in to comment.