@zeniai/client-epic-state 5.0.31-beta0ND → 5.0.31-beta1ND

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.
@@ -26,7 +26,7 @@ const toTransactionLineBase = (payload, lineType, currency) => ({
26
26
  });
27
27
  const toLinkedTransactionLine = (payload, currency) => ({
28
28
  ...toTransactionLineBase(payload, 'linked_transaction_line', currency),
29
- linkedTransactions: payload.linked_transactions.map((transactionIDPayload) => (0, transactionIDPayload_1.toTransactionID)(transactionIDPayload)),
29
+ linkedTransactions: payload.linked_transactions != null ? payload.linked_transactions.map((transactionIDPayload) => (0, transactionIDPayload_1.toTransactionID)(transactionIDPayload)) : [],
30
30
  });
31
31
  /**
32
32
  * Transaction with account and class line payload with COT tracking
@@ -22,7 +22,7 @@ const toTransactionLineBase = (payload, lineType, currency) => ({
22
22
  });
23
23
  const toLinkedTransactionLine = (payload, currency) => ({
24
24
  ...toTransactionLineBase(payload, 'linked_transaction_line', currency),
25
- linkedTransactions: payload.linked_transactions.map((transactionIDPayload) => toTransactionID(transactionIDPayload)),
25
+ linkedTransactions: payload.linked_transactions != null ? payload.linked_transactions.map((transactionIDPayload) => toTransactionID(transactionIDPayload)) : [],
26
26
  });
27
27
  /**
28
28
  * Transaction with account and class line payload with COT tracking
@@ -140,9 +140,11 @@ export function aggregateHorizontalDescendantBalances(accounts, childIndices, ch
140
140
  childBalances.forEach((b, i) => {
141
141
  sums.set(i, (sums.get(i) ?? 0) + (b.balance.amount ?? 0));
142
142
  });
143
- const grandChildren = childrenByParent[idx] ?? [];
144
- grandChildren.forEach(walk);
145
143
  }
144
+ // Always recurse — a missing intermediate node should not prune its
145
+ // descendants from the aggregate.
146
+ const grandChildren = childrenByParent[idx] ?? [];
147
+ grandChildren.forEach(walk);
146
148
  };
147
149
  childIndices.forEach(walk);
148
150
  if (template == null) {