console: fix unlockAccount argument count check (#21081)

This commit is contained in:
Felix Lange 2020-05-14 13:12:52 +02:00 committed by GitHub
parent f3f1e59eea
commit 3666da8a4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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.