@leofcoin/chain 1.7.20 → 1.7.21

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/exports/chain.js CHANGED
@@ -1642,8 +1642,10 @@ class Chain extends VersionControl {
1642
1642
  // if (timestamp + this.#slotTime > Date.now()) {
1643
1643
  try {
1644
1644
  const result = await this.#executeTransaction({ ...transaction.decoded, hash });
1645
- block.transactions.push(hash);
1646
- block.fees = block.fees.add(await calculateFee(transaction.decoded));
1645
+ if (block) {
1646
+ block.transactions.push(hash);
1647
+ block.fees = block.fees.add(await calculateFee(transaction.decoded));
1648
+ }
1647
1649
  await globalThis.accountsStore.put(transaction.decoded.from, new TextEncoder().encode(String(transaction.decoded.nonce)));
1648
1650
  await transactionStore.put(hash, await transaction.encode());
1649
1651
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leofcoin/chain",
3
- "version": "1.7.20",
3
+ "version": "1.7.21",
4
4
  "description": "Official javascript implementation",
5
5
  "private": false,
6
6
  "exports": {