Skip to content

Commit

Permalink
mempool ui url
Browse files Browse the repository at this point in the history
  • Loading branch information
gbarkhatov committed Aug 19, 2024
1 parent 526fc24 commit a7a2621
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/app/components/Delegations/Delegation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -111,7 +112,12 @@ export const Delegation: React.FC<DelegationProps> = ({
}
};

const { coinName, mempoolApiUrl } = getNetworkConfig();
const { coinName, network } = getNetworkConfig();

const mempoolUIUrl =
network === Network.MAINNET
? "https://mempool.space"
: "https://mempool.space/signet";

return (
<div
Expand All @@ -135,7 +141,7 @@ export const Delegation: React.FC<DelegationProps> = ({
</p>
<div className="justify-center lg:flex order-2 lg:order-3">
<a
href={`${mempoolApiUrl}/tx/${stakingTxHash}`}
href={`${mempoolUIUrl}/tx/${stakingTxHash}`}
target="_blank"
rel="noopener noreferrer"
className="text-primary hover:underline"
Expand Down

0 comments on commit a7a2621

Please sign in to comment.