@relay-federation/bridge 0.3.3 → 0.3.4

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.
@@ -1003,11 +1003,8 @@ function generateQR(text) {
1003
1003
  }
1004
1004
 
1005
1005
  // ── Configuration ──────────────────────────────────
1006
- // Seed URLs onlynames come from each bridge's /status response
1007
- const SEED_URLS = [
1008
- 'http://144.202.48.217:9333',
1009
- 'http://45.63.77.31:9333'
1010
- ];
1006
+ // Bootstrap from selfdiscover the rest of the mesh via /discover
1007
+ const SEED_URLS = [window.location.origin];
1011
1008
  let BRIDGES = SEED_URLS.map(url => ({ name: null, url }));
1012
1009
  const POLL_INTERVAL = 5000;
1013
1010
  let discoveryDone = false;
@@ -1126,12 +1123,9 @@ async function pollAll() {
1126
1123
  if (!selectedBridge && bridgeData.size > 0) {
1127
1124
  selectedBridge = bridgeData.keys().next().value;
1128
1125
  }
1129
- // Fetch price from first online bridge
1130
- const firstOnline = results.find(b => !b._error);
1131
- if (firstOnline) {
1132
- fetch(firstOnline._url + '/price', { signal: AbortSignal.timeout(5000) })
1133
- .then(r => r.ok ? r.json() : null).then(d => { if (d) latestPrice = d; }).catch(() => {});
1134
- }
1126
+ // Fetch price from self (same-origin, always works)
1127
+ fetch('/price', { signal: AbortSignal.timeout(5000) })
1128
+ .then(r => r.ok ? r.json() : null).then(d => { if (d) latestPrice = d; }).catch(() => {});
1135
1129
  renderHeader();
1136
1130
  renderBridgeRail();
1137
1131
  renderActiveTab(true);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@relay-federation/bridge",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "description": "Bridge server — WebSocket peering, header sync, tx relay, CLI",
5
5
  "type": "module",
6
6
  "bin": {
@@ -11,8 +11,8 @@
11
11
  },
12
12
  "dependencies": {
13
13
  "@bsv/sdk": "^1.10.1",
14
- "@relay-federation/common": "^0.1.0",
15
- "@relay-federation/registry": "^0.1.0",
14
+ "@relay-federation/common": "^0.2.0",
15
+ "@relay-federation/registry": "^0.2.0",
16
16
  "level": "^10.0.0",
17
17
  "ws": "^8.19.0"
18
18
  },