mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-02-24 22:58:46 +01:00
clean
This commit is contained in:
parent
2db8006d9e
commit
fbd8f6a8e5
1 changed files with 4 additions and 3 deletions
|
@ -1228,8 +1228,7 @@ page_container %}
|
||||||
this.camera.show = false
|
this.camera.show = false
|
||||||
},
|
},
|
||||||
decodeRequest: function () {
|
decodeRequest: function () {
|
||||||
// let req = this.payInvoiceData.data.request.toLowerCase()
|
let reqtype = null
|
||||||
reqtype = null
|
|
||||||
let req = this.camera.data
|
let req = this.camera.data
|
||||||
if (req.toLowerCase().startsWith('lnbc')) {
|
if (req.toLowerCase().startsWith('lnbc')) {
|
||||||
this.payInvoiceData.data.request = req
|
this.payInvoiceData.data.request = req
|
||||||
|
@ -1252,9 +1251,11 @@ page_container %}
|
||||||
this.payInvoiceData.data.request = req
|
this.payInvoiceData.data.request = req
|
||||||
reqtype = 'lnurl'
|
reqtype = 'lnurl'
|
||||||
return
|
return
|
||||||
|
} else if (req.indexOf('cashu:') !== 1) {
|
||||||
|
this.receiveData.tokensBase64 = req.slice(req.indexOf('cashu:'))
|
||||||
|
reqtype = 'cashu'
|
||||||
} else if (req.indexOf('W3siaWQ') !== 1) {
|
} else if (req.indexOf('W3siaWQ') !== 1) {
|
||||||
// very dirty way of parsing cashu tokens
|
// very dirty way of parsing cashu tokens
|
||||||
|
|
||||||
this.receiveData.tokensBase64 = req.slice(req.indexOf('W3siaWQ'))
|
this.receiveData.tokensBase64 = req.slice(req.indexOf('W3siaWQ'))
|
||||||
reqtype = 'cashu'
|
reqtype = 'cashu'
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue