Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/e2e-subtensor-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:

- name: Setup subtensor repo
working-directory: ${{ github.workspace }}/subtensor
run: git checkout main
run: git checkout testnet

- name: Install Python dependencies
run: python3 -m pip install -e . pytest
Expand Down
4 changes: 2 additions & 2 deletions bittensor_cli/src/commands/wallets.py
Original file line number Diff line number Diff line change
Expand Up @@ -1426,14 +1426,14 @@ async def sign(wallet: Wallet, message: str, use_hotkey: str):
"""Sign a message using the provided wallet or hotkey."""

if not use_hotkey:
if not unlock_key(wallet, "coldkey").success:
if not unlock_key(wallet, "cold").success:
return False
keypair = wallet.coldkey
print_verbose(
f"Signing using [{COLOR_PALETTE['GENERAL']['COLDKEY']}]coldkey: {wallet.name}"
)
else:
if not unlock_key(wallet, "hotkey").success:
if not unlock_key(wallet, "hot").success:
return False
keypair = wallet.hotkey
print_verbose(
Expand Down
32 changes: 23 additions & 9 deletions tests/e2e_tests/test_staking_sudo.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,27 @@ def test_staking(local_chain, wallet_setup):
extra_args=[
"--wallet-path",
wallet_path_alice,
"--wallet-hotkey",
wallet_alice.hotkey_str,
"--chain",
"ws://127.0.0.1:9945",
"--wallet-name",
wallet_alice.name,
"--wallet-hotkey",
wallet_alice.hotkey_str,
"--name",
"Test Subnet",
"--repo",
"https://github.com/username/repo",
"--contact",
"alice@opentensor.dev",
"--url",
"https://testsubnet.com",
"--discord",
"alice#1234",
"--description",
"A test subnet for e2e testing",
"--additional-info",
"Created by Alice",
"--no-prompt",
"--subnet-name",
"test-subnet",
"--github-repo",
"https://github.com/bittensor/bittensor",
"--subnet-contact",
"test@test.com",
],
)
assert f"✅ Registered subnetwork with netuid: {netuid}" in result.stdout
Expand Down Expand Up @@ -101,6 +109,9 @@ def test_staking(local_chain, wallet_setup):
"ws://127.0.0.1:9945",
"--amount",
"100",
"--tolerance",
"0.1",
"--partial",
"--no-prompt",
],
)
Expand All @@ -123,7 +134,7 @@ def test_staking(local_chain, wallet_setup):
cleaned_stake = [
re.sub(r"\s+", " ", line) for line in show_stake.stdout.splitlines()
]
stake_added = cleaned_stake[9].split()[8]
stake_added = cleaned_stake[8].split("│")[3].strip().split()[0]
assert Balance.from_tao(float(stake_added)) >= Balance.from_tao(100)

# Execute remove_stake command and remove all 100 TAO from Alice
Expand All @@ -143,6 +154,9 @@ def test_staking(local_chain, wallet_setup):
"ws://127.0.0.1:9945",
"--amount",
"100",
"--tolerance",
"0.1",
"--partial",
"--no-prompt",
],
)
Expand Down
Loading
Loading