@agg-build/ui 4.11.0 → 4.11.3
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-5D36HPOG.mjs} +1 -1
- package/dist/{chunk-NCWBKC5C.mjs → chunk-VHKGW4DB.mjs} +136 -46
- package/dist/index.js +136 -46
- package/dist/index.mjs +2 -2
- package/dist/pages.js +136 -46
- package/dist/pages.mjs +2 -2
- package/dist/trading.js +136 -46
- package/dist/trading.mjs +1 -1
- package/dist/types/trading/place-order/index.place-order.utils.d.mts +28 -0
- package/dist/types/trading/place-order/index.place-order.utils.d.ts +28 -0
- package/package.json +2 -2
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);
|
|
@@ -19493,6 +19493,72 @@ var parseDecimalString = (value) => {
|
|
|
19493
19493
|
if (!Number.isFinite(parsed) || parsed <= 0) return null;
|
|
19494
19494
|
return parsed;
|
|
19495
19495
|
};
|
|
19496
|
+
var getPlaceOrderBuyPayout = (quoteData) => {
|
|
19497
|
+
var _a;
|
|
19498
|
+
return (_a = quoteData.estimatedPayout) != null ? _a : quoteData.totalFilled;
|
|
19499
|
+
};
|
|
19500
|
+
var getPlaceOrderSellProceeds = (quoteData) => Math.max(
|
|
19501
|
+
0,
|
|
19502
|
+
quoteData.rawExecCost - quoteData.fills.reduce((sum, fill) => {
|
|
19503
|
+
var _a, _b;
|
|
19504
|
+
return sum + ((_a = fill.venueFee) != null ? _a : 0) + ((_b = fill.builderFee) != null ? _b : 0);
|
|
19505
|
+
}, 0)
|
|
19506
|
+
);
|
|
19507
|
+
var getPlaceOrderQuoteValue = (quoteData, tradeSide) => tradeSide === "sell" ? getPlaceOrderSellProceeds(quoteData) : getPlaceOrderBuyPayout(quoteData);
|
|
19508
|
+
var resolvePlaceOrderNetResult = ({
|
|
19509
|
+
quoteData,
|
|
19510
|
+
tradeSide,
|
|
19511
|
+
shares,
|
|
19512
|
+
usd,
|
|
19513
|
+
terminalOrderEvents,
|
|
19514
|
+
submittedOrders
|
|
19515
|
+
}) => {
|
|
19516
|
+
if (!quoteData) return tradeSide === "sell" ? usd : shares;
|
|
19517
|
+
const actualEvents = (terminalOrderEvents != null ? terminalOrderEvents : []).filter(
|
|
19518
|
+
(event) => (event.event === "filled" || event.event === "partial_fill") && (tradeSide === "buy" ? event.filledAmountRaw != null : event.actualSharesRaw != null)
|
|
19519
|
+
);
|
|
19520
|
+
if (actualEvents.length) {
|
|
19521
|
+
return actualEvents.reduce((sum, event) => {
|
|
19522
|
+
var _a;
|
|
19523
|
+
const outcomeId = (_a = submittedOrders == null ? void 0 : submittedOrders.find(
|
|
19524
|
+
(order) => order.orderId === event.orderId
|
|
19525
|
+
)) == null ? void 0 : _a.outcomeId;
|
|
19526
|
+
const venueFills = quoteData.fills.filter((fill) => fill.venue === event.venue);
|
|
19527
|
+
const exactFill = venueFills.find((fill) => fill.venueMarketOutcomeId === outcomeId);
|
|
19528
|
+
const fills = exactFill ? [exactFill] : venueFills;
|
|
19529
|
+
const legQuote = fills.length ? __spreadProps(__spreadValues({}, quoteData), {
|
|
19530
|
+
fills,
|
|
19531
|
+
totalFilled: fills.reduce((total, fill) => total + fill.venueQty, 0),
|
|
19532
|
+
rawExecCost: fills.reduce((total, fill) => total + fill.avgPrice * fill.venueQty, 0),
|
|
19533
|
+
estimatedPayout: fills.reduce(
|
|
19534
|
+
(total, fill) => {
|
|
19535
|
+
var _a2;
|
|
19536
|
+
return total + fill.venueQty - ((_a2 = fill.settlementFee) != null ? _a2 : 0);
|
|
19537
|
+
},
|
|
19538
|
+
0
|
|
19539
|
+
)
|
|
19540
|
+
}) : quoteData;
|
|
19541
|
+
const actual = resolveActualExecutionEconomics({
|
|
19542
|
+
quoteData: legQuote,
|
|
19543
|
+
tradeSide,
|
|
19544
|
+
terminalOrderEvents: [event],
|
|
19545
|
+
submittedOrders
|
|
19546
|
+
});
|
|
19547
|
+
return sum + resolvePlaceOrderNetResult({
|
|
19548
|
+
quoteData: legQuote,
|
|
19549
|
+
tradeSide,
|
|
19550
|
+
shares: actual.actualTotalFilled,
|
|
19551
|
+
usd: actual.actualRawExecCost
|
|
19552
|
+
});
|
|
19553
|
+
}, 0);
|
|
19554
|
+
}
|
|
19555
|
+
if (tradeSide === "sell") {
|
|
19556
|
+
const gross = quoteData.rawExecCost;
|
|
19557
|
+
return gross > 0 ? usd * (getPlaceOrderSellProceeds(quoteData) / gross) : usd;
|
|
19558
|
+
}
|
|
19559
|
+
const filled = quoteData.totalFilled;
|
|
19560
|
+
return filled > 0 ? shares * (getPlaceOrderBuyPayout(quoteData) / filled) : shares;
|
|
19561
|
+
};
|
|
19496
19562
|
var resolvePlaceOrderQuoteResult = ({
|
|
19497
19563
|
labels,
|
|
19498
19564
|
quoteData,
|
|
@@ -19501,7 +19567,7 @@ var resolvePlaceOrderQuoteResult = ({
|
|
|
19501
19567
|
if (!quoteData || quoteData.totalFilled <= 0) return null;
|
|
19502
19568
|
const avgPrice = getPlaceOrderAverageExecutionPrice(quoteData);
|
|
19503
19569
|
if (avgPrice == null) return null;
|
|
19504
|
-
const quoteValue =
|
|
19570
|
+
const quoteValue = getPlaceOrderQuoteValue(quoteData, tradeSide);
|
|
19505
19571
|
return {
|
|
19506
19572
|
hint: labels.averagePrice(avgPrice),
|
|
19507
19573
|
value: getTradingValueLabel({
|
|
@@ -19619,7 +19685,7 @@ var buildLiveRouteCards = ({
|
|
|
19619
19685
|
eventVenues = [],
|
|
19620
19686
|
geoBlockedVenues: inheritedGeoBlockedVenues
|
|
19621
19687
|
}) => {
|
|
19622
|
-
var _a, _b, _c, _d;
|
|
19688
|
+
var _a, _b, _c, _d, _e;
|
|
19623
19689
|
const geoBlockedVenues = extractGeoBlockedVenues(quoteData.warnings);
|
|
19624
19690
|
for (const venue of inheritedGeoBlockedVenues != null ? inheritedGeoBlockedVenues : []) {
|
|
19625
19691
|
geoBlockedVenues.add(venue);
|
|
@@ -19634,6 +19700,7 @@ var buildLiveRouteCards = ({
|
|
|
19634
19700
|
);
|
|
19635
19701
|
const averageExecutionPrice = (_b = getPlaceOrderAverageExecutionPrice(quoteData)) != null ? _b : void 0;
|
|
19636
19702
|
const primaryWinnerVenue = quoteData.fills.length === 1 ? primaryVenue : void 0;
|
|
19703
|
+
const primaryWinnerOutcomeId = quoteData.fills.length === 1 ? (_c = quoteData.fills[0]) == null ? void 0 : _c.venueMarketOutcomeId : void 0;
|
|
19637
19704
|
const isPrimaryRouteGeoBlocked = quoteData.fills.length > 0 && quoteData.fills.some((f) => geoBlockedVenues.has(f.venue));
|
|
19638
19705
|
const primaryCard = primaryResult ? isPrimaryRouteGeoBlocked ? isSplit ? null : {
|
|
19639
19706
|
id: "live-route",
|
|
@@ -19643,7 +19710,7 @@ var buildLiveRouteCards = ({
|
|
|
19643
19710
|
parsedPrimaryVenue.success ? parsedPrimaryVenue.data : void 0
|
|
19644
19711
|
),
|
|
19645
19712
|
executionPrice: averageExecutionPrice,
|
|
19646
|
-
numericValue:
|
|
19713
|
+
numericValue: getPlaceOrderQuoteValue(quoteData, tradeSide),
|
|
19647
19714
|
quoteData,
|
|
19648
19715
|
value: primaryResult.value,
|
|
19649
19716
|
venue: parsedPrimaryVenue.success ? parsedPrimaryVenue.data : void 0,
|
|
@@ -19656,7 +19723,7 @@ var buildLiveRouteCards = ({
|
|
|
19656
19723
|
label: isSplit ? labels.orderSplitting : getTradingVenueLabel(
|
|
19657
19724
|
parsedPrimaryVenue.success ? parsedPrimaryVenue.data : void 0
|
|
19658
19725
|
),
|
|
19659
|
-
numericValue:
|
|
19726
|
+
numericValue: getPlaceOrderQuoteValue(quoteData, tradeSide),
|
|
19660
19727
|
quoteData,
|
|
19661
19728
|
rows: mapQuoteDataToRoutingRows(quoteData, tradeSide),
|
|
19662
19729
|
description: labels.splitOrderDescription,
|
|
@@ -19666,7 +19733,7 @@ var buildLiveRouteCards = ({
|
|
|
19666
19733
|
requiresSharedKyc: primaryRequiresSharedKyc
|
|
19667
19734
|
} : null;
|
|
19668
19735
|
const soloCardId = (prefix, sq) => `${prefix}-${sq.venue}${sq.venueMarketOutcomeId ? `-${sq.venueMarketOutcomeId}` : ""}`;
|
|
19669
|
-
const soloCards = ((
|
|
19736
|
+
const soloCards = ((_d = quoteData.venueSoloQuotes) != null ? _d : []).filter(
|
|
19670
19737
|
(sq) => sq.status === "ok" && sq.unavailableReason !== "venue_unavailable" && sq.avgPrice !== null && sq.filledQty > 0 && // No `sq.quoteId` requirement: a solo is preview-only whenever its own
|
|
19671
19738
|
// funding lane is short (API nulls the quoteId), which is NOT always the
|
|
19672
19739
|
// whole-quote `insufficient_balance` case — an off-chain winner (Kalshi
|
|
@@ -19674,9 +19741,9 @@ var buildLiveRouteCards = ({
|
|
|
19674
19741
|
// stays unfunded. Gating on the quoteId silently hid that venue from the
|
|
19675
19742
|
// comparison list entirely. The panel's Deposit CTA fires off the same
|
|
19676
19743
|
// balance condition, and `handleExecuteQuote` rejects an empty quoteId.
|
|
19677
|
-
sq.venue !== primaryWinnerVenue
|
|
19744
|
+
(primaryWinnerOutcomeId && sq.venueMarketOutcomeId ? sq.venueMarketOutcomeId !== primaryWinnerOutcomeId : sq.venue !== primaryWinnerVenue)
|
|
19678
19745
|
).map((sq) => {
|
|
19679
|
-
var _a2, _b2;
|
|
19746
|
+
var _a2, _b2, _c2, _d2, _e2, _f;
|
|
19680
19747
|
const parsedVenue = parseVenue(sq.venue);
|
|
19681
19748
|
const venue = parsedVenue.success ? parsedVenue.data : void 0;
|
|
19682
19749
|
if (geoBlockedVenues.has(sq.venue)) {
|
|
@@ -19686,10 +19753,10 @@ var buildLiveRouteCards = ({
|
|
|
19686
19753
|
hint: labels.venueUnavailableInRegion,
|
|
19687
19754
|
kind: "venue",
|
|
19688
19755
|
label: getTradingVenueLabel(venue),
|
|
19689
|
-
numericValue: sq.filledQty,
|
|
19756
|
+
numericValue: (_a2 = sq.estimatedPayout) != null ? _a2 : sq.filledQty,
|
|
19690
19757
|
quoteData,
|
|
19691
19758
|
value: getTradingValueLabel({
|
|
19692
|
-
amount: sq.filledQty,
|
|
19759
|
+
amount: (_b2 = sq.estimatedPayout) != null ? _b2 : sq.filledQty,
|
|
19693
19760
|
minimumFractionDigits: 2,
|
|
19694
19761
|
maximumFractionDigits: 2
|
|
19695
19762
|
}),
|
|
@@ -19703,7 +19770,7 @@ var buildLiveRouteCards = ({
|
|
|
19703
19770
|
// Preview-only solos intentionally carry no executable quoteId; the card
|
|
19704
19771
|
// should still render for comparison, while the CTA stays disabled until
|
|
19705
19772
|
// the user is funded and requotes.
|
|
19706
|
-
quoteId: (
|
|
19773
|
+
quoteId: (_c2 = sq.quoteId) != null ? _c2 : "",
|
|
19707
19774
|
fills: sq.fills.map((f) => __spreadValues({}, f)),
|
|
19708
19775
|
totalFilled: sq.filledQty,
|
|
19709
19776
|
rawExecCost: sq.rawExecCost,
|
|
@@ -19716,7 +19783,7 @@ var buildLiveRouteCards = ({
|
|
|
19716
19783
|
// primary route's breakdown in place, so selecting a bridge-free venue
|
|
19717
19784
|
// still showed the primary's bridging charge. Falls back to the
|
|
19718
19785
|
// primary only when the router omitted one (non-"ok" solos).
|
|
19719
|
-
feeBreakdown: (
|
|
19786
|
+
feeBreakdown: (_d2 = sq.feeBreakdown) != null ? _d2 : quoteData.feeBreakdown
|
|
19720
19787
|
}), sq.quoteId ? { status: "ok", error: void 0 } : null);
|
|
19721
19788
|
return {
|
|
19722
19789
|
id: soloCardId("live-solo", sq),
|
|
@@ -19725,10 +19792,10 @@ var buildLiveRouteCards = ({
|
|
|
19725
19792
|
kind: "venue",
|
|
19726
19793
|
label: getTradingVenueLabel(venue),
|
|
19727
19794
|
executionPrice: avgPrice,
|
|
19728
|
-
numericValue: sq.filledQty,
|
|
19795
|
+
numericValue: (_e2 = sq.estimatedPayout) != null ? _e2 : sq.filledQty,
|
|
19729
19796
|
quoteData: soloQuoteData,
|
|
19730
19797
|
value: getTradingValueLabel({
|
|
19731
|
-
amount: sq.filledQty,
|
|
19798
|
+
amount: (_f = sq.estimatedPayout) != null ? _f : sq.filledQty,
|
|
19732
19799
|
minimumFractionDigits: 2,
|
|
19733
19800
|
maximumFractionDigits: 2
|
|
19734
19801
|
}),
|
|
@@ -19736,7 +19803,8 @@ var buildLiveRouteCards = ({
|
|
|
19736
19803
|
requiresSharedKyc: venueRequiresSharedKyc({ venue: sq.venue })
|
|
19737
19804
|
};
|
|
19738
19805
|
});
|
|
19739
|
-
const unavailableCards = ((
|
|
19806
|
+
const unavailableCards = ((_e = quoteData.venueSoloQuotes) != null ? _e : []).filter((sq) => sq.status === "unavailable" || sq.unavailableReason === "venue_unavailable").map((sq) => {
|
|
19807
|
+
var _a2, _b2;
|
|
19740
19808
|
const parsedVenue = parseVenue(sq.venue);
|
|
19741
19809
|
const venue = parsedVenue.success ? parsedVenue.data : void 0;
|
|
19742
19810
|
const temporarilyUnavailable = sq.unavailableReason === "venue_unavailable";
|
|
@@ -19747,10 +19815,10 @@ var buildLiveRouteCards = ({
|
|
|
19747
19815
|
hint: temporarilyUnavailable ? labels.venueTemporarilyUnavailable : labels.venueUnavailableInRegion,
|
|
19748
19816
|
kind: "venue",
|
|
19749
19817
|
label: getTradingVenueLabel(venue),
|
|
19750
|
-
numericValue: hasPreview ? sq.filledQty : 0,
|
|
19818
|
+
numericValue: hasPreview ? (_a2 = sq.estimatedPayout) != null ? _a2 : sq.filledQty : 0,
|
|
19751
19819
|
quoteData: __spreadProps(__spreadValues({}, quoteData), { quoteId: "" }),
|
|
19752
19820
|
value: hasPreview ? getTradingValueLabel({
|
|
19753
|
-
amount: sq.filledQty,
|
|
19821
|
+
amount: (_b2 = sq.estimatedPayout) != null ? _b2 : sq.filledQty,
|
|
19754
19822
|
minimumFractionDigits: 2,
|
|
19755
19823
|
maximumFractionDigits: 2
|
|
19756
19824
|
}) : ""
|
|
@@ -19964,10 +20032,13 @@ var getPlaceOrderPotentialReturn = (quoteData) => {
|
|
|
19964
20032
|
if (!((_a = quoteData == null ? void 0 : quoteData.fills) == null ? void 0 : _a.length) || quoteData.fills.length < 2) return 0;
|
|
19965
20033
|
const bestSoloVenueFill = Math.max(
|
|
19966
20034
|
0,
|
|
19967
|
-
...((_b = quoteData.venueSoloQuotes) != null ? _b : []).filter((quote) => quote.status === "ok" && quote.filledQty > 0).map((quote) =>
|
|
20035
|
+
...((_b = quoteData.venueSoloQuotes) != null ? _b : []).filter((quote) => quote.status === "ok" && quote.filledQty > 0).map((quote) => {
|
|
20036
|
+
var _a2;
|
|
20037
|
+
return (_a2 = quote.estimatedPayout) != null ? _a2 : quote.filledQty;
|
|
20038
|
+
})
|
|
19968
20039
|
);
|
|
19969
20040
|
if (bestSoloVenueFill <= 0) return 0;
|
|
19970
|
-
return Math.max(0, quoteData
|
|
20041
|
+
return Math.max(0, getPlaceOrderBuyPayout(quoteData) - bestSoloVenueFill);
|
|
19971
20042
|
};
|
|
19972
20043
|
var resolvePrimarySubmittedOrderId = ({
|
|
19973
20044
|
allowOrderIdFallback = true,
|
|
@@ -22372,7 +22443,7 @@ var PlaceOrder = ({
|
|
|
22372
22443
|
showResolvingState = false,
|
|
22373
22444
|
midpointsResult
|
|
22374
22445
|
}) => {
|
|
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;
|
|
22446
|
+
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
22447
|
const {
|
|
22377
22448
|
enableDebug: isExecutionDebugEnabled,
|
|
22378
22449
|
features: { enableAnimations, showFeesBreakdown, showLimitOrders: limitOrdersFeature },
|
|
@@ -23153,7 +23224,16 @@ var PlaceOrder = ({
|
|
|
23153
23224
|
});
|
|
23154
23225
|
const payoutLabel = formatUsd(usdSide);
|
|
23155
23226
|
const amountLabel = internalTab === "sell" ? sharesLabel : payoutLabel;
|
|
23156
|
-
const toWinLabel =
|
|
23227
|
+
const toWinLabel = formatUsd(
|
|
23228
|
+
resolvePlaceOrderNetResult({
|
|
23229
|
+
quoteData,
|
|
23230
|
+
tradeSide: internalTab,
|
|
23231
|
+
shares: sharesSide,
|
|
23232
|
+
usd: usdSide,
|
|
23233
|
+
terminalOrderEvents: executionProgress.terminalOrderEvents,
|
|
23234
|
+
submittedOrders: executionProgress.submittedOrders
|
|
23235
|
+
})
|
|
23236
|
+
);
|
|
23157
23237
|
const potentialReturnValue = getPlaceOrderPotentialReturn(quoteData);
|
|
23158
23238
|
const potentialReturnLabel = potentialReturnValue > 0 ? formatUsd(potentialReturnValue) : void 0;
|
|
23159
23239
|
const eventTitle = (_f2 = (_e2 = scopedSelectedEvent == null ? void 0 : scopedSelectedEvent.title) != null ? _e2 : scopedSelectedMarket == null ? void 0 : scopedSelectedMarket.question) != null ? _f2 : "";
|
|
@@ -23557,7 +23637,16 @@ var PlaceOrder = ({
|
|
|
23557
23637
|
maximumFractionDigits: 2
|
|
23558
23638
|
})
|
|
23559
23639
|
) : formatUsd(actualEconomics.actualRawExecCost);
|
|
23560
|
-
const payoutLabel =
|
|
23640
|
+
const payoutLabel = formatUsd(
|
|
23641
|
+
resolvePlaceOrderNetResult({
|
|
23642
|
+
quoteData,
|
|
23643
|
+
tradeSide: internalTab,
|
|
23644
|
+
shares: actualEconomics.actualTotalFilled,
|
|
23645
|
+
usd: actualEconomics.actualRawExecCost,
|
|
23646
|
+
terminalOrderEvents: executionProgress.terminalOrderEvents,
|
|
23647
|
+
submittedOrders: executionProgress.submittedOrders
|
|
23648
|
+
})
|
|
23649
|
+
);
|
|
23561
23650
|
return __spreadProps(__spreadValues({}, summaryWithGroups), {
|
|
23562
23651
|
actions: summaryWithGroups.actions.map(
|
|
23563
23652
|
(action) => action.variant === "retry" ? __spreadProps(__spreadValues({}, action), { label: tradingLabels.orderTryRemaining(remainingLabel) }) : action
|
|
@@ -23793,30 +23882,21 @@ var PlaceOrder = ({
|
|
|
23793
23882
|
if (totalFees == null) return null;
|
|
23794
23883
|
return formatUsd(totalFees, { minimumFractionDigits: 2, maximumFractionDigits: 2 });
|
|
23795
23884
|
}, [activeFeeBreakdown]);
|
|
23885
|
+
const appFeeValue = (__ = activeFeeBreakdown == null ? void 0 : activeFeeBreakdown.appFee) != null ? __ : 0;
|
|
23796
23886
|
const feeBreakdownRows = (0, import_react38.useMemo)(() => {
|
|
23797
|
-
var _a2
|
|
23887
|
+
var _a2;
|
|
23798
23888
|
if (!activeFeeBreakdown) return [];
|
|
23799
23889
|
return [
|
|
23800
23890
|
{
|
|
23891
|
+
// The builder slice (Hyperliquid only today) is a separate field on the
|
|
23892
|
+
// wire but reads as one cost to the user, so it renders inside "Venue".
|
|
23801
23893
|
kind: "amount",
|
|
23802
23894
|
label: tradingLabels.feeBreakdownVenueFees,
|
|
23803
|
-
value: formatUsd(activeFeeBreakdown.venueFees, {
|
|
23895
|
+
value: formatUsd(activeFeeBreakdown.venueFees + ((_a2 = activeFeeBreakdown.builderFee) != null ? _a2 : 0), {
|
|
23804
23896
|
minimumFractionDigits: 2,
|
|
23805
23897
|
maximumFractionDigits: 2
|
|
23806
23898
|
})
|
|
23807
23899
|
},
|
|
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
23900
|
{
|
|
23821
23901
|
kind: "amount",
|
|
23822
23902
|
label: tradingLabels.feeBreakdownExecutionGas,
|
|
@@ -23833,23 +23913,33 @@ var PlaceOrder = ({
|
|
|
23833
23913
|
maximumFractionDigits: 2
|
|
23834
23914
|
})
|
|
23835
23915
|
},
|
|
23836
|
-
|
|
23916
|
+
// A partner charging a non-zero app fee gets a plain dollar row like every
|
|
23917
|
+
// other cost above it — the "0% fee" badge is only true, and only worth
|
|
23918
|
+
// highlighting, when the fee really is zero.
|
|
23919
|
+
appFeeValue > 0 ? {
|
|
23920
|
+
kind: "amount",
|
|
23921
|
+
label: tradingLabels.feeBreakdownAggMarket,
|
|
23922
|
+
value: formatUsd(appFeeValue, {
|
|
23923
|
+
minimumFractionDigits: 2,
|
|
23924
|
+
maximumFractionDigits: 2
|
|
23925
|
+
})
|
|
23926
|
+
} : {
|
|
23837
23927
|
kind: "badge",
|
|
23838
23928
|
label: tradingLabels.feeBreakdownAggMarket,
|
|
23839
23929
|
badgeLabel: tradingLabels.feeBreakdownPlatformFeeBadge
|
|
23840
23930
|
}
|
|
23841
23931
|
];
|
|
23842
|
-
}, [activeFeeBreakdown, tradingLabels]);
|
|
23932
|
+
}, [activeFeeBreakdown, appFeeValue, tradingLabels]);
|
|
23843
23933
|
const isActionLoading = isPrimaryActionLoading || executeManaged.isPending || placeLimitOrder.isPending || isBeforeActionPending;
|
|
23844
23934
|
const selectedLimitRouteCardId = selectedLimitVenueOption ? `limit-venue-${selectedLimitVenueOption.venue}-${selectedLimitVenueOption.venueMarketOutcomeId}` : null;
|
|
23845
|
-
const selectedLimitRouteCard = selectedLimitRouteCardId ? (
|
|
23846
|
-
const selectedRouteGeoBlocked = isLimitOrder ? (
|
|
23935
|
+
const selectedLimitRouteCard = selectedLimitRouteCardId ? (_$ = limitRouteCards.find((card) => card.id === selectedLimitRouteCardId)) != null ? _$ : null : null;
|
|
23936
|
+
const selectedRouteGeoBlocked = isLimitOrder ? (_aa = selectedLimitRouteCard == null ? void 0 : selectedLimitRouteCard.isUnavailable) != null ? _aa : false : (_ba = selectedRouteCard == null ? void 0 : selectedRouteCard.isUnavailable) != null ? _ba : false;
|
|
23847
23937
|
const geoBlockedVenuesFromWarnings = (0, import_react38.useMemo)(
|
|
23848
23938
|
() => {
|
|
23849
23939
|
var _a2;
|
|
23850
23940
|
return extractGeoBlockedVenues((_a2 = smartRoute.data) == null ? void 0 : _a2.warnings);
|
|
23851
23941
|
},
|
|
23852
|
-
[(
|
|
23942
|
+
[(_ca = smartRoute.data) == null ? void 0 : _ca.warnings]
|
|
23853
23943
|
);
|
|
23854
23944
|
const isPrimaryVenueGeoBlocked = (0, import_react38.useMemo)(() => {
|
|
23855
23945
|
var _a2, _b2;
|
|
@@ -24534,7 +24624,7 @@ var PlaceOrder = ({
|
|
|
24534
24624
|
PlaceOrderResolvedView,
|
|
24535
24625
|
{
|
|
24536
24626
|
tradingState: resolvedReadOnlyTradingState,
|
|
24537
|
-
resolutionTimestamp: (
|
|
24627
|
+
resolutionTimestamp: (_da = resolvedEventTradingState.resolvesAt) != null ? _da : resolvedReadOnlyTradingState.resolvesAt,
|
|
24538
24628
|
resolvedClaim,
|
|
24539
24629
|
classNames,
|
|
24540
24630
|
className,
|
|
@@ -25295,7 +25385,7 @@ var PlaceOrder = ({
|
|
|
25295
25385
|
message: internalTab === "buy" ? tradingLabels.lowLiquidityWarning : tradingLabels.lowLiquiditySellWarning
|
|
25296
25386
|
}
|
|
25297
25387
|
) : 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: [
|
|
25388
|
+
!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
25389
|
/* @__PURE__ */ (0, import_jsx_runtime169.jsx)(
|
|
25300
25390
|
Icon,
|
|
25301
25391
|
{
|
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-5D36HPOG.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-VHKGW4DB.mjs";
|
|
22
22
|
import "./chunk-6EHT5OFU.mjs";
|
|
23
23
|
import "./chunk-TXQJUVRW.mjs";
|
|
24
24
|
import "./chunk-W7HQVQ22.mjs";
|