From 811520e8d036a3dbfa1060fc015b00659d6040c6 Mon Sep 17 00:00:00 2001 From: highlander Date: Thu, 20 Aug 2026 22:33:47 -0500 Subject: [PATCH] test(uniswap): run the liquidity tests on the emulator instead of skipping them MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- tests/test_msg_ethereum_erc20_uniswap_liquidity.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/tests/test_msg_ethereum_erc20_uniswap_liquidity.py b/tests/test_msg_ethereum_erc20_uniswap_liquidity.py index 14970079..6593611c 100644 --- a/tests/test_msg_ethereum_erc20_uniswap_liquidity.py +++ b/tests/test_msg_ethereum_erc20_uniswap_liquidity.py @@ -29,13 +29,6 @@ class TestMsgEthereumUniswaptxERC20(common.KeepKeyTest): def test_sign_uni_approve_liquidity_ETH(self): self.requires_fullFeature() - if self.client.features.firmware_variant[0:8] == "Emulator": - # Approving an UNKNOWN token contract (the FOX pool, not in the - # token table) does not complete on the emulator — same limitation - # as test_sign_uni_add_liquidity_ETH below. Known-token approves - # (test_msg_ethereum_erc20_approve) pass here; on-device this path - # is exercised by the app. Pre-existing, unrelated to clear-signing. - self.skipTest("Skip until emulator issue resolved") self.requires_firmware("7.1.0") self.setup_mnemonic_nopin_nopassphrase() @@ -62,9 +55,6 @@ def test_sign_uni_approve_liquidity_ETH(self): def test_sign_uni_add_liquidity_ETH(self): self.requires_fullFeature() - if self.client.features.firmware_variant[0:8] == "Emulator": - self.skipTest("Skip until emulator issue resolved") - return self.requires_firmware("7.1.0") self.setup_mnemonic_nopin_nopassphrase() @@ -94,9 +84,6 @@ def test_sign_uni_add_liquidity_ETH(self): def test_sign_uni_remove_liquidity_ETH(self): self.requires_fullFeature() - if self.client.features.firmware_variant[0:8] == "Emulator": - self.skipTest("Skip until emulator issue resolved") - return self.requires_firmware("7.1.0") self.setup_mnemonic_nopin_nopassphrase()