Skip to content

Commit 041120e

Browse files
BitHighlanderclaude
andcommitted
fix: add requires_firmware("7.14.0") gates to all new chain tests
CI emulator is v7.10.0 — new 7.14.0 tests (EVM clear-signing, Solana, TRON, TON, Zcash Orchard, Zcash PCZT, Zcash v5) fail with "Unknown message" or missing client methods. Adding version gates so they skip gracefully on pre-7.14.0 firmware. 24 failures → 24 skips on the old emulator. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 9409f04 commit 041120e

7 files changed

Lines changed: 26 additions & 0 deletions

tests/test_msg_ethereum_clear_signing.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,7 @@ class TestEthereumClearSigning(common.KeepKeyTest):
411411

412412
def setUp(self):
413413
super().setUp()
414+
self.requires_firmware("7.14.0")
414415
self.setup_mnemonic_nopin_nopassphrase()
415416

416417
def test_valid_metadata_returns_verified(self):

tests/test_msg_solana_signtx.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ def build_system_transfer_tx(from_pubkey, to_pubkey, lamports, blockhash=None):
6262

6363
class TestMsgSolanaSignTx(common.KeepKeyTest):
6464

65+
def setUp(self):
66+
super().setUp()
67+
self.requires_firmware("7.14.0")
68+
6569
def test_solana_get_address(self):
6670
"""Test Solana address derivation from device."""
6771
self.requires_fullFeature()

tests/test_msg_ton_signtx.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ def make_ton_address(workchain=0, hash_bytes=None, bounceable=True, testnet=Fals
5959
@unittest.skipUnless(_has_ton, "TON protobuf messages not available in this build")
6060
class TestMsgTonSignTx(common.KeepKeyTest):
6161

62+
def setUp(self):
63+
super().setUp()
64+
self.requires_firmware("7.14.0")
65+
6266
def test_ton_get_address(self):
6367
"""Test TON address derivation from device."""
6468
self.requires_fullFeature()

tests/test_msg_tron_signtx.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@
2727
@unittest.skipUnless(_has_tron, "TRON protobuf messages not available in this build")
2828
class TestMsgTronSignTx(common.KeepKeyTest):
2929

30+
def setUp(self):
31+
super().setUp()
32+
self.requires_firmware("7.14.0")
33+
3034
def test_tron_get_address(self):
3135
"""Test TRON address derivation from device."""
3236
self.requires_fullFeature()

tests/test_msg_zcash_orchard.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ def bytes_to_int_le(b):
3737
class TestZcashOrchardFVK(common.KeepKeyTest):
3838
"""Test Zcash Orchard Full Viewing Key derivation."""
3939

40+
def setUp(self):
41+
super().setUp()
42+
self.requires_firmware("7.14.0")
43+
4044
def test_fvk_field_ranges(self):
4145
"""FVK components must be in valid field ranges.
4246

tests/test_msg_zcash_sign_pczt.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
class TestZcashSignPCZT(common.KeepKeyTest):
1212
"""Test Zcash Orchard PCZT signing protocol."""
1313

14+
def setUp(self):
15+
super().setUp()
16+
self.requires_firmware("7.14.0")
17+
1418
def _make_action(self, index, sighash=None, value=10000, is_spend=True):
1519
"""Build a minimal action dict for testing."""
1620
action = {

tests/test_zcash_v5_complete.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import os
1111
import binascii
1212
import requests
13+
import pytest
1314
from hashlib import sha256
1415

1516
# Setup paths
@@ -93,6 +94,10 @@ def compare_sighashes(firmware_sighash, expected_sighash):
9394
print("❌ SIGHASH MISMATCH!")
9495
return False
9596

97+
@pytest.mark.skipif(
98+
not os.environ.get('ZCASH_RPC_URL'),
99+
reason="Zcash v5 test requires ZCASH_RPC_URL and firmware >= 7.14.0"
100+
)
96101
def test_v5_signing():
97102
"""Test Zcash v5 transaction signing with proper scriptPubKey"""
98103

0 commit comments

Comments
 (0)