From 52f2bda928624e2f54b17d43a74362a69e2945c3 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 24 Jan 2025 18:14:26 -0800 Subject: parse payment memos --- src/routes/(app)/payment/[id]/+page.svelte | 50 ++++++++++++++++-------------- 1 file changed, 26 insertions(+), 24 deletions(-) (limited to 'src/routes/(app)/payment') diff --git a/src/routes/(app)/payment/[id]/+page.svelte b/src/routes/(app)/payment/[id]/+page.svelte index 3fae32dc..20f41588 100644 --- a/src/routes/(app)/payment/[id]/+page.svelte +++ b/src/routes/(app)/payment/[id]/+page.svelte @@ -80,7 +80,10 @@ {$t(title)}
- {s(amount, userLocale)}
@@ -106,23 +109,6 @@
{/if} - {#if p.type === types.fund} -
- {direction} - -
-
- -
-
{p.memo}
-
-
-
- {/if} {@render field("payments.amount", a)} @@ -146,16 +132,32 @@ {#if type === types.ecash && amount < 0} - - + + Cash +
{$t("payments.ecashToken")}
+
+ {:else if type === types.fund} + + {$t("payments.viewFund")} + + {:else if memo?.includes("9734")} + {@const eid = JSON.parse(memo).tags.find((t) => t[0] === "e")[1]} + + + {$t("payments.zappedEvent")} {:else if memo}
{$t("payments.memo")} -
{memo}
+
+ {#if memo.includes("text/plain")} + {JSON.parse(memo)[0][1]} + {:else} + {memo} + {/if} +
{/if} -- cgit v1.2.3