diff options
Diffstat (limited to 'src/routes/(app)/ln')
| -rw-r--r-- | src/routes/(app)/ln/[lnurl]/+page.server.ts | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/routes/(app)/ln/[lnurl]/+page.server.ts b/src/routes/(app)/ln/[lnurl]/+page.server.ts index 0caadfc0..cae220bf 100644 --- a/src/routes/(app)/ln/[lnurl]/+page.server.ts +++ b/src/routes/(app)/ln/[lnurl]/+page.server.ts @@ -24,7 +24,9 @@ export const actions = { pay: async ({ fetch, request }) => { let error; - let { callback, amount, minSendable, maxSendable, comment } = await fd(request); + let { callback, amount, minSendable, maxSendable, comment } = await fd( + request + ); minSendable = Math.round(minSendable / 1000); maxSendable = Math.round(maxSendable / 1000); @@ -35,9 +37,9 @@ export const actions = { if (error) return fail(400, { error }); let url = `${callback}?amount=${amount * 1000}`; - if (comment) url += `&comment=${comment}`; - let { pr } = await fetch(url).then((r) => r.json()); + + let { pr } = await fetch(url).then((r) => r.json()); redirect(307, `/send/lightning/${pr}`); }, |
