diff --git a/src/services/main/index.ts b/src/services/main/index.ts index 2ccb4488..3a82ad93 100644 --- a/src/services/main/index.ts +++ b/src/services/main/index.ts @@ -179,6 +179,7 @@ export default class { async createZapReceipt(log: PubLogger, invoice: UserReceivingInvoice) { const zapInfo = invoice.zap_info if (!zapInfo || !invoice.linkedApplication || !invoice.linkedApplication.nostr_public_key) { + log("no zap info linked to payment") return } const tags = [["p", zapInfo.pub], ["bolt11", invoice.invoice], ["description", zapInfo.description]] diff --git a/src/services/main/paymentManager.ts b/src/services/main/paymentManager.ts index fbc2e356..86b01ae3 100644 --- a/src/services/main/paymentManager.ts +++ b/src/services/main/paymentManager.ts @@ -375,6 +375,13 @@ export default class { if (!key.linkedApplication) { throw new Error("cannot handle lnurl for non application user") } + let log = getLogger({ appName: key.linkedApplication.name }) + if (zapInfo) { + log("this payment is a zap") + } else { + log("this payment is NOT a zap") + + } const invoice = await this.NewInvoice(key.user.user_id, { amountSats: sats, memo: zapInfo ? zapInfo.description : defaultLnurlPayMetadata