We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7ba1ce5 commit 0904784Copy full SHA for 0904784
bittensor_cli/src/commands/stake/remove.py
@@ -248,13 +248,13 @@ async def unstake(
248
# Additional fields for safe unstaking
249
if safe_staking:
250
if subnet_info.is_dynamic:
251
- rate = subnet_info.price.tao or 1
+ rate = amount_to_unstake_as_balance.rao / received_amount.rao
252
rate_with_tolerance = rate * (
253
1 - rate_tolerance
254
) # Rate only for display
255
- price_with_tolerance = subnet_info.price.rao * (
256
- 1 - rate_tolerance
257
- ) # Actual price to pass to extrinsic
+ price_with_tolerance = Balance.from_tao(
+ rate_with_tolerance
+ ).rao # Actual price to pass to extrinsic
258
else:
259
rate_with_tolerance = 1
260
price_with_tolerance = 1
0 commit comments