Skip to content

fix: add WETH to uniswap token database#172

Merged
BitHighlander merged 1 commit intokeepkey:developfrom
BitHighlander:fix/add-weth-token
Mar 4, 2026
Merged

fix: add WETH to uniswap token database#172
BitHighlander merged 1 commit intokeepkey:developfrom
BitHighlander:fix/add-weth-token

Conversation

@BitHighlander
Copy link
Copy Markdown
Contributor

Summary

Adds WETH (Wrapped Ether) to the uniswap token database.

  • Adds WETH entry to keepkeylib/eth/uniswap_tokens.json
  • Required by firmware's zxappliquid.c Uniswap approve handler which calls tokenByTicker(chain_id, "WETH", &WETH)
  • Without this entry, the test_sign_uni_approve_liquidity_ETH integration test fails

Context

The firmware's Uniswap liquidity contract handler references WETH by ticker to validate approve transactions for ETH/token liquidity pools. The token was missing from the Python test library's token database, causing the approve test to fail while add/remove liquidity tests (which don't reference WETH) passed.

Test plan

  • test_sign_uni_approve_liquidity_ETH passes in emulator CI
  • test_sign_uni_add_liquidity_ETH still passes
  • test_sign_uni_remove_liquidity_ETH still passes
  • No regression in other ERC-20 token tests

The Uniswap approve liquidity handler (zxappliquid.c) calls
tokenByTicker("WETH") to compute V2 pair addresses via CREATE2.
Without WETH in the token table, the firmware returns false before
any button prompt, causing "Signing cancelled by user" in tests.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@BitHighlander BitHighlander merged commit c0e0735 into keepkey:develop Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant