From f1bd471cf5cbab6ee60a18eded0a9ed489904b13 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 22 Jul 2026 08:18:39 -0700 Subject: payments: show lightning sends as pending until settled Lightning/bolt12 sends now start unconfirmed (server sets confirmed=false until the HTLC settles and the preimage arrives). Reflect that in the UI: the payment list and detail page show 'Pending' for an unsettled send, and the detail page shows a pending note in place of the empty preimage. Prevents the misleading 'Sent/completed with no preimage' state for held HTLCs (e.g. Ark hold invoices that stay in-flight for hours). Co-Authored-By: Claude Opus 4.8 --- src/components/Payments.svelte | 4 +++- src/routes/(app)/payment/[id]/+page.svelte | 14 ++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/components/Payments.svelte b/src/components/Payments.svelte index 36633089..232ef552 100644 --- a/src/components/Payments.svelte +++ b/src/components/Payments.svelte @@ -111,7 +111,9 @@ ? p.confirmed ? $t("payments.received") : $t("payments.pending") - : $t("payments.sent")} + : p.confirmed + ? $t("payments.sent") + : $t("payments.pending")} {/if} diff --git a/src/routes/(app)/payment/[id]/+page.svelte b/src/routes/(app)/payment/[id]/+page.svelte index 6551793c..a4c693a0 100644 --- a/src/routes/(app)/payment/[id]/+page.svelte +++ b/src/routes/(app)/payment/[id]/+page.svelte @@ -97,7 +97,11 @@

- {$t(amount < 0 ? "payments.sent" : "payments.received")} + {#if amount < 0 && !confirmed && (type === types.lightning || type === types.bolt12)} + {$t("payments.pending")} + {:else} + {$t(amount < 0 ? "payments.sent" : "payments.received")} + {/if}

{#if p.with} @@ -195,7 +199,13 @@
{$t("payments.preimage")} -
{ref}
+
+ {#if ref} + {ref} + {:else} + {$t("payments.pending")} + {/if} +
{/if} -- cgit v1.2.3