Prompt for password on sendtx
This commit is contained in:
committed by
rigelrozanski
parent
67e896dcaf
commit
00304dd094
@@ -70,8 +70,7 @@ func getAccount(cmd *cobra.Command, args []string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
// TODO: better
|
||||
// fmt.Printf("Account: %#v\n", acct)
|
||||
// print out whole account or just coins?
|
||||
output, err := json.MarshalIndent(acct, "", " ")
|
||||
// output, err := json.MarshalIndent(acct.BaseAccount.Coins, "", " ")
|
||||
if err != nil {
|
||||
|
||||
@@ -89,7 +89,11 @@ func buildTx() ([]byte, error) {
|
||||
|
||||
// sign and build
|
||||
bz := msg.GetSignBytes()
|
||||
passphrase := "1234567890" // XXX: adults only
|
||||
prompt := fmt.Sprintf("Password to sign with '%s':", name)
|
||||
passphrase, err := client.GetPassword(prompt)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
sig, pubkey, err := keybase.Sign(name, passphrase, bz)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user