From 29ed3a4366eb9719d32dac390764bf119c40afff Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sun, 22 Jan 2023 21:03:57 -0800 Subject: rename txns --- src/routes/(app)/payment/[id]/+page.server.js | 6 +++ src/routes/(app)/payment/[id]/+page.svelte | 62 +++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 src/routes/(app)/payment/[id]/+page.server.js create mode 100644 src/routes/(app)/payment/[id]/+page.svelte (limited to 'src/routes/(app)/payment') diff --git a/src/routes/(app)/payment/[id]/+page.server.js b/src/routes/(app)/payment/[id]/+page.server.js new file mode 100644 index 00000000..cbd7355e --- /dev/null +++ b/src/routes/(app)/payment/[id]/+page.server.js @@ -0,0 +1,6 @@ +import { auth, get } from '$lib/utils'; + +export async function load({ cookies, params }) { + let tx = await get(`/payments/${params.id}`, auth(cookies)); + return { tx }; +} diff --git a/src/routes/(app)/payment/[id]/+page.svelte b/src/routes/(app)/payment/[id]/+page.svelte new file mode 100644 index 00000000..9c0afaac --- /dev/null +++ b/src/routes/(app)/payment/[id]/+page.svelte @@ -0,0 +1,62 @@ + + + + +
+

+ {$t(amount < 0 ? 'payments.sent' : 'payments.received')} +

+ +
+
{$t('payments.amount')}
+
+ {f(fiat, currency)} + ⚡️{`${s(Math.abs(amount) + fee)}`} +
+
+ +
+
{$t('payments.date')}
+
+ {format(new Date(created), 'MMMM d')}, + {format(new Date(created), 'h:mm aaa')} +
+
+ + {#if type === 'lightning'} +
+
{$t('payments.preimage')}
+
+ {preimage} +
+
+ {:else} +
+
{$t('payments.id')}
+
+
+ {id} +
+ +
+
+ {/if} +
-- cgit v1.2.3