@sherwoodagent/cli 0.13.1 → 0.13.2

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.js CHANGED
@@ -2643,6 +2643,7 @@ syndicate.command("create").description("Create a new syndicate via the factory
2643
2643
  subdomain
2644
2644
  });
2645
2645
  setChainContract(getChain().id, "vault", result.vault);
2646
+ await new Promise((r) => setTimeout(r, 2e3));
2646
2647
  spinner.text = W3("Registering creator as agent...");
2647
2648
  try {
2648
2649
  setVaultAddress(result.vault);
@@ -3060,11 +3061,13 @@ syndicate.command("approve").description("Approve an agent join request (registe
3060
3061
  process.exit(1);
3061
3062
  }
3062
3063
  spinner.text = "Registering agent on vault...";
3064
+ let agentWasRegistered = false;
3063
3065
  try {
3064
3066
  const regHash = await registerAgent(
3065
3067
  BigInt(opts.agentId),
3066
3068
  opts.wallet
3067
3069
  );
3070
+ agentWasRegistered = true;
3068
3071
  console.log(DIM3(` Agent registered: ${getExplorerUrl(regHash)}`));
3069
3072
  } catch (regErr) {
3070
3073
  const msg = regErr instanceof Error ? regErr.message : String(regErr);
@@ -3074,6 +3077,9 @@ syndicate.command("approve").description("Approve an agent join request (registe
3074
3077
  throw regErr;
3075
3078
  }
3076
3079
  }
3080
+ if (agentWasRegistered) {
3081
+ await new Promise((r) => setTimeout(r, 2e3));
3082
+ }
3077
3083
  spinner.text = "Checking for existing approval...";
3078
3084
  const existingApprovals = await queryApprovals(getAccount().address);
3079
3085
  const alreadyApproved = existingApprovals.find(