Skip to content

Commit 811520e

Browse files
committed
test(uniswap): run the liquidity tests on the emulator instead of skipping them
These three were skipped whenever firmware_variant starts with "Emulator", and the emulator is the only thing CI runs — so they have never executed in CI on any branch. The firmware test report reads "327/330 PASSED, 3 skipped (withheld)" with every EVM section green, and these are the 3. The skip said "Skip until emulator issue resolved" and the comment above it said "Pre-existing, unrelated to clear-signing" and "on-device this path is exercised by the app". Both were wrong. Lifting the skip found a firmware logic defect that fails on hardware too: confirmFromAccountMatch() in zxliquidtx.c ended in `return is_self`, refusing the transaction AFTER the user approved the recipient screen, so the device answered "Signing cancelled by user" for a transaction the user had just confirmed. The vectors show the split themselves — add_liquidity's recipient word is commented "# eth address (self)" and passes; remove_liquidity's is "# to address (not self)" and failed. Fixed in keepkey-firmware as "fix(evm): a Uniswap recipient screen the user approved is an approval". Against that firmware all three pass, asserting their exact sig_v/sig_r/sig_s, so the device is signing the right bytes. Keeping the skip would keep the report green by not looking.
1 parent 8c1492b commit 811520e

1 file changed

Lines changed: 0 additions & 13 deletions

File tree

tests/test_msg_ethereum_erc20_uniswap_liquidity.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,6 @@ class TestMsgEthereumUniswaptxERC20(common.KeepKeyTest):
2929

3030
def test_sign_uni_approve_liquidity_ETH(self):
3131
self.requires_fullFeature()
32-
if self.client.features.firmware_variant[0:8] == "Emulator":
33-
# Approving an UNKNOWN token contract (the FOX pool, not in the
34-
# token table) does not complete on the emulator — same limitation
35-
# as test_sign_uni_add_liquidity_ETH below. Known-token approves
36-
# (test_msg_ethereum_erc20_approve) pass here; on-device this path
37-
# is exercised by the app. Pre-existing, unrelated to clear-signing.
38-
self.skipTest("Skip until emulator issue resolved")
3932
self.requires_firmware("7.1.0")
4033
self.setup_mnemonic_nopin_nopassphrase()
4134

@@ -62,9 +55,6 @@ def test_sign_uni_approve_liquidity_ETH(self):
6255

6356
def test_sign_uni_add_liquidity_ETH(self):
6457
self.requires_fullFeature()
65-
if self.client.features.firmware_variant[0:8] == "Emulator":
66-
self.skipTest("Skip until emulator issue resolved")
67-
return
6858
self.requires_firmware("7.1.0")
6959
self.setup_mnemonic_nopin_nopassphrase()
7060

@@ -94,9 +84,6 @@ def test_sign_uni_add_liquidity_ETH(self):
9484

9585
def test_sign_uni_remove_liquidity_ETH(self):
9686
self.requires_fullFeature()
97-
if self.client.features.firmware_variant[0:8] == "Emulator":
98-
self.skipTest("Skip until emulator issue resolved")
99-
return
10087
self.requires_firmware("7.1.0")
10188
self.setup_mnemonic_nopin_nopassphrase()
10289

0 commit comments

Comments
 (0)