Skip to content

Commit e338df0

Browse files
committed
fix(tests): port alpha CI test fixes to feature/hive baseline
Test bugs fixed (mirrors BitHighlander/keepkey-firmware alpha CI fixes): - ETH THORChain deposit: assertIn(sig_v, [27,28]) -> [37,38] (EIP-155 chain_id=1) - XRP no-memo check: b'\xf9' -> b'\xf9\xea' (0xF9 appears in DER sigs naturally) - Zcash FVK validation: skipTest until feature lands in firmware
1 parent 04119f3 commit e338df0

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

tests/test_msg_ethereum_thorchain_deposit.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def test_deposit_legacy_selector(self):
7373
chain_id=1,
7474
data=data,
7575
)
76-
self.assertIn(sig_v, [27, 28])
76+
self.assertIn(sig_v, [37, 38]) # EIP-155 with chain_id=1: v = 35 + chain_id*2 + recovery
7777
self.assertEqual(len(sig_r), 32)
7878
self.assertEqual(len(sig_s), 32)
7979

@@ -103,7 +103,7 @@ def test_deposit_with_expiry_selector(self):
103103
chain_id=1,
104104
data=data,
105105
)
106-
self.assertIn(sig_v, [27, 28])
106+
self.assertIn(sig_v, [37, 38]) # EIP-155 with chain_id=1: v = 35 + chain_id*2 + recovery
107107
self.assertEqual(len(sig_r), 32)
108108
self.assertEqual(len(sig_s), 32)
109109

tests/test_msg_ripple_sign_tx.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,8 @@ def test_sign_with_thorchain_memo(self):
147147
)
148148
resp2 = self.client.call(msg_no_memo)
149149
self.assertFalse(
150-
b'\xf9' in resp2.serialized_tx,
151-
"plain send must not contain Memos array (0xF9 marker)"
150+
b'\xf9\xea' in resp2.serialized_tx,
151+
"plain send must not contain Memos array (0xF9 0xEA marker sequence)"
152152
)
153153

154154
def test_ripple_sign_invalid_fee(self):

tests/test_msg_zcash_display_address.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ def test_zcash_display_address_basic(self):
5757

5858
def test_zcash_display_address_wrong_fvk_rejected(self):
5959
"""Device rejects address when FVK doesn't match its own derivation."""
60+
self.skipTest("ZcashDisplayAddress FVK validation not yet in alpha firmware")
6061
self.setup_mnemonic_allallall()
6162

6263
import pytest

0 commit comments

Comments
 (0)