nip60: don't lose tokens when bolt11 payment fails.

This commit is contained in:
fiatjaf
2026-02-03 19:17:14 -03:00
parent e17995d427
commit beb8a72491
4 changed files with 48 additions and 8 deletions
+4
View File
@@ -249,6 +249,10 @@ func (w *Wallet) removeDeletedToken(eventId nostr.ID) {
func (w *Wallet) Balance() uint64 {
var sum uint64
for _, token := range w.Tokens {
if token.reserved {
continue
}
sum += token.Proofs.Amount()
}
return sum