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,8 +2149,18 @@ page_container %}
// get recv_token
if (params.get('recv_token')) {
this.receiveData.tokensBase64 = params.get('recv_token')
this.showReceiveTokens = true
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)