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

This commit is contained in:
Hanjiang Yu 2020-09-01 16:23:04 +08:00 committed by GitHub
parent 12d8570322
commit ff23e265cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)
}