Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions bittensor_cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -3369,6 +3369,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.
Expand All @@ -3390,6 +3392,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]"
)
Expand Down
7 changes: 6 additions & 1 deletion bittensor_cli/src/commands/stake/move.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ async def display_stake_movement_cross_subnets(
received_amount_tao = subnet.alpha_to_tao(amount_to_move)
received_amount_tao -= MIN_STAKE_FEE
received_amount = subnet.tao_to_alpha(received_amount_tao)

if received_amount < Balance.from_tao(0):
print_error("Not enough Alpha to pay the transaction fee.")
raise ValueError

slippage_pct_float = (
100 * float(MIN_STAKE_FEE) / float(MIN_STAKE_FEE + received_amount_tao)
if received_amount_tao != 0
Expand Down Expand Up @@ -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"]
Expand Down