Skip to content

feat(ethers5): add Trezor connector for EVM chains - #5739

Merged
0xmkh merged 1 commit into
reown-com:fix/bitcoin-addresesfrom
ronaldsg20:fix/bitcoin-addreses
Aug 5, 2026
Merged

feat(ethers5): add Trezor connector for EVM chains#5739
0xmkh merged 1 commit into
reown-com:fix/bitcoin-addresesfrom
ronaldsg20:fix/bitcoin-addreses

Conversation

@ronaldsg20

@ronaldsg20 ronaldsg20 commented Aug 4, 2026

Copy link
Copy Markdown

Description

Adds a Trezor connector for EVM chains to the ethers5 adapter, so "Trezor" is offered in the eip155 Connect view the same way the Bitcoin adapter already offers its own Trezor connector.

The connector is an EIP-1193 provider backed by @trezor/connect-web:

  • Accounts are derived on the device from the standard Ethereum path (m/44'/60'/0'/0/0, single account), matching the address MetaMask and Ledger Live show for the same seed.
  • Transactions are signed on the device (ethereumSignTransaction) and broadcast as legacy gas-price transactions through the active network's RPC endpoint — compatible with every EVM chain, including ones without EIP-1559 support such as Rootstock. Missing nonce/gasPrice/gas fields are filled from the RPC before signing.
  • Message signing supports personal_sign, eth_sign and eth_signTypedData(_v4).
  • Chain switching (wallet_switchEthereumChain) validates against the adapter's configured networks and emits chainChanged.
  • Read-only JSON-RPC calls are forwarded to the active network's RPC endpoint.

Registration happens automatically in Ethers5Adapter.syncConnectors() via TrezorConnector.getWallet(), mirroring the Bitcoin adapter — no host-app wiring required.

Since Trezor Connect is a page-global singleton shared between namespaces, both this connector and the Bitcoin one now treat init() reporting "already initialized" as success, so whichever namespace connects first wins the init and the other reuses the instance.

Type of change

  • Chore (non-breaking change that addresses non-functional tasks, maintenance, or code quality improvements)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Associated Issues

N/A

Showcase (Optional)

Validated manually end to end on a real Trezor device from a host dapp using the ethers5 adapter: connect (account listed in the modal and derived on the device), chain switching across configured networks, and a successful Rootstock pegout — both a native transfer transaction and a Flyover contract call with value — signed on the device and broadcast through the network RPC.

Checklist

  • Code in this PR is covered by automated tests (Unit tests, E2E tests)
  • My changes generate no new warnings
  • I have reviewed my own code
  • I have filled out all required sections
  • I have tested my changes on the preview link
  • Approver of this PR confirms that the changes are tested on the preview link

    Register a Trezor connector in the ethers5 adapter's syncConnectors,
    mirroring how the Bitcoin adapter offers its own, so "Trezor" appears
    in the eip155 Connect view without any host-app wiring.

    The connector is an EIP-1193 provider backed by @trezor/connect-web:
    accounts come from the device on the standard Ethereum path
    (m/44'/60'/0'/0/0, single account), transactions are signed on the
    device and broadcast as legacy gas-price transactions through the
    active network's RPC endpoint (Rootstock has no EIP-1559), and
    read-only JSON-RPC calls are forwarded to that same endpoint. Chain
    switching validates against the adapter's configured networks.
@changeset-bot

changeset-bot Bot commented Aug 4, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: e078eab

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel

vercel Bot commented Aug 4, 2026

Copy link
Copy Markdown

@ronaldsg20 is attempting to deploy a commit to the Reown Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Thank you for your contribution! We ask that you please read and sign our CTA Document before we can accept your contribution. You can sign the CTA simply by posting a Pull Request Comment with the following text:


I have read the CTA Document and I hereby sign the CTA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@ronaldsg20
ronaldsg20 marked this pull request as ready for review August 4, 2026 17:54
@0xmkh
0xmkh merged commit 4f960b1 into reown-com:fix/bitcoin-addreses Aug 5, 2026
2 of 16 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 5, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants