@loafmarkets/ui 0.1.365 → 0.1.366

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.mjs CHANGED
@@ -13617,9 +13617,9 @@ function PortfolioActivityPanel({
13617
13617
  case "asset":
13618
13618
  return dir * a.tokenName.localeCompare(b.tokenName);
13619
13619
  case "units":
13620
- return dir * (a.quantity - b.quantity);
13620
+ return dir * (a.totalQuantity - b.totalQuantity);
13621
13621
  case "value":
13622
- return dir * (a.quantity * a.marketPrice - b.quantity * b.marketPrice);
13622
+ return dir * (a.totalQuantity * a.marketPrice - b.totalQuantity * b.marketPrice);
13623
13623
  case "avgPrice":
13624
13624
  return dir * (a.averageEntryPrice - b.averageEntryPrice);
13625
13625
  case "currentPrice":
@@ -13788,8 +13788,8 @@ function PortfolioActivityPanel({
13788
13788
  ] })
13789
13789
  ] }),
13790
13790
  sortedPositions.map((pos) => {
13791
- const currentValue = pos.quantity * pos.marketPrice;
13792
- const costBasis = pos.quantity * pos.averageEntryPrice;
13791
+ const currentValue = pos.totalQuantity * pos.marketPrice;
13792
+ const costBasis = pos.totalQuantity * pos.averageEntryPrice;
13793
13793
  const pnl = pos.propertyPnl ?? currentValue - costBasis;
13794
13794
  const pnlPercent = pos.propertyPnlPercent ?? pos.percentChange ?? 0;
13795
13795
  const isPositive = pnl >= 0;
@@ -13806,7 +13806,7 @@ function PortfolioActivityPanel({
13806
13806
  ] }),
13807
13807
  /* @__PURE__ */ jsxs(CUnitsCell, { children: [
13808
13808
  /* @__PURE__ */ jsx(CCellLabel, { children: "Units" }),
13809
- formatNumber2(pos.quantity, pos.quantity >= 100 ? 0 : 2),
13809
+ formatNumber2(pos.totalQuantity, pos.totalQuantity >= 100 ? 0 : 2),
13810
13810
  " ",
13811
13811
  ticker
13812
13812
  ] }),
@@ -13879,15 +13879,15 @@ function PortfolioActivityPanel({
13879
13879
  onClosePosition && /* @__PURE__ */ jsx(PositionsHeaderCell, { children: /* @__PURE__ */ jsx(CloseAllHeaderBtn, { onClick: () => setCloseAllOpen(true), children: "Sell All" }) })
13880
13880
  ] }),
13881
13881
  sortedPositions.map((pos) => {
13882
- const currentValue = pos.quantity * pos.marketPrice;
13883
- const costBasis = pos.quantity * pos.averageEntryPrice;
13882
+ const currentValue = pos.totalQuantity * pos.marketPrice;
13883
+ const costBasis = pos.totalQuantity * pos.averageEntryPrice;
13884
13884
  const pnl = pos.propertyPnl ?? currentValue - costBasis;
13885
13885
  const pnlPercent = pos.propertyPnlPercent ?? pos.percentChange ?? 0;
13886
13886
  const isPositive = pnl >= 0;
13887
13887
  return /* @__PURE__ */ jsxs(PositionsRow, { $hasClose: !!onClosePosition, children: [
13888
13888
  /* @__PURE__ */ jsx(PositionsCell, { children: /* @__PURE__ */ jsx(HoldingsPropertyLink, { onClick: () => onPositionClick?.(pos.tokenName, pos.isIpoAllocation), children: pos.tokenName }) }),
13889
13889
  /* @__PURE__ */ jsx(PositionsCell, { children: /* @__PURE__ */ jsxs("span", { style: { color: "#fff", fontSize: "0.8rem" }, children: [
13890
- formatNumber2(pos.quantity),
13890
+ formatNumber2(pos.totalQuantity),
13891
13891
  " ",
13892
13892
  /* @__PURE__ */ jsx("span", { style: { color: "rgba(255,255,255,0.4)", fontSize: "0.7rem" }, children: pos.tokenName.toUpperCase() })
13893
13893
  ] }) }),