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
|
||||
},
|
||||
decodeRequest: function () {
|
||||
// let req = this.payInvoiceData.data.request.toLowerCase()
|
||||
reqtype = null
|
||||
let reqtype = null
|
||||
let req = this.camera.data
|
||||
if (req.toLowerCase().startsWith('lnbc')) {
|
||||
this.payInvoiceData.data.request = req
|
||||
|
@ -1252,9 +1251,11 @@ page_container %}
|
|||
this.payInvoiceData.data.request = req
|
||||
reqtype = 'lnurl'
|
||||
return
|
||||
} else if (req.indexOf('cashu:') !== 1) {
|
||||
this.receiveData.tokensBase64 = req.slice(req.indexOf('cashu:'))
|
||||
reqtype = 'cashu'
|
||||
} else if (req.indexOf('W3siaWQ') !== 1) {
|
||||
// very dirty way of parsing cashu tokens
|
||||
|
||||
this.receiveData.tokensBase64 = req.slice(req.indexOf('W3siaWQ'))
|
||||
reqtype = 'cashu'
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue