From 222bbc9080fbb15861cc5c0802449fcf06a53532 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sat, 7 Oct 2023 23:30:52 -0700 Subject: fix more options invoices --- src/routes/(app)/send/invoice/[id]/+page.svelte | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/routes/(app)/send') diff --git a/src/routes/(app)/send/invoice/[id]/+page.svelte b/src/routes/(app)/send/invoice/[id]/+page.svelte index 554eef6f..a71c697a 100644 --- a/src/routes/(app)/send/invoice/[id]/+page.svelte +++ b/src/routes/(app)/send/invoice/[id]/+page.svelte @@ -28,12 +28,13 @@ let submit = () => (loading = true); let external = async () => { - let invoice = { type: 'lightning', amount }; - let { hash } = await post(`/${recipient.username}/invoice`, { - invoice + let invoice = { type: 'lightning', amount, currency }; + let {id }= await post(`/${recipient.username}/invoice`, { + invoice, + user: { username: recipient.username } }); - goto(`/${recipient.username}/invoice/${hash}`, { invalidateAll: true }); + goto(`/${recipient.username}/invoice/${id}?options=true`, { invalidateAll: true }); }; $: rate = data.rate * (rates[user.currency] / rates[data.currency]); @@ -139,7 +140,7 @@ {/if} -
- -
+
+ +
-- cgit v1.2.3