This commit is contained in:
callebtc 2022-11-07 16:54:25 +01:00 committed by dni ⚡
parent 8e07b220b1
commit 44df0d5cab

View File

@ -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'
}