From 3e604081381cc0d0ee8220605ae5890e1ff20079 Mon Sep 17 00:00:00 2001 From: Karolina Kosiorowska Date: Tue, 14 May 2024 11:34:46 +0200 Subject: [PATCH] Replace Bitcoin block explorer --- dapp/src/constants/chains.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/dapp/src/constants/chains.ts b/dapp/src/constants/chains.ts index 150d7575f..43d408d31 100644 --- a/dapp/src/constants/chains.ts +++ b/dapp/src/constants/chains.ts @@ -1,11 +1,21 @@ import { Chain } from "#/types" import { EthereumNetwork, BitcoinNetwork } from "@acre-btc/sdk" -export const BLOCK_EXPLORER: Record = { +const BLOCK_EXPLORER_TESTNET = { + ethereum: { title: "Etherscan", url: "https://sepolia.etherscan.io" }, + bitcoin: { title: "Mempool Space", url: "https://mempool.space/testnet" }, +} + +const BLOCK_EXPLORER_MAINNET = { ethereum: { title: "Etherscan", url: "https://etherscan.io" }, - bitcoin: { title: "Blockstream", url: "https://blockstream.info" }, + bitcoin: { title: "Mempool Space", url: "https://mempool.space" }, } +export const BLOCK_EXPLORER: Record = + import.meta.env.VITE_USE_TESTNET === "true" + ? BLOCK_EXPLORER_TESTNET + : BLOCK_EXPLORER_MAINNET + export const ETHEREUM_NETWORK: EthereumNetwork = import.meta.env.VITE_USE_TESTNET === "true" ? "sepolia" : "mainnet"