fix nip19 decoding type quibble (this shouldn't be an error I think, but).
This commit is contained in:
@@ -30,7 +30,7 @@ func Decode(bech32string string) (prefix string, value any, err error) {
|
|||||||
if len(data) != 32 {
|
if len(data) != 32 {
|
||||||
return prefix, nil, fmt.Errorf("note should be 32 bytes (%d)", len(data))
|
return prefix, nil, fmt.Errorf("note should be 32 bytes (%d)", len(data))
|
||||||
}
|
}
|
||||||
return prefix, [32]byte(data[0:32]), nil
|
return prefix, nostr.ID(data[0:32]), nil
|
||||||
case "npub":
|
case "npub":
|
||||||
if len(data) != 32 {
|
if len(data) != 32 {
|
||||||
return prefix, nil, fmt.Errorf("npub should be 32 bytes (%d)", len(data))
|
return prefix, nil, fmt.Errorf("npub should be 32 bytes (%d)", len(data))
|
||||||
|
|||||||
Reference in New Issue
Block a user