7474 ProxyAddressBook ,
7575 ProxyAnnouncements ,
7676 confirm_action ,
77+ print_protection_warnings ,
7778)
7879from bittensor_cli .src .commands import sudo , wallets , view
7980from bittensor_cli .src .commands import weights as weights_cmds
@@ -4699,7 +4700,12 @@ def stake_add(
46994700 if safe_staking :
47004701 rate_tolerance = self .ask_rate_tolerance (rate_tolerance )
47014702 allow_partial_stake = self .ask_partial_stake (allow_partial_stake )
4702- console .print ("\n " )
4703+
4704+ print_protection_warnings (
4705+ mev_protection = mev_protection ,
4706+ safe_staking = safe_staking ,
4707+ command_name = "stake add" ,
4708+ )
47034709
47044710 if netuids :
47054711 netuids = parse_to_list (
@@ -5016,8 +5022,12 @@ def stake_remove(
50165022 if safe_staking :
50175023 rate_tolerance = self .ask_rate_tolerance (rate_tolerance )
50185024 allow_partial_stake = self .ask_partial_stake (allow_partial_stake )
5019- console .print ("\n " )
50205025
5026+ print_protection_warnings (
5027+ mev_protection = mev_protection ,
5028+ safe_staking = safe_staking ,
5029+ command_name = "stake remove" ,
5030+ )
50215031 if interactive and any (
50225032 [hotkey_ss58_address , include_hotkeys , exclude_hotkeys , all_hotkeys ]
50235033 ):
@@ -5353,6 +5363,11 @@ def stake_move(
53535363 """
53545364 self .verbosity_handler (quiet , verbose , json_output , prompt , decline )
53555365 proxy = self .is_valid_proxy_name_or_ss58 (proxy , announce_only )
5366+ print_protection_warnings (
5367+ mev_protection = mev_protection ,
5368+ safe_staking = None ,
5369+ command_name = "stake move" ,
5370+ )
53565371 if prompt :
53575372 if not confirm_action (
53585373 "This transaction will [bold]move stake[/bold] to another hotkey while keeping the same "
@@ -5574,6 +5589,11 @@ def stake_transfer(
55745589 """
55755590 self .verbosity_handler (quiet , verbose , json_output , prompt , decline )
55765591 proxy = self .is_valid_proxy_name_or_ss58 (proxy , announce_only )
5592+ print_protection_warnings (
5593+ mev_protection = mev_protection ,
5594+ safe_staking = None ,
5595+ command_name = "stake transfer" ,
5596+ )
55775597 if prompt :
55785598 if not confirm_action (
55795599 "This transaction will [bold]transfer ownership[/bold] from one coldkey to another, in subnets "
@@ -5780,6 +5800,15 @@ def stake_swap(
57805800 "[dim]This command moves stake from one subnet to another subnet while keeping "
57815801 "the same coldkey-hotkey pair.[/dim]"
57825802 )
5803+ safe_staking = self .ask_safe_staking (safe_staking )
5804+ if safe_staking :
5805+ rate_tolerance = self .ask_rate_tolerance (rate_tolerance )
5806+ allow_partial_stake = self .ask_partial_stake (allow_partial_stake )
5807+ print_protection_warnings (
5808+ mev_protection = mev_protection ,
5809+ safe_staking = safe_staking ,
5810+ command_name = "stake swap" ,
5811+ )
57835812
57845813 wallet = self .wallet_ask (
57855814 wallet_name ,
@@ -5803,10 +5832,6 @@ def stake_swap(
58035832 )
58045833 if not amount and not swap_all :
58055834 amount = FloatPrompt .ask ("Enter the [blue]amount[/blue] to swap" )
5806- safe_staking = self .ask_safe_staking (safe_staking )
5807- if safe_staking :
5808- rate_tolerance = self .ask_rate_tolerance (rate_tolerance )
5809- allow_partial_stake = self .ask_partial_stake (allow_partial_stake )
58105835
58115836 logger .debug (
58125837 "args:\n "
@@ -7598,6 +7623,11 @@ def subnets_create(
75987623 """
75997624 self .verbosity_handler (quiet , verbose , json_output , prompt )
76007625 proxy = self .is_valid_proxy_name_or_ss58 (proxy , announce_only )
7626+ print_protection_warnings (
7627+ mev_protection = mev_protection ,
7628+ safe_staking = None ,
7629+ command_name = "subnets create" ,
7630+ )
76017631 wallet = self .wallet_ask (
76027632 wallet_name ,
76037633 wallet_path ,
0 commit comments