mirror of
https://github.com/lnbits/lnbits.git
synced 2025-09-19 12:01:12 +02:00
check if token already received
This commit is contained in:
@@ -2149,8 +2149,18 @@ page_container %}
|
|||||||
|
|
||||||
// get recv_token
|
// get recv_token
|
||||||
if (params.get('recv_token')) {
|
if (params.get('recv_token')) {
|
||||||
this.receiveData.tokensBase64 = params.get('recv_token')
|
tokenBase64 = params.get('recv_token')
|
||||||
this.showReceiveTokens = true
|
let seen = false
|
||||||
|
for (var i = 0; i < this.historyTokens.length; i++) {
|
||||||
|
var thisToken = this.historyTokens[i].token
|
||||||
|
if (thisToken == tokenBase64) {
|
||||||
|
seen = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!seen) {
|
||||||
|
this.receiveData.tokensBase64 = params.get('recv_token')
|
||||||
|
this.showReceiveTokens = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('### invoicesCashu', this.invoicesCashu)
|
console.log('### invoicesCashu', this.invoicesCashu)
|
||||||
|
Reference in New Issue
Block a user