Skip to content

Commit

Permalink
address review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanchristo committed Jul 26, 2021
1 parent d38350b commit 2aa8ef0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions x/genutil/client/cli/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,12 @@ func InitCmd(mbm module.BasicManager, defaultNodeHome string) *cobra.Command {
config.SetRoot(clientCtx.HomeDir)

chainID, _ := cmd.Flags().GetString(flags.FlagChainID)
if chainID == "" {
if clientCtx.ChainID == "" {
chainID = fmt.Sprintf("test-chain-%v", tmrand.Str(6))
} else {
chainID = clientCtx.ChainID
}
switch {
case chainID != "":
case clientCtx.ChainID != "":
chainID = clientCtx.ChainID
default:
chainID = fmt.Sprintf("test-chain-%v", tmrand.Str(6))
}

// Get bip39 mnemonic
Expand Down

0 comments on commit 2aa8ef0

Please sign in to comment.