mirror of
https://github.com/lnbits/lnbits.git
synced 2025-09-28 21:02:31 +02:00
Merge pull request #1634 from lnbits/allow_bip21_scan
Allow for scanning BIP21 QR codes
This commit is contained in:
@@ -466,6 +466,16 @@ new Vue({
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// BIP-21 support
|
||||||
|
if (this.parse.data.request.toLowerCase().includes('lightning')) {
|
||||||
|
this.parse.data.request = this.parse.data.request.split('lightning=')[1]
|
||||||
|
|
||||||
|
// fail safe to check there's nothing after the lightning= part
|
||||||
|
if (this.parse.data.request.includes('&')) {
|
||||||
|
this.parse.data.request = this.parse.data.request.split('&')[0]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
let invoice
|
let invoice
|
||||||
try {
|
try {
|
||||||
invoice = decode(this.parse.data.request)
|
invoice = decode(this.parse.data.request)
|
||||||
|
Reference in New Issue
Block a user