Skip to content
This repository has been archived by the owner on Sep 6, 2023. It is now read-only.

Commit

Permalink
Add ledger to switchChainAllowedRegex
Browse files Browse the repository at this point in the history
  • Loading branch information
hlopes-ledger committed Mar 9, 2023
1 parent c6b2b3a commit 55be166
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/hot-peas-kiss.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@wagmi/connectors': patch
---

Added "ledger" to the regular expression that determines the wallets allowed to switch chains.
4 changes: 3 additions & 1 deletion packages/connectors/src/walletConnectLegacy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ import { Connector } from './base'
/**
* Wallets that support chain switching through WalletConnect
* - imToken (token.im)
* - Ledger Live (ledger.com)
* - MetaMask (metamask.io)
* - Rainbow (rainbow.me)
* - Trust Wallet (trustwallet.com)
*/
const switchChainAllowedRegex = /(imtoken|metamask|rainbow|trust wallet)/i
const switchChainAllowedRegex =
/(imtoken|metamask|rainbow|trust wallet|ledger)/i

type WalletConnectOptions = ConstructorParameters<
typeof WalletConnectProvider
Expand Down

0 comments on commit 55be166

Please sign in to comment.