Skip to content

Commit

Permalink
chore(cli): move key related cli to key namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
0xHansLee committed Feb 28, 2025
1 parent e89f93e commit efd9a29
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion client/cmd/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ func validateGenPrivKeyJSONFlags(cfg *genPrivKeyJSONConfig) error {
return nil
}

func validateEncryptPrivKeyFlags(cfg *baseConfig) error {
func validateEncryptFlags(cfg *baseConfig) error {
if cmtos.FileExists(cfg.EncPrivKeyFile()) {
return errors.New("already encrypted private key exists")
}
Expand Down
6 changes: 3 additions & 3 deletions client/cmd/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func newKeyCmds() *cobra.Command {
cmd.AddCommand(
newKeyConvertCmd(),
newKeyGenPrivKeyJSONCmd(),
newKeyEncryptPrivKeyCmd(),
newKeyEncryptCmd(),
)

return cmd
Expand Down Expand Up @@ -81,7 +81,7 @@ func newKeyGenPrivKeyJSONCmd() *cobra.Command {
return cmd
}

func newKeyEncryptPrivKeyCmd() *cobra.Command {
func newKeyEncryptCmd() *cobra.Command {
var cfg baseConfig

cmd := &cobra.Command{
Expand All @@ -93,7 +93,7 @@ func newKeyEncryptPrivKeyCmd() *cobra.Command {
},
RunE: runValidatorCommand(
func(_ *cobra.Command) error {
return validateEncryptPrivKeyFlags(&cfg)
return validateEncryptFlags(&cfg)
},
func(_ context.Context) error { return encryptPrivKey(cfg) },
),
Expand Down

0 comments on commit efd9a29

Please sign in to comment.