@wagmi/connectors 3.1.6 → 3.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -87,8 +87,7 @@ var WalletConnectConnector = class extends Connector {
87
87
  this.emit("message", { type: "connecting" });
88
88
  await provider.connect({
89
89
  pairingTopic,
90
- chains: [targetChainId],
91
- optionalChains: optionalChains.length ? optionalChains : void 0
90
+ optionalChains: [targetChainId, ...optionalChains]
92
91
  });
93
92
  __privateMethod(this, _setRequestedChainsIds, setRequestedChainsIds_fn).call(this, this.chains.map(({ id: id2 }) => id2));
94
93
  }
@@ -222,9 +221,9 @@ createProvider_fn = async function() {
222
221
  };
223
222
  _initProvider = new WeakSet();
224
223
  initProvider_fn = async function() {
225
- const { EthereumProvider, OPTIONAL_EVENTS, OPTIONAL_METHODS } = await import("@walletconnect/ethereum-provider");
226
- const [defaultChain, ...optionalChains] = this.chains.map(({ id }) => id);
227
- if (defaultChain) {
224
+ const { EthereumProvider } = await import("@walletconnect/ethereum-provider");
225
+ const optionalChains = this.chains.map(({ id }) => id);
226
+ if (optionalChains.length) {
228
227
  const {
229
228
  projectId,
230
229
  showQrModal = true,
@@ -236,10 +235,7 @@ initProvider_fn = async function() {
236
235
  showQrModal,
237
236
  qrModalOptions,
238
237
  projectId,
239
- optionalMethods: OPTIONAL_METHODS,
240
- optionalEvents: OPTIONAL_EVENTS,
241
- chains: [defaultChain],
242
- optionalChains: optionalChains.length ? optionalChains : void 0,
238
+ optionalChains,
243
239
  rpcMap: Object.fromEntries(
244
240
  this.chains.map((chain) => [
245
241
  chain.id,
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@wagmi/connectors",
3
3
  "description": "A collection of connectors for wagmi",
4
4
  "license": "MIT",
5
- "version": "3.1.6",
5
+ "version": "3.1.7",
6
6
  "peerDependencies": {
7
7
  "typescript": ">=5.0.4",
8
8
  "viem": ">=0.3.35"