Skip to content

Commit 0904784

Browse files
committed
update_remove_stake_limit
1 parent 7ba1ce5 commit 0904784

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

bittensor_cli/src/commands/stake/remove.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -248,13 +248,13 @@ async def unstake(
248248
# Additional fields for safe unstaking
249249
if safe_staking:
250250
if subnet_info.is_dynamic:
251-
rate = subnet_info.price.tao or 1
251+
rate = amount_to_unstake_as_balance.rao / received_amount.rao
252252
rate_with_tolerance = rate * (
253253
1 - rate_tolerance
254254
) # Rate only for display
255-
price_with_tolerance = subnet_info.price.rao * (
256-
1 - rate_tolerance
257-
) # Actual price to pass to extrinsic
255+
price_with_tolerance = Balance.from_tao(
256+
rate_with_tolerance
257+
).rao # Actual price to pass to extrinsic
258258
else:
259259
rate_with_tolerance = 1
260260
price_with_tolerance = 1

0 commit comments

Comments
 (0)