Skip to content

fix(clearsign): chain-scope THORChain router in clear-sign predictor#364

Open
BitHighlander wants to merge 1 commit into
developfrom
fix/thorchain-clearsign-per-chain-router
Open

fix(clearsign): chain-scope THORChain router in clear-sign predictor#364
BitHighlander wants to merge 1 commit into
developfrom
fix/thorchain-clearsign-per-chain-router

Conversation

@BitHighlander

Copy link
Copy Markdown
Collaborator

Companion to BitHighlander/keepkey-firmware#309.

firmwareClearSigns() mirrors the device's native clear-sign allowlist so the REST/WalletConnect signing overlay predicts whether the device will clear-sign (and avoids force-enabling AdvancedMode on a tx the device would render natively). It matched THORChain deposits against the Ethereum-mainnet router only, ignoring chainId, so it mispredicted an Avalanche THORChain deposit.

This scopes the pin to (address, chainId) via THOR_ROUTER_BY_CHAIN, in lockstep with firmware thor_router_for_chain. Adds the live-verified Avalanche router (00dc6100..); BSC/Base omitted until verified live (the shipped host catalog's AVAX router is stale, and those pairs route via Relay today).

Note: this is the predictor for the REST/WC overlay, a different flow from the swap path that surfaced the bug — the swap AVAX→ETH clear-sign is fixed by the firmware PR alone. This keeps the two in lockstep.

No firmware submodule pin bump here — that lands separately after #309 merges.

…edictor

firmwareClearSigns() mirrors the device's native clear-sign allowlist so the
REST/WalletConnect signing overlay can predict whether the device will
clear-sign (and avoid force-enabling AdvancedMode on a tx it would render
natively). It matched THORChain deposits against the Ethereum-mainnet router
only, ignoring chainId — so it mispredicted an Avalanche THORChain deposit as
blind-sign.

Scope the pin to (address, chainId) via THOR_ROUTER_BY_CHAIN, in lockstep with
firmware thor_router_for_chain (ethereum_contracts/thortx.c). Adds the
live-verified Avalanche router; BSC/Base omitted until verified live, matching
the firmware side.

Companion to BitHighlander/keepkey-firmware#309.
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