aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(app)/payment
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2023-12-29 23:12:05 -0800
committerAdam Soltys <[email protected]>2023-12-29 23:12:05 -0800
commita8fdbec965b1e5c8741e7b6011820f8d640a9b80 (patch)
tree7dc6e3b5de242e1c7641e8a3766dc0374f2c0a53 /src/routes/(app)/payment
parentfae074a054b1a5ba923ab7c2da173734bfa6a6a0 (diff)
downloadcoinos-ui-a8fdbec965b1e5c8741e7b6011820f8d640a9b80.tar.gz
coinos-ui-a8fdbec965b1e5c8741e7b6011820f8d640a9b80.zip
get txid from payment hash
Diffstat (limited to 'src/routes/(app)/payment')
-rw-r--r--src/routes/(app)/payment/[id]/+page.svelte19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/routes/(app)/payment/[id]/+page.svelte b/src/routes/(app)/payment/[id]/+page.svelte
index df33c323..aaf056a3 100644
--- a/src/routes/(app)/payment/[id]/+page.svelte
+++ b/src/routes/(app)/payment/[id]/+page.svelte
@@ -22,7 +22,19 @@
let { user, payment: p } = data;
let { username } = user;
- let { id, hash, amount, created, rate, type, ref, tip, ourfee, fee, currency } = p;
+ let {
+ id,
+ hash,
+ amount,
+ created,
+ rate,
+ type,
+ ref,
+ tip,
+ ourfee,
+ fee,
+ currency,
+ } = p;
let a = Math.abs(amount);
let print = async () => {
@@ -31,7 +43,6 @@
};
fee = fee || 0;
- let [txid, vout] = ref.split(':');
let direction = "";
onMount(() => {
@@ -142,7 +153,9 @@
<span class="text-lg text-secondary">Txid</span>
<div class="flex">
<div>
- <a href={`${expl}/tx/${txid}#vout=${vout}`} target="_blank" rel="noreferrer">{txid}</a>
+ <a href={`${expl}/tx/${hash}`} target="_blank" rel="noreferrer"
+ >{hash}</a
+ >
</div>
<button
class="flex font-bold hover:opacity-80 mb-auto my-auto"