@calimero-network/mero-js 19.27.0 → 19.27.1

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/index.mjs CHANGED
@@ -7333,17 +7333,14 @@ function audienceLabel(audience) {
7333
7333
  }
7334
7334
  async function login(config) {
7335
7335
  const baseUrl = config.nodeUrl.replace(/\/+$/, "");
7336
- const doFetch = config.fetch ?? globalThis.fetch;
7337
7336
  const timeoutMs = config.timeoutMs ?? 1e4;
7338
7337
  const request = async (path, init) => {
7339
7338
  const controller = new AbortController();
7340
7339
  const timer = setTimeout(() => controller.abort(), timeoutMs);
7341
7340
  let response;
7342
7341
  try {
7343
- response = await doFetch(`${baseUrl}${path}`, {
7344
- ...init,
7345
- signal: controller.signal
7346
- });
7342
+ const requestInit = { ...init, signal: controller.signal };
7343
+ response = config.fetch ? await config.fetch(`${baseUrl}${path}`, requestInit) : await globalThis.fetch(`${baseUrl}${path}`, requestInit);
7347
7344
  } catch (err) {
7348
7345
  throw new HTTPError(
7349
7346
  0,