nip60: don't lose tokens when bolt11 payment fails.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user