Skip to content

Commit 7c7d582

Browse files
authored
Merge pull request opentensor#705 from opentensor/release/9.15.2
Release/9.15.2
2 parents 6b73141 + ab56dde commit 7c7d582

File tree

5 files changed

+42
-9
lines changed

5 files changed

+42
-9
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## 9.15.2 /2025-11-05
4+
5+
## What's Changed
6+
* Update/btcli stake claim args by @ibraheem-abe in https://github.com/opentensor/btcli/pull/701
7+
* Update metagraph symbols thru subnet info by @ibraheem-abe in https://github.com/opentensor/btcli/pull/703
8+
9+
**Full Changelog**: https://github.com/opentensor/btcli/compare/v9.15.1...v9.15.2
10+
311
## 9.15.1 /2025-11-04
412

513
* Update/Subnet list ema by @ibraheem-abe in https://github.com/opentensor/btcli/pull/699

bittensor_cli/cli.py

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7085,6 +7085,10 @@ def view_dashboard(
70857085

70867086
def stake_set_claim_type(
70877087
self,
7088+
claim_type: Optional[str] = typer.Argument(
7089+
None,
7090+
help="Claim type: 'keep' or 'swap'. If not provided, you'll be prompted to choose.",
7091+
),
70887092
wallet_name: Optional[str] = Options.wallet_name,
70897093
wallet_path: Optional[str] = Options.wallet_path,
70907094
wallet_hotkey: Optional[str] = Options.wallet_hotkey,
@@ -7105,13 +7109,26 @@ def stake_set_claim_type(
71057109
71067110
USAGE:
71077111
7108-
[green]$[/green] btcli root set-claim-type
7112+
[green]$[/green] btcli stake claim
7113+
[green]$[/green] btcli stake claim keep
7114+
[green]$[/green] btcli stake claim swap
71097115
71107116
With specific wallet:
71117117
7112-
[green]$[/green] btcli root set-claim-type --wallet-name my_wallet
7118+
[green]$[/green] btcli stake claim swap --wallet-name my_wallet
71137119
"""
71147120
self.verbosity_handler(quiet, verbose, json_output)
7121+
7122+
if claim_type is not None:
7123+
claim_type_normalized = claim_type.capitalize()
7124+
if claim_type_normalized not in ["Keep", "Swap"]:
7125+
err_console.print(
7126+
f":cross_mark: [red]Invalid claim type '{claim_type}'. Must be 'keep' or 'swap'.[/red]"
7127+
)
7128+
raise typer.Exit()
7129+
else:
7130+
claim_type_normalized = None
7131+
71157132
wallet = self.wallet_ask(
71167133
wallet_name,
71177134
wallet_path,
@@ -7122,6 +7139,7 @@ def stake_set_claim_type(
71227139
claim_stake.set_claim_type(
71237140
wallet=wallet,
71247141
subtensor=self.initialize_chain(network),
7142+
claim_type=claim_type_normalized,
71257143
prompt=prompt,
71267144
json_output=json_output,
71277145
)

bittensor_cli/src/commands/stake/claim.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
async def set_claim_type(
2626
wallet: Wallet,
2727
subtensor: "SubtensorInterface",
28+
claim_type: Optional[str] = None,
2829
prompt: bool = True,
2930
json_output: bool = False,
3031
) -> tuple[bool, str, Optional[str]]:
@@ -38,6 +39,7 @@ async def set_claim_type(
3839
Args:
3940
wallet: Bittensor wallet object
4041
subtensor: SubtensorInterface object
42+
claim_type: Optional claim type ("Keep" or "Swap"). If None, user will be prompted.
4143
prompt: Whether to prompt for user confirmation
4244
json_output: Whether to output JSON
4345
@@ -76,8 +78,13 @@ async def set_claim_type(
7678
wallet.coldkeypub.ss58_address, f"[yellow]{current_type}[/yellow]"
7779
)
7880
console.print(claim_table)
79-
new_type = Prompt.ask(
80-
"Select new root claim type", choices=["Swap", "Keep"], default=current_type
81+
82+
new_type = (
83+
claim_type
84+
if claim_type
85+
else Prompt.ask(
86+
"Select new root claim type", choices=["Swap", "Keep"], default=current_type
87+
)
8188
)
8289
if new_type == current_type:
8390
msg = f"Root claim type is already set to '{current_type}'. No change needed."

bittensor_cli/src/commands/subnets/subnets.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1377,7 +1377,7 @@ async def show_subnet(
13771377
# Add columns to the table
13781378
table.add_column("UID", style="grey89", no_wrap=True, justify="center")
13791379
table.add_column(
1380-
f"Stake ({Balance.get_unit(netuid_)})",
1380+
f"Stake ({subnet_info.symbol})",
13811381
style=COLOR_PALETTE["POOLS"]["ALPHA_IN"],
13821382
no_wrap=True,
13831383
justify="right",
@@ -1386,7 +1386,7 @@ async def show_subnet(
13861386
else f"{millify_tao(stake_sum)} {subnet_info.symbol}",
13871387
)
13881388
table.add_column(
1389-
f"Alpha ({Balance.get_unit(netuid_)})",
1389+
f"Alpha ({subnet_info.symbol})",
13901390
style=COLOR_PALETTE["POOLS"]["EXTRA_2"],
13911391
no_wrap=True,
13921392
justify="right",
@@ -1412,11 +1412,11 @@ async def show_subnet(
14121412
)
14131413
table.add_column("Incentive", style="#5fd7ff", no_wrap=True, justify="center")
14141414
table.add_column(
1415-
f"Emissions ({Balance.get_unit(netuid_)})",
1415+
f"Emissions ({subnet_info.symbol})",
14161416
style=COLOR_PALETTE["POOLS"]["EMISSION"],
14171417
no_wrap=True,
14181418
justify="center",
1419-
footer=str(Balance.from_tao(emission_sum).set_unit(subnet_info.netuid)),
1419+
footer=f"{emission_sum:.4f} {subnet_info.symbol}",
14201420
)
14211421
table.add_column(
14221422
"Hotkey",

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "bittensor-cli"
7-
version = "9.15.1"
7+
version = "9.15.2"
88
description = "Bittensor CLI"
99
readme = "README.md"
1010
authors = [

0 commit comments

Comments
 (0)