@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.
- package/dist/walletConnect.js +5 -9
- package/package.json +1 -1
package/dist/walletConnect.js
CHANGED
|
@@ -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
|
-
|
|
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
|
|
226
|
-
const
|
|
227
|
-
if (
|
|
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
|
-
|
|
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,
|