@agg-build/ui 4.11.0 → 4.11.1
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-CHM6SCOY.mjs → chunk-VMG6BUHI.mjs} +1 -1
- package/dist/{chunk-NCWBKC5C.mjs → chunk-WWIVSROM.mjs} +27 -26
- package/dist/index.js +27 -26
- package/dist/index.mjs +2 -2
- package/dist/pages.js +27 -26
- package/dist/pages.mjs +2 -2
- package/dist/trading.js +27 -26
- package/dist/trading.mjs +1 -1
- package/package.json +1 -1
|
@@ -1311,13 +1311,13 @@ var extractGeoBlockedVenues = (warnings) => {
|
|
|
1311
1311
|
);
|
|
1312
1312
|
};
|
|
1313
1313
|
var getSmartRouteTotalFees = (feeBreakdown) => {
|
|
1314
|
-
var _a;
|
|
1314
|
+
var _a, _b;
|
|
1315
1315
|
if (!feeBreakdown) return null;
|
|
1316
1316
|
const feeParts = [
|
|
1317
|
-
feeBreakdown.venueFees,
|
|
1318
|
-
(_a = feeBreakdown.builderFee) != null ? _a : 0,
|
|
1317
|
+
feeBreakdown.venueFees + ((_a = feeBreakdown.builderFee) != null ? _a : 0),
|
|
1319
1318
|
feeBreakdown.bridgeFees,
|
|
1320
|
-
feeBreakdown.executionGas
|
|
1319
|
+
feeBreakdown.executionGas,
|
|
1320
|
+
(_b = feeBreakdown.appFee) != null ? _b : 0
|
|
1321
1321
|
];
|
|
1322
1322
|
if (!feeParts.every(Number.isFinite)) return null;
|
|
1323
1323
|
return feeParts.reduce((total, fee) => total + Math.round(fee * 100) / 100, 0);
|
|
@@ -4291,7 +4291,7 @@ var PlaceOrder = ({
|
|
|
4291
4291
|
showResolvingState = false,
|
|
4292
4292
|
midpointsResult
|
|
4293
4293
|
}) => {
|
|
4294
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca;
|
|
4294
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca, _da;
|
|
4295
4295
|
const {
|
|
4296
4296
|
enableDebug: isExecutionDebugEnabled,
|
|
4297
4297
|
features: { enableAnimations, showFeesBreakdown, showLimitOrders: limitOrdersFeature },
|
|
@@ -5712,30 +5712,21 @@ var PlaceOrder = ({
|
|
|
5712
5712
|
if (totalFees == null) return null;
|
|
5713
5713
|
return formatUsd(totalFees, { minimumFractionDigits: 2, maximumFractionDigits: 2 });
|
|
5714
5714
|
}, [activeFeeBreakdown]);
|
|
5715
|
+
const appFeeValue = (__ = activeFeeBreakdown == null ? void 0 : activeFeeBreakdown.appFee) != null ? __ : 0;
|
|
5715
5716
|
const feeBreakdownRows = useMemo(() => {
|
|
5716
|
-
var _a2
|
|
5717
|
+
var _a2;
|
|
5717
5718
|
if (!activeFeeBreakdown) return [];
|
|
5718
5719
|
return [
|
|
5719
5720
|
{
|
|
5721
|
+
// The builder slice (Hyperliquid only today) is a separate field on the
|
|
5722
|
+
// wire but reads as one cost to the user, so it renders inside "Venue".
|
|
5720
5723
|
kind: "amount",
|
|
5721
5724
|
label: tradingLabels.feeBreakdownVenueFees,
|
|
5722
|
-
value: formatUsd(activeFeeBreakdown.venueFees, {
|
|
5725
|
+
value: formatUsd(activeFeeBreakdown.venueFees + ((_a2 = activeFeeBreakdown.builderFee) != null ? _a2 : 0), {
|
|
5723
5726
|
minimumFractionDigits: 2,
|
|
5724
5727
|
maximumFractionDigits: 2
|
|
5725
5728
|
})
|
|
5726
5729
|
},
|
|
5727
|
-
// Only Hyperliquid charges a builder slice today; every other route
|
|
5728
|
-
// would show a bare "$0.00" line.
|
|
5729
|
-
...((_a2 = activeFeeBreakdown.builderFee) != null ? _a2 : 0) > 0 ? [
|
|
5730
|
-
{
|
|
5731
|
-
kind: "amount",
|
|
5732
|
-
label: tradingLabels.feeBreakdownBuilderFee,
|
|
5733
|
-
value: formatUsd((_b2 = activeFeeBreakdown.builderFee) != null ? _b2 : 0, {
|
|
5734
|
-
minimumFractionDigits: 2,
|
|
5735
|
-
maximumFractionDigits: 2
|
|
5736
|
-
})
|
|
5737
|
-
}
|
|
5738
|
-
] : [],
|
|
5739
5730
|
{
|
|
5740
5731
|
kind: "amount",
|
|
5741
5732
|
label: tradingLabels.feeBreakdownExecutionGas,
|
|
@@ -5752,23 +5743,33 @@ var PlaceOrder = ({
|
|
|
5752
5743
|
maximumFractionDigits: 2
|
|
5753
5744
|
})
|
|
5754
5745
|
},
|
|
5755
|
-
|
|
5746
|
+
// A partner charging a non-zero app fee gets a plain dollar row like every
|
|
5747
|
+
// other cost above it — the "0% fee" badge is only true, and only worth
|
|
5748
|
+
// highlighting, when the fee really is zero.
|
|
5749
|
+
appFeeValue > 0 ? {
|
|
5750
|
+
kind: "amount",
|
|
5751
|
+
label: tradingLabels.feeBreakdownAggMarket,
|
|
5752
|
+
value: formatUsd(appFeeValue, {
|
|
5753
|
+
minimumFractionDigits: 2,
|
|
5754
|
+
maximumFractionDigits: 2
|
|
5755
|
+
})
|
|
5756
|
+
} : {
|
|
5756
5757
|
kind: "badge",
|
|
5757
5758
|
label: tradingLabels.feeBreakdownAggMarket,
|
|
5758
5759
|
badgeLabel: tradingLabels.feeBreakdownPlatformFeeBadge
|
|
5759
5760
|
}
|
|
5760
5761
|
];
|
|
5761
|
-
}, [activeFeeBreakdown, tradingLabels]);
|
|
5762
|
+
}, [activeFeeBreakdown, appFeeValue, tradingLabels]);
|
|
5762
5763
|
const isActionLoading = isPrimaryActionLoading || executeManaged.isPending || placeLimitOrder.isPending || isBeforeActionPending;
|
|
5763
5764
|
const selectedLimitRouteCardId = selectedLimitVenueOption ? `limit-venue-${selectedLimitVenueOption.venue}-${selectedLimitVenueOption.venueMarketOutcomeId}` : null;
|
|
5764
|
-
const selectedLimitRouteCard = selectedLimitRouteCardId ? (
|
|
5765
|
-
const selectedRouteGeoBlocked = isLimitOrder ? (
|
|
5765
|
+
const selectedLimitRouteCard = selectedLimitRouteCardId ? (_$ = limitRouteCards.find((card) => card.id === selectedLimitRouteCardId)) != null ? _$ : null : null;
|
|
5766
|
+
const selectedRouteGeoBlocked = isLimitOrder ? (_aa = selectedLimitRouteCard == null ? void 0 : selectedLimitRouteCard.isUnavailable) != null ? _aa : false : (_ba = selectedRouteCard == null ? void 0 : selectedRouteCard.isUnavailable) != null ? _ba : false;
|
|
5766
5767
|
const geoBlockedVenuesFromWarnings = useMemo(
|
|
5767
5768
|
() => {
|
|
5768
5769
|
var _a2;
|
|
5769
5770
|
return extractGeoBlockedVenues((_a2 = smartRoute.data) == null ? void 0 : _a2.warnings);
|
|
5770
5771
|
},
|
|
5771
|
-
[(
|
|
5772
|
+
[(_ca = smartRoute.data) == null ? void 0 : _ca.warnings]
|
|
5772
5773
|
);
|
|
5773
5774
|
const isPrimaryVenueGeoBlocked = useMemo(() => {
|
|
5774
5775
|
var _a2, _b2;
|
|
@@ -6453,7 +6454,7 @@ var PlaceOrder = ({
|
|
|
6453
6454
|
PlaceOrderResolvedView,
|
|
6454
6455
|
{
|
|
6455
6456
|
tradingState: resolvedReadOnlyTradingState,
|
|
6456
|
-
resolutionTimestamp: (
|
|
6457
|
+
resolutionTimestamp: (_da = resolvedEventTradingState.resolvesAt) != null ? _da : resolvedReadOnlyTradingState.resolvesAt,
|
|
6457
6458
|
resolvedClaim,
|
|
6458
6459
|
classNames,
|
|
6459
6460
|
className,
|
|
@@ -7214,7 +7215,7 @@ var PlaceOrder = ({
|
|
|
7214
7215
|
message: internalTab === "buy" ? tradingLabels.lowLiquidityWarning : tradingLabels.lowLiquiditySellWarning
|
|
7215
7216
|
}
|
|
7216
7217
|
) : null,
|
|
7217
|
-
!shouldShowGeoBlockBanner && internalTab === "buy" && showFeesBreakdown ? /* @__PURE__ */ jsxs6("div", { className: "agg-order-platform-fee mt-1 flex items-center justify-center gap-1.5 text-agg-sm leading-agg-5 text-agg-muted-foreground", children: [
|
|
7218
|
+
!shouldShowGeoBlockBanner && internalTab === "buy" && showFeesBreakdown && appFeeValue === 0 ? /* @__PURE__ */ jsxs6("div", { className: "agg-order-platform-fee mt-1 flex items-center justify-center gap-1.5 text-agg-sm leading-agg-5 text-agg-muted-foreground", children: [
|
|
7218
7219
|
/* @__PURE__ */ jsx7(
|
|
7219
7220
|
Icon,
|
|
7220
7221
|
{
|
package/dist/index.js
CHANGED
|
@@ -21717,13 +21717,13 @@ var extractGeoBlockedVenues = (warnings) => {
|
|
|
21717
21717
|
);
|
|
21718
21718
|
};
|
|
21719
21719
|
var getSmartRouteTotalFees = (feeBreakdown) => {
|
|
21720
|
-
var _a;
|
|
21720
|
+
var _a, _b;
|
|
21721
21721
|
if (!feeBreakdown) return null;
|
|
21722
21722
|
const feeParts = [
|
|
21723
|
-
feeBreakdown.venueFees,
|
|
21724
|
-
(_a = feeBreakdown.builderFee) != null ? _a : 0,
|
|
21723
|
+
feeBreakdown.venueFees + ((_a = feeBreakdown.builderFee) != null ? _a : 0),
|
|
21725
21724
|
feeBreakdown.bridgeFees,
|
|
21726
|
-
feeBreakdown.executionGas
|
|
21725
|
+
feeBreakdown.executionGas,
|
|
21726
|
+
(_b = feeBreakdown.appFee) != null ? _b : 0
|
|
21727
21727
|
];
|
|
21728
21728
|
if (!feeParts.every(Number.isFinite)) return null;
|
|
21729
21729
|
return feeParts.reduce((total, fee) => total + Math.round(fee * 100) / 100, 0);
|
|
@@ -24697,7 +24697,7 @@ var PlaceOrder = ({
|
|
|
24697
24697
|
showResolvingState = false,
|
|
24698
24698
|
midpointsResult
|
|
24699
24699
|
}) => {
|
|
24700
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca;
|
|
24700
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca, _da;
|
|
24701
24701
|
const {
|
|
24702
24702
|
enableDebug: isExecutionDebugEnabled,
|
|
24703
24703
|
features: { enableAnimations, showFeesBreakdown, showLimitOrders: limitOrdersFeature },
|
|
@@ -26118,30 +26118,21 @@ var PlaceOrder = ({
|
|
|
26118
26118
|
if (totalFees == null) return null;
|
|
26119
26119
|
return formatUsd(totalFees, { minimumFractionDigits: 2, maximumFractionDigits: 2 });
|
|
26120
26120
|
}, [activeFeeBreakdown]);
|
|
26121
|
+
const appFeeValue = (__ = activeFeeBreakdown == null ? void 0 : activeFeeBreakdown.appFee) != null ? __ : 0;
|
|
26121
26122
|
const feeBreakdownRows = (0, import_react41.useMemo)(() => {
|
|
26122
|
-
var _a2
|
|
26123
|
+
var _a2;
|
|
26123
26124
|
if (!activeFeeBreakdown) return [];
|
|
26124
26125
|
return [
|
|
26125
26126
|
{
|
|
26127
|
+
// The builder slice (Hyperliquid only today) is a separate field on the
|
|
26128
|
+
// wire but reads as one cost to the user, so it renders inside "Venue".
|
|
26126
26129
|
kind: "amount",
|
|
26127
26130
|
label: tradingLabels.feeBreakdownVenueFees,
|
|
26128
|
-
value: formatUsd(activeFeeBreakdown.venueFees, {
|
|
26131
|
+
value: formatUsd(activeFeeBreakdown.venueFees + ((_a2 = activeFeeBreakdown.builderFee) != null ? _a2 : 0), {
|
|
26129
26132
|
minimumFractionDigits: 2,
|
|
26130
26133
|
maximumFractionDigits: 2
|
|
26131
26134
|
})
|
|
26132
26135
|
},
|
|
26133
|
-
// Only Hyperliquid charges a builder slice today; every other route
|
|
26134
|
-
// would show a bare "$0.00" line.
|
|
26135
|
-
...((_a2 = activeFeeBreakdown.builderFee) != null ? _a2 : 0) > 0 ? [
|
|
26136
|
-
{
|
|
26137
|
-
kind: "amount",
|
|
26138
|
-
label: tradingLabels.feeBreakdownBuilderFee,
|
|
26139
|
-
value: formatUsd((_b2 = activeFeeBreakdown.builderFee) != null ? _b2 : 0, {
|
|
26140
|
-
minimumFractionDigits: 2,
|
|
26141
|
-
maximumFractionDigits: 2
|
|
26142
|
-
})
|
|
26143
|
-
}
|
|
26144
|
-
] : [],
|
|
26145
26136
|
{
|
|
26146
26137
|
kind: "amount",
|
|
26147
26138
|
label: tradingLabels.feeBreakdownExecutionGas,
|
|
@@ -26158,23 +26149,33 @@ var PlaceOrder = ({
|
|
|
26158
26149
|
maximumFractionDigits: 2
|
|
26159
26150
|
})
|
|
26160
26151
|
},
|
|
26161
|
-
|
|
26152
|
+
// A partner charging a non-zero app fee gets a plain dollar row like every
|
|
26153
|
+
// other cost above it — the "0% fee" badge is only true, and only worth
|
|
26154
|
+
// highlighting, when the fee really is zero.
|
|
26155
|
+
appFeeValue > 0 ? {
|
|
26156
|
+
kind: "amount",
|
|
26157
|
+
label: tradingLabels.feeBreakdownAggMarket,
|
|
26158
|
+
value: formatUsd(appFeeValue, {
|
|
26159
|
+
minimumFractionDigits: 2,
|
|
26160
|
+
maximumFractionDigits: 2
|
|
26161
|
+
})
|
|
26162
|
+
} : {
|
|
26162
26163
|
kind: "badge",
|
|
26163
26164
|
label: tradingLabels.feeBreakdownAggMarket,
|
|
26164
26165
|
badgeLabel: tradingLabels.feeBreakdownPlatformFeeBadge
|
|
26165
26166
|
}
|
|
26166
26167
|
];
|
|
26167
|
-
}, [activeFeeBreakdown, tradingLabels]);
|
|
26168
|
+
}, [activeFeeBreakdown, appFeeValue, tradingLabels]);
|
|
26168
26169
|
const isActionLoading = isPrimaryActionLoading || executeManaged.isPending || placeLimitOrder.isPending || isBeforeActionPending;
|
|
26169
26170
|
const selectedLimitRouteCardId = selectedLimitVenueOption ? `limit-venue-${selectedLimitVenueOption.venue}-${selectedLimitVenueOption.venueMarketOutcomeId}` : null;
|
|
26170
|
-
const selectedLimitRouteCard = selectedLimitRouteCardId ? (
|
|
26171
|
-
const selectedRouteGeoBlocked = isLimitOrder ? (
|
|
26171
|
+
const selectedLimitRouteCard = selectedLimitRouteCardId ? (_$ = limitRouteCards.find((card) => card.id === selectedLimitRouteCardId)) != null ? _$ : null : null;
|
|
26172
|
+
const selectedRouteGeoBlocked = isLimitOrder ? (_aa = selectedLimitRouteCard == null ? void 0 : selectedLimitRouteCard.isUnavailable) != null ? _aa : false : (_ba = selectedRouteCard == null ? void 0 : selectedRouteCard.isUnavailable) != null ? _ba : false;
|
|
26172
26173
|
const geoBlockedVenuesFromWarnings = (0, import_react41.useMemo)(
|
|
26173
26174
|
() => {
|
|
26174
26175
|
var _a2;
|
|
26175
26176
|
return extractGeoBlockedVenues((_a2 = smartRoute.data) == null ? void 0 : _a2.warnings);
|
|
26176
26177
|
},
|
|
26177
|
-
[(
|
|
26178
|
+
[(_ca = smartRoute.data) == null ? void 0 : _ca.warnings]
|
|
26178
26179
|
);
|
|
26179
26180
|
const isPrimaryVenueGeoBlocked = (0, import_react41.useMemo)(() => {
|
|
26180
26181
|
var _a2, _b2;
|
|
@@ -26859,7 +26860,7 @@ var PlaceOrder = ({
|
|
|
26859
26860
|
PlaceOrderResolvedView,
|
|
26860
26861
|
{
|
|
26861
26862
|
tradingState: resolvedReadOnlyTradingState,
|
|
26862
|
-
resolutionTimestamp: (
|
|
26863
|
+
resolutionTimestamp: (_da = resolvedEventTradingState.resolvesAt) != null ? _da : resolvedReadOnlyTradingState.resolvesAt,
|
|
26863
26864
|
resolvedClaim,
|
|
26864
26865
|
classNames,
|
|
26865
26866
|
className,
|
|
@@ -27620,7 +27621,7 @@ var PlaceOrder = ({
|
|
|
27620
27621
|
message: internalTab === "buy" ? tradingLabels.lowLiquidityWarning : tradingLabels.lowLiquiditySellWarning
|
|
27621
27622
|
}
|
|
27622
27623
|
) : null,
|
|
27623
|
-
!shouldShowGeoBlockBanner && internalTab === "buy" && showFeesBreakdown ? /* @__PURE__ */ (0, import_jsx_runtime178.jsxs)("div", { className: "agg-order-platform-fee mt-1 flex items-center justify-center gap-1.5 text-agg-sm leading-agg-5 text-agg-muted-foreground", children: [
|
|
27624
|
+
!shouldShowGeoBlockBanner && internalTab === "buy" && showFeesBreakdown && appFeeValue === 0 ? /* @__PURE__ */ (0, import_jsx_runtime178.jsxs)("div", { className: "agg-order-platform-fee mt-1 flex items-center justify-center gap-1.5 text-agg-sm leading-agg-5 text-agg-muted-foreground", children: [
|
|
27624
27625
|
/* @__PURE__ */ (0, import_jsx_runtime178.jsx)(
|
|
27625
27626
|
Icon,
|
|
27626
27627
|
{
|
package/dist/index.mjs
CHANGED
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
formatRecurringCountdown,
|
|
15
15
|
formatShareAmount,
|
|
16
16
|
useHomePageModals
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-VMG6BUHI.mjs";
|
|
18
18
|
import {
|
|
19
19
|
EventList,
|
|
20
20
|
EventListItem,
|
|
@@ -67,7 +67,7 @@ import {
|
|
|
67
67
|
useResolvedMarketClaim,
|
|
68
68
|
useSharedKycFlow,
|
|
69
69
|
venueRequiresSharedKyc
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-WWIVSROM.mjs";
|
|
71
71
|
import {
|
|
72
72
|
SETTLEMENT_SECTION_ID,
|
|
73
73
|
Settlement,
|
package/dist/pages.js
CHANGED
|
@@ -19392,13 +19392,13 @@ var extractGeoBlockedVenues = (warnings) => {
|
|
|
19392
19392
|
);
|
|
19393
19393
|
};
|
|
19394
19394
|
var getSmartRouteTotalFees = (feeBreakdown) => {
|
|
19395
|
-
var _a;
|
|
19395
|
+
var _a, _b;
|
|
19396
19396
|
if (!feeBreakdown) return null;
|
|
19397
19397
|
const feeParts = [
|
|
19398
|
-
feeBreakdown.venueFees,
|
|
19399
|
-
(_a = feeBreakdown.builderFee) != null ? _a : 0,
|
|
19398
|
+
feeBreakdown.venueFees + ((_a = feeBreakdown.builderFee) != null ? _a : 0),
|
|
19400
19399
|
feeBreakdown.bridgeFees,
|
|
19401
|
-
feeBreakdown.executionGas
|
|
19400
|
+
feeBreakdown.executionGas,
|
|
19401
|
+
(_b = feeBreakdown.appFee) != null ? _b : 0
|
|
19402
19402
|
];
|
|
19403
19403
|
if (!feeParts.every(Number.isFinite)) return null;
|
|
19404
19404
|
return feeParts.reduce((total, fee) => total + Math.round(fee * 100) / 100, 0);
|
|
@@ -22372,7 +22372,7 @@ var PlaceOrder = ({
|
|
|
22372
22372
|
showResolvingState = false,
|
|
22373
22373
|
midpointsResult
|
|
22374
22374
|
}) => {
|
|
22375
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca;
|
|
22375
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca, _da;
|
|
22376
22376
|
const {
|
|
22377
22377
|
enableDebug: isExecutionDebugEnabled,
|
|
22378
22378
|
features: { enableAnimations, showFeesBreakdown, showLimitOrders: limitOrdersFeature },
|
|
@@ -23793,30 +23793,21 @@ var PlaceOrder = ({
|
|
|
23793
23793
|
if (totalFees == null) return null;
|
|
23794
23794
|
return formatUsd(totalFees, { minimumFractionDigits: 2, maximumFractionDigits: 2 });
|
|
23795
23795
|
}, [activeFeeBreakdown]);
|
|
23796
|
+
const appFeeValue = (__ = activeFeeBreakdown == null ? void 0 : activeFeeBreakdown.appFee) != null ? __ : 0;
|
|
23796
23797
|
const feeBreakdownRows = (0, import_react38.useMemo)(() => {
|
|
23797
|
-
var _a2
|
|
23798
|
+
var _a2;
|
|
23798
23799
|
if (!activeFeeBreakdown) return [];
|
|
23799
23800
|
return [
|
|
23800
23801
|
{
|
|
23802
|
+
// The builder slice (Hyperliquid only today) is a separate field on the
|
|
23803
|
+
// wire but reads as one cost to the user, so it renders inside "Venue".
|
|
23801
23804
|
kind: "amount",
|
|
23802
23805
|
label: tradingLabels.feeBreakdownVenueFees,
|
|
23803
|
-
value: formatUsd(activeFeeBreakdown.venueFees, {
|
|
23806
|
+
value: formatUsd(activeFeeBreakdown.venueFees + ((_a2 = activeFeeBreakdown.builderFee) != null ? _a2 : 0), {
|
|
23804
23807
|
minimumFractionDigits: 2,
|
|
23805
23808
|
maximumFractionDigits: 2
|
|
23806
23809
|
})
|
|
23807
23810
|
},
|
|
23808
|
-
// Only Hyperliquid charges a builder slice today; every other route
|
|
23809
|
-
// would show a bare "$0.00" line.
|
|
23810
|
-
...((_a2 = activeFeeBreakdown.builderFee) != null ? _a2 : 0) > 0 ? [
|
|
23811
|
-
{
|
|
23812
|
-
kind: "amount",
|
|
23813
|
-
label: tradingLabels.feeBreakdownBuilderFee,
|
|
23814
|
-
value: formatUsd((_b2 = activeFeeBreakdown.builderFee) != null ? _b2 : 0, {
|
|
23815
|
-
minimumFractionDigits: 2,
|
|
23816
|
-
maximumFractionDigits: 2
|
|
23817
|
-
})
|
|
23818
|
-
}
|
|
23819
|
-
] : [],
|
|
23820
23811
|
{
|
|
23821
23812
|
kind: "amount",
|
|
23822
23813
|
label: tradingLabels.feeBreakdownExecutionGas,
|
|
@@ -23833,23 +23824,33 @@ var PlaceOrder = ({
|
|
|
23833
23824
|
maximumFractionDigits: 2
|
|
23834
23825
|
})
|
|
23835
23826
|
},
|
|
23836
|
-
|
|
23827
|
+
// A partner charging a non-zero app fee gets a plain dollar row like every
|
|
23828
|
+
// other cost above it — the "0% fee" badge is only true, and only worth
|
|
23829
|
+
// highlighting, when the fee really is zero.
|
|
23830
|
+
appFeeValue > 0 ? {
|
|
23831
|
+
kind: "amount",
|
|
23832
|
+
label: tradingLabels.feeBreakdownAggMarket,
|
|
23833
|
+
value: formatUsd(appFeeValue, {
|
|
23834
|
+
minimumFractionDigits: 2,
|
|
23835
|
+
maximumFractionDigits: 2
|
|
23836
|
+
})
|
|
23837
|
+
} : {
|
|
23837
23838
|
kind: "badge",
|
|
23838
23839
|
label: tradingLabels.feeBreakdownAggMarket,
|
|
23839
23840
|
badgeLabel: tradingLabels.feeBreakdownPlatformFeeBadge
|
|
23840
23841
|
}
|
|
23841
23842
|
];
|
|
23842
|
-
}, [activeFeeBreakdown, tradingLabels]);
|
|
23843
|
+
}, [activeFeeBreakdown, appFeeValue, tradingLabels]);
|
|
23843
23844
|
const isActionLoading = isPrimaryActionLoading || executeManaged.isPending || placeLimitOrder.isPending || isBeforeActionPending;
|
|
23844
23845
|
const selectedLimitRouteCardId = selectedLimitVenueOption ? `limit-venue-${selectedLimitVenueOption.venue}-${selectedLimitVenueOption.venueMarketOutcomeId}` : null;
|
|
23845
|
-
const selectedLimitRouteCard = selectedLimitRouteCardId ? (
|
|
23846
|
-
const selectedRouteGeoBlocked = isLimitOrder ? (
|
|
23846
|
+
const selectedLimitRouteCard = selectedLimitRouteCardId ? (_$ = limitRouteCards.find((card) => card.id === selectedLimitRouteCardId)) != null ? _$ : null : null;
|
|
23847
|
+
const selectedRouteGeoBlocked = isLimitOrder ? (_aa = selectedLimitRouteCard == null ? void 0 : selectedLimitRouteCard.isUnavailable) != null ? _aa : false : (_ba = selectedRouteCard == null ? void 0 : selectedRouteCard.isUnavailable) != null ? _ba : false;
|
|
23847
23848
|
const geoBlockedVenuesFromWarnings = (0, import_react38.useMemo)(
|
|
23848
23849
|
() => {
|
|
23849
23850
|
var _a2;
|
|
23850
23851
|
return extractGeoBlockedVenues((_a2 = smartRoute.data) == null ? void 0 : _a2.warnings);
|
|
23851
23852
|
},
|
|
23852
|
-
[(
|
|
23853
|
+
[(_ca = smartRoute.data) == null ? void 0 : _ca.warnings]
|
|
23853
23854
|
);
|
|
23854
23855
|
const isPrimaryVenueGeoBlocked = (0, import_react38.useMemo)(() => {
|
|
23855
23856
|
var _a2, _b2;
|
|
@@ -24534,7 +24535,7 @@ var PlaceOrder = ({
|
|
|
24534
24535
|
PlaceOrderResolvedView,
|
|
24535
24536
|
{
|
|
24536
24537
|
tradingState: resolvedReadOnlyTradingState,
|
|
24537
|
-
resolutionTimestamp: (
|
|
24538
|
+
resolutionTimestamp: (_da = resolvedEventTradingState.resolvesAt) != null ? _da : resolvedReadOnlyTradingState.resolvesAt,
|
|
24538
24539
|
resolvedClaim,
|
|
24539
24540
|
classNames,
|
|
24540
24541
|
className,
|
|
@@ -25295,7 +25296,7 @@ var PlaceOrder = ({
|
|
|
25295
25296
|
message: internalTab === "buy" ? tradingLabels.lowLiquidityWarning : tradingLabels.lowLiquiditySellWarning
|
|
25296
25297
|
}
|
|
25297
25298
|
) : null,
|
|
25298
|
-
!shouldShowGeoBlockBanner && internalTab === "buy" && showFeesBreakdown ? /* @__PURE__ */ (0, import_jsx_runtime169.jsxs)("div", { className: "agg-order-platform-fee mt-1 flex items-center justify-center gap-1.5 text-agg-sm leading-agg-5 text-agg-muted-foreground", children: [
|
|
25299
|
+
!shouldShowGeoBlockBanner && internalTab === "buy" && showFeesBreakdown && appFeeValue === 0 ? /* @__PURE__ */ (0, import_jsx_runtime169.jsxs)("div", { className: "agg-order-platform-fee mt-1 flex items-center justify-center gap-1.5 text-agg-sm leading-agg-5 text-agg-muted-foreground", children: [
|
|
25299
25300
|
/* @__PURE__ */ (0, import_jsx_runtime169.jsx)(
|
|
25300
25301
|
Icon,
|
|
25301
25302
|
{
|
package/dist/pages.mjs
CHANGED
|
@@ -11,14 +11,14 @@ import {
|
|
|
11
11
|
formatRecurringCountdown,
|
|
12
12
|
formatShareAmount,
|
|
13
13
|
useHomePageModals
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-VMG6BUHI.mjs";
|
|
15
15
|
import "./chunk-EYJS45RP.mjs";
|
|
16
16
|
import {
|
|
17
17
|
DEPOSIT_MODAL_OPEN_EVENT,
|
|
18
18
|
WITHDRAW_MODAL_OPEN_EVENT,
|
|
19
19
|
requestAggDepositModalOpen,
|
|
20
20
|
requestAggWithdrawModalOpen
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-WWIVSROM.mjs";
|
|
22
22
|
import "./chunk-6EHT5OFU.mjs";
|
|
23
23
|
import "./chunk-TXQJUVRW.mjs";
|
|
24
24
|
import "./chunk-W7HQVQ22.mjs";
|
package/dist/trading.js
CHANGED
|
@@ -9214,13 +9214,13 @@ var extractGeoBlockedVenues = (warnings) => {
|
|
|
9214
9214
|
);
|
|
9215
9215
|
};
|
|
9216
9216
|
var getSmartRouteTotalFees = (feeBreakdown) => {
|
|
9217
|
-
var _a;
|
|
9217
|
+
var _a, _b;
|
|
9218
9218
|
if (!feeBreakdown) return null;
|
|
9219
9219
|
const feeParts = [
|
|
9220
|
-
feeBreakdown.venueFees,
|
|
9221
|
-
(_a = feeBreakdown.builderFee) != null ? _a : 0,
|
|
9220
|
+
feeBreakdown.venueFees + ((_a = feeBreakdown.builderFee) != null ? _a : 0),
|
|
9222
9221
|
feeBreakdown.bridgeFees,
|
|
9223
|
-
feeBreakdown.executionGas
|
|
9222
|
+
feeBreakdown.executionGas,
|
|
9223
|
+
(_b = feeBreakdown.appFee) != null ? _b : 0
|
|
9224
9224
|
];
|
|
9225
9225
|
if (!feeParts.every(Number.isFinite)) return null;
|
|
9226
9226
|
return feeParts.reduce((total, fee) => total + Math.round(fee * 100) / 100, 0);
|
|
@@ -12194,7 +12194,7 @@ var PlaceOrder = ({
|
|
|
12194
12194
|
showResolvingState = false,
|
|
12195
12195
|
midpointsResult
|
|
12196
12196
|
}) => {
|
|
12197
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca;
|
|
12197
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca, _da;
|
|
12198
12198
|
const {
|
|
12199
12199
|
enableDebug: isExecutionDebugEnabled,
|
|
12200
12200
|
features: { enableAnimations, showFeesBreakdown, showLimitOrders: limitOrdersFeature },
|
|
@@ -13615,30 +13615,21 @@ var PlaceOrder = ({
|
|
|
13615
13615
|
if (totalFees == null) return null;
|
|
13616
13616
|
return formatUsd(totalFees, { minimumFractionDigits: 2, maximumFractionDigits: 2 });
|
|
13617
13617
|
}, [activeFeeBreakdown]);
|
|
13618
|
+
const appFeeValue = (__ = activeFeeBreakdown == null ? void 0 : activeFeeBreakdown.appFee) != null ? __ : 0;
|
|
13618
13619
|
const feeBreakdownRows = (0, import_react17.useMemo)(() => {
|
|
13619
|
-
var _a2
|
|
13620
|
+
var _a2;
|
|
13620
13621
|
if (!activeFeeBreakdown) return [];
|
|
13621
13622
|
return [
|
|
13622
13623
|
{
|
|
13624
|
+
// The builder slice (Hyperliquid only today) is a separate field on the
|
|
13625
|
+
// wire but reads as one cost to the user, so it renders inside "Venue".
|
|
13623
13626
|
kind: "amount",
|
|
13624
13627
|
label: tradingLabels.feeBreakdownVenueFees,
|
|
13625
|
-
value: formatUsd(activeFeeBreakdown.venueFees, {
|
|
13628
|
+
value: formatUsd(activeFeeBreakdown.venueFees + ((_a2 = activeFeeBreakdown.builderFee) != null ? _a2 : 0), {
|
|
13626
13629
|
minimumFractionDigits: 2,
|
|
13627
13630
|
maximumFractionDigits: 2
|
|
13628
13631
|
})
|
|
13629
13632
|
},
|
|
13630
|
-
// Only Hyperliquid charges a builder slice today; every other route
|
|
13631
|
-
// would show a bare "$0.00" line.
|
|
13632
|
-
...((_a2 = activeFeeBreakdown.builderFee) != null ? _a2 : 0) > 0 ? [
|
|
13633
|
-
{
|
|
13634
|
-
kind: "amount",
|
|
13635
|
-
label: tradingLabels.feeBreakdownBuilderFee,
|
|
13636
|
-
value: formatUsd((_b2 = activeFeeBreakdown.builderFee) != null ? _b2 : 0, {
|
|
13637
|
-
minimumFractionDigits: 2,
|
|
13638
|
-
maximumFractionDigits: 2
|
|
13639
|
-
})
|
|
13640
|
-
}
|
|
13641
|
-
] : [],
|
|
13642
13633
|
{
|
|
13643
13634
|
kind: "amount",
|
|
13644
13635
|
label: tradingLabels.feeBreakdownExecutionGas,
|
|
@@ -13655,23 +13646,33 @@ var PlaceOrder = ({
|
|
|
13655
13646
|
maximumFractionDigits: 2
|
|
13656
13647
|
})
|
|
13657
13648
|
},
|
|
13658
|
-
|
|
13649
|
+
// A partner charging a non-zero app fee gets a plain dollar row like every
|
|
13650
|
+
// other cost above it — the "0% fee" badge is only true, and only worth
|
|
13651
|
+
// highlighting, when the fee really is zero.
|
|
13652
|
+
appFeeValue > 0 ? {
|
|
13653
|
+
kind: "amount",
|
|
13654
|
+
label: tradingLabels.feeBreakdownAggMarket,
|
|
13655
|
+
value: formatUsd(appFeeValue, {
|
|
13656
|
+
minimumFractionDigits: 2,
|
|
13657
|
+
maximumFractionDigits: 2
|
|
13658
|
+
})
|
|
13659
|
+
} : {
|
|
13659
13660
|
kind: "badge",
|
|
13660
13661
|
label: tradingLabels.feeBreakdownAggMarket,
|
|
13661
13662
|
badgeLabel: tradingLabels.feeBreakdownPlatformFeeBadge
|
|
13662
13663
|
}
|
|
13663
13664
|
];
|
|
13664
|
-
}, [activeFeeBreakdown, tradingLabels]);
|
|
13665
|
+
}, [activeFeeBreakdown, appFeeValue, tradingLabels]);
|
|
13665
13666
|
const isActionLoading = isPrimaryActionLoading || executeManaged.isPending || placeLimitOrder.isPending || isBeforeActionPending;
|
|
13666
13667
|
const selectedLimitRouteCardId = selectedLimitVenueOption ? `limit-venue-${selectedLimitVenueOption.venue}-${selectedLimitVenueOption.venueMarketOutcomeId}` : null;
|
|
13667
|
-
const selectedLimitRouteCard = selectedLimitRouteCardId ? (
|
|
13668
|
-
const selectedRouteGeoBlocked = isLimitOrder ? (
|
|
13668
|
+
const selectedLimitRouteCard = selectedLimitRouteCardId ? (_$ = limitRouteCards.find((card) => card.id === selectedLimitRouteCardId)) != null ? _$ : null : null;
|
|
13669
|
+
const selectedRouteGeoBlocked = isLimitOrder ? (_aa = selectedLimitRouteCard == null ? void 0 : selectedLimitRouteCard.isUnavailable) != null ? _aa : false : (_ba = selectedRouteCard == null ? void 0 : selectedRouteCard.isUnavailable) != null ? _ba : false;
|
|
13669
13670
|
const geoBlockedVenuesFromWarnings = (0, import_react17.useMemo)(
|
|
13670
13671
|
() => {
|
|
13671
13672
|
var _a2;
|
|
13672
13673
|
return extractGeoBlockedVenues((_a2 = smartRoute.data) == null ? void 0 : _a2.warnings);
|
|
13673
13674
|
},
|
|
13674
|
-
[(
|
|
13675
|
+
[(_ca = smartRoute.data) == null ? void 0 : _ca.warnings]
|
|
13675
13676
|
);
|
|
13676
13677
|
const isPrimaryVenueGeoBlocked = (0, import_react17.useMemo)(() => {
|
|
13677
13678
|
var _a2, _b2;
|
|
@@ -14356,7 +14357,7 @@ var PlaceOrder = ({
|
|
|
14356
14357
|
PlaceOrderResolvedView,
|
|
14357
14358
|
{
|
|
14358
14359
|
tradingState: resolvedReadOnlyTradingState,
|
|
14359
|
-
resolutionTimestamp: (
|
|
14360
|
+
resolutionTimestamp: (_da = resolvedEventTradingState.resolvesAt) != null ? _da : resolvedReadOnlyTradingState.resolvesAt,
|
|
14360
14361
|
resolvedClaim,
|
|
14361
14362
|
classNames,
|
|
14362
14363
|
className,
|
|
@@ -15117,7 +15118,7 @@ var PlaceOrder = ({
|
|
|
15117
15118
|
message: internalTab === "buy" ? tradingLabels.lowLiquidityWarning : tradingLabels.lowLiquiditySellWarning
|
|
15118
15119
|
}
|
|
15119
15120
|
) : null,
|
|
15120
|
-
!shouldShowGeoBlockBanner && internalTab === "buy" && showFeesBreakdown ? /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-order-platform-fee mt-1 flex items-center justify-center gap-1.5 text-agg-sm leading-agg-5 text-agg-muted-foreground", children: [
|
|
15121
|
+
!shouldShowGeoBlockBanner && internalTab === "buy" && showFeesBreakdown && appFeeValue === 0 ? /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "agg-order-platform-fee mt-1 flex items-center justify-center gap-1.5 text-agg-sm leading-agg-5 text-agg-muted-foreground", children: [
|
|
15121
15122
|
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
15122
15123
|
Icon,
|
|
15123
15124
|
{
|
package/dist/trading.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agg-build/ui",
|
|
3
|
-
"version": "4.11.
|
|
3
|
+
"version": "4.11.1",
|
|
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",
|