Skip to content

Commit

Permalink
Fix minor issues
Browse files Browse the repository at this point in the history
  • Loading branch information
moisses89 committed Nov 7, 2023
1 parent ea1ee95 commit a604c5a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions safe_cli/operators/safe_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def load_ledger_cli_owners(
print_formatted_text(HTML(f"{option} - <b>{address}</b> "))

option = choose_option_question(
"Select the owner address", len(ledger_accounts) - 1
"Select the owner address", len(ledger_accounts)
)
if option is None:
return None
Expand All @@ -305,7 +305,7 @@ def load_ledger_cli_owners(
print_formatted_text(
HTML(
f"Loaded account <b>{address}</b> "
f'with balance={Web3.from_wei(balance, "ether")} ether'
f'with balance={Web3.from_wei(balance, "ether")} ether.\n'
f"Ledger account cannot be defined as sender"
)
)
Expand Down
4 changes: 3 additions & 1 deletion safe_cli/prompt_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,9 @@ def load_cli_owners(args):

@safe_exception
def load_ledger_cli_owners(args):
safe_operator.load_ledger_cli_owners(args.derivation_path, args.legacy_accounts)
safe_operator.load_ledger_cli_owners(
derivation_path=args.derivation_path, legacy_account=args.legacy_accounts
)

@safe_exception
def unload_cli_owners(args):
Expand Down
2 changes: 1 addition & 1 deletion safe_cli/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def choose_option_question(
) -> Optional[int]:
if "PYTEST_CURRENT_TEST" in os.environ:
return default_option # Ignore confirmations when running tests
choices = f" [0-{number_options}] default {default_option}:"
choices = f" [0-{number_options-1}] default {default_option}: "
reply = str(get_input(question + choices)).lower().strip() or str(default_option)
try:
option = int(reply)
Expand Down

0 comments on commit a604c5a

Please sign in to comment.