Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removes the .value checks as we no longer use SCALE objects. #270

Merged
merged 1 commit into from
Dec 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading