fix inconsistency in nak key decrypt output: print hex always.

This commit is contained in:
fiatjaf 2024-07-12 19:15:13 -03:00
parent 54c4be10bd
commit bca4362ca5

6
key.go
View File

@ -116,8 +116,7 @@ var decrypt = &cli.Command{
if err != nil {
return fmt.Errorf("failed to decrypt: %s", err)
}
nsec, _ := nip19.EncodePrivateKey(sec)
stdout(nsec)
stdout(sec)
return nil
case 1:
if arg := c.Args().Get(0); strings.HasPrefix(arg, "ncryptsec1") {
@ -136,8 +135,7 @@ var decrypt = &cli.Command{
ctx = lineProcessingError(ctx, "failed to decrypt: %s", err)
continue
}
nsec, _ := nip19.EncodePrivateKey(sec)
stdout(nsec)
stdout(sec)
}
return nil
}