aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2023-12-30 08:11:01 -0800
committerAdam Soltys <[email protected]>2023-12-30 08:11:01 -0800
commit7fa6c7b418e798ef0ce3ee17e7be5d500178e0a7 (patch)
tree6a2b1380335a86a426f97f1d054e8a18021d906f
parenta8fdbec965b1e5c8741e7b6011820f8d640a9b80 (diff)
downloadcoinos-ui-7fa6c7b418e798ef0ce3ee17e7be5d500178e0a7.tar.gz
coinos-ui-7fa6c7b418e798ef0ce3ee17e7be5d500178e0a7.zip
fix txid link
-rw-r--r--src/routes/(app)/payment/[id]/+page.svelte10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/routes/(app)/payment/[id]/+page.svelte b/src/routes/(app)/payment/[id]/+page.svelte
index aaf056a3..1acd0d3d 100644
--- a/src/routes/(app)/payment/[id]/+page.svelte
+++ b/src/routes/(app)/payment/[id]/+page.svelte
@@ -44,6 +44,10 @@
fee = fee || 0;
+ let txid, vout;
+ if (amount > 0) [txid, vout] = ref.split(":");
+ else txid = hash;
+
let direction = "";
onMount(() => {
direction = amount > 0 ? $t("payments.from") : $t("payments.to");
@@ -153,8 +157,10 @@
<span class="text-lg text-secondary">Txid</span>
<div class="flex">
<div>
- <a href={`${expl}/tx/${hash}`} target="_blank" rel="noreferrer"
- >{hash}</a
+ <a
+ href={`${expl}/tx/${txid}${vout ? "#vout=" + vout : ""}`}
+ target="_blank"
+ rel="noreferrer">{txid}</a
>
</div>
<button