check if token already received

This commit is contained in:
callebtc 2022-11-06 13:03:12 +01:00 committed by dni ⚡
parent f698074f89
commit a6669fa78b

View File

@ -2149,9 +2149,19 @@ page_container %}
// get recv_token
if (params.get('recv_token')) {
tokenBase64 = params.get('recv_token')
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.table('### tokens', this.proofs)