From 26597452c5ec40cd23a5f40232d54b699b45dd44 Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Wed, 29 Jan 2025 12:47:33 -0300 Subject: [PATCH] nip60: stop requiring the "sat" string on history amounts. --- nip60/history.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nip60/history.go b/nip60/history.go index de272c4..7eab800 100644 --- a/nip60/history.go +++ b/nip60/history.go @@ -114,10 +114,10 @@ func (h *HistoryEntry) parse(ctx context.Context, kr nostr.Keyer, evt *nostr.Eve } case "amount": essential++ - if len(tag) < 3 { - return fmt.Errorf("'amount' tag must have at least 3 items") + if len(tag) < 2 { + return fmt.Errorf("'amount' tag must have at least 2 items") } - if tag[2] != "sat" { + if len(tag) >= 3 && tag[2] != "sat" { return fmt.Errorf("only 'sat' wallets are supported") } v, err := strconv.ParseUint(tag[1], 10, 64)