@calimero-network/mero-react 10.2.0 → 10.2.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.cjs CHANGED
@@ -462,8 +462,9 @@ function MeroProvider({
462
462
  let active = true;
463
463
  const stop = new AbortController();
464
464
  (async () => {
465
- if (!client || !relayUrl) return;
466
- if (awaitingKey) {
465
+ const hasRelay = Boolean(client && relayUrl);
466
+ if (!hasRelay && !packageName) return;
467
+ if (awaitingKey && relayUrl) {
467
468
  const nodeKey = await meroJs.learnRelayNodeKey(relayUrl, { signal: stop.signal });
468
469
  if (!active) return;
469
470
  setMero(nodeKey ? meroJs.buildDelegatedClient(routed, contextId) ?? client : client);
@@ -484,6 +485,7 @@ function MeroProvider({
484
485
  if (!active) return;
485
486
  }
486
487
  }
488
+ if (!hasRelay) return;
487
489
  try {
488
490
  const contexts = await meroJs.listDelegatedContexts(delegated);
489
491
  if (!active) return;