@clawlabz/clawnetwork 0.1.7 → 0.1.9
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/index.ts +9 -3
- package/package.json +1 -1
package/index.ts
CHANGED
|
@@ -23,9 +23,11 @@ const MAX_RESTART_ATTEMPTS = 3
|
|
|
23
23
|
const BOOTSTRAP_PEERS: Record<string, string[]> = {
|
|
24
24
|
mainnet: [
|
|
25
25
|
'/ip4/178.156.162.162/tcp/9711',
|
|
26
|
+
'/ip4/39.102.144.231/tcp/9711',
|
|
26
27
|
],
|
|
27
28
|
testnet: [
|
|
28
29
|
'/ip4/178.156.162.162/tcp/9721',
|
|
30
|
+
'/ip4/39.102.144.231/tcp/9721',
|
|
29
31
|
],
|
|
30
32
|
devnet: [], // local dev, no bootstrap
|
|
31
33
|
}
|
|
@@ -1330,12 +1332,16 @@ function buildUiHtml(cfg: PluginConfig): string {
|
|
|
1330
1332
|
bannerHtml += 'Update available: v' + (s.latestVersion || '') + ' — ' + (s.changelog || 'New version available');
|
|
1331
1333
|
}
|
|
1332
1334
|
bannerHtml += '</div><div class="upgrade-actions">';
|
|
1333
|
-
bannerHtml += '<button class="upgrade-btn"
|
|
1335
|
+
bannerHtml += '<button class="upgrade-btn" id="upgradeBtn">Update Now</button>';
|
|
1334
1336
|
if (recommended) {
|
|
1335
|
-
bannerHtml += '<button class="upgrade-dismiss"
|
|
1337
|
+
bannerHtml += '<button class="upgrade-dismiss" id="dismissBtn">Dismiss</button>';
|
|
1336
1338
|
}
|
|
1337
1339
|
bannerHtml += '</div>';
|
|
1338
1340
|
bannerEl.innerHTML = bannerHtml;
|
|
1341
|
+
var ubtn = document.getElementById('upgradeBtn');
|
|
1342
|
+
if (ubtn) ubtn.onclick = function() { doAction('upgrade'); };
|
|
1343
|
+
var dbtn = document.getElementById('dismissBtn');
|
|
1344
|
+
if (dbtn) dbtn.onclick = function() { bannerEl.style.display = 'none'; };
|
|
1339
1345
|
} else {
|
|
1340
1346
|
bannerEl.style.display = 'none';
|
|
1341
1347
|
}
|
|
@@ -1706,7 +1712,7 @@ async function handle(req, res) {
|
|
|
1706
1712
|
if (cfg.syncMode) syncMode = cfg.syncMode;
|
|
1707
1713
|
if (cfg.extraBootstrapPeers) extraPeers = cfg.extraBootstrapPeers;
|
|
1708
1714
|
} catch {}
|
|
1709
|
-
const bootstrapPeers = { mainnet: ['/ip4/178.156.162.162/tcp/9711'], testnet: ['/ip4/178.156.162.162/tcp/9721'], devnet: [] };
|
|
1715
|
+
const bootstrapPeers = { mainnet: ['/ip4/178.156.162.162/tcp/9711', '/ip4/39.102.144.231/tcp/9711'], testnet: ['/ip4/178.156.162.162/tcp/9721', '/ip4/39.102.144.231/tcp/9721'], devnet: [] };
|
|
1710
1716
|
const peers = [...(bootstrapPeers[network] || []), ...extraPeers];
|
|
1711
1717
|
const args = ['start', '--network', network, '--rpc-port', String(RPC_PORT), '--p2p-port', String(p2pPort), '--sync-mode', syncMode, '--allow-genesis'];
|
|
1712
1718
|
for (const peer of peers) { args.push('--bootstrap', peer); }
|