diff --git a/nip60/send.go b/nip60/send.go index 8e85a8f..08e2d25 100644 --- a/nip60/send.go +++ b/nip60/send.go @@ -159,9 +159,8 @@ func (w *Wallet) saveChangeAndDeleteUsedTokens( w.wl.PublishUpdate(*changeToken.event, nil, nil, &changeToken, false) w.wl.Unlock() - w.tokensMu.Lock() + // we don't have to lock tokensMu here because this function will always be called with that lock already held w.Tokens = append(updatedTokens, changeToken) - w.tokensMu.Unlock() } return nil