mirror of
https://github.com/fiatjaf/nak.git
synced 2026-01-24 19:38:52 +00:00
key: fix stupid error when passing nsec1 code to nak key public.
This commit is contained in:
7
key.go
7
key.go
@@ -279,13 +279,14 @@ func getSecretKeysFromStdinLinesOrSlice(ctx context.Context, _ *cli.Command, key
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
sk = data.(nostr.SecretKey)
|
sk = data.(nostr.SecretKey)
|
||||||
}
|
} else {
|
||||||
|
var err error
|
||||||
sk, err := nostr.SecretKeyFromHex(sec)
|
sk, err = nostr.SecretKeyFromHex(sec)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ctx = lineProcessingError(ctx, "invalid hex key: %s", err)
|
ctx = lineProcessingError(ctx, "invalid hex key: %s", err)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ch <- sk
|
ch <- sk
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user