@leofcoin/peernet 1.1.37 → 1.1.38

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.
@@ -1,4 +1,4 @@
1
- import { g as getDefaultExportFromCjs, c as commonjsGlobal } from './peernet-c51c19dd.js';
1
+ import { g as getDefaultExportFromCjs, c as commonjsGlobal } from './peernet-6b71fc3d.js';
2
2
  import './value-157ab062.js';
3
3
 
4
4
  function commonjsRequire(path) {
@@ -41079,7 +41079,9 @@ class P2PTClient extends P2PT {
41079
41079
  });
41080
41080
 
41081
41081
  this.on('msg', async (peer, data, id, from) => {
41082
- if (!this.#discovered[peer.id]) {
41082
+ if (!this.#discovered[peer.id] ||
41083
+ this.#discovered[peer.id]?.connected === false ||
41084
+ this.#discovered[peer.id]?.connected === undefined) {
41083
41085
  if (this.#que.has(peer.id)) {
41084
41086
  const set = this.#que.get(peer.id);
41085
41087
  set.add({peer, data, id, from});
@@ -41087,7 +41089,7 @@ class P2PTClient extends P2PT {
41087
41089
  } else {
41088
41090
  this.#que.set(peer.id, new Set([{peer, data, id, from}]));
41089
41091
  }
41090
- } else if (this.#discovered[peer.id]?.connected) {
41092
+ } else if (this.#discovered[peer.id]?.connected === true) {
41091
41093
  this.#discovered[peer.id]?._handleMessage(new Uint8Array(Object.values(data)), id, from);
41092
41094
  this.bw.down += data.length || data.byteLength;
41093
41095
  }
@@ -1,4 +1,4 @@
1
- import { M as MultiWallet, e as encrypt, b as base58$1 } from './peernet-c51c19dd.js';
1
+ import { M as MultiWallet, e as encrypt, b as base58$1 } from './peernet-6b71fc3d.js';
2
2
  import './value-157ab062.js';
3
3
 
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { F as FormatInterface } from './peernet-c51c19dd.js';
1
+ import { F as FormatInterface } from './peernet-6b71fc3d.js';
2
2
  import './value-157ab062.js';
3
3
 
4
4
  var proto$b = {
@@ -20183,7 +20183,7 @@ class Identity {
20183
20183
  globalThis.peernet.selectedAccount = new TextDecoder().decode(selected);
20184
20184
  }
20185
20185
  else {
20186
- const importee = await import(/* webpackChunkName: "generate-account" */ './index-897eebb9.js');
20186
+ const importee = await import(/* webpackChunkName: "generate-account" */ './index-d89d21c8.js');
20187
20187
  const { identity, accounts } = await importee.default(password, this.network);
20188
20188
  await globalThis.accountStore.put('public', JSON.stringify({ walletId: identity.walletId }));
20189
20189
  await globalThis.walletStore.put('version', String(1));
@@ -20354,7 +20354,7 @@ class Peernet {
20354
20354
  this.root = options.root;
20355
20355
  const { RequestMessage, ResponseMessage, PeerMessage, PeerMessageResponse, PeernetMessage, DHTMessage, DHTMessageResponse, DataMessage, DataMessageResponse, PsMessage, ChatMessage, PeernetFile
20356
20356
  // FolderMessageResponse
20357
- } = await import(/* webpackChunkName: "messages" */ './messages-d4613b80.js');
20357
+ } = await import(/* webpackChunkName: "messages" */ './messages-865446ee.js');
20358
20358
  /**
20359
20359
  * proto Object containing protos
20360
20360
  * @type {Object}
@@ -20433,7 +20433,7 @@ class Peernet {
20433
20433
  if (this.#starting || this.#started)
20434
20434
  return;
20435
20435
  this.#starting = true;
20436
- const importee = await import('./client-fdce8059.js');
20436
+ const importee = await import('./client-6167d247.js');
20437
20437
  /**
20438
20438
  * @access public
20439
20439
  * @type {PeernetClient}
@@ -1,2 +1,2 @@
1
- export { P as default } from './peernet-c51c19dd.js';
1
+ export { P as default } from './peernet-6b71fc3d.js';
2
2
  import './value-157ab062.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leofcoin/peernet",
3
- "version": "1.1.37",
3
+ "version": "1.1.38",
4
4
  "description": "",
5
5
  "main": "src/peernet.js",
6
6
  "exports": {