Skip to content

Commit

Permalink
Removes the .value checks as we no longer use SCALE objects.
Browse files Browse the repository at this point in the history
  • Loading branch information
thewhaleking committed Dec 10, 2024
1 parent 389d8d3 commit 745092d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bittensor_cli/src/commands/stake/children_hotkeys.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)}")
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 745092d

Please sign in to comment.