Skip to content

Commit 4e2d06a

Browse files
committed
Updates stake swap e2e
1 parent 2313826 commit 4e2d06a

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tests/e2e_tests/test_staking.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -463,14 +463,15 @@ def test_safe_swap_stake_scenarios(subtensor, alice_wallet, bob_wallet):
463463
netuid=origin_netuid,
464464
)
465465
assert origin_stake > Balance(0), "Origin stake should be non-zero"
466-
466+
467+
stake_swap_amount = Balance.from_tao(100)
467468
# 1. Try swap with strict threshold - should fail
468469
success = subtensor.swap_stake(
469470
wallet=alice_wallet,
470471
hotkey_ss58=alice_wallet.hotkey.ss58_address,
471472
origin_netuid=origin_netuid,
472473
destination_netuid=dest_netuid,
473-
amount=origin_stake,
474+
amount=stake_swap_amount,
474475
wait_for_inclusion=True,
475476
wait_for_finalization=True,
476477
safe_staking=True,
@@ -495,11 +496,11 @@ def test_safe_swap_stake_scenarios(subtensor, alice_wallet, bob_wallet):
495496
hotkey_ss58=alice_wallet.hotkey.ss58_address,
496497
origin_netuid=origin_netuid,
497498
destination_netuid=dest_netuid,
498-
amount=origin_stake,
499+
amount=stake_swap_amount,
499500
wait_for_inclusion=True,
500501
wait_for_finalization=True,
501502
safe_staking=True,
502-
rate_threshold=0.3, # 10%
503+
rate_threshold=0.3, # 30%
503504
allow_partial_stake=True,
504505
)
505506
assert success is True

0 commit comments

Comments
 (0)