fix: also replace http:// urls in <lnbits-qrcode-lnurl> (#3346)

This commit is contained in:
dni ⚡
2025-09-04 07:00:15 +02:00
committed by GitHub
parent 67c92a79cf
commit 15b6b1d512
2 changed files with 6 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@@ -24,7 +24,11 @@ window.app.component('lnbits-qrcode-lnurl', {
const bech32 = NostrTools.nip19.encodeBytes('lnurl', bytes)
this.lnurl = `lightning:${bech32.toUpperCase()}`
} else if (this.tab == 'lud17') {
this.lnurl = this.url.replace('https://', this.prefix + '://')
if (this.url.startsWith('http://')) {
this.lnurl = this.url.replace('http://', this.prefix + '://')
} else {
this.lnurl = this.url.replace('https://', this.prefix + '://')
}
}
this.$emit('update:lnurl', this.lnurl)
}