@agg-build/ui 4.17.0 → 4.17.2
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/{chunk-M6U2RKBD.mjs → chunk-3Y2GCNVL.mjs} +100 -52
- package/dist/{chunk-D2BTU7QI.mjs → chunk-7E4UXCEX.mjs} +223 -169
- package/dist/{chunk-QGONLJLE.mjs → chunk-B5ALKYD5.mjs} +210 -184
- package/dist/{chunk-RR44PSKH.mjs → chunk-BBDFSTIA.mjs} +3 -1
- package/dist/{chunk-5SCDQSNA.mjs → chunk-JI5KV4QI.mjs} +2 -2
- package/dist/{chunk-NIRCF54M.mjs → chunk-RZLM3M5R.mjs} +2 -2
- package/dist/{chunk-HFMKCV4L.mjs → chunk-TK62UB5F.mjs} +27 -16
- package/dist/events.js +29 -16
- package/dist/events.mjs +3 -3
- package/dist/index.js +1033 -920
- package/dist/index.mjs +9 -38
- package/dist/modals.js +212 -184
- package/dist/modals.mjs +3 -3
- package/dist/pages.js +814 -674
- package/dist/pages.mjs +6 -6
- package/dist/primitives.js +3 -1
- package/dist/primitives.mjs +1 -1
- package/dist/styles.css +1 -1
- package/dist/tailwind.css +1 -1
- package/dist/trading.js +535 -442
- package/dist/trading.mjs +4 -4
- package/dist/types/auth/connect-button-view/connect-button-view.types.d.mts +0 -2
- package/dist/types/auth/connect-button-view/connect-button-view.types.d.ts +0 -2
- package/dist/types/auth/connect-button-view/index.d.mts +1 -1
- package/dist/types/auth/connect-button-view/index.d.ts +1 -1
- package/dist/types/pages/user-profile/components/available-balance-card.d.mts +3 -1
- package/dist/types/pages/user-profile/components/available-balance-card.d.ts +3 -1
- package/dist/types/pages/user-profile/user-profile.types.d.mts +8 -0
- package/dist/types/pages/user-profile/user-profile.types.d.ts +8 -0
- package/dist/types/primitives/modal/index.d.mts +1 -1
- package/dist/types/primitives/modal/index.d.ts +1 -1
- package/dist/types/primitives/modal/modal.types.d.mts +6 -0
- package/dist/types/primitives/modal/modal.types.d.ts +6 -0
- package/dist/types/trading/place-order/index.place-order.utils.d.mts +12 -1
- package/dist/types/trading/place-order/index.place-order.utils.d.ts +12 -1
- package/package.json +3 -3
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
isErrorWithStatus,
|
|
13
13
|
useEventListTabs,
|
|
14
14
|
useEventListTabsHeaderOverflow
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-RZLM3M5R.mjs";
|
|
16
16
|
import {
|
|
17
17
|
DEPOSIT_MODAL_OPEN_EVENT,
|
|
18
18
|
PlaceOrder,
|
|
@@ -21,12 +21,12 @@ import {
|
|
|
21
21
|
formatChainIdLabel,
|
|
22
22
|
useClaimWinnings,
|
|
23
23
|
useResolvedMarketClaim
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-7E4UXCEX.mjs";
|
|
25
25
|
import {
|
|
26
26
|
getDisplayOutcomePrice,
|
|
27
27
|
resolveHeaderOutcomeItems,
|
|
28
28
|
resolveMarketFromVenueMarkets
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-TK62UB5F.mjs";
|
|
30
30
|
import {
|
|
31
31
|
AggErrorBoundary,
|
|
32
32
|
Button,
|
|
@@ -62,7 +62,7 @@ import {
|
|
|
62
62
|
skeletonViews,
|
|
63
63
|
sortCategoriesForNavigation,
|
|
64
64
|
useOptionalToast
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-BBDFSTIA.mjs";
|
|
66
66
|
|
|
67
67
|
// src/pages/home/index.tsx
|
|
68
68
|
import {
|
|
@@ -3798,7 +3798,8 @@ import {
|
|
|
3798
3798
|
useLabels as useLabels13,
|
|
3799
3799
|
useSdkUiConfig as useSdkUiConfig4,
|
|
3800
3800
|
useUserActivity,
|
|
3801
|
-
useResolvedExecutionMode as useResolvedExecutionMode4
|
|
3801
|
+
useResolvedExecutionMode as useResolvedExecutionMode4,
|
|
3802
|
+
useVenueMarketMidpoints as useVenueMarketMidpoints2
|
|
3802
3803
|
} from "@agg-build/hooks";
|
|
3803
3804
|
import { Venue as Venue3 } from "@agg-build/sdk";
|
|
3804
3805
|
import dayjs from "dayjs";
|
|
@@ -3850,6 +3851,7 @@ var AvailableBalanceCard = ({
|
|
|
3850
3851
|
label,
|
|
3851
3852
|
valueLabel,
|
|
3852
3853
|
reservedValueLabel,
|
|
3854
|
+
kalshiValueLabel,
|
|
3853
3855
|
chains,
|
|
3854
3856
|
isLoading = false,
|
|
3855
3857
|
className,
|
|
@@ -4002,6 +4004,13 @@ var AvailableBalanceCard = ({
|
|
|
4002
4004
|
}
|
|
4003
4005
|
)
|
|
4004
4006
|
] }),
|
|
4007
|
+
kalshiValueLabel !== void 0 ? /* @__PURE__ */ jsxs7("div", { className: "agg-balance-kalshi flex items-center justify-between gap-3", children: [
|
|
4008
|
+
/* @__PURE__ */ jsx8("div", { className: "font-agg-sans text-agg-base leading-6 font-agg-bold text-agg-foreground", children: isLoading ? /* @__PURE__ */ jsx8("div", { role: "status", "aria-label": "Loading Kalshi balance", children: /* @__PURE__ */ jsx8(SkeletonBlock, { className: "h-6 w-16 rounded-agg-sm" }) }) : kalshiValueLabel }),
|
|
4009
|
+
/* @__PURE__ */ jsxs7("span", { className: "flex h-5 shrink-0 items-center gap-1 rounded-[4px] bg-agg-secondary-hover px-1.5", children: [
|
|
4010
|
+
/* @__PURE__ */ jsx8(VenueLogo, { venue: "kalshi", size: "small", className: "size-3" }),
|
|
4011
|
+
/* @__PURE__ */ jsx8("span", { className: "font-agg-sans text-agg-xs leading-agg-4 font-agg-normal text-agg-muted-foreground", children: labels.venues.kalshi })
|
|
4012
|
+
] })
|
|
4013
|
+
] }) : null,
|
|
4005
4014
|
!isLoading && reservedValueLabel ? /* @__PURE__ */ jsx8("p", { className: "font-agg-sans text-agg-xs leading-agg-4 text-agg-muted-foreground", children: balanceLabels.reservedForOpenOrders(reservedValueLabel) }) : null
|
|
4006
4015
|
]
|
|
4007
4016
|
}
|
|
@@ -4937,6 +4946,7 @@ var resolvePositionStatus = (position) => {
|
|
|
4937
4946
|
return "open";
|
|
4938
4947
|
};
|
|
4939
4948
|
var resolvePositionBucket = (position) => {
|
|
4949
|
+
if (position.status === "closed") return "closed";
|
|
4940
4950
|
const status = resolvePositionStatus(position);
|
|
4941
4951
|
if (status === "won_unclaimed") return "active";
|
|
4942
4952
|
if (status === "open") return "active";
|
|
@@ -5713,6 +5723,18 @@ var OpenOrderRow = ({
|
|
|
5713
5723
|
};
|
|
5714
5724
|
const canCancel = canCancelOpenOrder(order);
|
|
5715
5725
|
const isPending = isPendingOpenOrder(order);
|
|
5726
|
+
const sideLabel = order.side === "buy" ? labels.buy : order.side === "sell" ? labels.sell : void 0;
|
|
5727
|
+
const outcomePillLabel = sideLabel ? `${sideLabel} ${order.outcomeLabel}` : order.outcomeLabel;
|
|
5728
|
+
const currentPriceLabel = order.currentPriceLabel ? `${labels.nowPrefix} ${order.currentPriceLabel}` : void 0;
|
|
5729
|
+
const mobileStats = [
|
|
5730
|
+
__spreadValues({
|
|
5731
|
+
label: resolvedLimitPriceHeader,
|
|
5732
|
+
value: (_a = order.limitPriceLabel) != null ? _a : "\u2014"
|
|
5733
|
+
}, currentPriceLabel ? { subValue: currentPriceLabel } : {}),
|
|
5734
|
+
{ label: resolvedFilledHeader, value: order.filledLabel },
|
|
5735
|
+
{ label: resolvedTotalHeader, value: order.valueLabel },
|
|
5736
|
+
{ label: resolvedExpirationHeader, value: (_b = order.expirationLabel) != null ? _b : "\u2014" }
|
|
5737
|
+
];
|
|
5716
5738
|
const Wrapper = href ? "a" : "div";
|
|
5717
5739
|
const wrapperProps = href ? {
|
|
5718
5740
|
href,
|
|
@@ -5751,22 +5773,23 @@ var OpenOrderRow = ({
|
|
|
5751
5773
|
) }),
|
|
5752
5774
|
/* @__PURE__ */ jsxs12("div", { className: "flex min-w-0 flex-1 flex-col justify-center gap-2", children: [
|
|
5753
5775
|
/* @__PURE__ */ jsx13("p", { className: "agg-open-order-market min-w-0 overflow-hidden font-agg-sans text-agg-sm leading-agg-5 font-agg-bold text-agg-foreground [display:-webkit-box] [-webkit-line-clamp:2] [-webkit-box-orient:vertical] lg:text-agg-base lg:leading-agg-6 lg:whitespace-nowrap lg:text-ellipsis lg:[-webkit-line-clamp:1] lg:[display:block]", children: order.title }),
|
|
5754
|
-
/* @__PURE__ */ jsx13("span", { className: "agg-open-order-outcome hidden lg:inline-flex w-fit items-center justify-center rounded-full bg-agg-secondary-hover px-4 py-[6px]", children: /* @__PURE__ */ jsx13("span", { className: "font-agg-sans text-agg-sm leading-agg-5 font-agg-normal text-agg-foreground whitespace-nowrap", children:
|
|
5776
|
+
/* @__PURE__ */ jsx13("span", { className: "agg-open-order-outcome hidden lg:inline-flex w-fit items-center justify-center rounded-full bg-agg-secondary-hover px-4 py-[6px]", children: /* @__PURE__ */ jsx13("span", { className: "font-agg-sans text-agg-sm leading-agg-5 font-agg-normal text-agg-foreground whitespace-nowrap", children: outcomePillLabel }) })
|
|
5755
5777
|
] })
|
|
5756
5778
|
] }),
|
|
5757
5779
|
/* @__PURE__ */ jsxs12("div", { className: "flex w-full flex-wrap items-center gap-x-4 gap-y-2 lg:hidden", children: [
|
|
5758
|
-
/* @__PURE__ */ jsx13("span", { className: "agg-open-order-outcome inline-flex shrink-0 items-center justify-center rounded-full bg-agg-secondary-hover px-4 py-[6px]", children: /* @__PURE__ */ jsx13("span", { className: "font-agg-sans text-agg-sm leading-agg-5 font-agg-normal text-agg-foreground whitespace-nowrap", children:
|
|
5759
|
-
[
|
|
5760
|
-
|
|
5761
|
-
|
|
5762
|
-
|
|
5763
|
-
|
|
5764
|
-
|
|
5765
|
-
/* @__PURE__ */ jsx13("span", { className: "font-agg-sans text-agg-lg leading-agg-7 font-agg-normal text-agg-foreground", children: value }),
|
|
5766
|
-
/* @__PURE__ */ jsx13("span", { className: "font-agg-sans text-[10px] leading-[14px] font-agg-bold uppercase text-agg-muted-foreground", children: label })
|
|
5780
|
+
/* @__PURE__ */ jsx13("span", { className: "agg-open-order-outcome inline-flex shrink-0 items-center justify-center rounded-full bg-agg-secondary-hover px-4 py-[6px]", children: /* @__PURE__ */ jsx13("span", { className: "font-agg-sans text-agg-sm leading-agg-5 font-agg-normal text-agg-foreground whitespace-nowrap", children: outcomePillLabel }) }),
|
|
5781
|
+
mobileStats.map(({ label, value, subValue }) => /* @__PURE__ */ jsxs12("div", { className: "flex flex-col gap-0.5", children: [
|
|
5782
|
+
/* @__PURE__ */ jsxs12("div", { className: "flex items-baseline gap-1.5 whitespace-nowrap", children: [
|
|
5783
|
+
/* @__PURE__ */ jsx13("span", { className: "font-agg-sans text-agg-lg leading-agg-7 font-agg-normal text-agg-foreground", children: value }),
|
|
5784
|
+
/* @__PURE__ */ jsx13("span", { className: "font-agg-sans text-[10px] leading-[14px] font-agg-bold uppercase text-agg-muted-foreground", children: label })
|
|
5785
|
+
] }),
|
|
5786
|
+
subValue ? /* @__PURE__ */ jsx13("span", { className: "agg-open-order-current-price font-agg-sans text-agg-sm leading-agg-5 font-agg-normal whitespace-nowrap text-agg-foreground", children: subValue }) : null
|
|
5767
5787
|
] }, label))
|
|
5768
5788
|
] }),
|
|
5769
|
-
/* @__PURE__ */
|
|
5789
|
+
/* @__PURE__ */ jsxs12("div", { className: "agg-open-order-limit-price hidden w-[120px] shrink-0 flex-col justify-center gap-0.5 lg:flex", children: [
|
|
5790
|
+
/* @__PURE__ */ jsx13("p", { className: "agg-type-body-strong text-agg-foreground", children: (_c = order.limitPriceLabel) != null ? _c : "\u2014" }),
|
|
5791
|
+
currentPriceLabel ? /* @__PURE__ */ jsx13("p", { className: "agg-open-order-current-price font-agg-sans text-agg-sm leading-agg-5 font-agg-normal text-agg-foreground", children: currentPriceLabel }) : null
|
|
5792
|
+
] }),
|
|
5770
5793
|
/* @__PURE__ */ jsx13("p", { className: "agg-open-order-filled hidden w-[120px] shrink-0 agg-type-body-strong text-agg-foreground lg:block", children: order.filledLabel }),
|
|
5771
5794
|
/* @__PURE__ */ jsx13("p", { className: "agg-open-order-value hidden w-[120px] shrink-0 agg-type-body-strong text-agg-foreground lg:block", children: order.valueLabel }),
|
|
5772
5795
|
/* @__PURE__ */ jsx13("p", { className: "agg-open-order-expiration hidden w-[140px] shrink-0 agg-type-label text-agg-foreground lg:block", children: (_d = order.expirationLabel) != null ? _d : "\u2014" }),
|
|
@@ -5857,8 +5880,8 @@ var ResultBadge = ({
|
|
|
5857
5880
|
status,
|
|
5858
5881
|
labels
|
|
5859
5882
|
}) => {
|
|
5860
|
-
|
|
5861
|
-
|
|
5883
|
+
const isWon = status === "won_claimed" || status === "won_unclaimed";
|
|
5884
|
+
if (!isWon && status !== "lost" && status !== "sold") return null;
|
|
5862
5885
|
const isSold = status === "sold";
|
|
5863
5886
|
return /* @__PURE__ */ jsxs13(
|
|
5864
5887
|
"span",
|
|
@@ -7080,11 +7103,13 @@ var formatScaledNumberTwoDecimals = (value) => {
|
|
|
7080
7103
|
if (parsed == null) return "0.00";
|
|
7081
7104
|
return twoDecimalNumberFormatter.format(parsed);
|
|
7082
7105
|
};
|
|
7106
|
+
var formatPriceCentsLabel = (value) => `${limitPriceCentsFormatter.format(value * 100)}\xA2`;
|
|
7083
7107
|
var formatLimitPriceLabel = (value) => {
|
|
7084
7108
|
const parsed = parseRawMicroValue(value);
|
|
7085
7109
|
if (parsed == null) return void 0;
|
|
7086
|
-
return
|
|
7110
|
+
return formatPriceCentsLabel(parsed);
|
|
7087
7111
|
};
|
|
7112
|
+
var normalizeOutcomeMatchLabel = (value) => typeof value === "string" ? value.trim().toLowerCase() : "";
|
|
7088
7113
|
var formatOpenOrderExpirationLabel = ({
|
|
7089
7114
|
timeInForce,
|
|
7090
7115
|
expiresAt,
|
|
@@ -7972,8 +7997,7 @@ var UserProfilePage = ({
|
|
|
7972
7997
|
};
|
|
7973
7998
|
});
|
|
7974
7999
|
}, [activities, activityQuery.activities, isHydrated, labels, ordersQuery.orders]);
|
|
7975
|
-
const
|
|
7976
|
-
if (openOrders) return openOrders.filter(isUserProfileLimitOrder);
|
|
8000
|
+
const openOrderRows = useMemo8(() => {
|
|
7977
8001
|
const orderRowsById = /* @__PURE__ */ new Map();
|
|
7978
8002
|
for (const query of openOrderQueries) {
|
|
7979
8003
|
for (const order of query.orders) {
|
|
@@ -7984,7 +8008,47 @@ var UserProfilePage = ({
|
|
|
7984
8008
|
(order) => isOpenOrderStatus(order.status) && isExecutionLimitOrder(order)
|
|
7985
8009
|
).sort(
|
|
7986
8010
|
(a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime()
|
|
7987
|
-
)
|
|
8011
|
+
);
|
|
8012
|
+
}, [openOrderQueries]);
|
|
8013
|
+
const openOrderVenueMarketIds = useMemo8(
|
|
8014
|
+
() => openOrderRows.map((order) => {
|
|
8015
|
+
var _a2;
|
|
8016
|
+
return (_a2 = order.venueMarket) == null ? void 0 : _a2.id;
|
|
8017
|
+
}).filter((venueMarketId) => Boolean(venueMarketId)),
|
|
8018
|
+
[openOrderRows]
|
|
8019
|
+
);
|
|
8020
|
+
const openOrderMidpointsQuery = useVenueMarketMidpoints2({
|
|
8021
|
+
venueMarketIds: openOrderVenueMarketIds,
|
|
8022
|
+
enabled: !openOrders && openOrderVenueMarketIds.length > 0
|
|
8023
|
+
});
|
|
8024
|
+
const openOrderMidpointRows = openOrderMidpointsQuery.midpointRows;
|
|
8025
|
+
const openOrderCurrentPriceLabels = useMemo8(() => {
|
|
8026
|
+
var _a2, _b2, _c2, _d;
|
|
8027
|
+
const midpointRowsByVenueMarketId = new Map(
|
|
8028
|
+
openOrderMidpointRows.map((row) => [row.venueMarketId, row])
|
|
8029
|
+
);
|
|
8030
|
+
const labelsByOrderId = /* @__PURE__ */ new Map();
|
|
8031
|
+
for (const order of openOrderRows) {
|
|
8032
|
+
const venueMarketId = (_a2 = order.venueMarket) == null ? void 0 : _a2.id;
|
|
8033
|
+
if (!venueMarketId) continue;
|
|
8034
|
+
const midpointRow = midpointRowsByVenueMarketId.get(venueMarketId);
|
|
8035
|
+
if (!midpointRow) continue;
|
|
8036
|
+
const orderOutcomeLabels = [
|
|
8037
|
+
normalizeOutcomeMatchLabel((_b2 = order.venueMarketOutcome) == null ? void 0 : _b2.label),
|
|
8038
|
+
normalizeOutcomeMatchLabel((_c2 = order.venueMarketOutcome) == null ? void 0 : _c2.title)
|
|
8039
|
+
].filter(Boolean);
|
|
8040
|
+
if (orderOutcomeLabels.length === 0) continue;
|
|
8041
|
+
const outcomeMidpoint = (_d = midpointRow.outcomes) == null ? void 0 : _d.find(
|
|
8042
|
+
(outcome) => orderOutcomeLabels.includes(normalizeOutcomeMatchLabel(outcome.label))
|
|
8043
|
+
);
|
|
8044
|
+
if ((outcomeMidpoint == null ? void 0 : outcomeMidpoint.midpoint) == null) continue;
|
|
8045
|
+
labelsByOrderId.set(order.id, formatPriceCentsLabel(outcomeMidpoint.midpoint));
|
|
8046
|
+
}
|
|
8047
|
+
return labelsByOrderId;
|
|
8048
|
+
}, [openOrderMidpointRows, openOrderRows]);
|
|
8049
|
+
const resolvedOpenOrders = useMemo8(() => {
|
|
8050
|
+
if (openOrders) return openOrders.filter(isUserProfileLimitOrder);
|
|
8051
|
+
return openOrderRows.map((order) => {
|
|
7988
8052
|
var _a2, _b2, _c2, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
7989
8053
|
const isLimitOrder = isExecutionLimitOrder(order);
|
|
7990
8054
|
const filledRaw = isLimitOrder ? order.filledSizeRaw : order.filledAmountRaw;
|
|
@@ -7997,15 +8061,17 @@ var UserProfilePage = ({
|
|
|
7997
8061
|
goodTilCanceledLabel: labels.userProfile.openOrders.goodTilCanceled,
|
|
7998
8062
|
expiredLabel: labels.userProfile.openOrders.expired
|
|
7999
8063
|
});
|
|
8000
|
-
|
|
8064
|
+
const currentPriceLabel = openOrderCurrentPriceLabels.get(order.id);
|
|
8065
|
+
return __spreadProps(__spreadValues(__spreadProps(__spreadValues(__spreadValues(__spreadProps(__spreadValues({
|
|
8001
8066
|
id: order.id,
|
|
8002
8067
|
eventId: (_c2 = (_b2 = order.venueMarket) == null ? void 0 : _b2.venueEventId) != null ? _c2 : void 0,
|
|
8003
8068
|
marketId: (_e = (_d = order.venueMarket) == null ? void 0 : _d.id) != null ? _e : void 0,
|
|
8004
8069
|
thumbnailSrc: (_g = (_f = order.venueMarket) == null ? void 0 : _f.image) != null ? _g : fallbackThumbnailSrc,
|
|
8005
8070
|
title: ((_h = order.venueMarket) == null ? void 0 : _h.question) || "Market",
|
|
8006
|
-
outcomeLabel: ((_i = order.venueMarketOutcome) == null ? void 0 : _i.title) || ((_j = order.venueMarketOutcome) == null ? void 0 : _j.label) || "Outcome"
|
|
8071
|
+
outcomeLabel: ((_i = order.venueMarketOutcome) == null ? void 0 : _i.title) || ((_j = order.venueMarketOutcome) == null ? void 0 : _j.label) || "Outcome"
|
|
8072
|
+
}, order.side === "sell" || order.side === "buy" ? { side: order.side } : {}), {
|
|
8007
8073
|
venue: order.venue
|
|
8008
|
-
}, limitPriceLabel ? { limitPriceLabel } : {}), {
|
|
8074
|
+
}), limitPriceLabel ? { limitPriceLabel } : {}), currentPriceLabel ? { currentPriceLabel } : {}), {
|
|
8009
8075
|
filledLabel: `${formatScaledNumberTwoDecimals(filledRaw != null ? filledRaw : "0")}/${formatScaledNumberTwoDecimals(totalRaw)}`,
|
|
8010
8076
|
valueLabel: formatFilledUsdTwoDecimals(totalCostRaw)
|
|
8011
8077
|
}), expirationLabel ? { expirationLabel } : {}), {
|
|
@@ -8014,7 +8080,7 @@ var UserProfilePage = ({
|
|
|
8014
8080
|
dagRunId: (_k = order.dagRunId) != null ? _k : null
|
|
8015
8081
|
});
|
|
8016
8082
|
});
|
|
8017
|
-
}, [labels,
|
|
8083
|
+
}, [labels, openOrderCurrentPriceLabels, openOrderRows, openOrders]);
|
|
8018
8084
|
const isOpenOrdersQueryLoading = useMemo8(
|
|
8019
8085
|
() => openOrderQueries.some((query) => query.isLoading),
|
|
8020
8086
|
[openOrderQueries]
|
|
@@ -8179,32 +8245,13 @@ var UserProfilePage = ({
|
|
|
8179
8245
|
classNames == null ? void 0 : classNames.rightColumn
|
|
8180
8246
|
),
|
|
8181
8247
|
children: [
|
|
8182
|
-
/* @__PURE__ */
|
|
8183
|
-
|
|
8248
|
+
/* @__PURE__ */ jsx19(
|
|
8249
|
+
PositionsValueCard,
|
|
8184
8250
|
{
|
|
8185
|
-
|
|
8186
|
-
|
|
8187
|
-
|
|
8188
|
-
|
|
8189
|
-
children: [
|
|
8190
|
-
/* @__PURE__ */ jsx19(
|
|
8191
|
-
PositionsValueCard,
|
|
8192
|
-
{
|
|
8193
|
-
label: labels.userProfile.balance.positionsValue,
|
|
8194
|
-
valueLabel: positionsValueLabel,
|
|
8195
|
-
isLoading: isPositionsValueLoading,
|
|
8196
|
-
compact: isPaperMode
|
|
8197
|
-
}
|
|
8198
|
-
),
|
|
8199
|
-
isKalshiAvailable && !isPaperMode ? /* @__PURE__ */ jsx19(
|
|
8200
|
-
PositionsValueCard,
|
|
8201
|
-
{
|
|
8202
|
-
label: labels.userProfile.balance.kalshiBalance,
|
|
8203
|
-
valueLabel: formatUsd2((_b = balanceState.kalshiBalance) != null ? _b : 0),
|
|
8204
|
-
icon: /* @__PURE__ */ jsx19(VenueLogo, { venue: Venue3.kalshi, size: "small", className: "size-4" })
|
|
8205
|
-
}
|
|
8206
|
-
) : null
|
|
8207
|
-
]
|
|
8251
|
+
label: labels.userProfile.balance.positionsValue,
|
|
8252
|
+
valueLabel: positionsValueLabel,
|
|
8253
|
+
isLoading: isPositionsValueLoading,
|
|
8254
|
+
compact: isPaperMode
|
|
8208
8255
|
}
|
|
8209
8256
|
),
|
|
8210
8257
|
isPaperMode ? (
|
|
@@ -8253,13 +8300,14 @@ var UserProfilePage = ({
|
|
|
8253
8300
|
{
|
|
8254
8301
|
valueLabel: availableBalanceLabel,
|
|
8255
8302
|
isLoading: isAvailableBalanceLoading,
|
|
8256
|
-
chains: ((
|
|
8303
|
+
chains: ((_b = balanceChainsOverride != null ? balanceChainsOverride : balanceState.availableBalanceBreakdown) != null ? _b : balanceState.balanceBreakdown).map((b) => ({
|
|
8257
8304
|
key: b.key,
|
|
8258
8305
|
label: b.label,
|
|
8259
8306
|
balance: b.balance,
|
|
8260
8307
|
accountCount: b.accountCount,
|
|
8261
8308
|
venues: b.venues
|
|
8262
8309
|
})),
|
|
8310
|
+
kalshiValueLabel: isKalshiAvailable ? formatUsd2((_c = balanceState.kalshiBalance) != null ? _c : 0) : void 0,
|
|
8263
8311
|
manageButtonRef: manageBalancesButtonRef,
|
|
8264
8312
|
onManage: () => handleManageBalancesOpenChange(true)
|
|
8265
8313
|
}
|