diff --git a/bittensor_cli/cli.py b/bittensor_cli/cli.py index 3ac1ffe2a..cd3356f2f 100755 --- a/bittensor_cli/cli.py +++ b/bittensor_cli/cli.py @@ -2881,9 +2881,6 @@ def stake_add( ) raise typer.Exit() - if not stake_all and not amount: - amount = FloatPrompt.ask("Amount to [blue]stake (TAO τ)[/blue]") - if stake_all and not amount: if not Confirm.ask("Stake all the available TAO tokens?", default=False): raise typer.Exit() @@ -3747,7 +3744,6 @@ def stake_set_children( [], "--proportions", "--prop", - "-p", help="Enter the stake weight proportions for the child hotkeys (sum should be less than or equal to 1)", prompt=False, ), diff --git a/bittensor_cli/src/bittensor/extrinsics/registration.py b/bittensor_cli/src/bittensor/extrinsics/registration.py index 7c747ad8b..65d8f348d 100644 --- a/bittensor_cli/src/bittensor/extrinsics/registration.py +++ b/bittensor_cli/src/bittensor/extrinsics/registration.py @@ -693,7 +693,7 @@ async def burned_register_extrinsic( :return: Flag is `True` if extrinsic was finalized or included in the block. If we did not wait for finalization/inclusion, the response is `True`. """ - + if not (unlock_status := unlock_key(wallet, print_out=False)).success: return False, unlock_status.message diff --git a/bittensor_cli/src/bittensor/utils.py b/bittensor_cli/src/bittensor/utils.py index cbd27de60..2ac4019e8 100644 --- a/bittensor_cli/src/bittensor/utils.py +++ b/bittensor_cli/src/bittensor/utils.py @@ -32,7 +32,6 @@ if TYPE_CHECKING: from bittensor_cli.src.bittensor.chain_data import SubnetHyperparameters - from async_substrate_interface.async_substrate import AsyncSubstrateInterface console = Console() err_console = Console(stderr=True) diff --git a/bittensor_cli/src/commands/subnets/subnets.py b/bittensor_cli/src/commands/subnets/subnets.py index 44eea5e57..4f116e626 100644 --- a/bittensor_cli/src/commands/subnets/subnets.py +++ b/bittensor_cli/src/commands/subnets/subnets.py @@ -40,7 +40,7 @@ if TYPE_CHECKING: from bittensor_cli.src.bittensor.subtensor_interface import SubtensorInterface -TAO_WEIGHT = 0.018 +TAO_WEIGHT = 0.18 # helpers and extrinsics @@ -1322,7 +1322,7 @@ async def show_subnet(netuid_: int): return hotkey else: console.print( - f"[red]Invalid UID. Please enter a valid UID from the table above[/red]" + "[red]Invalid UID. Please enter a valid UID from the table above[/red]" ) except ValueError: console.print("[red]Please enter a valid number[/red]") diff --git a/bittensor_cli/src/commands/sudo.py b/bittensor_cli/src/commands/sudo.py index bf850b401..58c6a4b15 100644 --- a/bittensor_cli/src/commands/sudo.py +++ b/bittensor_cli/src/commands/sudo.py @@ -657,10 +657,10 @@ async def senate_vote( return False # Unlock the wallet. - try: - wallet.unlock_hotkey() - wallet.unlock_coldkey() - except KeyFileError: + if ( + not unlock_key(wallet, "hot").success + and unlock_key(wallet, "cold").success + ): return False console.print(f"Fetching proposals in [dark_orange]network: {subtensor.network}") @@ -736,10 +736,10 @@ async def _do_set_take() -> bool: f"Setting take on [{COLOR_PALETTE['GENERAL']['LINKS']}]network: {subtensor.network}" ) - try: - wallet.unlock_hotkey() - wallet.unlock_coldkey() - except KeyFileError: + if ( + not unlock_key(wallet, "hot").success + and unlock_key(wallet, "cold").success + ): return False result_ = await _do_set_take() diff --git a/bittensor_cli/src/commands/wallets.py b/bittensor_cli/src/commands/wallets.py index 4af28d4ea..e3a3e8d64 100644 --- a/bittensor_cli/src/commands/wallets.py +++ b/bittensor_cli/src/commands/wallets.py @@ -6,7 +6,7 @@ import aiohttp from bittensor_wallet import Wallet, Keypair -from bittensor_wallet.errors import KeyFileError, PasswordError +from bittensor_wallet.errors import KeyFileError from bittensor_wallet.keyfile import Keyfile from fuzzywuzzy import fuzz from rich import box