Ver código fonte

internal: fix personal.sign() (#21503)

Hanjiang Yu 5 anos atrás
pai
commit
ff23e265cd
1 arquivos alterados com 2 adições e 2 exclusões
  1. 2 2
      console/bridge.go

+ 2 - 2
console/bridge.go

@@ -306,9 +306,9 @@ func (b *bridge) Sign(call jsre.Call) (goja.Value, error) {
 	}
 
 	// Send the request to the backend and return
-	sign, callable := goja.AssertFunction(getJeth(call.VM).Get("unlockAccount"))
+	sign, callable := goja.AssertFunction(getJeth(call.VM).Get("sign"))
 	if !callable {
-		return nil, fmt.Errorf("jeth.unlockAccount is not callable")
+		return nil, fmt.Errorf("jeth.sign is not callable")
 	}
 	return sign(goja.Null(), message, account, passwd)
 }