@leofcoin/chain 1.4.46 → 1.4.47

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.
@@ -8064,7 +8064,11 @@ class Chain extends Contract {
8064
8064
  }
8065
8065
  return latest;
8066
8066
  }
8067
+ async #clearPool() {
8068
+ await globalThis.transactionPoolStore.clear();
8069
+ }
8067
8070
  async #init() {
8071
+ await this.#clearPool();
8068
8072
  // this.node = await new Node()
8069
8073
  this.#participants = [];
8070
8074
  this.#participating = false;
@@ -1,4 +1,4 @@
1
- import { c as commonjsGlobal, g as getDefaultExportFromCjs } from './node-browser-5de1f022.js';
1
+ import { c as commonjsGlobal, g as getDefaultExportFromCjs } from './node-browser-b64e2ed2.js';
2
2
  import './contract-f76383c3.js';
3
3
 
4
4
  function commonjsRequire(path) {
@@ -1,4 +1,4 @@
1
- import { M as MultiWallet, e as encrypt, b as base58$1 } from './node-browser-5de1f022.js';
1
+ import { M as MultiWallet, e as encrypt, b as base58$1 } from './node-browser-b64e2ed2.js';
2
2
  import './contract-f76383c3.js';
3
3
 
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { F as FormatInterface } from './node-browser-5de1f022.js';
1
+ import { F as FormatInterface } from './node-browser-b64e2ed2.js';
2
2
  import './contract-f76383c3.js';
3
3
 
4
4
  var proto$b = {
@@ -6286,8 +6286,7 @@ const lastFetched = {
6286
6286
  const fetchedCoordinates = {};
6287
6287
  const getAddress = async () => {
6288
6288
  const { address } = lastFetched;
6289
- const now = Math.round(new Date().getTime() / 1000);
6290
- if (now - address.timestamp > 1200000) {
6289
+ if (address) {
6291
6290
  address.value = await fetch('https://icanhazip.com/');
6292
6291
  address.value = await address.value.text();
6293
6292
  address.timestamp = Math.round(new Date().getTime() / 1000);
@@ -20268,7 +20267,7 @@ class Identity {
20268
20267
  globalThis.peernet.selectedAccount = new TextDecoder().decode(selected);
20269
20268
  }
20270
20269
  else {
20271
- const importee = await import(/* webpackChunkName: "generate-account" */ './index-e407f1a3-a07c9df0.js');
20270
+ const importee = await import(/* webpackChunkName: "generate-account" */ './index-116df6d1-d144f080.js');
20272
20271
  const { identity, accounts } = await importee.default(password, this.network);
20273
20272
  await globalThis.accountStore.put('public', JSON.stringify({ walletId: identity.walletId }));
20274
20273
  await globalThis.walletStore.put('version', String(1));
@@ -20439,7 +20438,7 @@ class Peernet {
20439
20438
  this.root = options.root;
20440
20439
  const { RequestMessage, ResponseMessage, PeerMessage, PeerMessageResponse, PeernetMessage, DHTMessage, DHTMessageResponse, DataMessage, DataMessageResponse, PsMessage, ChatMessage, PeernetFile
20441
20440
  // FolderMessageResponse
20442
- } = await import(/* webpackChunkName: "messages" */ './messages-2465e07d-6cd91c3d.js');
20441
+ } = await import(/* webpackChunkName: "messages" */ './messages-fab7583b-10480899.js');
20443
20442
  /**
20444
20443
  * proto Object containing protos
20445
20444
  * @type {Object}
@@ -20511,7 +20510,7 @@ class Peernet {
20511
20510
  if (this.#starting || this.#started)
20512
20511
  return;
20513
20512
  this.#starting = true;
20514
- const importee = await import('./client-31b62450-447815f7.js');
20513
+ const importee = await import('./client-bdab491d-5e9615c3.js');
20515
20514
  /**
20516
20515
  * @access public
20517
20516
  * @type {PeernetClient}
@@ -1,2 +1,2 @@
1
- export { N as default } from './node-browser-5de1f022.js';
1
+ export { N as default } from './node-browser-b64e2ed2.js';
2
2
  import './contract-f76383c3.js';
package/exports/chain.js CHANGED
@@ -659,7 +659,11 @@ class Chain extends Contract {
659
659
  }
660
660
  return latest;
661
661
  }
662
+ async #clearPool() {
663
+ await globalThis.transactionPoolStore.clear();
664
+ }
662
665
  async #init() {
666
+ await this.#clearPool();
663
667
  // this.node = await new Node()
664
668
  this.#participants = [];
665
669
  this.#participating = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leofcoin/chain",
3
- "version": "1.4.46",
3
+ "version": "1.4.47",
4
4
  "description": "Official javascript implementation",
5
5
  "exports": {
6
6
  "./node": "./exports/node.js",