Skip to content

Commit

Permalink
Fixed the --recover flag not working properly inside the init command (
Browse files Browse the repository at this point in the history
…#9201) (#9850)

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
(cherry picked from commit fdbc32e)

Co-authored-by: Riccardo Montagnin <riccardo.montagnin@gmail.com>
  • Loading branch information
mergify[bot] and RiccardoM authored Aug 4, 2021
1 parent 7f41de9 commit 63fc386
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion x/genutil/client/cli/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down

0 comments on commit 63fc386

Please sign in to comment.