diff options
| author | Adam Soltys <[email protected]> | 2024-08-20 11:19:16 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-08-20 11:19:16 -0700 |
| commit | fccc373c0e59222d7253740337ccc34409af9639 (patch) | |
| tree | 6970cd97a4b727f0d1fab1fa88cbd71787c66866 | |
| parent | 03108b9c787a9fdd087c0a2242879a18ff8fd0d9 (diff) | |
| parent | 766864b4ce9622d878bbef328e34170aad5eee4d (diff) | |
| download | coinos-server-fccc373c0e59222d7253740337ccc34409af9639.tar.gz coinos-server-fccc373c0e59222d7253740337ccc34409af9639.zip | |
Merge pull request #64 from SamSamskies/master
set nostrPubkey to coinos pubkey
| -rw-r--r-- | lib/nostr.js | 1 | ||||
| -rw-r--r-- | routes/lnurl.js | 5 |
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", }); |
