diff --git a/bittensor_cli/cli.py b/bittensor_cli/cli.py index 7b165bbb4..79f4d2fef 100755 --- a/bittensor_cli/cli.py +++ b/bittensor_cli/cli.py @@ -109,6 +109,18 @@ class Options: "--wallet.hotkey", help="Hotkey of the wallet", ) + wallet_hotkey_ss58 = typer.Option( + None, + "--hotkey", + "--hotkey-ss58", + "-H", + "--wallet_hotkey", + "--wallet_hotkey_ss58", + "--wallet-hotkey", + "--wallet-hotkey-ss58", + "--wallet.hotkey", + help="Hotkey name or SS58 address of the hotkey", + ) mnemonic = typer.Option( None, help='Mnemonic used to regenerate your key. For example: "horse cart dog ..."', @@ -3349,7 +3361,7 @@ def stake_move( network: Optional[list[str]] = Options.network, wallet_name: Optional[str] = Options.wallet_name, wallet_path: Optional[str] = Options.wallet_path, - wallet_hotkey: Optional[str] = Options.wallet_hotkey, + wallet_hotkey: Optional[str] = Options.wallet_hotkey_ss58, origin_netuid: Optional[int] = typer.Option( None, "--origin-netuid", help="Origin netuid" ), @@ -3369,6 +3381,8 @@ def stake_move( False, "--stake-all", "--all", help="Stake all", prompt=False ), prompt: bool = Options.prompt, + quiet: bool = Options.quiet, + verbose: bool = Options.verbose, ): """ Move staked TAO between hotkeys while keeping the same coldkey ownership. @@ -3390,6 +3404,7 @@ def stake_move( [green]$[/green] btcli stake move """ + self.verbosity_handler(quiet, verbose) console.print( "[dim]This command moves stake from one hotkey to another hotkey while keeping the same coldkey.[/dim]" ) @@ -3502,7 +3517,7 @@ def stake_transfer( network: Optional[list[str]] = Options.network, wallet_name: Optional[str] = Options.wallet_name, wallet_path: Optional[str] = Options.wallet_path, - wallet_hotkey: Optional[str] = Options.wallet_hotkey, + wallet_hotkey: Optional[str] = Options.wallet_hotkey_ss58, origin_netuid: Optional[int] = typer.Option( None, "--origin-netuid", diff --git a/bittensor_cli/src/commands/stake/move.py b/bittensor_cli/src/commands/stake/move.py index 371f3ccaf..0aa23278d 100644 --- a/bittensor_cli/src/commands/stake/move.py +++ b/bittensor_cli/src/commands/stake/move.py @@ -39,6 +39,11 @@ async def display_stake_movement_cross_subnets( subnet = await subtensor.subnet(origin_netuid) received_amount_tao = subnet.alpha_to_tao(amount_to_move) received_amount_tao -= MIN_STAKE_FEE + + if received_amount_tao < Balance.from_tao(0): + print_error("Not enough Alpha to pay the transaction fee.") + raise ValueError + received_amount = subnet.tao_to_alpha(received_amount_tao) slippage_pct_float = ( 100 * float(MIN_STAKE_FEE) / float(MIN_STAKE_FEE + received_amount_tao) @@ -440,7 +445,7 @@ async def move_stake( ): if interactive_selection: try: - selection = stake_move_transfer_selection(subtensor, wallet) + selection = await stake_move_transfer_selection(subtensor, wallet) except ValueError: return False origin_hotkey = selection["origin_hotkey"]