From 2a99c4a34478a1861db4bc4d1118a1b91c91a587 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Thu, 14 May 2020 11:19:50 +0200 Subject: [PATCH] console: fix unlockAccount argument count check --- console/bridge.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/console/bridge.go b/console/bridge.go index 93655c24d3..1a297ee123 100644 --- a/console/bridge.go +++ b/console/bridge.go @@ -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 // the RPC call. 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 ])") } // Make sure we have an account specified to unlock.