From 2b232a584144a92188b1ef337e90c7848b007dbe Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 1 Aug 2022 11:32:46 -0700 Subject: pass amount to lightning invoice endpoint --- src/routes/invoice/[id].svelte | 1 + src/routes/invoice/index.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/routes/invoice/[id].svelte b/src/routes/invoice/[id].svelte index 05d4b9ee..d9b1540e 100644 --- a/src/routes/invoice/[id].svelte +++ b/src/routes/invoice/[id].svelte @@ -65,6 +65,7 @@ onMount(async () => { if (browser) { let { default: QRCodeStyling } = await import('qr-code-styling'); + console.log("text", text) const qrCode = new QRCodeStyling({ width: window.screen.width < 640 ? 250 : 300, type: 'svg', diff --git a/src/routes/invoice/index.js b/src/routes/invoice/index.js index f6b1f2cf..2bd95538 100644 --- a/src/routes/invoice/index.js +++ b/src/routes/invoice/index.js @@ -4,7 +4,7 @@ let network = 'lightning'; export async function POST({ request }) { let { amount, rate, username } = await request.json(); - let { text } = await post('/lightning/invoice'); + let { text } = await post('/lightning/invoice', { amount }); let { uuid: id } = await post('/invoice', { invoice: { amount, currency: 'USD', network, rate, text }, user: { username } -- cgit v1.2.3