feat: more wallet support for second-class chains#769
feat: more wallet support for second-class chains#769gomesalexandre merged 11 commits intomasterfrom
Conversation
Enables HyperEVM, Monad, and Plasma support in hdwallet-metamask-multichain. These chains use standard Ethereum cryptography and MetaMask is chain-agnostic, so there's no technical barrier to supporting them. Previously only Native wallet had support enabled. Changes: - Set _supportsHyperEvm = true - Set _supportsMonad = true - Set _supportsPlasma = true This allows MetaMask users to import and use accounts on these second-class EVM chains when feature flags are enabled in web. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Enables HyperEVM, Monad, and Plasma support in hdwallet-ledger. Ledger uses the Ethereum app for all EVM chains, so there's no technical barrier to supporting these second-class chains. Previously only Native and MetaMask wallets had support enabled. Changes: - Set _supportsHyperEvm = true - Set _supportsMonad = true - Set _supportsPlasma = true This allows Ledger users to import and use accounts on these second-class EVM chains when feature flags are enabled in web. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Enables HyperEVM, Monad, and Plasma support in hdwallet-trezor. Trezor uses the Ethereum app for all EVM chains, so there's no technical barrier to supporting these second-class chains. Previously only Native, MetaMask, and Ledger wallets had support enabled. Changes: - Set _supportsHyperEvm = true - Set _supportsMonad = true - Set _supportsPlasma = true This allows Trezor users to import and use accounts on these second-class EVM chains when feature flags are enabled in web. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Enables HyperEVM, Monad, and Plasma support in hdwallet-walletconnectv2. WalletConnect V2 is chain-agnostic and supports any EVM chain that connected wallets support. There's no technical barrier to supporting these second-class chains. Changes: - Set _supportsHyperEvm = true - Set _supportsMonad = true - Set _supportsPlasma = true This allows WalletConnect V2 users to import and use accounts on these second-class EVM chains when feature flags are enabled in web. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
📝 WalkthroughWalkthroughEnable three capability flags (_supportsMonad, _supportsPlasma, _supportsHyperEvm) by flipping their readonly initializers from false to true in multiple HD wallet implementations; also bump many package versions from 1.62.28 → 1.62.29 across packages and examples. No control-flow or method changes. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (27)
✅ Files skipped from review due to trivial changes (4)
🧰 Additional context used🧠 Learnings (9)📓 Common learnings📚 Learning: 2025-08-07T15:23:54.858ZApplied to files:
📚 Learning: 2025-08-07T15:27:03.179ZApplied to files:
📚 Learning: 2025-08-07T15:24:19.530ZApplied to files:
📚 Learning: 2025-12-09T13:48:55.139ZApplied to files:
📚 Learning: 2025-08-07T15:47:29.207ZApplied to files:
📚 Learning: 2025-08-07T15:47:26.835ZApplied to files:
📚 Learning: 2025-12-12T11:19:53.263ZApplied to files:
📚 Learning: 2025-08-07T15:24:34.076ZApplied to files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (24)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (4)
packages/hdwallet-ledger/src/ledger.ts(1 hunks)packages/hdwallet-metamask-multichain/src/shapeshift-multichain.ts(1 hunks)packages/hdwallet-trezor/src/trezor.ts(1 hunks)packages/hdwallet-walletconnectV2/src/walletconnectV2.ts(1 hunks)
🧰 Additional context used
🧠 Learnings (4)
📚 Learning: 2025-08-07T15:47:29.207Z
Learnt from: gomesalexandre
Repo: shapeshift/hdwallet PR: 726
File: packages/hdwallet-ledger/src/transport.ts:10-10
Timestamp: 2025-08-07T15:47:29.207Z
Learning: In the shapeshiftoss/hdwallet monorepo, ts-ignore is used instead of ts-expect-error for Ledger transport imports because the code works locally without TypeScript errors but has issues in CI environment. Using ts-expect-error would fail locally since there are no actual errors to suppress.
Applied to files:
packages/hdwallet-metamask-multichain/src/shapeshift-multichain.tspackages/hdwallet-walletconnectV2/src/walletconnectV2.tspackages/hdwallet-ledger/src/ledger.tspackages/hdwallet-trezor/src/trezor.ts
📚 Learning: 2025-08-07T15:47:26.835Z
Learnt from: gomesalexandre
Repo: shapeshift/hdwallet PR: 726
File: packages/hdwallet-ledger-webusb/src/transport.ts:12-12
Timestamp: 2025-08-07T15:47:26.835Z
Learning: In the shapeshiftoss/hdwallet monorepo, ts-ignore is used instead of ts-expect-error for Ledger transport imports because the CI environment has different type checking behavior than local development. The code works locally without errors, but CI reports type issues, so ts-ignore is necessary to suppress the inconsistent type checking across environments.
Applied to files:
packages/hdwallet-metamask-multichain/src/shapeshift-multichain.tspackages/hdwallet-walletconnectV2/src/walletconnectV2.tspackages/hdwallet-ledger/src/ledger.tspackages/hdwallet-trezor/src/trezor.ts
📚 Learning: 2025-08-07T15:27:03.179Z
Learnt from: gomesalexandre
Repo: shapeshift/hdwallet PR: 726
File: packages/hdwallet-ledger/package.json:36-36
Timestamp: 2025-08-07T15:27:03.179Z
Learning: In the shapeshiftoss/hdwallet monorepo, the ledgerhq/hw-transport dependency in packages/hdwallet-ledger/package.json is pinned to an exact version (without caret) due to type mismatches that occur with newer versions. Other Ledger dependencies can safely use caret ranges.
Applied to files:
packages/hdwallet-metamask-multichain/src/shapeshift-multichain.tspackages/hdwallet-ledger/src/ledger.tspackages/hdwallet-trezor/src/trezor.ts
📚 Learning: 2025-11-20T11:04:44.808Z
Learnt from: gomesalexandre
Repo: shapeshift/hdwallet PR: 737
File: packages/hdwallet-trezor/src/ethereum.ts:122-138
Timestamp: 2025-11-20T11:04:44.808Z
Learning: In packages/hdwallet-trezor/src/ethereum.ts, the ethSignTypedData function correctly returns the signature from res.payload.signature without adding a "0x" prefix. This works correctly in practice and has been tested, despite appearing inconsistent with ethSignMessage which does add the prefix. The Trezor Connect ethereumSignTypedData response already provides the signature in the correct format for consumption.
Applied to files:
packages/hdwallet-trezor/src/trezor.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Build and Release
🔇 Additional comments (2)
packages/hdwallet-trezor/src/trezor.ts (1)
287-289: Capability flags are correctly enabled.
ethSupportsNetwork()returns true for all chain IDs without filtering, and signing paths useCommon.custom({ chainId })to accept any chain ID. The _supportsMonad, _supportsPlasma, and _supportsHyperEvm flags are consistent with the underlying implementation's generic chain support.packages/hdwallet-metamask-multichain/src/shapeshift-multichain.ts (1)
287-289: No action needed. The_supports*flags andethSupportsNetwork()are independent architectural concerns, not coupled gating mechanisms. The_supports*flags declare wallet capability to handle these EVM chain types, whileethSupportsNetwork()reports which specific chain IDs are currently supported. The supportsMonad/Plasma/HyperEvm() guard functions (in wallet.ts) check only the_supports*flags without consultingethSupportsNetwork(). Setting these flags totruewhile maintaining mainnet-only support inethSupportsNetwork()is consistent with the design pattern used across wallets like Trezor, which also combines universal_supports*flags with selective chain support.Likely an incorrect or invalid review comment.
|
Yeeting since no risks - chain support flags toggling, and support is guarded by chain support in web regardless of wallet |
Description
Enables MetaMask, Ledger, Trezor, and WalletConnect V2 support for second-class EVM chains (HyperEVM, Monad, Plasma). Previously only Native wallet had support enabled.
Issue
Testing
Warnings
wallet_addEthereumChain, it will fail with a duplicate RPC URL error. This is not our issue - it's because MM already has HyperEVM in their network registry.Screenshots
MetaMask/Rabby (MIPD Wallets)
https://jam.dev/c/51e0580a-34e6-453f-ae67-f8a9a2ab87ed
Ledger
https://jam.dev/c/376d984e-d5cf-4e38-a6c3-7deecce57c88
Trezor
https://jam.dev/c/68de9989-a18e-4fc2-b387-6076ac686264
WalletConnect V2
https://jam.dev/c/0ec7b43d-e01e-4061-9004-4413511bcbfa
Feature Flag OFF Regression Test
https://jam.dev/c/8107541a-f2fe-424a-94c8-9fb8dd9107c0
WalletConnect dApps
https://jam.dev/c/89116565-8212-4dff-93f2-21e7aa5a08ed
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.