Skip to content

Commit

Permalink
Replace Bitcoin block explorer
Browse files Browse the repository at this point in the history
  • Loading branch information
kkosiorowska committed May 14, 2024
1 parent d56a021 commit 3e60408
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions dapp/src/constants/chains.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
import { Chain } from "#/types"
import { EthereumNetwork, BitcoinNetwork } from "@acre-btc/sdk"

export const BLOCK_EXPLORER: Record<Chain, { title: string; url: string }> = {
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<Chain, { title: string; url: string }> =
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"

Expand Down

0 comments on commit 3e60408

Please sign in to comment.