瀏覽代碼

cmd/utils: fix accounts merge error on console unlock

Péter Szilágyi 9 年之前
父節點
當前提交
a1f1c404c3
共有 1 個文件被更改,包括 2 次插入3 次删除
  1. 2 3
      cmd/utils/jeth.go

+ 2 - 3
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() {
 		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() {