fix: bech32 lnurl fallback

This commit is contained in:
Tiago Vasconcelos
2026-05-07 10:21:03 +01:00
parent 9edc4786e1
commit 9303e68e8c
@@ -21,7 +21,7 @@ window.app.component('lnbits-qrcode-lnurl', {
if (this.tab == 'bech32') {
const bytes = new TextEncoder().encode(this.url)
const bech32 = NostrTools.nip19.encodeBytes('lnurl', bytes)
this.lnurl = `lightning:${bech32.toUpperCase()}`
this.lnurl = `${new URL(this.url).origin}/?lightning=${bech32.toUpperCase()}`
} else if (this.tab == 'lud17') {
if (this.url.startsWith('http://')) {
this.lnurl = this.url.replace('http://', this.prefix + '://')