58
58
validate_uri ,
59
59
prompt_for_subnet_identity ,
60
60
validate_rate_tolerance ,
61
+ get_hotkey_pub_ss58 ,
61
62
)
62
63
from bittensor_cli .src .commands import sudo , wallets , view
63
64
from bittensor_cli .src .commands import weights as weights_cmds
@@ -1734,7 +1735,7 @@ def wallet_ask(
1734
1735
if return_wallet_and_hotkey :
1735
1736
valid = utils .is_valid_wallet (wallet )
1736
1737
if valid [1 ]:
1737
- return wallet , wallet . hotkey . ss58_address
1738
+ return wallet , get_hotkey_pub_ss58 ( wallet )
1738
1739
else :
1739
1740
if wallet_hotkey and is_valid_ss58_address (wallet_hotkey ):
1740
1741
return wallet , wallet_hotkey
@@ -2572,7 +2573,7 @@ def wallet_associate_hotkey(
2572
2573
ask_for = [WO .NAME , WO .PATH , WO .HOTKEY ],
2573
2574
validate = WV .WALLET_AND_HOTKEY ,
2574
2575
)
2575
- hotkey_ss58 = wallet . hotkey . ss58_address
2576
+ hotkey_ss58 = get_hotkey_pub_ss58 ( wallet )
2576
2577
hotkey_display = (
2577
2578
f"hotkey [blue]{ wallet_hotkey } [/blue] "
2578
2579
f"[{ COLORS .GENERAL .HK } ]({ hotkey_ss58 } )[/{ COLORS .GENERAL .HK } ]"
@@ -3588,7 +3589,7 @@ def stake_add(
3588
3589
ask_for = [WO .NAME , WO .HOTKEY , WO .PATH ],
3589
3590
validate = WV .WALLET_AND_HOTKEY ,
3590
3591
)
3591
- include_hotkeys = wallet . hotkey . ss58_address
3592
+ include_hotkeys = get_hotkey_pub_ss58 ( wallet )
3592
3593
3593
3594
elif all_hotkeys or include_hotkeys or exclude_hotkeys :
3594
3595
wallet = self .wallet_ask (
@@ -4052,7 +4053,7 @@ def stake_move(
4052
4053
ask_for = [WO .NAME , WO .PATH , WO .HOTKEY ],
4053
4054
validate = WV .WALLET_AND_HOTKEY ,
4054
4055
)
4055
- destination_hotkey = destination_wallet . hotkey . ss58_address
4056
+ destination_hotkey = get_hotkey_pub_ss58 ( destination_wallet )
4056
4057
else :
4057
4058
if is_valid_ss58_address (destination_hotkey ):
4058
4059
destination_hotkey = destination_hotkey
@@ -4091,7 +4092,7 @@ def stake_move(
4091
4092
ask_for = [WO .NAME , WO .PATH , WO .HOTKEY ],
4092
4093
validate = WV .WALLET_AND_HOTKEY ,
4093
4094
)
4094
- origin_hotkey = wallet . hotkey . ss58_address
4095
+ origin_hotkey = get_hotkey_pub_ss58 ( wallet )
4095
4096
else :
4096
4097
if is_valid_ss58_address (wallet_hotkey ):
4097
4098
origin_hotkey = wallet_hotkey
@@ -4103,7 +4104,7 @@ def stake_move(
4103
4104
ask_for = [],
4104
4105
validate = WV .WALLET_AND_HOTKEY ,
4105
4106
)
4106
- origin_hotkey = wallet . hotkey . ss58_address
4107
+ origin_hotkey = get_hotkey_pub_ss58 ( wallet )
4107
4108
4108
4109
if not interactive_selection :
4109
4110
if origin_netuid is None :
@@ -4256,7 +4257,7 @@ def stake_transfer(
4256
4257
ask_for = [WO .NAME , WO .PATH , WO .HOTKEY ],
4257
4258
validate = WV .WALLET_AND_HOTKEY ,
4258
4259
)
4259
- origin_hotkey = wallet . hotkey . ss58_address
4260
+ origin_hotkey = get_hotkey_pub_ss58 ( wallet )
4260
4261
else :
4261
4262
if is_valid_ss58_address (wallet_hotkey ):
4262
4263
origin_hotkey = wallet_hotkey
@@ -4268,7 +4269,7 @@ def stake_transfer(
4268
4269
ask_for = [],
4269
4270
validate = WV .WALLET_AND_HOTKEY ,
4270
4271
)
4271
- origin_hotkey = wallet . hotkey . ss58_address
4272
+ origin_hotkey = get_hotkey_pub_ss58 ( wallet )
4272
4273
4273
4274
if not interactive_selection :
4274
4275
if origin_netuid is None :
0 commit comments