Skip to content

Commit

Permalink
Fixes bug in stake list + bumps version and changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
ibraheem-opentensor committed Jan 11, 2025
1 parent ac375ba commit c836528
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 8.2.0rc10 /2025-01-11

## What's Changed
* Fixes data ordering in stake list

## 8.2.0rc9 /2025-01-09

## What's Changed
Expand Down
2 changes: 1 addition & 1 deletion bittensor_cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
from .cli import CLIManager


__version__ = "8.2.0rc9"
__version__ = "8.2.0rc10"

__all__ = ["CLIManager", "__version__"]
2 changes: 1 addition & 1 deletion bittensor_cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class GitError(Exception):
pass


__version__ = "8.2.0rc9"
__version__ = "8.2.0rc10"


_core_version = re.match(r"^\d+\.\d+\.\d+", __version__).group(0)
Expand Down
8 changes: 3 additions & 5 deletions bittensor_cli/src/commands/stake/stake.py
Original file line number Diff line number Diff line change
Expand Up @@ -1999,7 +1999,7 @@ async def get_stake_data(block_hash: str = None):
(
substakes,
registered_delegate_info,
dynamic_info,
_dynamic_info,
) = await asyncio.gather(
subtensor.get_stake_info_for_coldkeys(
coldkey_ss58_list=[coldkey_address], block_hash=block_hash
Expand All @@ -2008,6 +2008,7 @@ async def get_stake_data(block_hash: str = None):
subtensor.get_all_subnet_dynamic_info(),
)
sub_stakes = substakes[coldkey_address]
dynamic_info = {info.netuid: info for info in _dynamic_info}
return (
sub_stakes,
registered_delegate_info,
Expand Down Expand Up @@ -2195,9 +2196,7 @@ def create_table(hotkey_: str, substakes: list[StakeInfo]):
f"{stake_value} {symbol}"
if netuid != 0
else f"{symbol} {stake_value}", # Stake (a)
f"{millify_tao(pool.price.tao)} τ/{symbol}"
if not verbose
else f"{pool.price.tao:.4f} τ/{symbol}", # Rate (t/a)
f"{pool.price.tao:.4f} τ/{symbol}", # Rate (t/a)
# f"τ {millify_tao(tao_ownership.tao)}" if not verbose else f"{tao_ownership}", # TAO equiv
swap_value, # Swap(α) -> τ
"YES"
Expand Down Expand Up @@ -2483,7 +2482,6 @@ def format_cell(
if stake.hotkey_ss58 == selected_hotkey
]

dynamic_info = {info.netuid: info for info in dynamic_info_}
block_number = await subtensor.substrate.get_block_number(None)

previous_block = current_block
Expand Down
6 changes: 2 additions & 4 deletions bittensor_cli/src/commands/subnets.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,9 +324,7 @@ def create_table(subnets, block_number):
else f"{subnet.alpha_out.tao:,.4f}"
)
price_value = (
f"{millify_tao(subnet.price.tao)}"
if not verbose
else f"{subnet.price.tao:,.4f}"
f"{subnet.price.tao:,.4f}"
)

# Market Cap
Expand Down Expand Up @@ -559,7 +557,7 @@ def format_liquidity_cell(
prev.get("price"),
unit=f"τ/{symbol}",
precision=4,
millify=True if not verbose else False,
millify=False,
)

alpha_out_cell = format_cell(
Expand Down

0 comments on commit c836528

Please sign in to comment.