allow to scan BIP21 QR codes
This commit is contained in:
parent
fe315d0a9b
commit
0a210f766d
1 changed files with 10 additions and 0 deletions
|
|
@ -466,6 +466,16 @@ new Vue({
|
|||
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
|
||||
try {
|
||||
invoice = decode(this.parse.data.request)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue