Răsfoiți Sursa

console: fix unlockAccount argument count check (#21081)

Felix Lange 5 ani în urmă
părinte
comite
3666da8a4b
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      console/bridge.go

+ 1 - 1
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.