From a7a2621cf6851ebe9f7216d776fdb207ee49e1c4 Mon Sep 17 00:00:00 2001 From: Govard Barkhatov Date: Mon, 19 Aug 2024 17:05:34 +0200 Subject: [PATCH 1/2] mempool ui url --- src/app/components/Delegations/Delegation.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/app/components/Delegations/Delegation.tsx b/src/app/components/Delegations/Delegation.tsx index de3e4958..e74187e5 100644 --- a/src/app/components/Delegations/Delegation.tsx +++ b/src/app/components/Delegations/Delegation.tsx @@ -12,6 +12,7 @@ import { durationTillNow } from "@/utils/formatTime"; import { getState, getStateTooltip } from "@/utils/getState"; import { maxDecimals } from "@/utils/maxDecimals"; import { trim } from "@/utils/trim"; +import { Network } from "@/utils/wallet/wallet_provider"; interface DelegationProps { finalityProviderMoniker: string; @@ -111,7 +112,12 @@ export const Delegation: React.FC = ({ } }; - const { coinName, mempoolApiUrl } = getNetworkConfig(); + const { coinName, network } = getNetworkConfig(); + + const mempoolUIUrl = + network === Network.MAINNET + ? "https://mempool.space" + : "https://mempool.space/signet"; return (
= ({

Date: Tue, 20 Aug 2024 11:43:49 +0200 Subject: [PATCH 2/2] PUBLIC_MEMPOOL_URL --- src/app/components/Delegations/Delegation.tsx | 8 ++++++-- src/config/mempool.ts | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 src/config/mempool.ts diff --git a/src/app/components/Delegations/Delegation.tsx b/src/app/components/Delegations/Delegation.tsx index e74187e5..ad7fec8c 100644 --- a/src/app/components/Delegations/Delegation.tsx +++ b/src/app/components/Delegations/Delegation.tsx @@ -6,6 +6,10 @@ import { Tooltip } from "react-tooltip"; import { DelegationState, StakingTx } from "@/app/types/delegations"; import { GlobalParamsVersion } from "@/app/types/globalParams"; +import { + PUBLIC_MEMPOOL_URL, + PUBLIC_MEMPOOL_URL_SIGNET, +} from "@/config/mempool"; import { getNetworkConfig } from "@/config/network.config"; import { satoshiToBtc } from "@/utils/btcConversions"; import { durationTillNow } from "@/utils/formatTime"; @@ -116,8 +120,8 @@ export const Delegation: React.FC = ({ const mempoolUIUrl = network === Network.MAINNET - ? "https://mempool.space" - : "https://mempool.space/signet"; + ? PUBLIC_MEMPOOL_URL + : PUBLIC_MEMPOOL_URL_SIGNET; return (