aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/nostr.js1
-rw-r--r--routes/lnurl.js5
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/nostr.js b/lib/nostr.js
index 09059542..28fde6aa 100644
--- a/lib/nostr.js
+++ b/lib/nostr.js
@@ -7,6 +7,7 @@ import { g, s, db } from "$lib/db";
import { fail, nada, wait } from "$lib/utils";
import { nip19 } from "nostr-tools";
+export const COINOS_PUBKEY = getPublicKey(nip19.decode(config.nostrKey).data);
export let coinos;
export let pool;
diff --git a/routes/lnurl.js b/routes/lnurl.js
index 03dcc19a..462127ac 100644
--- a/routes/lnurl.js
+++ b/routes/lnurl.js
@@ -9,6 +9,7 @@ import { bech32 } from "bech32";
import { fields, pick } from "$lib/utils";
import { types } from "$lib/payments";
import crypto from "crypto";
+import { COINOS_PUBKEY } from "$lib/nostr";
import config from "$config";
let { admin } = config;
@@ -54,7 +55,7 @@ export default {
res,
) {
try {
- let { id: uid, pubkey: nostrPubkey } = await getUser(username);
+ let { id: uid } = await getUser(username);
let metadata = JSON.stringify([
["text/plain", `Paying ${username}@${host}`],
@@ -69,7 +70,7 @@ export default {
minSendable,
maxSendable,
metadata,
- nostrPubkey,
+ nostrPubkey: COINOS_PUBKEY,
callback: `${URL}/api/lnurl/${id}`,
tag: "payRequest",
});