@johngalt5/bsv-overlay 0.2.2 → 0.2.3

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.
Files changed (2) hide show
  1. package/index.ts +3 -5
  2. package/package.json +1 -1
package/index.ts CHANGED
@@ -78,9 +78,9 @@ async function startAutoImport(env, cliPath, logger) {
78
78
  const network = env.BSV_NETWORK === 'testnet' ? 'test' : 'main';
79
79
  const controller = new AbortController();
80
80
  const timeout = setTimeout(() => controller.abort(), 15000);
81
- try {
82
- const resp = await fetch(`https://api.whatsonchain.com/v1/bsv/${network}/address/${address}/unspent`, { signal: controller.signal });
83
- if (!resp.ok) return;
81
+ const resp = await fetch(`https://api.whatsonchain.com/v1/bsv/${network}/address/${address}/unspent`, { signal: controller.signal });
82
+ clearTimeout(timeout);
83
+ if (!resp.ok) return;
84
84
  const utxos = await resp.json();
85
85
 
86
86
  for (const utxo of utxos) {
@@ -118,8 +118,6 @@ async function startAutoImport(env, cliPath, logger) {
118
118
  }
119
119
  } catch (err) {
120
120
  // WoC API error — just skip this cycle
121
- } finally {
122
- clearTimeout(timeout);
123
121
  }
124
122
  }, 60000); // Check every 60 seconds
125
123
  } catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@johngalt5/bsv-overlay",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Clawdbot BSV Overlay — agent discovery, service marketplace, and micropayments on the BSV blockchain",
5
5
  "type": "module",
6
6
  "files": [