we can't lnurl-verify non-proxied invoices

This commit is contained in:
k00b 2025-03-26 09:16:52 -05:00
parent ef8c738582
commit 5701bf640a

View File

@ -78,7 +78,7 @@ export default async ({ query: { username, amount, nostr, comment, payerdata: pa
}
// generate invoice
const { invoice } = await performPaidAction('RECEIVE', {
const { invoice, paymentMethod } = await performPaidAction('RECEIVE', {
msats: toPositiveBigInt(amount),
description,
descriptionHash,
@ -92,7 +92,7 @@ export default async ({ query: { username, amount, nostr, comment, payerdata: pa
return res.status(200).json({
pr: invoice.bolt11,
routes: [],
verify: invoice.hash ? `${process.env.NEXT_PUBLIC_URL}/api/lnurlp/${username}/verify/${invoice.hash}` : undefined
verify: paymentMethod !== 'DIRECT' && invoice.hash ? `${process.env.NEXT_PUBLIC_URL}/api/lnurlp/${username}/verify/${invoice.hash}` : undefined
})
} catch (error) {
console.log(error)