@@ -463,14 +463,15 @@ def test_safe_swap_stake_scenarios(subtensor, alice_wallet, bob_wallet):
463
463
netuid = origin_netuid ,
464
464
)
465
465
assert origin_stake > Balance (0 ), "Origin stake should be non-zero"
466
-
466
+
467
+ stake_swap_amount = Balance .from_tao (100 )
467
468
# 1. Try swap with strict threshold - should fail
468
469
success = subtensor .swap_stake (
469
470
wallet = alice_wallet ,
470
471
hotkey_ss58 = alice_wallet .hotkey .ss58_address ,
471
472
origin_netuid = origin_netuid ,
472
473
destination_netuid = dest_netuid ,
473
- amount = origin_stake ,
474
+ amount = stake_swap_amount ,
474
475
wait_for_inclusion = True ,
475
476
wait_for_finalization = True ,
476
477
safe_staking = True ,
@@ -495,11 +496,11 @@ def test_safe_swap_stake_scenarios(subtensor, alice_wallet, bob_wallet):
495
496
hotkey_ss58 = alice_wallet .hotkey .ss58_address ,
496
497
origin_netuid = origin_netuid ,
497
498
destination_netuid = dest_netuid ,
498
- amount = origin_stake ,
499
+ amount = stake_swap_amount ,
499
500
wait_for_inclusion = True ,
500
501
wait_for_finalization = True ,
501
502
safe_staking = True ,
502
- rate_threshold = 0.3 , # 10 %
503
+ rate_threshold = 0.3 , # 30 %
503
504
allow_partial_stake = True ,
504
505
)
505
506
assert success is True
0 commit comments