Skip to content

Commit 4de77c8

Browse files
committed
Small fixes
1 parent 9f011dc commit 4de77c8

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

bittensor_cli/cli.py

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1724,18 +1724,21 @@ def wallet_ask(
17241724
if valid[1]:
17251725
return wallet, wallet.hotkey.ss58_address
17261726
else:
1727-
hotkey = (
1728-
Prompt.ask(
1729-
"Enter the SS58 of the hotkey to use for this transaction."
1730-
)
1731-
).strip()
1732-
if not is_valid_ss58_address(hotkey):
1733-
err_console.print(
1734-
f"[red]Error: {hotkey} is not valid SS58 address."
1735-
)
1736-
raise typer.Exit(1)
1727+
if wallet_hotkey and is_valid_ss58_address(wallet_hotkey):
1728+
return wallet, wallet_hotkey
17371729
else:
1738-
return wallet, hotkey
1730+
hotkey = (
1731+
Prompt.ask(
1732+
"Enter the SS58 of the hotkey to use for this transaction."
1733+
)
1734+
).strip()
1735+
if not is_valid_ss58_address(hotkey):
1736+
err_console.print(
1737+
f"[red]Error: {hotkey} is not valid SS58 address."
1738+
)
1739+
raise typer.Exit(1)
1740+
else:
1741+
return wallet, hotkey
17391742
else:
17401743
return wallet
17411744

@@ -5925,7 +5928,7 @@ def liquidity_list(
59255928
wallet_name=wallet_name,
59265929
wallet_path=wallet_path,
59275930
wallet_hotkey=wallet_hotkey,
5928-
ask_for=[WO.NAME, WO.HOTKEY, WO.PATH],
5931+
ask_for=[WO.NAME, WO.PATH],
59295932
validate=WV.WALLET,
59305933
)
59315934
self._run_command(

0 commit comments

Comments
 (0)