aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(app)/ln
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2024-10-14 15:53:40 -0700
committerAdam Soltys <[email protected]>2024-10-14 15:53:40 -0700
commiteeca081f8c1b459653d9c8e3743a20b01056a7ee (patch)
tree3ee3cb80c948c842d4a8a977638207800bf9c43e /src/routes/(app)/ln
parent9bf9c7151be64317ec5b8b43fb41064e62dc743a (diff)
downloadcoinos-ui-eeca081f8c1b459653d9c8e3743a20b01056a7ee.tar.gz
coinos-ui-eeca081f8c1b459653d9c8e3743a20b01056a7ee.zip
hide maxfee unless error
Diffstat (limited to 'src/routes/(app)/ln')
-rw-r--r--src/routes/(app)/ln/[lnurl]/+page.server.ts8
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}`);
},