diff --git a/api/paidAction/receive.js b/api/paidAction/receive.js index 6f39c11f..8c6d8d4d 100644 --- a/api/paidAction/receive.js +++ b/api/paidAction/receive.js @@ -36,13 +36,15 @@ export async function getSybilFeePercent () { export async function perform ({ invoiceId, comment, - lud18Data + lud18Data, + noteStr }, { me, tx }) { const invoice = await tx.invoice.update({ where: { id: invoiceId }, data: { comment, - lud18Data + lud18Data, + ...(noteStr ? { desc: noteStr } : {}) }, include: { invoiceForward: true } }) diff --git a/pages/api/lnurlp/[username]/pay.js b/pages/api/lnurlp/[username]/pay.js index 0504e298..7df0cd18 100644 --- a/pages/api/lnurlp/[username]/pay.js +++ b/pages/api/lnurlp/[username]/pay.js @@ -82,7 +82,8 @@ export default async ({ query: { username, amount, nostr, comment, payerdata: pa description, descriptionHash, comment: comment || '', - lud18Data: parsedPayerData + lud18Data: parsedPayerData, + noteStr }, { models, lnd, me: user }) if (!invoice?.bolt11) throw new Error('could not generate invoice')