diff options
| author | Adam Soltys <[email protected]> | 2025-03-08 11:26:20 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2025-03-08 11:26:22 -0800 |
| commit | fdc3cd5ec694928c370a6f545a911fab34273789 (patch) | |
| tree | a09681be4173b6365b4183dc26e1c6475851c63e | |
| parent | 8160fe18b0a5825f5950ba0d7edb61c85e58fb66 (diff) | |
| download | coinos-server-fdc3cd5ec694928c370a6f545a911fab34273789.tar.gz coinos-server-fdc3cd5ec694928c370a6f545a911fab34273789.zip | |
log notifications
| -rw-r--r-- | lib/notifications.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/notifications.ts b/lib/notifications.ts index 5d602291..0c890c07 100644 --- a/lib/notifications.ts +++ b/lib/notifications.ts @@ -1,7 +1,7 @@ import config from "$config"; import { db } from "$lib/db"; import ln from "$lib/ln"; -import { err, warn } from "$lib/logging"; +import { err, l, warn } from "$lib/logging"; import { mail, templates } from "$lib/mail"; import mqtt from "$lib/mqtt"; import { publish, serverSecret } from "$lib/nostr"; @@ -87,6 +87,7 @@ export const nwcNotify = async (p) => { let payment_hash = ""; if (p.type === "lightning") ({ payment_hash } = await ln.decode(p.hash)); for (const pubkey of pubkeys) { + l("notifying", pubkey, p.type, p.amount); const notification = { type: p.amount > 0 ? "incoming" : "outgoing", invoice: p.hash, @@ -119,6 +120,7 @@ export const nwcNotify = async (p) => { } } } catch (e) { + console.log(e); warn("nwc notification failed", e.message); } }; |
