Skip to content

fix: register Osmosis and Binance in transport typeRegistry#33

Merged
BitHighlander merged 1 commit intomasterfrom
fix/osmosis-binance-type-registry
Mar 25, 2026
Merged

fix: register Osmosis and Binance in transport typeRegistry#33
BitHighlander merged 1 commit intomasterfrom
fix/osmosis-binance-type-registry

Conversation

@BitHighlander
Copy link
Collaborator

Summary

  • Add OsmosisMessages and BinanceMessages to the transport type registry
  • Without this, device responses for Osmosis (type 1101) and Binance are not deserializable — the transport fakes a FAILURE("Unknown message type received") even though the firmware handles these chains correctly

Root cause

typeRegistry.ts builds messageTypeRegistry from AllMessages, which concatenates all proto modules. Osmosis and Binance proto modules were imported in their respective chain files (osmosis.ts, binance.ts) for sending messages, but never added to AllMessages — so response types couldn't be deserialized.

Cosmos, THORChain, Mayachain, Ripple, EOS, Nano, Zcash were all registered. Solana/TON/TRON self-register via side-effect functions. Osmosis and Binance were the gap.

Test plan

  • osmosisGetAddress() returns address instead of FAILURE
  • binanceGetAddress() returns address instead of FAILURE
  • Existing chains unaffected (no duplicate registrations)

…stry

The transport's fromMessageBuffer() looks up response message types in
messageTypeRegistry to deserialize device responses. Osmosis and Binance
proto constructors were never registered, so the device's valid
OsmosisAddress (1101) / BinanceAddress responses were silently converted
to FAILURE("Unknown message type received") at the hdwallet layer.

The firmware handles these chains correctly — the error was entirely
client-side deserialization failure.
@vercel
Copy link

vercel bot commented Mar 25, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hdwallet-sandbox Ready Ready Preview, Comment Mar 25, 2026 5:23am

Request Review

@BitHighlander BitHighlander merged commit 81f0f85 into master Mar 25, 2026
4 checks passed
BitHighlander added a commit that referenced this pull request Mar 25, 2026
…Registry

Ethereum response types (EthereumAddress=57, EthereumTxRequest=59,
EthereumMessageSignature=110, EthereumTypedDataSignature=113) were
never registered in the transport type registry. The device sends
valid responses but the transport can't deserialize them, fabricating
FAILURE("Unknown message type received") instead.

ETH getAddress appeared to work because EvmAddressManager silently
catches the error and falls back to cached addresses. But ETH signing
(signTx, signMessage, signTypedData) has no fallback and is broken.

Also registers Tendermint (1000-1011) for completeness — currently
unused but prevents future gaps.

Same bug class as Osmosis/Binance (fixed in #33).
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