mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-05-20 07:29:57 +02:00
nip60: stop requiring the "sat" string on history amounts.
This commit is contained in:
parent
5e2d455b72
commit
26597452c5
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user