key: fix panic in validate with npub input, nip19.Decode returns a nostr.PubKey not a bare [32]byte.

This commit is contained in:
Yasuhiro Matsumoto
2026-07-15 09:25:23 +09:00
parent 514fed0b79
commit f1de27c88c

2
key.go
View File

@@ -214,7 +214,7 @@ Returns error if key is invalid, otherwise exits successfully.`,
ctx = lineProcessingError(ctx, "invalid npub: %s", err)
continue
}
tmp := data.([32]byte)
tmp := data.(nostr.PubKey)
pkBytes = tmp[:]
} else {
pkBytes, err = hex.DecodeString(pk)