Merge pull request #1238 from lnbits/fix/cashu/wallet/duplicate_history
Cashu wallet: correctly update ui on token sending
This commit is contained in:
commit
0df81e5aaf
|
@ -1961,7 +1961,7 @@ page_container %}
|
|||
|
||||
// /check
|
||||
|
||||
checkProofsSpendable: async function (proofs) {
|
||||
checkProofsSpendable: async function (proofs, update_history = false) {
|
||||
/*
|
||||
checks with the mint whether an array of proofs is still
|
||||
spendable or already invalidated
|
||||
|
@ -1984,6 +1984,7 @@ page_container %}
|
|||
this.deleteProofs(spentProofs)
|
||||
|
||||
// update UI
|
||||
if (update_history) {
|
||||
tokensBase64 = btoa(JSON.stringify(spentProofs))
|
||||
|
||||
this.historyTokens.push({
|
||||
|
@ -1994,6 +1995,7 @@ page_container %}
|
|||
})
|
||||
this.storehistoryTokens()
|
||||
}
|
||||
}
|
||||
|
||||
return data
|
||||
} catch (error) {
|
||||
|
@ -2450,7 +2452,7 @@ page_container %}
|
|||
console.log('#### this.mintId', this.mintId)
|
||||
console.log('#### this.mintName', this.mintName)
|
||||
|
||||
this.checkProofsSpendable(this.proofs)
|
||||
this.checkProofsSpendable(this.proofs, true)
|
||||
this.checkPendingInvoices()
|
||||
this.checkPendingTokens()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user