mirror of
https://gitlab.com/pulsechaincom/staking-deposit-cli.git
synced 2025-01-10 21:11:21 +00:00
Fix CLI index bounds
`type=click.IntRange(0, 2**32)` got corrected to `type=click.IntRange(0, 2**32 - 1)` Co-authored-by: Hsiao-Wei Wang <hwwang156@gmail.com>
This commit is contained in:
parent
fe5b539701
commit
741fa62392
@ -48,7 +48,7 @@ def validate_mnemonic(cts: click.Context, param: Any, mnemonic: str) -> str:
|
|||||||
default=0,
|
default=0,
|
||||||
prompt=('Enter the index (key number) you wish to start generating more keys from. '
|
prompt=('Enter the index (key number) you wish to start generating more keys from. '
|
||||||
'For example, if you\'ve generated 4 keys in the past, you\'d enter 4 here,'),
|
'For example, if you\'ve generated 4 keys in the past, you\'d enter 4 here,'),
|
||||||
type=click.IntRange(0, 2**32),
|
type=click.IntRange(0, 2**32 - 1),
|
||||||
)
|
)
|
||||||
@generate_keys_arguments_decorator
|
@generate_keys_arguments_decorator
|
||||||
def existing_mnemonic(ctx: click.Context, mnemonic: str, mnemonic_password: str, **kwargs: Any) -> None:
|
def existing_mnemonic(ctx: click.Context, mnemonic: str, mnemonic_password: str, **kwargs: Any) -> None:
|
||||||
|
@ -32,7 +32,7 @@ def generate_keys_arguments_decorator(function: Callable[..., Any]) -> Callable[
|
|||||||
'--num_validators',
|
'--num_validators',
|
||||||
prompt='Please choose how many validators you wish to run',
|
prompt='Please choose how many validators you wish to run',
|
||||||
required=True,
|
required=True,
|
||||||
type=click.IntRange(0, 2**32),
|
type=click.IntRange(0, 2**32 - 1),
|
||||||
),
|
),
|
||||||
click.option(
|
click.option(
|
||||||
'--folder',
|
'--folder',
|
||||||
|
Loading…
Reference in New Issue
Block a user