Skip to content

Commit b9ab241

Browse files
committed
test(uniswap): restore mandatory liquidity evidence
1 parent d3660b1 commit b9ab241

4 files changed

Lines changed: 19 additions & 33 deletions

File tree

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
# Actions integration lane. Bump deliberately with that workflow.
3333
git init .
3434
git remote add origin https://github.com/BitHighlander/keepkey-firmware.git
35-
git fetch --depth 1 origin ec9ced7f23b119878961ee6571da29b035cf11fb
35+
git fetch --depth 1 origin 54b169a7036b29db22944d962fb666b50aef9083
3636
git checkout --detach FETCH_HEAD
3737
3838
# Initialise firmware submodules

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ jobs:
130130
# integration-btc job) and the Ironwood known-answer vectors. So this
131131
# job validates 7.16.0; it does not validate the RC18 dependency
132132
# graph. Bump deliberately, and re-read that claim when you do.
133-
ref: ec9ced7f23b119878961ee6571da29b035cf11fb
133+
ref: 54b169a7036b29db22944d962fb666b50aef9083
134134
path: keepkey-firmware
135135

136136
# NOT `submodules: recursive`. trezor-firmware carries a micropython

scripts/generate-test-report.py

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1138,21 +1138,25 @@ def _arg_shown(a):
11381138
'Failure on the wire.',
11391139
[]),
11401140
('E17', 'test_msg_ethereum_erc20_uniswap_liquidity', 'test_sign_uni_approve_liquidity_ETH',
1141-
'Uniswap V2 add-liquidity approve (pending)',
1142-
'PENDING, disclosed: known emulator limitation — an approve to an unknown (non-registry) '
1143-
'token contract cannot complete against the kkemu emulator (matches the sibling '
1144-
'add/remove-liquidity skips below); the device-firmware path is not in question, only '
1145-
'CI emulator coverage. Real-device testing is unaffected.',
1146-
[]),
1141+
'Uniswap V2 LP-token approval',
1142+
'Approves the Uniswap V2 FOX/WETH LP token for the canonical router. The exact pool '
1143+
'identity and full-LP allowance are shown before the generic fee review, and the fixed '
1144+
'signature proves the reviewed transaction bytes are the bytes signed.',
1145+
['Full LP allowance', 'LP token and pool address', 'Fee and final approval']),
11471146
('E18', 'test_msg_ethereum_erc20_uniswap_liquidity', 'test_sign_uni_add_liquidity_ETH',
1148-
'Uniswap V2 add liquidity ETH+token (pending)',
1149-
'PENDING, disclosed: same emulator limitation as E17 — a daily-driver LP-deposit flow '
1150-
'with no PDF proof on this build; tracked for real-device verification.',
1151-
[]),
1147+
'Uniswap V2 add liquidity ETH+token',
1148+
'Clear-signs both desired/minimum FOX and ETH amounts, the signed recipient, and the '
1149+
'deadline before the final fee review. The fixed signature binds those confirmations '
1150+
'to the complete addLiquidityETH calldata.',
1151+
['FOX desired amount', 'FOX minimum', 'Recipient', 'ETH desired amount',
1152+
'ETH minimum', 'Deadline', 'Fee and final approval']),
11521153
('E19', 'test_msg_ethereum_erc20_uniswap_liquidity', 'test_sign_uni_remove_liquidity_ETH',
1153-
'Uniswap V2 remove liquidity ETH+token (pending)',
1154-
'PENDING, disclosed: same emulator limitation as E17.',
1155-
[]),
1154+
'Uniswap V2 remove liquidity ETH+token',
1155+
'Clear-signs the LP burn amount, minimum FOX and ETH outputs, the non-self signed '
1156+
'recipient, and deadline before the final fee review. This is the regression for the '
1157+
'recipient-confirmation path that previously cancelled after the user approved it.',
1158+
['LP burn amount', 'FOX minimum', 'Recipient', 'ETH minimum', 'Deadline',
1159+
'Fee and final approval']),
11561160
('E20', 'test_msg_ethereum_thorchain_deposit', 'test_deposit_legacy_selector',
11571161
'THORChain router deposit() (legacy selector)',
11581162
'Cross-chain swap via the THORChain router contract — a daily-driver EVM<->THORChain '

tests/test_msg_ethereum_erc20_uniswap_liquidity.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -27,24 +27,6 @@
2727

2828
class TestMsgEthereumUniswaptxERC20(common.KeepKeyTest):
2929

30-
def setUp(self):
31-
super(TestMsgEthereumUniswaptxERC20, self).setUp()
32-
# Every test in this file approves or spends against the ETH/FOX pool,
33-
# whose contract is NOT in the token table. Approving an unknown token
34-
# contract does not complete on the emulator: the device never returns,
35-
# so these tests HANG instead of failing, and CI kills the whole run on
36-
# its no-output timeout -- taking every later test with it.
37-
#
38-
# This is a firmware-side limitation, not a gap in the tests. It is
39-
# gated here rather than deleted so the coverage returns automatically
40-
# once the firmware completes this path. Known-token approves
41-
# (test_msg_ethereum_erc20_approve) run here and pass; on real hardware
42-
# this path is exercised by the app.
43-
if self.client.features.firmware_variant[0:8] == "Emulator":
44-
self.skipTest(
45-
"Uniswap liquidity against an unknown token contract does not "
46-
"complete on the emulator")
47-
4830
def test_sign_uni_approve_liquidity_ETH(self):
4931
self.requires_fullFeature()
5032
self.requires_firmware("7.1.0")

0 commit comments

Comments
 (0)