@latticexyz/entrykit 2.2.22-91cbbf67c5363dfcb7435504d6c803c19113e9ad → 2.2.22-9f06079cb52cb39888097ea3a293ec71bd46ebbc

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.
@@ -189,31 +189,20 @@ function userOpExecutor({ executor }) {
189
189
  }
190
190
 
191
191
  // src/getBundlerTransport.ts
192
- import { wiresaw } from "@latticexyz/common/internal";
193
192
  function getBundlerTransport(chain) {
194
193
  const bundlerHttpUrl = chain.rpcUrls.bundler?.http[0];
195
- const wiresawWebSocketUrl = chain.rpcUrls.wiresaw?.webSocket?.[0];
196
- if (wiresawWebSocketUrl) {
197
- return wiresaw({ wiresaw: webSocket(wiresawWebSocketUrl), fallbackBundler: http(bundlerHttpUrl) });
194
+ const bundlerTransport = bundlerHttpUrl ? http(bundlerHttpUrl) : chain.id === 31337 ? userOpExecutor({
195
+ executor: createClient({
196
+ chain,
197
+ transport: fallback([webSocket(), http()]),
198
+ account: privateKeyToAccount(keccak256(stringToHex("local user op executor"))),
199
+ pollingInterval: 10
200
+ }).extend(transactionQueue())
201
+ }) : null;
202
+ if (!bundlerTransport) {
203
+ throw new Error(`Chain ${chain.id} config did not include a bundler RPC URL.`);
198
204
  }
199
- const wiresawHttpUrl = chain.rpcUrls.wiresaw?.http[0];
200
- if (wiresawHttpUrl) {
201
- return wiresaw({ wiresaw: http(wiresawHttpUrl), fallbackBundler: http(bundlerHttpUrl) });
202
- }
203
- if (bundlerHttpUrl) {
204
- return http(bundlerHttpUrl);
205
- }
206
- if (chain.id === 31337) {
207
- return userOpExecutor({
208
- executor: createClient({
209
- chain,
210
- transport: fallback([webSocket(), http()]),
211
- account: privateKeyToAccount(keccak256(stringToHex("local user op executor"))),
212
- pollingInterval: 10
213
- }).extend(transactionQueue())
214
- });
215
- }
216
- throw new Error(`Chain ${chain.id} config did not include a bundler RPC URL.`);
205
+ return bundlerTransport;
217
206
  }
218
207
 
219
208
  // src/EntryKitConfigProvider.tsx