aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2024-12-05 09:44:22 -0800
committerAdam Soltys <[email protected]>2024-12-05 09:44:22 -0800
commitb9845b1f945dd011a4e12c748bc7d6a75bdd7386 (patch)
tree130366415eb44b8c6c91197576200e0b79988b4e
parentad4f2d37de749748de44523714790a215c846086 (diff)
downloadcoinos-server-b9845b1f945dd011a4e12c748bc7d6a75bdd7386.tar.gz
coinos-server-b9845b1f945dd011a4e12c748bc7d6a75bdd7386.zip
add null preimage to lnurl verify response
-rw-r--r--routes/lnurl.ts14
1 files changed, 7 insertions, 7 deletions
diff --git a/routes/lnurl.ts b/routes/lnurl.ts
index a93e63e4..3327e07e 100644
--- a/routes/lnurl.ts
+++ b/routes/lnurl.ts
@@ -1,12 +1,12 @@
import { g, s } from "$lib/db";
-import { err, warn } from "$lib/logging";
-import { bail, getUser, fail } from "$lib/utils";
-import { v4 } from "uuid";
-import got from "got";
import { generate } from "$lib/invoices";
-import { bech32 } from "bech32";
-import { types } from "$lib/payments";
+import { err, warn } from "$lib/logging";
import { serverPubkey } from "$lib/nostr";
+import { types } from "$lib/payments";
+import { bail, fail, getUser } from "$lib/utils";
+import { bech32 } from "bech32";
+import got from "got";
+import { v4 } from "uuid";
const { URL } = process.env;
const host = URL.split("/").at(-1);
@@ -134,6 +134,6 @@ export default {
const { received, amount, preimage } = inv;
const settled = received >= amount;
- res.send({ status: "OK", settled, preimage });
+ res.send({ status: "OK", settled, preimage: preimage || null });
},
};