mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-11-15 08:37:11 +01:00
nip60: fixes, actual Cashu stuff and a wallet.Receive() method.
This commit is contained in:
@@ -11,7 +11,7 @@ import (
|
||||
|
||||
type HistoryEntry struct {
|
||||
In bool // in = received, out = sent
|
||||
Amount uint32
|
||||
Amount uint64
|
||||
|
||||
tokenEventIDs []string
|
||||
nutZaps []bool
|
||||
@@ -120,11 +120,11 @@ func (h *HistoryEntry) parse(ctx context.Context, kr nostr.Keyer, evt *nostr.Eve
|
||||
if tag[2] != "sat" {
|
||||
return fmt.Errorf("only 'sat' wallets are supported")
|
||||
}
|
||||
v, err := strconv.ParseUint(tag[1], 10, 32)
|
||||
v, err := strconv.ParseUint(tag[1], 10, 64)
|
||||
if err != nil {
|
||||
return fmt.Errorf("invalid 'amount' %s: %w", tag[1], err)
|
||||
}
|
||||
h.Amount = uint32(v)
|
||||
h.Amount = v
|
||||
case "e":
|
||||
essential++
|
||||
if len(tag) < 4 {
|
||||
|
||||
Reference in New Issue
Block a user