Skip to content

Commit da29bd8

Browse files
committed
Ensure stake fee is correctly applied netuid unit
1 parent e8f4358 commit da29bd8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

bittensor_cli/src/bittensor/subtensor_interface.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1534,7 +1534,7 @@ async def get_stake_fee(
15341534
if destination_hotkey_ss58 is not None and destination_netuid is not None:
15351535
destination = (destination_hotkey_ss58, destination_netuid)
15361536

1537-
result = await self.query_runtime_api(
1537+
result_ = await self.query_runtime_api(
15381538
runtime_api="StakeInfoRuntimeApi",
15391539
method="get_stake_fee",
15401540
params=[
@@ -1546,8 +1546,10 @@ async def get_stake_fee(
15461546
],
15471547
block_hash=block_hash,
15481548
)
1549+
result = Balance.from_rao(result_)
1550+
result.set_unit(origin_netuid)
15491551

1550-
return Balance.from_rao(result)
1552+
return result
15511553

15521554
async def get_scheduled_coldkey_swap(
15531555
self,

0 commit comments

Comments
 (0)