HOTFIX: restore missing link between lnurlp and nip57 (#1630)

* restore missing link between lnurlp and nip57

* pass noteStr as receive action arg

* make sure the desc field is not updated if noteStr is unset
This commit is contained in:
Riccardo Balbo 2024-11-21 15:46:28 +01:00 committed by GitHub
parent 277f8a20fb
commit eb3efbef57
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 3 deletions

View File

@ -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 }
})

View File

@ -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')