cmd/utils: fix accounts merge error on console unlock

This commit is contained in:
Péter Szilágyi 2016-04-12 18:01:37 +03:00
parent 1e9b504ee7
commit a1f1c404c3
1 changed files with 2 additions and 3 deletions

View File

@ -76,10 +76,9 @@ func (self *Jeth) UnlockAccount(call otto.FunctionCall) (response otto.Value) {
if call.Argument(1).IsUndefined() || call.Argument(1).IsNull() {
fmt.Printf("Unlock account %s\n", account)
if input, err := Stdin.PasswordPrompt("Passphrase: "); err != nil {
return otto.FalseValue()
passwd, _ = otto.ToValue(input)
} else {
throwJSExeception(err.Error())
} else {
passwd, _ = otto.ToValue(input)
}
} else {
if !call.Argument(1).IsString() {