@leofcoin/chain 1.7.72 → 1.7.73

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.
@@ -4219,7 +4219,10 @@ class Machine {
4219
4219
  }
4220
4220
  }
4221
4221
  else if (data.question === 'peers') {
4222
- this.worker.postMessage({ id: data.id, input: peernet.connections ? peernet.peers : [] });
4222
+ this.worker.postMessage({
4223
+ id: data.id,
4224
+ input: peernet.connections ? Object.entries(peernet.connections).map(([id, peer]) => peer.toJSON()) : []
4225
+ });
4223
4226
  }
4224
4227
  else {
4225
4228
  this.worker.postMessage({ id: data.id, input: data.input });
package/exports/chain.js CHANGED
@@ -365,7 +365,10 @@ class Machine {
365
365
  }
366
366
  }
367
367
  else if (data.question === 'peers') {
368
- this.worker.postMessage({ id: data.id, input: peernet.connections ? peernet.peers : [] });
368
+ this.worker.postMessage({
369
+ id: data.id,
370
+ input: peernet.connections ? Object.entries(peernet.connections).map(([id, peer]) => peer.toJSON()) : []
371
+ });
369
372
  }
370
373
  else {
371
374
  this.worker.postMessage({ id: data.id, input: data.input });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leofcoin/chain",
3
- "version": "1.7.72",
3
+ "version": "1.7.73",
4
4
  "description": "Official javascript implementation",
5
5
  "private": false,
6
6
  "exports": {
@@ -69,7 +69,7 @@
69
69
  "@leofcoin/messages": "^1.4.40",
70
70
  "@leofcoin/multi-wallet": "^3.1.8",
71
71
  "@leofcoin/networks": "^1.1.25",
72
- "@leofcoin/peernet": "^1.1.83",
72
+ "@leofcoin/peernet": "^1.1.84",
73
73
  "@leofcoin/storage": "^3.5.38",
74
74
  "@leofcoin/utils": "^1.1.39",
75
75
  "@leofcoin/workers": "^1.5.23",