Reduce password prompt duplication when using keyring's file backend (#5406)

Workaround for #5403, users are still prompted for password twice.
This commit is contained in:
Alessio Treglia 2019-12-17 03:48:52 +01:00 committed by Federico Kunze
parent fb0a2c46d3
commit 98acd941e7
1 changed files with 1 additions and 6 deletions

View File

@ -140,12 +140,7 @@ func GenTxCmd(ctx *server.Context, cdc *codec.Codec, mbm module.BasicManager, sm
return errors.Wrap(err, "failed to build create-validator message")
}
info, err := txBldr.Keybase().Get(name)
if err != nil {
return errors.Wrap(err, "failed to read from tx builder keybase")
}
if info.GetType() == kbkeys.TypeOffline || info.GetType() == kbkeys.TypeMulti {
if key.GetType() == kbkeys.TypeOffline || key.GetType() == kbkeys.TypeMulti {
fmt.Println("Offline key passed in. Use `tx sign` command to sign:")
return utils.PrintUnsignedStdTx(txBldr, cliCtx, []sdk.Msg{msg})
}