Skip to content

Commit 1778f62

Browse files
authored
Merge pull request #311 from opentensor/fix/thewhaleking/typing
Fix return type annotation for `alpha_to_tao_with_slippage`
2 parents 5b44155 + 003283b commit 1778f62

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

bittensor_cli/src/bittensor/chain_data.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,9 @@ def tao_to_alpha_with_slippage(self, tao: Balance) -> tuple[Balance, Balance]:
750750
)
751751
return alpha_returned, slippage, slippage_pct_float
752752

753-
def alpha_to_tao_with_slippage(self, alpha: Balance) -> tuple[Balance, Balance]:
753+
def alpha_to_tao_with_slippage(
754+
self, alpha: Balance
755+
) -> tuple[Balance, Balance, float]:
754756
"""
755757
Returns an estimate of how much TAO would a staker receive if they unstake their alpha using the current pool state.
756758
Args:

bittensor_cli/src/commands/sudo.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -692,10 +692,7 @@ async def senate_vote(
692692
return False
693693

694694
# Unlock the wallet.
695-
if (
696-
not unlock_key(wallet, "hot").success
697-
and unlock_key(wallet, "cold").success
698-
):
695+
if not unlock_key(wallet, "hot").success and unlock_key(wallet, "cold").success:
699696
return False
700697

701698
console.print(f"Fetching proposals in [dark_orange]network: {subtensor.network}")
@@ -771,10 +768,7 @@ async def _do_set_take() -> bool:
771768
f"Setting take on [{COLOR_PALETTE['GENERAL']['LINKS']}]network: {subtensor.network}"
772769
)
773770

774-
if (
775-
not unlock_key(wallet, "hot").success
776-
and unlock_key(wallet, "cold").success
777-
):
771+
if not unlock_key(wallet, "hot").success and unlock_key(wallet, "cold").success:
778772
return False
779773

780774
result_ = await _do_set_take()

0 commit comments

Comments
 (0)