Merge pull request #2446 from karalabe/console-unlock-fix

cmd/utils: fix accounts merge error on console unlock
pull/2445/merge
Felix Lange 9 years ago
commit f460b0217f
  1. 5
      cmd/utils/jeth.go

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

Loading…
Cancel
Save