Skip to content

Commit

Permalink
Cleanup from rige's review
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanfrey authored and rigelrozanski committed Mar 1, 2018
1 parent 1c0fdfe commit 05f5141
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions client/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,16 @@ func GetCheckPassword(prompt, prompt2 string) (string, error) {
return pass, nil
}

// inputIsTty returns true iff we have an interactive prompt,
// where we can disable echo and request to repeat the password.
// If false, we can optimize for piped input from another command
func inputIsTty() bool {
return isatty.IsTerminal(os.Stdin.Fd()) || isatty.IsCygwinTerminal(os.Stdin.Fd())
}

// stdinPassword reads one line from stdin.
// Subsequent calls reuse the same buffer, so we don't lose
// any input when reading a password twice (to verify)
func stdinPassword() (string, error) {
if buf == nil {
buf = bufio.NewReader(os.Stdin)
Expand Down
2 changes: 1 addition & 1 deletion x/bank/commands/sendtx.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func sendTx(cmd *cobra.Command, args []string) error {
result.CheckTx.Log)
}
if result.DeliverTx.Code != uint32(0) {
return errors.Errorf("CheckTx failed: (%d) %s",
return errors.Errorf("DeliverTx failed: (%d) %s",
result.DeliverTx.Code,
result.DeliverTx.Log)
}
Expand Down

0 comments on commit 05f5141

Please sign in to comment.