Prompt for password on sendtx

This commit is contained in:
Ethan Frey
2018-03-01 02:36:57 +00:00
committed by rigelrozanski
parent 67e896dcaf
commit 00304dd094
8 changed files with 101 additions and 82 deletions
+1 -2
View File
@@ -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 {
+5 -1
View File
@@ -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