mirror of
https://github.com/fiatjaf/nak.git
synced 2025-08-31 22:10:47 -04:00
update go-nostr and nostr-sdk to fix bad nevent/naddr parsing bug.
This commit is contained in:
@@ -59,8 +59,11 @@ var decode = &cli.Command{
|
||||
} else if pp := sdk.InputToProfile(ctx, input); pp != nil {
|
||||
decodeResult = DecodeResult{ProfilePointer: pp}
|
||||
} else if prefix, value, err := nip19.Decode(input); err == nil && prefix == "naddr" {
|
||||
ep := value.(nostr.EntityPointer)
|
||||
decodeResult = DecodeResult{EntityPointer: &ep}
|
||||
if ep, ok := value.(nostr.EntityPointer); ok {
|
||||
decodeResult = DecodeResult{EntityPointer: &ep}
|
||||
} else {
|
||||
ctx = lineProcessingError(ctx, "couldn't decode naddr: %s", err)
|
||||
}
|
||||
} else if prefix, value, err := nip19.Decode(input); err == nil && prefix == "nsec" {
|
||||
decodeResult.PrivateKey.PrivateKey = value.(string)
|
||||
decodeResult.PrivateKey.PublicKey, _ = nostr.GetPublicKey(value.(string))
|
||||
|
Reference in New Issue
Block a user