From 745092d44b63e20161f9de5412cca1f9b149fcd3 Mon Sep 17 00:00:00 2001 From: Benjamin Himes Date: Tue, 10 Dec 2024 15:54:56 +0200 Subject: [PATCH 1/2] Removes the `.value` checks as we no longer use SCALE objects. --- bittensor_cli/src/commands/stake/children_hotkeys.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bittensor_cli/src/commands/stake/children_hotkeys.py b/bittensor_cli/src/commands/stake/children_hotkeys.py index 2f983890..fc913faa 100644 --- a/bittensor_cli/src/commands/stake/children_hotkeys.py +++ b/bittensor_cli/src/commands/stake/children_hotkeys.py @@ -229,7 +229,7 @@ async def get_childkey_take(subtensor, hotkey: str, netuid: int) -> Optional[int params=[hotkey, netuid], ) if childkey_take_: - return int(childkey_take_.value) + return int(childkey_take_) except SubstrateRequestException as e: err_console.print(f"Error querying ChildKeys: {format_error_message(e)}") @@ -300,8 +300,8 @@ async def get_total_stake_for_hk(hotkey: str, parent: bool = False): reuse_block_hash=True, ) stake = ( - Balance.from_rao(_result.value) - if getattr(_result, "value", None) + Balance.from_rao(_result) + if _result is not None else Balance(0) ) if parent: From 4dc0a35cc91e3d1c12545c315a8a6e4414080969 Mon Sep 17 00:00:00 2001 From: ibraheem-opentensor Date: Thu, 12 Dec 2024 14:10:56 -0800 Subject: [PATCH 2/2] Bumps version and changelog --- CHANGELOG.md | 8 ++++++++ bittensor_cli/__init__.py | 2 +- bittensor_cli/cli.py | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dbf44bac..2b1c06a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 8.4.2 /2024-12-12 + +## What's Changed +* Removes the `.value` checks as we no longer use SCALE objects. by @thewhaleking in https://github.com/opentensor/btcli/pull/270 +* Backmerge main to staging 842 by @ibraheem-opentensor in https://github.com/opentensor/btcli/pull/273 + +**Full Changelog**: https://github.com/opentensor/btcli/compare/v8.4.1...v8.4.2 + ## 8.4.1 /2024-12-05 ## What's Changed diff --git a/bittensor_cli/__init__.py b/bittensor_cli/__init__.py index f8d1c3ab..a61da5cd 100644 --- a/bittensor_cli/__init__.py +++ b/bittensor_cli/__init__.py @@ -18,6 +18,6 @@ from .cli import CLIManager -__version__ = "8.4.1" +__version__ = "8.4.2" __all__ = ["CLIManager", "__version__"] diff --git a/bittensor_cli/cli.py b/bittensor_cli/cli.py index 892d56fa..bbad070a 100755 --- a/bittensor_cli/cli.py +++ b/bittensor_cli/cli.py @@ -58,7 +58,7 @@ class GitError(Exception): pass -__version__ = "8.4.1" +__version__ = "8.4.2" _core_version = re.match(r"^\d+\.\d+\.\d+", __version__).group(0)