Fixed the --recover flag not working properly inside the init command (#9201)
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
This commit is contained in:
parent
49bf0774bc
commit
fdbc32e50c
|
@ -89,11 +89,12 @@ func InitCmd(mbm module.BasicManager, defaultNodeHome string) *cobra.Command {
|
|||
recover, _ := cmd.Flags().GetBool(FlagRecover)
|
||||
if recover {
|
||||
inBuf := bufio.NewReader(cmd.InOrStdin())
|
||||
mnemonic, err := input.GetString("Enter your bip39 mnemonic", inBuf)
|
||||
value, err := input.GetString("Enter your bip39 mnemonic", inBuf)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
mnemonic = value
|
||||
if !bip39.IsMnemonicValid(mnemonic) {
|
||||
return errors.New("invalid mnemonic")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue