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

Commit

Permalink
fix: empty optionalChains (#396)
Browse files Browse the repository at this point in the history
  • Loading branch information
glitch-txs authored Jul 4, 2023
1 parent 2eec1a8 commit 0a57de2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/tricky-snails-roll.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@wagmi/connectors": patch
---

Added conditional for WalletConnectConnector optionalChains
2 changes: 1 addition & 1 deletion packages/connectors/src/walletConnect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ export class WalletConnectConnector extends Connector<
optionalMethods: OPTIONAL_METHODS,
optionalEvents: OPTIONAL_EVENTS,
chains: [defaultChain],
optionalChains: optionalChains,
optionalChains: optionalChains.length > 0 ? optionalChains : undefined,
rpcMap: Object.fromEntries(
this.chains.map((chain) => [
chain.id,
Expand Down

0 comments on commit 0a57de2

Please sign in to comment.