mirror of
https://github.com/aljazceru/mutiny-web.git
synced 2026-01-04 06:44:23 +01:00
24 lines
702 B
TypeScript
24 lines
702 B
TypeScript
import { Network } from "~/logic/mutinyWalletSetup";
|
|
|
|
export default function mempoolTxUrl(txid?: string, network?: Network) {
|
|
if (!txid || !network) {
|
|
console.error("Problem creating the mempool url");
|
|
return "#";
|
|
}
|
|
|
|
if (network) {
|
|
switch (network) {
|
|
case "bitcoin":
|
|
return `https://mempool.space/tx/${txid}`;
|
|
case "testnet":
|
|
return `https://mempool.space/testnet/tx/${txid}`;
|
|
case "signet":
|
|
return `https://mutinynet.com/tx/${txid}`;
|
|
default:
|
|
return `https://mempool.space/tx/${txid}`;
|
|
}
|
|
}
|
|
|
|
return `https://mempool.space/tx/${txid}`;
|
|
}
|