Skip to content

hotfix: add WETH to uniswap token database#173

Open
BitHighlander wants to merge 4 commits intomasterfrom
hotfix/add-weth-token
Open

hotfix: add WETH to uniswap token database#173
BitHighlander wants to merge 4 commits intomasterfrom
hotfix/add-weth-token

Conversation

@BitHighlander
Copy link
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, test_sign_uni_approve_liquidity_ETH 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 test library's token database.

Already merged to develop via #172.

Test plan

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

BitHighlander and others added 4 commits March 4, 2026 13:04
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 <noreply@anthropic.com>
fix: add WETH to uniswap token database
The pb2 files were regenerated with a newer protoc (4.x) in fb4ba4d,
which emits `from google.protobuf.internal import builder` — an import
that only exists in protobuf >= 4.21.0. The CI Docker image
(kktech/firmware:v15) runs Python 3.6.9 with protobuf 3.17.3, causing
all 73 test modules to fail at import time.

Revert to the protoc 3.5.1-generated files (from e9cd6b2) which use
the older reflection-based codegen compatible with protobuf 3.x.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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