From b137cdfca84cf68a2b8a620ba1c55337e88a0050 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 25 Feb 2026 13:26:19 -0800 Subject: fix lightning receive redirect --- src/routes/(app)/[username]/receive/+page.svelte | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/routes') diff --git a/src/routes/(app)/[username]/receive/+page.svelte b/src/routes/(app)/[username]/receive/+page.svelte index 14489c13..a0ab38a2 100644 --- a/src/routes/(app)/[username]/receive/+page.svelte +++ b/src/routes/(app)/[username]/receive/+page.svelte @@ -3,7 +3,7 @@ import { btc, loc, post, copy, fail, f, get, types, sat, s, sats } from "$lib/utils"; import { tick, onMount, onDestroy } from "svelte"; import { browser } from "$app/environment"; - import { last, showQr, amountPrompt } from "$lib/store"; + import { last, lastPayment, showQr, amountPrompt } from "$lib/store"; import Avatar from "$comp/Avatar.svelte"; import InvoiceData from "$comp/InvoiceData.svelte"; import InvoiceActions from "$comp/InvoiceActions.svelte"; @@ -109,10 +109,20 @@ let txt = $derived([types.bitcoin, types.liquid].includes(type) ? hash : text); onMount(() => { + $lastPayment = null; if ($amountPrompt && !amount) toggleAmount(); let address_type = $page.url.searchParams.get("address_type"); if (address_type) setType(types.bitcoin, address_type); }); + + $effect(() => { + if ($lastPayment?.iid) { + const { iid, confirmed } = $lastPayment; + const target = confirmed ? `/invoice/${iid}/paid` : `/invoice/${iid}`; + $lastPayment = null; + goto(target); + } + });
-- cgit v1.2.3