@net-protocol/cli 0.1.44 → 0.1.45

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.
@@ -1771,16 +1771,15 @@ async function executeFeedVerifyClaim(txHash, options) {
1771
1771
  });
1772
1772
  const netContract = getNetContract(readOnlyOptions.chainId);
1773
1773
  const netClient = createNetClient(readOnlyOptions);
1774
- const existingHistory = getHistory();
1775
- if (existingHistory.some((entry) => entry.txHash === txHash)) {
1776
- if (options.json) {
1777
- printJson({ alreadyRecorded: true, txHash });
1778
- } else {
1779
- console.log(
1780
- chalk12.yellow("Transaction already recorded in history. Skipping.")
1781
- );
1782
- }
1783
- return;
1774
+ const wasAlreadyRecorded = getHistory().some(
1775
+ (entry) => entry.txHash === txHash
1776
+ );
1777
+ if (wasAlreadyRecorded && !options.json) {
1778
+ console.log(
1779
+ chalk12.yellow(
1780
+ "Transaction already in history \u2014 re-deriving URLs from on-chain data."
1781
+ )
1782
+ );
1784
1783
  }
1785
1784
  const receipt = await publicClient.getTransactionReceipt({ hash: txHash }).catch(
1786
1785
  () => exitWithError(
@@ -1863,15 +1862,18 @@ async function executeFeedVerifyClaim(txHash, options) {
1863
1862
  postId = createPostId(message);
1864
1863
  permalink = postPermalink(readOnlyOptions.chainId, { globalIndex });
1865
1864
  }
1866
- addHistoryEntry({
1867
- type,
1868
- txHash,
1869
- chainId: readOnlyOptions.chainId,
1870
- feed: feedName,
1871
- sender: message.sender,
1872
- text: message.text,
1873
- postId: type === "comment" ? parentPostId : postId
1874
- });
1865
+ if (!wasAlreadyRecorded) {
1866
+ addHistoryEntry({
1867
+ type,
1868
+ txHash,
1869
+ chainId: readOnlyOptions.chainId,
1870
+ feed: feedName,
1871
+ sender: message.sender,
1872
+ text: message.text,
1873
+ postId: type === "comment" ? parentPostId : postId
1874
+ });
1875
+ recorded++;
1876
+ }
1875
1877
  const entry = {
1876
1878
  type,
1877
1879
  txHash,
@@ -1907,10 +1909,9 @@ async function executeFeedVerifyClaim(txHash, options) {
1907
1909
  Tx: ${txHash}`;
1908
1910
  console.log(chalk12.green(` ${label}`));
1909
1911
  }
1910
- recorded++;
1911
1912
  }
1912
1913
  if (options.json) {
1913
- printJson({ recorded, entries });
1914
+ printJson({ alreadyRecorded: wasAlreadyRecorded, recorded, entries });
1914
1915
  return;
1915
1916
  }
1916
1917
  if (recorded > 0) {