@leofcoin/chain 1.4.14 → 1.4.16

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leofcoin/chain",
3
- "version": "1.4.14",
3
+ "version": "1.4.16",
4
4
  "description": "Official javascript implementation",
5
5
  "main": "./dist/node.js",
6
6
  "module": "./dist/chain.esm",
package/src/chain.js CHANGED
@@ -282,7 +282,7 @@ export default class Chain extends Contract {
282
282
  }
283
283
 
284
284
  async #syncChain(lastBlock) {
285
- if (this.#chainSyncing) return
285
+ if (this.#chainSyncing || !lastBlock || !lastBlock.hash || !lastBlock.hash) return
286
286
 
287
287
  if (!this.lastBlock || Number(this.lastBlock.index) < Number(lastBlock.index)) {
288
288
  this.#chainSyncing = true
package/test/chain.js CHANGED
@@ -30,13 +30,13 @@ const job = async () => {
30
30
  // console.log({e});
31
31
  // }
32
32
 
33
- try {
34
- tx = await chain.createTransaction(chain.nativeToken, 'mint', [peernet.selectedAccount, chain.utils.parseUnits('100000000000000').toString()])
33
+ // try {
34
+ // tx = await chain.createTransaction(chain.nativeToken, 'mint', [peernet.selectedAccount, chain.utils.parseUnits('100000000000000').toString()])
35
35
 
36
- await tx.wait
37
- } catch (e) {
38
- console.log({e});
39
- }
36
+ // await tx.wait
37
+ // } catch (e) {
38
+ // console.log({e});
39
+ // }
40
40
  return
41
41
  console.log({nonce});
42
42
  let balances = await chain.balances