Unverified Commit 3666da8a authored by Felix Lange's avatar Felix Lange Committed by GitHub

console: fix unlockAccount argument count check (#21081)

parent f3f1e59e
...@@ -229,7 +229,7 @@ func (b *bridge) readPinAndReopenWallet(call jsre.Call) (goja.Value, error) { ...@@ -229,7 +229,7 @@ func (b *bridge) readPinAndReopenWallet(call jsre.Call) (goja.Value, error) {
// original RPC method (saved in jeth.unlockAccount) with it to actually execute // original RPC method (saved in jeth.unlockAccount) with it to actually execute
// the RPC call. // the RPC call.
func (b *bridge) UnlockAccount(call jsre.Call) (goja.Value, error) { func (b *bridge) UnlockAccount(call jsre.Call) (goja.Value, error) {
if nArgs := len(call.Arguments); nArgs < 2 { if len(call.Arguments) < 1 {
return nil, fmt.Errorf("usage: unlockAccount(account, [ password, duration ])") return nil, fmt.Errorf("usage: unlockAccount(account, [ password, duration ])")
} }
// Make sure we have an account specified to unlock. // Make sure we have an account specified to unlock.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment