[keys] Better error messages when unable to unlock keystore (#222)

pull/225/head
Janet Liang 5 years ago committed by GitHub
parent aa1257aa5e
commit 1af7852153
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      cmd/subcommands/keys.go
  2. 2
      pkg/store/local.go

@ -56,7 +56,7 @@ func getPassphrase() (string, error) {
pw := strings.TrimSuffix(string(dat), "\n")
return pw, nil
} else if userProvidesPassphrase {
fmt.Println("Enter passphrase:")
fmt.Println("Enter wallet keystore passphrase:")
pass, err := terminal.ReadPassword(int(os.Stdin.Fd()))
if err != nil {
return "", err

@ -43,7 +43,7 @@ func LocalAccounts() []string {
var (
describe = fmt.Sprintf("%-24s\t\t%23s\n", "NAME", "ADDRESS")
NoUnlockBadPassphrase = errors.New("could not unlock account with passphrase, perhaps need different phrase")
NoUnlockBadPassphrase = errors.New("could not unlock wallet with given passphrase")
)
// DescribeLocalAccounts will display all the account alias name and their corresponding one address

Loading…
Cancel
Save