@mx-cartographer/experiences 6.0.22-alpha.san5 → 6.0.23-alpha.mega1

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/dist/index.es.js CHANGED
@@ -13325,7 +13325,7 @@ class fo {
13325
13325
  constructor(t, i) {
13326
13326
  this.fetchInstance = new _A(t, i);
13327
13327
  }
13328
- getHoldings = async () => this.fetchInstance.get(Q.HOLDINGS).then((t) => t.holdings);
13328
+ getHoldings = async () => this.fetchInstance.get(Q.HOLDINGS).then((t) => t);
13329
13329
  }
13330
13330
  class Bl {
13331
13331
  globalStore;
@@ -21866,13 +21866,15 @@ const H3 = g(() => {
21866
21866
  ...v,
21867
21867
  [d]: l
21868
21868
  }));
21869
- }, { holdings: n } = ha(), { visibleInvestmentAccounts: r, members: o } = zA(), a = r.reduce((d, f) => d + (f.balance || 0), 0), s = n.reduce((d, f) => {
21869
+ }, { holdings: n } = ha(), { visibleInvestmentAccounts: r, members: o } = zA();
21870
+ console.log(JSON.parse(JSON.stringify(r)), "accounts"), console.log(JSON.parse(JSON.stringify(n)), "allHoldings");
21871
+ const a = r?.reduce((d, f) => d + (f.balance || 0), 0) || 0, s = n?.reduce((d, f) => {
21870
21872
  const l = f.market_value ? f.market_value - (f.cost_basis || 0) : 0;
21871
21873
  return d + l;
21872
- }, 0), c = n.reduce((d, f) => {
21874
+ }, 0) || 0, c = n?.reduce((d, f) => {
21873
21875
  const l = f.market_value ? f.market_value - (f.cost_basis || 0) : 0;
21874
21876
  return d + l;
21875
- }, 0), E = a ? c / a * 100 : 0;
21877
+ }, 0) || 0, E = a ? c / a * 100 : 0;
21876
21878
  return /* @__PURE__ */ I(oe, { sx: { alignItems: "center", pt: 48, gap: 48, width: "100%" }, children: [
21877
21879
  /* @__PURE__ */ I(oe, { alignItems: "center", children: [
21878
21880
  /* @__PURE__ */ e(R, { color: "#49505A", children: "Total Portfolio" }),
@@ -21918,10 +21920,10 @@ const H3 = g(() => {
21918
21920
  // Calculate gain/loss
21919
21921
  marketValue: X.market_value || 0,
21920
21922
  description: X.description || ""
21921
- })), u = v.length > 0, H = l.balance, P = v.reduce(
21923
+ })), u = v.length > 0, H = l.balance, P = v?.reduce(
21922
21924
  (X, x) => x.totalGainLoss + X,
21923
21925
  0
21924
- ), C = H ? P / H * 100 : 0;
21926
+ ) || 0, C = H ? P / H * 100 : 0;
21925
21927
  return /* @__PURE__ */ I(
21926
21928
  Gi,
21927
21929
  {