@noosphere/agent-core 0.1.0-alpha.6 → 0.1.0-alpha.8

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
@@ -512,7 +512,7 @@ var ContainerManager = class {
512
512
  * Start a persistent container that stays running
513
513
  */
514
514
  async startPersistentContainer(containerId, metadata) {
515
- const containerName = `noosphere-${containerId}`;
515
+ const containerName = `noosphere-${metadata.name}`;
516
516
  const imageTag = `${metadata.image}:${metadata.tag || "latest"}`;
517
517
  try {
518
518
  const existingContainer = this.docker.getContainer(containerName);
@@ -1666,6 +1666,7 @@ var NoosphereAgent = class _NoosphereAgent {
1666
1666
  console.warn(` Could not verify interval currency:`, error.message);
1667
1667
  }
1668
1668
  this.scheduler.markIntervalCommitted(BigInt(event.subscriptionId), BigInt(event.interval));
1669
+ let sentTxHash;
1669
1670
  try {
1670
1671
  await this.waitForPriority(event);
1671
1672
  if (this.options.onRequestProcessing) {
@@ -1778,6 +1779,7 @@ var NoosphereAgent = class _NoosphereAgent {
1778
1779
  commitmentData,
1779
1780
  nodeWallet
1780
1781
  );
1782
+ sentTxHash = tx.hash;
1781
1783
  console.log(` \u{1F4E4} Transaction sent: ${tx.hash}`);
1782
1784
  const receipt = await tx.wait();
1783
1785
  if (receipt.status === 1) {
@@ -1812,7 +1814,7 @@ var NoosphereAgent = class _NoosphereAgent {
1812
1814
  }
1813
1815
  console.error(` \u274C Error processing request:`, error);
1814
1816
  if (this.options.onRequestFailed) {
1815
- this.options.onRequestFailed(event.requestId, errorMessage);
1817
+ this.options.onRequestFailed(event.requestId, errorMessage, sentTxHash);
1816
1818
  }
1817
1819
  } finally {
1818
1820
  this.processingRequests.delete(event.requestId);