@agg-build/ui 1.2.5 → 1.2.7

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.
@@ -454,18 +454,19 @@ var buildLiveRouteCards = ({
454
454
  const parsedPrimaryVenue = parseVenue(primaryVenue);
455
455
  const isSplit = quoteData.fills.length > 1;
456
456
  const primaryWinnerVenue = quoteData.fills.length === 1 ? primaryVenue : void 0;
457
- const isPrimaryRouteGeoBlocked = quoteData.fills.length > 0 && quoteData.fills.every((f) => geoBlockedVenues.has(f.venue));
457
+ const isPrimaryRouteGeoBlocked = quoteData.fills.length > 0 && quoteData.fills.some((f) => geoBlockedVenues.has(f.venue));
458
458
  const primaryCard = primaryResult ? isPrimaryRouteGeoBlocked ? {
459
459
  id: "live-route",
460
460
  hint: labels.venueUnavailableInRegion,
461
- kind: "venue",
462
- label: getTradingVenueLabel(
461
+ kind: isSplit ? "split" : "venue",
462
+ label: isSplit ? labels.orderSplitting : getTradingVenueLabel(
463
463
  parsedPrimaryVenue.success ? parsedPrimaryVenue.data : void 0
464
464
  ),
465
465
  numericValue: tradeSide === "sell" ? quoteData.rawExecCost : quoteData.totalFilled,
466
466
  quoteData,
467
+ rows: isSplit ? mapQuoteDataToRoutingRows(quoteData) : void 0,
467
468
  value: primaryResult.value,
468
- venue: parsedPrimaryVenue.success ? parsedPrimaryVenue.data : void 0,
469
+ venue: isSplit ? void 0 : parsedPrimaryVenue.success ? parsedPrimaryVenue.data : void 0,
469
470
  isUnavailable: true
470
471
  } : {
471
472
  id: "live-route",
@@ -1765,70 +1766,64 @@ var PlaceOrderResolvedView = ({
1765
1766
  classNames == null ? void 0 : classNames.root,
1766
1767
  className
1767
1768
  ),
1768
- children: /* @__PURE__ */ jsxs3(
1769
- "div",
1770
- {
1771
- className: cn(
1772
- "agg-order-panel-body flex flex-col items-center gap-6 p-8",
1773
- classNames == null ? void 0 : classNames.body
1769
+ children: /* @__PURE__ */ jsxs3("div", { className: cn("agg-order-panel-body flex flex-col", classNames == null ? void 0 : classNames.body), children: [
1770
+ /* @__PURE__ */ jsxs3("div", { className: "flex flex-col items-center gap-6 p-8", children: [
1771
+ /* @__PURE__ */ jsx4(
1772
+ "div",
1773
+ {
1774
+ className: cn(
1775
+ "flex h-15 w-15 items-center justify-center rounded-full",
1776
+ resolvedIconContainerClassName
1777
+ ),
1778
+ children: /* @__PURE__ */ jsx4(Icon, { name: resolvedIconName, className: cn("h-6 w-6", resolvedIconToneClassName) })
1779
+ }
1774
1780
  ),
1775
- children: [
1776
- /* @__PURE__ */ jsx4(
1777
- "div",
1778
- {
1779
- className: cn(
1780
- "flex h-15 w-15 items-center justify-center rounded-full",
1781
- resolvedIconContainerClassName
1782
- ),
1783
- children: /* @__PURE__ */ jsx4(Icon, { name: resolvedIconName, className: cn("h-6 w-6", resolvedIconToneClassName) })
1784
- }
1785
- ),
1786
- /* @__PURE__ */ jsxs3(
1787
- "div",
1781
+ /* @__PURE__ */ jsxs3(
1782
+ "div",
1783
+ {
1784
+ className: cn(
1785
+ "agg-order-panel-content flex flex-col items-center gap-1",
1786
+ classNames == null ? void 0 : classNames.content
1787
+ ),
1788
+ children: [
1789
+ tradingState.market ? /* @__PURE__ */ jsx4(Typography, { variant: "body", children: tradingState.market.question }) : null,
1790
+ tradingState.winningOutcome ? /* @__PURE__ */ jsx4(Typography, { variant: "body-large-strong", children: tradingLabels.outcome(tradingState.winningOutcome.label) }) : null
1791
+ ]
1792
+ }
1793
+ )
1794
+ ] }),
1795
+ resolvedClaim ? /* @__PURE__ */ jsxs3(Fragment2, { children: [
1796
+ /* @__PURE__ */ jsx4("div", { className: "h-px w-full bg-agg-separator" }),
1797
+ /* @__PURE__ */ jsxs3("div", { className: "flex w-full flex-col gap-5 p-6", children: [
1798
+ /* @__PURE__ */ jsx4(Typography, { variant: "body-strong", className: "text-center", children: (_d = extendedTradingLabels.resolvedEarningsTitle) != null ? _d : "Your Earnings" }),
1799
+ /* @__PURE__ */ jsxs3("div", { className: "flex flex-col gap-3 text-agg-sm leading-agg-5 text-agg-foreground", children: [
1800
+ resolvedClaim.resolutionDateLabel ? /* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-between gap-4", children: [
1801
+ /* @__PURE__ */ jsx4("span", { children: (_e = extendedTradingLabels.resolvedResolutionDateLabel) != null ? _e : "Resolution date" }),
1802
+ /* @__PURE__ */ jsx4("span", { className: "font-agg-bold", children: resolvedClaim.resolutionDateLabel })
1803
+ ] }) : null,
1804
+ /* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-between gap-4", children: [
1805
+ /* @__PURE__ */ jsx4("span", { children: (_f = extendedTradingLabels.resolvedSharesLabel) != null ? _f : "Shares" }),
1806
+ /* @__PURE__ */ jsx4("span", { className: "font-agg-bold", children: resolvedClaim.sharesLabel })
1807
+ ] }),
1808
+ /* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-between gap-4", children: [
1809
+ /* @__PURE__ */ jsx4("span", { children: (_g = extendedTradingLabels.resolvedTotalPayoutLabel) != null ? _g : "Total payout" }),
1810
+ /* @__PURE__ */ jsx4("span", { className: "font-agg-bold", children: resolvedClaim.totalPayoutLabel })
1811
+ ] })
1812
+ ] }),
1813
+ resolvedClaim.onClaim ? /* @__PURE__ */ jsx4(
1814
+ Button,
1788
1815
  {
1789
- className: cn(
1790
- "agg-order-panel-content flex flex-col items-center gap-1",
1791
- classNames == null ? void 0 : classNames.content
1792
- ),
1793
- children: [
1794
- tradingState.market ? /* @__PURE__ */ jsx4(Typography, { variant: "body", children: tradingState.market.question }) : null,
1795
- tradingState.winningOutcome ? /* @__PURE__ */ jsx4(Typography, { variant: "body-large-strong", children: tradingLabels.outcome(tradingState.winningOutcome.label) }) : null
1796
- ]
1816
+ size: "large",
1817
+ className: "w-full",
1818
+ onClick: resolvedClaim.onClaim,
1819
+ isLoading: resolvedClaim.isClaiming,
1820
+ disabled: resolvedClaim.isClaiming,
1821
+ children: (_h = extendedTradingLabels.claimWinnings) != null ? _h : "Claim Winnings"
1797
1822
  }
1798
- ),
1799
- resolvedClaim ? /* @__PURE__ */ jsxs3(Fragment2, { children: [
1800
- /* @__PURE__ */ jsx4("div", { className: "h-px w-full bg-agg-separator" }),
1801
- /* @__PURE__ */ jsxs3("div", { className: "flex flex-col gap-5 p-6", children: [
1802
- /* @__PURE__ */ jsx4(Typography, { variant: "body-strong", children: (_d = extendedTradingLabels.resolvedEarningsTitle) != null ? _d : "Your Earnings" }),
1803
- /* @__PURE__ */ jsxs3("div", { className: "flex flex-col gap-3 text-agg-sm leading-agg-5 text-agg-foreground", children: [
1804
- /* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-between gap-4", children: [
1805
- /* @__PURE__ */ jsx4("span", { children: (_e = extendedTradingLabels.resolvedResolutionDateLabel) != null ? _e : "Resolution date" }),
1806
- /* @__PURE__ */ jsx4("span", { className: "font-agg-bold", children: resolvedClaim.resolutionDateLabel })
1807
- ] }),
1808
- /* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-between gap-4", children: [
1809
- /* @__PURE__ */ jsx4("span", { children: (_f = extendedTradingLabels.resolvedSharesLabel) != null ? _f : "Shares" }),
1810
- /* @__PURE__ */ jsx4("span", { className: "font-agg-bold", children: resolvedClaim.sharesLabel })
1811
- ] }),
1812
- /* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-between gap-4", children: [
1813
- /* @__PURE__ */ jsx4("span", { children: (_g = extendedTradingLabels.resolvedTotalPayoutLabel) != null ? _g : "Total payout" }),
1814
- /* @__PURE__ */ jsx4("span", { className: "font-agg-bold", children: resolvedClaim.totalPayoutLabel })
1815
- ] })
1816
- ] }),
1817
- resolvedClaim.onClaim ? /* @__PURE__ */ jsx4(
1818
- Button,
1819
- {
1820
- size: "large",
1821
- onClick: resolvedClaim.onClaim,
1822
- isLoading: resolvedClaim.isClaiming,
1823
- disabled: resolvedClaim.isClaiming,
1824
- children: (_h = extendedTradingLabels.claimWinnings) != null ? _h : "Claim Winnings"
1825
- }
1826
- ) : null
1827
- ] })
1828
- ] }) : null
1829
- ]
1830
- }
1831
- )
1823
+ ) : null
1824
+ ] })
1825
+ ] }) : null
1826
+ ] })
1832
1827
  }
1833
1828
  );
1834
1829
  };
@@ -15,7 +15,7 @@ import {
15
15
  PlaceOrder,
16
16
  SettlementDetails,
17
17
  WITHDRAW_MODAL_OPEN_EVENT
18
- } from "./chunk-XCECYRTH.mjs";
18
+ } from "./chunk-3RG2K7MV.mjs";
19
19
  import {
20
20
  AggErrorBoundary,
21
21
  Button,
@@ -3009,8 +3009,11 @@ var hasActivityError = (item) => {
3009
3009
  var isVisibleActivityItem = (item) => {
3010
3010
  var _a;
3011
3011
  if (item.type === "user_op" || item.type === "bridge") return false;
3012
- if (item.type === "trade" && item.status.toLowerCase() === "failed" && ((_a = parseRawMicroValue(item.filledAmountRaw)) != null ? _a : 0) <= 0)
3013
- return false;
3012
+ if (item.type === "trade") {
3013
+ if (isOpenOrderStatus(item.status)) return false;
3014
+ if (item.status.toLowerCase() === "failed" && ((_a = parseRawMicroValue(item.filledAmountRaw)) != null ? _a : 0) <= 0)
3015
+ return false;
3016
+ }
3014
3017
  return true;
3015
3018
  };
3016
3019
  var isVisibleUserProfileActivity = (activity) => activity.kind !== "bridge";
@@ -1748,7 +1748,11 @@ var WithdrawAmountStep = ({
1748
1748
  /* @__PURE__ */ jsxs13("div", { className: "flex flex-col gap-2", children: [
1749
1749
  /* @__PURE__ */ jsxs13("div", { className: "flex items-center justify-between", children: [
1750
1750
  /* @__PURE__ */ jsx13("p", { className: "agg-type-label-strong text-agg-foreground", children: labels.withdraw.walletFlow.amountLabel }),
1751
- /* @__PURE__ */ jsx13("p", { className: "agg-type-label text-agg-muted-foreground", children: balanceDisplay })
1751
+ /* @__PURE__ */ jsxs13("p", { className: "agg-type-label text-agg-muted-foreground", children: [
1752
+ labels.withdraw.balancePrefix,
1753
+ " ",
1754
+ balanceDisplay
1755
+ ] })
1752
1756
  ] }),
1753
1757
  /* @__PURE__ */ jsxs13("div", { className: "flex h-10 items-center gap-2 rounded border border-agg-separator bg-agg-secondary px-3 focus-within:border-agg-primary transition-colors", children: [
1754
1758
  /* @__PURE__ */ jsx13(
@@ -2191,7 +2195,7 @@ function WithdrawModalControlled({
2191
2195
  });
2192
2196
  const withdrawTokenOptions = withTokenIcons(withdrawFlow.tokenOptions);
2193
2197
  const withdrawNetworkOptions = withNetworkIcons(withdrawFlow.networkOptions);
2194
- return /* @__PURE__ */ jsx15(Modal, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ jsxs15(Modal.Container, { maxWidth: "600px", "aria-label": "Withdraw", children: [
2198
+ return /* @__PURE__ */ jsx15(Modal, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ jsxs15(Modal.Container, { maxWidth: step === "method" ? "600px" : "480px", "aria-label": "Withdraw", children: [
2195
2199
  step === "method" ? /* @__PURE__ */ jsx15(
2196
2200
  WithdrawMethodStep,
2197
2201
  {
package/dist/index.js CHANGED
@@ -15874,18 +15874,19 @@ var buildLiveRouteCards = ({
15874
15874
  const parsedPrimaryVenue = parseVenue(primaryVenue);
15875
15875
  const isSplit = quoteData.fills.length > 1;
15876
15876
  const primaryWinnerVenue = quoteData.fills.length === 1 ? primaryVenue : void 0;
15877
- const isPrimaryRouteGeoBlocked = quoteData.fills.length > 0 && quoteData.fills.every((f) => geoBlockedVenues.has(f.venue));
15877
+ const isPrimaryRouteGeoBlocked = quoteData.fills.length > 0 && quoteData.fills.some((f) => geoBlockedVenues.has(f.venue));
15878
15878
  const primaryCard = primaryResult ? isPrimaryRouteGeoBlocked ? {
15879
15879
  id: "live-route",
15880
15880
  hint: labels.venueUnavailableInRegion,
15881
- kind: "venue",
15882
- label: getTradingVenueLabel(
15881
+ kind: isSplit ? "split" : "venue",
15882
+ label: isSplit ? labels.orderSplitting : getTradingVenueLabel(
15883
15883
  parsedPrimaryVenue.success ? parsedPrimaryVenue.data : void 0
15884
15884
  ),
15885
15885
  numericValue: tradeSide === "sell" ? quoteData.rawExecCost : quoteData.totalFilled,
15886
15886
  quoteData,
15887
+ rows: isSplit ? mapQuoteDataToRoutingRows(quoteData) : void 0,
15887
15888
  value: primaryResult.value,
15888
- venue: parsedPrimaryVenue.success ? parsedPrimaryVenue.data : void 0,
15889
+ venue: isSplit ? void 0 : parsedPrimaryVenue.success ? parsedPrimaryVenue.data : void 0,
15889
15890
  isUnavailable: true
15890
15891
  } : {
15891
15892
  id: "live-route",
@@ -17185,70 +17186,64 @@ var PlaceOrderResolvedView = ({
17185
17186
  classNames == null ? void 0 : classNames.root,
17186
17187
  className
17187
17188
  ),
17188
- children: /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(
17189
- "div",
17190
- {
17191
- className: cn(
17192
- "agg-order-panel-body flex flex-col items-center gap-6 p-8",
17193
- classNames == null ? void 0 : classNames.body
17189
+ children: /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: cn("agg-order-panel-body flex flex-col", classNames == null ? void 0 : classNames.body), children: [
17190
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: "flex flex-col items-center gap-6 p-8", children: [
17191
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
17192
+ "div",
17193
+ {
17194
+ className: cn(
17195
+ "flex h-15 w-15 items-center justify-center rounded-full",
17196
+ resolvedIconContainerClassName
17197
+ ),
17198
+ children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(Icon, { name: resolvedIconName, className: cn("h-6 w-6", resolvedIconToneClassName) })
17199
+ }
17194
17200
  ),
17195
- children: [
17196
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
17197
- "div",
17198
- {
17199
- className: cn(
17200
- "flex h-15 w-15 items-center justify-center rounded-full",
17201
- resolvedIconContainerClassName
17202
- ),
17203
- children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(Icon, { name: resolvedIconName, className: cn("h-6 w-6", resolvedIconToneClassName) })
17204
- }
17205
- ),
17206
- /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(
17207
- "div",
17201
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(
17202
+ "div",
17203
+ {
17204
+ className: cn(
17205
+ "agg-order-panel-content flex flex-col items-center gap-1",
17206
+ classNames == null ? void 0 : classNames.content
17207
+ ),
17208
+ children: [
17209
+ tradingState.market ? /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(Typography, { variant: "body", children: tradingState.market.question }) : null,
17210
+ tradingState.winningOutcome ? /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(Typography, { variant: "body-large-strong", children: tradingLabels.outcome(tradingState.winningOutcome.label) }) : null
17211
+ ]
17212
+ }
17213
+ )
17214
+ ] }),
17215
+ resolvedClaim ? /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_jsx_runtime142.Fragment, { children: [
17216
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("div", { className: "h-px w-full bg-agg-separator" }),
17217
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: "flex w-full flex-col gap-5 p-6", children: [
17218
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(Typography, { variant: "body-strong", className: "text-center", children: (_d = extendedTradingLabels.resolvedEarningsTitle) != null ? _d : "Your Earnings" }),
17219
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: "flex flex-col gap-3 text-agg-sm leading-agg-5 text-agg-foreground", children: [
17220
+ resolvedClaim.resolutionDateLabel ? /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
17221
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("span", { children: (_e = extendedTradingLabels.resolvedResolutionDateLabel) != null ? _e : "Resolution date" }),
17222
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("span", { className: "font-agg-bold", children: resolvedClaim.resolutionDateLabel })
17223
+ ] }) : null,
17224
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
17225
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("span", { children: (_f = extendedTradingLabels.resolvedSharesLabel) != null ? _f : "Shares" }),
17226
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("span", { className: "font-agg-bold", children: resolvedClaim.sharesLabel })
17227
+ ] }),
17228
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
17229
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("span", { children: (_g = extendedTradingLabels.resolvedTotalPayoutLabel) != null ? _g : "Total payout" }),
17230
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("span", { className: "font-agg-bold", children: resolvedClaim.totalPayoutLabel })
17231
+ ] })
17232
+ ] }),
17233
+ resolvedClaim.onClaim ? /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
17234
+ Button,
17208
17235
  {
17209
- className: cn(
17210
- "agg-order-panel-content flex flex-col items-center gap-1",
17211
- classNames == null ? void 0 : classNames.content
17212
- ),
17213
- children: [
17214
- tradingState.market ? /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(Typography, { variant: "body", children: tradingState.market.question }) : null,
17215
- tradingState.winningOutcome ? /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(Typography, { variant: "body-large-strong", children: tradingLabels.outcome(tradingState.winningOutcome.label) }) : null
17216
- ]
17236
+ size: "large",
17237
+ className: "w-full",
17238
+ onClick: resolvedClaim.onClaim,
17239
+ isLoading: resolvedClaim.isClaiming,
17240
+ disabled: resolvedClaim.isClaiming,
17241
+ children: (_h = extendedTradingLabels.claimWinnings) != null ? _h : "Claim Winnings"
17217
17242
  }
17218
- ),
17219
- resolvedClaim ? /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_jsx_runtime142.Fragment, { children: [
17220
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("div", { className: "h-px w-full bg-agg-separator" }),
17221
- /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: "flex flex-col gap-5 p-6", children: [
17222
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(Typography, { variant: "body-strong", children: (_d = extendedTradingLabels.resolvedEarningsTitle) != null ? _d : "Your Earnings" }),
17223
- /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: "flex flex-col gap-3 text-agg-sm leading-agg-5 text-agg-foreground", children: [
17224
- /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
17225
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("span", { children: (_e = extendedTradingLabels.resolvedResolutionDateLabel) != null ? _e : "Resolution date" }),
17226
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("span", { className: "font-agg-bold", children: resolvedClaim.resolutionDateLabel })
17227
- ] }),
17228
- /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
17229
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("span", { children: (_f = extendedTradingLabels.resolvedSharesLabel) != null ? _f : "Shares" }),
17230
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("span", { className: "font-agg-bold", children: resolvedClaim.sharesLabel })
17231
- ] }),
17232
- /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
17233
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("span", { children: (_g = extendedTradingLabels.resolvedTotalPayoutLabel) != null ? _g : "Total payout" }),
17234
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("span", { className: "font-agg-bold", children: resolvedClaim.totalPayoutLabel })
17235
- ] })
17236
- ] }),
17237
- resolvedClaim.onClaim ? /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
17238
- Button,
17239
- {
17240
- size: "large",
17241
- onClick: resolvedClaim.onClaim,
17242
- isLoading: resolvedClaim.isClaiming,
17243
- disabled: resolvedClaim.isClaiming,
17244
- children: (_h = extendedTradingLabels.claimWinnings) != null ? _h : "Claim Winnings"
17245
- }
17246
- ) : null
17247
- ] })
17248
- ] }) : null
17249
- ]
17250
- }
17251
- )
17243
+ ) : null
17244
+ ] })
17245
+ ] }) : null
17246
+ ] })
17252
17247
  }
17253
17248
  );
17254
17249
  };
@@ -21800,8 +21795,11 @@ var hasActivityError = (item) => {
21800
21795
  var isVisibleActivityItem = (item) => {
21801
21796
  var _a;
21802
21797
  if (item.type === "user_op" || item.type === "bridge") return false;
21803
- if (item.type === "trade" && item.status.toLowerCase() === "failed" && ((_a = parseRawMicroValue(item.filledAmountRaw)) != null ? _a : 0) <= 0)
21804
- return false;
21798
+ if (item.type === "trade") {
21799
+ if (isOpenOrderStatus(item.status)) return false;
21800
+ if (item.status.toLowerCase() === "failed" && ((_a = parseRawMicroValue(item.filledAmountRaw)) != null ? _a : 0) <= 0)
21801
+ return false;
21802
+ }
21805
21803
  return true;
21806
21804
  };
21807
21805
  var isVisibleUserProfileActivity = (activity) => activity.kind !== "bridge";
@@ -24194,7 +24192,11 @@ var WithdrawAmountStep = ({
24194
24192
  /* @__PURE__ */ (0, import_jsx_runtime165.jsxs)("div", { className: "flex flex-col gap-2", children: [
24195
24193
  /* @__PURE__ */ (0, import_jsx_runtime165.jsxs)("div", { className: "flex items-center justify-between", children: [
24196
24194
  /* @__PURE__ */ (0, import_jsx_runtime165.jsx)("p", { className: "agg-type-label-strong text-agg-foreground", children: labels.withdraw.walletFlow.amountLabel }),
24197
- /* @__PURE__ */ (0, import_jsx_runtime165.jsx)("p", { className: "agg-type-label text-agg-muted-foreground", children: balanceDisplay })
24195
+ /* @__PURE__ */ (0, import_jsx_runtime165.jsxs)("p", { className: "agg-type-label text-agg-muted-foreground", children: [
24196
+ labels.withdraw.balancePrefix,
24197
+ " ",
24198
+ balanceDisplay
24199
+ ] })
24198
24200
  ] }),
24199
24201
  /* @__PURE__ */ (0, import_jsx_runtime165.jsxs)("div", { className: "flex h-10 items-center gap-2 rounded border border-agg-separator bg-agg-secondary px-3 focus-within:border-agg-primary transition-colors", children: [
24200
24202
  /* @__PURE__ */ (0, import_jsx_runtime165.jsx)(
@@ -24637,7 +24639,7 @@ function WithdrawModalControlled({
24637
24639
  });
24638
24640
  const withdrawTokenOptions = withTokenIcons(withdrawFlow.tokenOptions);
24639
24641
  const withdrawNetworkOptions = withNetworkIcons(withdrawFlow.networkOptions);
24640
- return /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(Modal, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime167.jsxs)(Modal.Container, { maxWidth: "600px", "aria-label": "Withdraw", children: [
24642
+ return /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(Modal, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime167.jsxs)(Modal.Container, { maxWidth: step === "method" ? "600px" : "480px", "aria-label": "Withdraw", children: [
24641
24643
  step === "method" ? /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(
24642
24644
  WithdrawMethodStep,
24643
24645
  {
package/dist/index.mjs CHANGED
@@ -10,7 +10,7 @@ import {
10
10
  USER_PROFILE_TAB_POSITIONS,
11
11
  UserProfilePage,
12
12
  useHomePageModals
13
- } from "./chunk-UWAN6DRI.mjs";
13
+ } from "./chunk-QMWKXDVZ.mjs";
14
14
  import {
15
15
  EventList,
16
16
  EventListItem,
@@ -40,7 +40,7 @@ import {
40
40
  WithdrawModal,
41
41
  clearPendingCardSession,
42
42
  getPendingCardSession
43
- } from "./chunk-VTLEFAAM.mjs";
43
+ } from "./chunk-WPF47BQQ.mjs";
44
44
  import {
45
45
  DEPOSIT_MODAL_OPEN_EVENT,
46
46
  PlaceOrder,
@@ -52,7 +52,7 @@ import {
52
52
  parseVenue,
53
53
  requestAggDepositModalOpen,
54
54
  requestAggWithdrawModalOpen
55
- } from "./chunk-XCECYRTH.mjs";
55
+ } from "./chunk-3RG2K7MV.mjs";
56
56
  import {
57
57
  SETTLEMENT_SECTION_ID,
58
58
  Settlement,
package/dist/modals.js CHANGED
@@ -5823,7 +5823,11 @@ var WithdrawAmountStep = ({
5823
5823
  /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: "flex flex-col gap-2", children: [
5824
5824
  /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: "flex items-center justify-between", children: [
5825
5825
  /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("p", { className: "agg-type-label-strong text-agg-foreground", children: labels.withdraw.walletFlow.amountLabel }),
5826
- /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("p", { className: "agg-type-label text-agg-muted-foreground", children: balanceDisplay })
5826
+ /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("p", { className: "agg-type-label text-agg-muted-foreground", children: [
5827
+ labels.withdraw.balancePrefix,
5828
+ " ",
5829
+ balanceDisplay
5830
+ ] })
5827
5831
  ] }),
5828
5832
  /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: "flex h-10 items-center gap-2 rounded border border-agg-separator bg-agg-secondary px-3 focus-within:border-agg-primary transition-colors", children: [
5829
5833
  /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
@@ -6266,7 +6270,7 @@ function WithdrawModalControlled({
6266
6270
  });
6267
6271
  const withdrawTokenOptions = withTokenIcons(withdrawFlow.tokenOptions);
6268
6272
  const withdrawNetworkOptions = withNetworkIcons(withdrawFlow.networkOptions);
6269
- return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Modal, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(Modal.Container, { maxWidth: "600px", "aria-label": "Withdraw", children: [
6273
+ return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Modal, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(Modal.Container, { maxWidth: step === "method" ? "600px" : "480px", "aria-label": "Withdraw", children: [
6270
6274
  step === "method" ? /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
6271
6275
  WithdrawMethodStep,
6272
6276
  {
package/dist/modals.mjs CHANGED
@@ -13,7 +13,7 @@ import {
13
13
  WithdrawModal,
14
14
  clearPendingCardSession,
15
15
  getPendingCardSession
16
- } from "./chunk-VTLEFAAM.mjs";
16
+ } from "./chunk-WPF47BQQ.mjs";
17
17
  import {
18
18
  GeoBlockBanner
19
19
  } from "./chunk-5FXMHTVR.mjs";
package/dist/pages.js CHANGED
@@ -14107,18 +14107,19 @@ var buildLiveRouteCards = ({
14107
14107
  const parsedPrimaryVenue = parseVenue(primaryVenue);
14108
14108
  const isSplit = quoteData.fills.length > 1;
14109
14109
  const primaryWinnerVenue = quoteData.fills.length === 1 ? primaryVenue : void 0;
14110
- const isPrimaryRouteGeoBlocked = quoteData.fills.length > 0 && quoteData.fills.every((f) => geoBlockedVenues.has(f.venue));
14110
+ const isPrimaryRouteGeoBlocked = quoteData.fills.length > 0 && quoteData.fills.some((f) => geoBlockedVenues.has(f.venue));
14111
14111
  const primaryCard = primaryResult ? isPrimaryRouteGeoBlocked ? {
14112
14112
  id: "live-route",
14113
14113
  hint: labels.venueUnavailableInRegion,
14114
- kind: "venue",
14115
- label: getTradingVenueLabel(
14114
+ kind: isSplit ? "split" : "venue",
14115
+ label: isSplit ? labels.orderSplitting : getTradingVenueLabel(
14116
14116
  parsedPrimaryVenue.success ? parsedPrimaryVenue.data : void 0
14117
14117
  ),
14118
14118
  numericValue: tradeSide === "sell" ? quoteData.rawExecCost : quoteData.totalFilled,
14119
14119
  quoteData,
14120
+ rows: isSplit ? mapQuoteDataToRoutingRows(quoteData) : void 0,
14120
14121
  value: primaryResult.value,
14121
- venue: parsedPrimaryVenue.success ? parsedPrimaryVenue.data : void 0,
14122
+ venue: isSplit ? void 0 : parsedPrimaryVenue.success ? parsedPrimaryVenue.data : void 0,
14122
14123
  isUnavailable: true
14123
14124
  } : {
14124
14125
  id: "live-route",
@@ -15418,70 +15419,64 @@ var PlaceOrderResolvedView = ({
15418
15419
  classNames == null ? void 0 : classNames.root,
15419
15420
  className
15420
15421
  ),
15421
- children: /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(
15422
- "div",
15423
- {
15424
- className: cn(
15425
- "agg-order-panel-body flex flex-col items-center gap-6 p-8",
15426
- classNames == null ? void 0 : classNames.body
15422
+ children: /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)("div", { className: cn("agg-order-panel-body flex flex-col", classNames == null ? void 0 : classNames.body), children: [
15423
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)("div", { className: "flex flex-col items-center gap-6 p-8", children: [
15424
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
15425
+ "div",
15426
+ {
15427
+ className: cn(
15428
+ "flex h-15 w-15 items-center justify-center rounded-full",
15429
+ resolvedIconContainerClassName
15430
+ ),
15431
+ children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Icon, { name: resolvedIconName, className: cn("h-6 w-6", resolvedIconToneClassName) })
15432
+ }
15427
15433
  ),
15428
- children: [
15429
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
15430
- "div",
15431
- {
15432
- className: cn(
15433
- "flex h-15 w-15 items-center justify-center rounded-full",
15434
- resolvedIconContainerClassName
15435
- ),
15436
- children: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Icon, { name: resolvedIconName, className: cn("h-6 w-6", resolvedIconToneClassName) })
15437
- }
15438
- ),
15439
- /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(
15440
- "div",
15434
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(
15435
+ "div",
15436
+ {
15437
+ className: cn(
15438
+ "agg-order-panel-content flex flex-col items-center gap-1",
15439
+ classNames == null ? void 0 : classNames.content
15440
+ ),
15441
+ children: [
15442
+ tradingState.market ? /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Typography, { variant: "body", children: tradingState.market.question }) : null,
15443
+ tradingState.winningOutcome ? /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Typography, { variant: "body-large-strong", children: tradingLabels.outcome(tradingState.winningOutcome.label) }) : null
15444
+ ]
15445
+ }
15446
+ )
15447
+ ] }),
15448
+ resolvedClaim ? /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_jsx_runtime135.Fragment, { children: [
15449
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("div", { className: "h-px w-full bg-agg-separator" }),
15450
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)("div", { className: "flex w-full flex-col gap-5 p-6", children: [
15451
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Typography, { variant: "body-strong", className: "text-center", children: (_d = extendedTradingLabels.resolvedEarningsTitle) != null ? _d : "Your Earnings" }),
15452
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)("div", { className: "flex flex-col gap-3 text-agg-sm leading-agg-5 text-agg-foreground", children: [
15453
+ resolvedClaim.resolutionDateLabel ? /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
15454
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("span", { children: (_e = extendedTradingLabels.resolvedResolutionDateLabel) != null ? _e : "Resolution date" }),
15455
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("span", { className: "font-agg-bold", children: resolvedClaim.resolutionDateLabel })
15456
+ ] }) : null,
15457
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
15458
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("span", { children: (_f = extendedTradingLabels.resolvedSharesLabel) != null ? _f : "Shares" }),
15459
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("span", { className: "font-agg-bold", children: resolvedClaim.sharesLabel })
15460
+ ] }),
15461
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
15462
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("span", { children: (_g = extendedTradingLabels.resolvedTotalPayoutLabel) != null ? _g : "Total payout" }),
15463
+ /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("span", { className: "font-agg-bold", children: resolvedClaim.totalPayoutLabel })
15464
+ ] })
15465
+ ] }),
15466
+ resolvedClaim.onClaim ? /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
15467
+ Button,
15441
15468
  {
15442
- className: cn(
15443
- "agg-order-panel-content flex flex-col items-center gap-1",
15444
- classNames == null ? void 0 : classNames.content
15445
- ),
15446
- children: [
15447
- tradingState.market ? /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Typography, { variant: "body", children: tradingState.market.question }) : null,
15448
- tradingState.winningOutcome ? /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Typography, { variant: "body-large-strong", children: tradingLabels.outcome(tradingState.winningOutcome.label) }) : null
15449
- ]
15469
+ size: "large",
15470
+ className: "w-full",
15471
+ onClick: resolvedClaim.onClaim,
15472
+ isLoading: resolvedClaim.isClaiming,
15473
+ disabled: resolvedClaim.isClaiming,
15474
+ children: (_h = extendedTradingLabels.claimWinnings) != null ? _h : "Claim Winnings"
15450
15475
  }
15451
- ),
15452
- resolvedClaim ? /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_jsx_runtime135.Fragment, { children: [
15453
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("div", { className: "h-px w-full bg-agg-separator" }),
15454
- /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)("div", { className: "flex flex-col gap-5 p-6", children: [
15455
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Typography, { variant: "body-strong", children: (_d = extendedTradingLabels.resolvedEarningsTitle) != null ? _d : "Your Earnings" }),
15456
- /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)("div", { className: "flex flex-col gap-3 text-agg-sm leading-agg-5 text-agg-foreground", children: [
15457
- /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
15458
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("span", { children: (_e = extendedTradingLabels.resolvedResolutionDateLabel) != null ? _e : "Resolution date" }),
15459
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("span", { className: "font-agg-bold", children: resolvedClaim.resolutionDateLabel })
15460
- ] }),
15461
- /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
15462
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("span", { children: (_f = extendedTradingLabels.resolvedSharesLabel) != null ? _f : "Shares" }),
15463
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("span", { className: "font-agg-bold", children: resolvedClaim.sharesLabel })
15464
- ] }),
15465
- /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
15466
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("span", { children: (_g = extendedTradingLabels.resolvedTotalPayoutLabel) != null ? _g : "Total payout" }),
15467
- /* @__PURE__ */ (0, import_jsx_runtime135.jsx)("span", { className: "font-agg-bold", children: resolvedClaim.totalPayoutLabel })
15468
- ] })
15469
- ] }),
15470
- resolvedClaim.onClaim ? /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
15471
- Button,
15472
- {
15473
- size: "large",
15474
- onClick: resolvedClaim.onClaim,
15475
- isLoading: resolvedClaim.isClaiming,
15476
- disabled: resolvedClaim.isClaiming,
15477
- children: (_h = extendedTradingLabels.claimWinnings) != null ? _h : "Claim Winnings"
15478
- }
15479
- ) : null
15480
- ] })
15481
- ] }) : null
15482
- ]
15483
- }
15484
- )
15476
+ ) : null
15477
+ ] })
15478
+ ] }) : null
15479
+ ] })
15485
15480
  }
15486
15481
  );
15487
15482
  };
@@ -20089,8 +20084,11 @@ var hasActivityError = (item) => {
20089
20084
  var isVisibleActivityItem = (item) => {
20090
20085
  var _a;
20091
20086
  if (item.type === "user_op" || item.type === "bridge") return false;
20092
- if (item.type === "trade" && item.status.toLowerCase() === "failed" && ((_a = parseRawMicroValue(item.filledAmountRaw)) != null ? _a : 0) <= 0)
20093
- return false;
20087
+ if (item.type === "trade") {
20088
+ if (isOpenOrderStatus(item.status)) return false;
20089
+ if (item.status.toLowerCase() === "failed" && ((_a = parseRawMicroValue(item.filledAmountRaw)) != null ? _a : 0) <= 0)
20090
+ return false;
20091
+ }
20094
20092
  return true;
20095
20093
  };
20096
20094
  var isVisibleUserProfileActivity = (activity) => activity.kind !== "bridge";
package/dist/pages.mjs CHANGED
@@ -7,14 +7,14 @@ import {
7
7
  USER_PROFILE_TAB_POSITIONS,
8
8
  UserProfilePage,
9
9
  useHomePageModals
10
- } from "./chunk-UWAN6DRI.mjs";
10
+ } from "./chunk-QMWKXDVZ.mjs";
11
11
  import "./chunk-E45WOOMN.mjs";
12
12
  import {
13
13
  DEPOSIT_MODAL_OPEN_EVENT,
14
14
  WITHDRAW_MODAL_OPEN_EVENT,
15
15
  requestAggDepositModalOpen,
16
16
  requestAggWithdrawModalOpen
17
- } from "./chunk-XCECYRTH.mjs";
17
+ } from "./chunk-3RG2K7MV.mjs";
18
18
  import "./chunk-TBKDLNOE.mjs";
19
19
  import "./chunk-5FXMHTVR.mjs";
20
20
  import "./chunk-34L7ZKJW.mjs";
package/dist/trading.js CHANGED
@@ -6042,18 +6042,19 @@ var buildLiveRouteCards = ({
6042
6042
  const parsedPrimaryVenue = parseVenue(primaryVenue);
6043
6043
  const isSplit = quoteData.fills.length > 1;
6044
6044
  const primaryWinnerVenue = quoteData.fills.length === 1 ? primaryVenue : void 0;
6045
- const isPrimaryRouteGeoBlocked = quoteData.fills.length > 0 && quoteData.fills.every((f) => geoBlockedVenues.has(f.venue));
6045
+ const isPrimaryRouteGeoBlocked = quoteData.fills.length > 0 && quoteData.fills.some((f) => geoBlockedVenues.has(f.venue));
6046
6046
  const primaryCard = primaryResult ? isPrimaryRouteGeoBlocked ? {
6047
6047
  id: "live-route",
6048
6048
  hint: labels.venueUnavailableInRegion,
6049
- kind: "venue",
6050
- label: getTradingVenueLabel(
6049
+ kind: isSplit ? "split" : "venue",
6050
+ label: isSplit ? labels.orderSplitting : getTradingVenueLabel(
6051
6051
  parsedPrimaryVenue.success ? parsedPrimaryVenue.data : void 0
6052
6052
  ),
6053
6053
  numericValue: tradeSide === "sell" ? quoteData.rawExecCost : quoteData.totalFilled,
6054
6054
  quoteData,
6055
+ rows: isSplit ? mapQuoteDataToRoutingRows(quoteData) : void 0,
6055
6056
  value: primaryResult.value,
6056
- venue: parsedPrimaryVenue.success ? parsedPrimaryVenue.data : void 0,
6057
+ venue: isSplit ? void 0 : parsedPrimaryVenue.success ? parsedPrimaryVenue.data : void 0,
6057
6058
  isUnavailable: true
6058
6059
  } : {
6059
6060
  id: "live-route",
@@ -7353,70 +7354,64 @@ var PlaceOrderResolvedView = ({
7353
7354
  classNames == null ? void 0 : classNames.root,
7354
7355
  className
7355
7356
  ),
7356
- children: /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)(
7357
- "div",
7358
- {
7359
- className: cn(
7360
- "agg-order-panel-body flex flex-col items-center gap-6 p-8",
7361
- classNames == null ? void 0 : classNames.body
7357
+ children: /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)("div", { className: cn("agg-order-panel-body flex flex-col", classNames == null ? void 0 : classNames.body), children: [
7358
+ /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)("div", { className: "flex flex-col items-center gap-6 p-8", children: [
7359
+ /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
7360
+ "div",
7361
+ {
7362
+ className: cn(
7363
+ "flex h-15 w-15 items-center justify-center rounded-full",
7364
+ resolvedIconContainerClassName
7365
+ ),
7366
+ children: /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(Icon, { name: resolvedIconName, className: cn("h-6 w-6", resolvedIconToneClassName) })
7367
+ }
7362
7368
  ),
7363
- children: [
7364
- /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
7365
- "div",
7366
- {
7367
- className: cn(
7368
- "flex h-15 w-15 items-center justify-center rounded-full",
7369
- resolvedIconContainerClassName
7370
- ),
7371
- children: /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(Icon, { name: resolvedIconName, className: cn("h-6 w-6", resolvedIconToneClassName) })
7372
- }
7373
- ),
7374
- /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)(
7375
- "div",
7369
+ /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)(
7370
+ "div",
7371
+ {
7372
+ className: cn(
7373
+ "agg-order-panel-content flex flex-col items-center gap-1",
7374
+ classNames == null ? void 0 : classNames.content
7375
+ ),
7376
+ children: [
7377
+ tradingState.market ? /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(Typography, { variant: "body", children: tradingState.market.question }) : null,
7378
+ tradingState.winningOutcome ? /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(Typography, { variant: "body-large-strong", children: tradingLabels.outcome(tradingState.winningOutcome.label) }) : null
7379
+ ]
7380
+ }
7381
+ )
7382
+ ] }),
7383
+ resolvedClaim ? /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)(import_jsx_runtime113.Fragment, { children: [
7384
+ /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("div", { className: "h-px w-full bg-agg-separator" }),
7385
+ /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)("div", { className: "flex w-full flex-col gap-5 p-6", children: [
7386
+ /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(Typography, { variant: "body-strong", className: "text-center", children: (_d = extendedTradingLabels.resolvedEarningsTitle) != null ? _d : "Your Earnings" }),
7387
+ /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)("div", { className: "flex flex-col gap-3 text-agg-sm leading-agg-5 text-agg-foreground", children: [
7388
+ resolvedClaim.resolutionDateLabel ? /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
7389
+ /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("span", { children: (_e = extendedTradingLabels.resolvedResolutionDateLabel) != null ? _e : "Resolution date" }),
7390
+ /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("span", { className: "font-agg-bold", children: resolvedClaim.resolutionDateLabel })
7391
+ ] }) : null,
7392
+ /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
7393
+ /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("span", { children: (_f = extendedTradingLabels.resolvedSharesLabel) != null ? _f : "Shares" }),
7394
+ /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("span", { className: "font-agg-bold", children: resolvedClaim.sharesLabel })
7395
+ ] }),
7396
+ /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
7397
+ /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("span", { children: (_g = extendedTradingLabels.resolvedTotalPayoutLabel) != null ? _g : "Total payout" }),
7398
+ /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("span", { className: "font-agg-bold", children: resolvedClaim.totalPayoutLabel })
7399
+ ] })
7400
+ ] }),
7401
+ resolvedClaim.onClaim ? /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
7402
+ Button,
7376
7403
  {
7377
- className: cn(
7378
- "agg-order-panel-content flex flex-col items-center gap-1",
7379
- classNames == null ? void 0 : classNames.content
7380
- ),
7381
- children: [
7382
- tradingState.market ? /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(Typography, { variant: "body", children: tradingState.market.question }) : null,
7383
- tradingState.winningOutcome ? /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(Typography, { variant: "body-large-strong", children: tradingLabels.outcome(tradingState.winningOutcome.label) }) : null
7384
- ]
7404
+ size: "large",
7405
+ className: "w-full",
7406
+ onClick: resolvedClaim.onClaim,
7407
+ isLoading: resolvedClaim.isClaiming,
7408
+ disabled: resolvedClaim.isClaiming,
7409
+ children: (_h = extendedTradingLabels.claimWinnings) != null ? _h : "Claim Winnings"
7385
7410
  }
7386
- ),
7387
- resolvedClaim ? /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)(import_jsx_runtime113.Fragment, { children: [
7388
- /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("div", { className: "h-px w-full bg-agg-separator" }),
7389
- /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)("div", { className: "flex flex-col gap-5 p-6", children: [
7390
- /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(Typography, { variant: "body-strong", children: (_d = extendedTradingLabels.resolvedEarningsTitle) != null ? _d : "Your Earnings" }),
7391
- /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)("div", { className: "flex flex-col gap-3 text-agg-sm leading-agg-5 text-agg-foreground", children: [
7392
- /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
7393
- /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("span", { children: (_e = extendedTradingLabels.resolvedResolutionDateLabel) != null ? _e : "Resolution date" }),
7394
- /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("span", { className: "font-agg-bold", children: resolvedClaim.resolutionDateLabel })
7395
- ] }),
7396
- /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
7397
- /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("span", { children: (_f = extendedTradingLabels.resolvedSharesLabel) != null ? _f : "Shares" }),
7398
- /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("span", { className: "font-agg-bold", children: resolvedClaim.sharesLabel })
7399
- ] }),
7400
- /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
7401
- /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("span", { children: (_g = extendedTradingLabels.resolvedTotalPayoutLabel) != null ? _g : "Total payout" }),
7402
- /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("span", { className: "font-agg-bold", children: resolvedClaim.totalPayoutLabel })
7403
- ] })
7404
- ] }),
7405
- resolvedClaim.onClaim ? /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
7406
- Button,
7407
- {
7408
- size: "large",
7409
- onClick: resolvedClaim.onClaim,
7410
- isLoading: resolvedClaim.isClaiming,
7411
- disabled: resolvedClaim.isClaiming,
7412
- children: (_h = extendedTradingLabels.claimWinnings) != null ? _h : "Claim Winnings"
7413
- }
7414
- ) : null
7415
- ] })
7416
- ] }) : null
7417
- ]
7418
- }
7419
- )
7411
+ ) : null
7412
+ ] })
7413
+ ] }) : null
7414
+ ] })
7420
7415
  }
7421
7416
  );
7422
7417
  };
package/dist/trading.mjs CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  SettlementDetails,
7
7
  parseAmount,
8
8
  parseVenue
9
- } from "./chunk-XCECYRTH.mjs";
9
+ } from "./chunk-3RG2K7MV.mjs";
10
10
  import {
11
11
  SETTLEMENT_SECTION_ID,
12
12
  Settlement,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agg-build/ui",
3
- "version": "1.2.5",
3
+ "version": "1.2.7",
4
4
  "description": "Pre-built React component library for the AGG prediction market aggregator. Tailwind-based, themeable, with primitives, event surfaces, trading flows, full pages, and modals.",
5
5
  "sideEffects": false,
6
6
  "license": "MIT",