diff --git a/src/app/components/vault/components/vault-expanded-information/components/vault-expanded-information-transaction-row.tsx b/src/app/components/vault/components/vault-expanded-information/components/vault-expanded-information-transaction-row.tsx index 8292f9ed..9d759557 100644 --- a/src/app/components/vault/components/vault-expanded-information/components/vault-expanded-information-transaction-row.tsx +++ b/src/app/components/vault/components/vault-expanded-information/components/vault-expanded-information-transaction-row.tsx @@ -23,7 +23,7 @@ export function VaultExpandedInformationTransactionRow({ color={'accent.cyan.01'} fontSize={'xs'} textDecoration={'underline'} - onClick={() => window.open(`${bitcoinExplorerAPIURL}${value}`, '_blank')} + onClick={() => window.open(`${bitcoinExplorerAPIURL}/tx/${value}`, '_blank')} _hover={{ cursor: 'pointer' }} > View in TX explorer diff --git a/src/app/hooks/use-confirmation-checker.ts b/src/app/hooks/use-confirmation-checker.ts index 811c1abb..cbdb513d 100644 --- a/src/app/hooks/use-confirmation-checker.ts +++ b/src/app/hooks/use-confirmation-checker.ts @@ -4,8 +4,11 @@ import { Vault, VaultState } from '@models/vault'; export function useConfirmationChecker(vault?: Vault): number { const txID = vault?.state === VaultState.FUNDING ? vault?.fundingTX : vault?.closingTX; - const bitcoinExplorerTXURL = `https://devnet.dlc.link/electrs/tx/${txID}`; - const bitcoinExplorerHeightURL = `https://devnet.dlc.link/electrs/blocks/tip/height`; + + const bitcoinBlockchainAPIURL = import.meta.env.VITE_BITCOIN_BLOCKCHAIN_API_URL; + + const bitcoinExplorerTXURL = `${bitcoinBlockchainAPIURL}/tx/${txID}`; + const bitcoinExplorerHeightURL = `${bitcoinBlockchainAPIURL}/blocks/tip/height`; const fetchInterval = useRef(undefined); const [transactionProgress, setTransactionProgress] = useState(0);