@calimero-network/mero-react 9.6.3 → 9.7.0

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
@@ -423,10 +423,13 @@ async function foundDelegatedNamespace(s, req = {}, deps = {}) {
423
423
  const known = Object.entries(readRelayMap(s.account).namespaces).find(
424
424
  ([, url]) => url.replace(/\/+$/, "") === relay
425
425
  )?.[0];
426
- if (!known) {
427
- throw new Error("join a namespace on this relay first: its executor account is learned from one you are in");
426
+ const named = s.executorAccount && s.relayUrl && s.relayUrl.replace(/\/+$/, "") === relay ? s.executorAccount : null;
427
+ if (!named && !known) {
428
+ throw new Error(
429
+ "the executor account of this relay is not known: join a namespace on it first, or connect with the relay's executor account (the cloud shows it beside the relay)"
430
+ );
428
431
  }
429
- const { executorAccount } = await client(s, relay, governanceNonce(relay, known), deps.fetch).describeGovernance(known);
432
+ const executorAccount = named ?? (await client(s, relay, governanceNonce(relay, known), deps.fetch).describeGovernance(known)).executorAccount;
430
433
  let next = BigInt(Date.now());
431
434
  const founded = await client(s, relay, { next: async () => next++ }, deps.fetch).foundNamespace({
432
435
  executorAccount,
@@ -585,11 +588,7 @@ var NODE_ONLY = /* @__PURE__ */ new Set([
585
588
  "getTeeAdmissionPolicy",
586
589
  "deleteBlob",
587
590
  "listAccountDevices",
588
- "revokeAccountDevice",
589
- // Core rc.76 asks the NODE to be the namespace admin for this read, which a
590
- // relay is not, so an account that is the admin is answered a bare 403.
591
- // Refused by name until core checks the caller, as it does for the other two.
592
- "getMigrationStatus"
591
+ "revokeAccountDevice"
593
592
  ]);
594
593
  function isAlreadyDirectMember(e) {
595
594
  if (!(e instanceof Error)) return false;