Skip to content

Commit ec9331c

Browse files
committed
add warning to stake swap
1 parent 9481b40 commit ec9331c

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

bittensor_cli/cli.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5795,6 +5795,15 @@ def stake_swap(
57955795
"[dim]This command moves stake from one subnet to another subnet while keeping "
57965796
"the same coldkey-hotkey pair.[/dim]"
57975797
)
5798+
safe_staking = self.ask_safe_staking(safe_staking)
5799+
if safe_staking:
5800+
rate_tolerance = self.ask_rate_tolerance(rate_tolerance)
5801+
allow_partial_stake = self.ask_partial_stake(allow_partial_stake)
5802+
print_protection_warnings(
5803+
mev_protection=mev_protection,
5804+
safe_staking=safe_staking,
5805+
command_name="stake swap",
5806+
)
57985807

57995808
wallet = self.wallet_ask(
58005809
wallet_name,
@@ -5818,10 +5827,6 @@ def stake_swap(
58185827
)
58195828
if not amount and not swap_all:
58205829
amount = FloatPrompt.ask("Enter the [blue]amount[/blue] to swap")
5821-
safe_staking = self.ask_safe_staking(safe_staking)
5822-
if safe_staking:
5823-
rate_tolerance = self.ask_rate_tolerance(rate_tolerance)
5824-
allow_partial_stake = self.ask_partial_stake(allow_partial_stake)
58255830

58265831
logger.debug(
58275832
"args:\n"

0 commit comments

Comments
 (0)