we can't lnurl-verify non-proxied invoices
This commit is contained in:
parent
ef8c738582
commit
5701bf640a
@ -78,7 +78,7 @@ export default async ({ query: { username, amount, nostr, comment, payerdata: pa
|
|||||||
}
|
}
|
||||||
|
|
||||||
// generate invoice
|
// generate invoice
|
||||||
const { invoice } = await performPaidAction('RECEIVE', {
|
const { invoice, paymentMethod } = await performPaidAction('RECEIVE', {
|
||||||
msats: toPositiveBigInt(amount),
|
msats: toPositiveBigInt(amount),
|
||||||
description,
|
description,
|
||||||
descriptionHash,
|
descriptionHash,
|
||||||
@ -92,7 +92,7 @@ export default async ({ query: { username, amount, nostr, comment, payerdata: pa
|
|||||||
return res.status(200).json({
|
return res.status(200).json({
|
||||||
pr: invoice.bolt11,
|
pr: invoice.bolt11,
|
||||||
routes: [],
|
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) {
|
} catch (error) {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user