@leofcoin/peernet 1.1.62 → 1.1.63

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 { M as MultiWallet, e as encrypt, b as base58$1 } from './peernet-8bc2189b.js';
1
+ import { M as MultiWallet, e as encrypt, b as base58$1 } from './peernet-5c083379.js';
2
2
  import './value-4e80eeeb.js';
3
3
 
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { F as FormatInterface } from './peernet-8bc2189b.js';
1
+ import { F as FormatInterface } from './peernet-5c083379.js';
2
2
  import './value-4e80eeeb.js';
3
3
 
4
4
  var proto$b = {
@@ -12724,9 +12724,13 @@ class MessageHandler {
12724
12724
  const dataHandler = async (message) => {
12725
12725
  if (!message) return
12726
12726
 
12727
- const { data, id, from, peer } = message;
12728
- const proto = await protoFor(data);
12729
- peernet._protoHandler({ id, proto }, peernet.connections[from] || peer, from);
12727
+ try {
12728
+ const { data, id, from, peer } = message;
12729
+ const proto = await protoFor(data);
12730
+ peernet._protoHandler({ id, proto }, peernet.connections[from] || peer, from);
12731
+ } catch (error) {
12732
+ console.error(error);
12733
+ }
12730
12734
  };
12731
12735
 
12732
12736
  const dhtError = (proto) => {
@@ -27079,7 +27083,7 @@ class Identity {
27079
27083
  this.selectedAccount = new TextDecoder().decode(selected);
27080
27084
  }
27081
27085
  else {
27082
- const importee = await import(/* webpackChunkName: "generate-account" */ './index-3614702b.js');
27086
+ const importee = await import(/* webpackChunkName: "generate-account" */ './index-d76c4d54.js');
27083
27087
  const { identity, accounts } = await importee.default(password, this.network);
27084
27088
  await globalThis.accountStore.put('public', JSON.stringify({ walletId: identity.walletId }));
27085
27089
  await globalThis.walletStore.put('version', String(1));
@@ -27271,7 +27275,7 @@ class Peernet {
27271
27275
  this.root = options.root;
27272
27276
  const { RequestMessage, ResponseMessage, PeerMessage, PeerMessageResponse, PeernetMessage, DHTMessage, DHTMessageResponse, DataMessage, DataMessageResponse, PsMessage, ChatMessage, PeernetFile
27273
27277
  // FolderMessageResponse
27274
- } = await import(/* webpackChunkName: "messages" */ './messages-92c1c441.js');
27278
+ } = await import(/* webpackChunkName: "messages" */ './messages-87375bf7.js');
27275
27279
  /**
27276
27280
  * proto Object containing protos
27277
27281
  * @type {Object}
@@ -1,2 +1,2 @@
1
- export { P as default } from './peernet-8bc2189b.js';
1
+ export { P as default } from './peernet-5c083379.js';
2
2
  import './value-4e80eeeb.js';
@@ -292,9 +292,13 @@ class MessageHandler {
292
292
  const dataHandler = async (message) => {
293
293
  if (!message) return
294
294
 
295
- const { data, id, from, peer } = message;
296
- const proto = await protoFor(data);
297
- peernet._protoHandler({ id, proto }, peernet.connections[from] || peer, from);
295
+ try {
296
+ const { data, id, from, peer } = message;
297
+ const proto = await protoFor(data);
298
+ peernet._protoHandler({ id, proto }, peernet.connections[from] || peer, from);
299
+ } catch (error) {
300
+ console.error(error);
301
+ }
298
302
  };
299
303
 
300
304
  const dhtError = (proto) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leofcoin/peernet",
3
- "version": "1.1.62",
3
+ "version": "1.1.63",
4
4
  "description": "",
5
5
  "main": "src/peernet.js",
6
6
  "exports": {
@@ -3,9 +3,13 @@ import { protoFor } from './../utils/utils.js'
3
3
  const dataHandler = async (message) => {
4
4
  if (!message) return
5
5
 
6
- const { data, id, from, peer } = message
7
- const proto = await protoFor(data)
8
- peernet._protoHandler({ id, proto }, peernet.connections[from] || peer, from)
6
+ try {
7
+ const { data, id, from, peer } = message
8
+ const proto = await protoFor(data)
9
+ peernet._protoHandler({ id, proto }, peernet.connections[from] || peer, from)
10
+ } catch (error) {
11
+ console.error(error)
12
+ }
9
13
  }
10
14
 
11
15
  export default dataHandler