@agg-build/ui 2.1.0 → 2.1.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-C5M2OOM3.mjs → chunk-5RBHMMY3.mjs} +1 -1
- package/dist/{chunk-YMVD6Q2A.mjs → chunk-75AMJAWR.mjs} +1 -1
- package/dist/{chunk-Y6PVXAUQ.mjs → chunk-7ZR5JYB3.mjs} +423 -488
- package/dist/{chunk-R6FBYAY5.mjs → chunk-JJDYOBVG.mjs} +117 -48
- package/dist/{chunk-3OI2ZLLT.mjs → chunk-NRNBJPYK.mjs} +1 -1
- package/dist/{chunk-DXF2LMNN.mjs → chunk-TBD3N4T4.mjs} +849 -759
- package/dist/{chunk-YAEA6EDG.mjs → chunk-ZOECARZW.mjs} +364 -17
- package/dist/events.js +1115 -972
- package/dist/events.mjs +3 -3
- package/dist/index.js +3705 -3278
- package/dist/index.mjs +16 -8
- package/dist/modals.js +851 -824
- package/dist/modals.mjs +3 -3
- package/dist/pages.js +2778 -2357
- package/dist/pages.mjs +8 -6
- package/dist/primitives.js +849 -759
- package/dist/primitives.mjs +3 -1
- package/dist/styles.css +1 -1
- package/dist/tailwind.css +1 -1
- package/dist/trading.js +970 -599
- package/dist/trading.mjs +10 -6
- package/dist/types/events/shared/format-event-title.d.mts +25 -0
- package/dist/types/events/shared/format-event-title.d.ts +25 -0
- package/dist/types/events/shared/select-best-outcome.d.mts +88 -0
- package/dist/types/events/shared/select-best-outcome.d.ts +88 -0
- package/dist/types/pages/event-market/event-market.types.d.mts +7 -0
- package/dist/types/pages/event-market/event-market.types.d.ts +7 -0
- package/dist/types/pages/user-profile/index.d.mts +1 -0
- package/dist/types/pages/user-profile/index.d.ts +1 -0
- package/dist/types/pages/user-profile/transaction-explorer.d.mts +1 -0
- package/dist/types/pages/user-profile/transaction-explorer.d.ts +1 -0
- package/dist/types/pages/user-profile/user-profile.types.d.mts +8 -2
- package/dist/types/pages/user-profile/user-profile.types.d.ts +8 -2
- package/dist/types/primitives/icon/index.d.mts +2 -1
- package/dist/types/primitives/icon/index.d.ts +2 -1
- package/dist/types/primitives/icon/registry.d.mts +4 -0
- package/dist/types/primitives/icon/registry.d.ts +4 -0
- package/dist/types/primitives/icon/svg/paper-mode.d.mts +5 -0
- package/dist/types/primitives/icon/svg/paper-mode.d.ts +5 -0
- package/dist/types/primitives/search/search.utils.d.mts +3 -1
- package/dist/types/primitives/search/search.utils.d.ts +3 -1
- package/dist/types/trading/index.d.mts +2 -0
- package/dist/types/trading/index.d.ts +2 -0
- package/dist/types/trading/place-order/index.d.mts +1 -1
- package/dist/types/trading/place-order/index.d.ts +1 -1
- package/dist/types/trading/place-order/index.place-order.types.d.mts +23 -1
- package/dist/types/trading/place-order/index.place-order.types.d.ts +23 -1
- package/dist/types/trading/use-claim-winnings.d.mts +84 -0
- package/dist/types/trading/use-claim-winnings.d.ts +84 -0
- package/dist/types/trading/use-resolved-market-claim.d.mts +26 -0
- package/dist/types/trading/use-resolved-market-claim.d.ts +26 -0
- package/package.json +3 -3
package/dist/trading.mjs
CHANGED
|
@@ -5,8 +5,10 @@ import {
|
|
|
5
5
|
PlaceOrderSuccessView,
|
|
6
6
|
SettlementDetails,
|
|
7
7
|
parseAmount,
|
|
8
|
-
parseVenue
|
|
9
|
-
|
|
8
|
+
parseVenue,
|
|
9
|
+
useClaimWinnings,
|
|
10
|
+
useResolvedMarketClaim
|
|
11
|
+
} from "./chunk-ZOECARZW.mjs";
|
|
10
12
|
import {
|
|
11
13
|
SETTLEMENT_SECTION_ID,
|
|
12
14
|
Settlement,
|
|
@@ -21,9 +23,9 @@ import {
|
|
|
21
23
|
getTradingValueLabel,
|
|
22
24
|
getTradingVenueLabel,
|
|
23
25
|
useEventTradingContext
|
|
24
|
-
} from "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
26
|
+
} from "./chunk-5RBHMMY3.mjs";
|
|
27
|
+
import "./chunk-75AMJAWR.mjs";
|
|
28
|
+
import "./chunk-TBD3N4T4.mjs";
|
|
27
29
|
export {
|
|
28
30
|
PlaceOrder,
|
|
29
31
|
PlaceOrderFailureView,
|
|
@@ -43,5 +45,7 @@ export {
|
|
|
43
45
|
getTradingVenueLabel,
|
|
44
46
|
parseAmount,
|
|
45
47
|
parseVenue,
|
|
46
|
-
|
|
48
|
+
useClaimWinnings,
|
|
49
|
+
useEventTradingContext,
|
|
50
|
+
useResolvedMarketClaim
|
|
47
51
|
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
type EventCategoryLike = {
|
|
2
|
+
id?: string | null;
|
|
3
|
+
category?: {
|
|
4
|
+
id?: string | null;
|
|
5
|
+
name?: string | null;
|
|
6
|
+
displayName?: string | null;
|
|
7
|
+
parentId?: string | null;
|
|
8
|
+
} | null;
|
|
9
|
+
};
|
|
10
|
+
type FormatEventTitleWithDateSuffixParams = {
|
|
11
|
+
title: string;
|
|
12
|
+
categories?: readonly EventCategoryLike[] | null;
|
|
13
|
+
structureType?: string | null;
|
|
14
|
+
/**
|
|
15
|
+
* Scheduled kickoff of the underlying game. Preferred over `endDate` for
|
|
16
|
+
* the date suffix because `endDate` is the market close/expiration, which
|
|
17
|
+
* can sit well after the game (e.g. Kalshi World Cup markets expire weeks
|
|
18
|
+
* later — a June 22 game would otherwise read "- July 6").
|
|
19
|
+
*/
|
|
20
|
+
gameStartTime?: string | null;
|
|
21
|
+
endDate?: string | null;
|
|
22
|
+
locale?: string;
|
|
23
|
+
};
|
|
24
|
+
export declare const formatEventTitleWithDateSuffix: ({ title, categories, structureType, gameStartTime, endDate, locale, }: FormatEventTitleWithDateSuffixParams) => string;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
type EventCategoryLike = {
|
|
2
|
+
id?: string | null;
|
|
3
|
+
category?: {
|
|
4
|
+
id?: string | null;
|
|
5
|
+
name?: string | null;
|
|
6
|
+
displayName?: string | null;
|
|
7
|
+
parentId?: string | null;
|
|
8
|
+
} | null;
|
|
9
|
+
};
|
|
10
|
+
type FormatEventTitleWithDateSuffixParams = {
|
|
11
|
+
title: string;
|
|
12
|
+
categories?: readonly EventCategoryLike[] | null;
|
|
13
|
+
structureType?: string | null;
|
|
14
|
+
/**
|
|
15
|
+
* Scheduled kickoff of the underlying game. Preferred over `endDate` for
|
|
16
|
+
* the date suffix because `endDate` is the market close/expiration, which
|
|
17
|
+
* can sit well after the game (e.g. Kalshi World Cup markets expire weeks
|
|
18
|
+
* later — a June 22 game would otherwise read "- July 6").
|
|
19
|
+
*/
|
|
20
|
+
gameStartTime?: string | null;
|
|
21
|
+
endDate?: string | null;
|
|
22
|
+
locale?: string;
|
|
23
|
+
};
|
|
24
|
+
export declare const formatEventTitleWithDateSuffix: ({ title, categories, structureType, gameStartTime, endDate, locale, }: FormatEventTitleWithDateSuffixParams) => string;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import type { LiveBestPriceCandidate } from "@agg-build/hooks";
|
|
2
|
+
/** Which data tier produced the winning price + venue. */
|
|
3
|
+
export type BestOutcomeSource = "ws" | "rest-best" | "rest-midpoint" | "static";
|
|
4
|
+
/**
|
|
5
|
+
* The single, unified result for an outcome pill: price and venue resolved
|
|
6
|
+
* together from the *same* tier, so the displayed price and the venue logo can
|
|
7
|
+
* never disagree. `venueMarketId`, `source` and `updatedAt` are carried for
|
|
8
|
+
* telemetry/debugging and to let callers reason about freshness.
|
|
9
|
+
*/
|
|
10
|
+
export interface BestOutcomeCandidate {
|
|
11
|
+
price: number;
|
|
12
|
+
venue: string | undefined;
|
|
13
|
+
venueMarketId: string | undefined;
|
|
14
|
+
outcomeId: string;
|
|
15
|
+
source: BestOutcomeSource;
|
|
16
|
+
updatedAt: number | undefined;
|
|
17
|
+
}
|
|
18
|
+
export interface SelectBestOutcomeArgs {
|
|
19
|
+
outcomeId: string | null | undefined;
|
|
20
|
+
outcomeLabel?: string | null | undefined;
|
|
21
|
+
/** Active trade side. When set, the best ask (buy) / best bid (sell) wins. */
|
|
22
|
+
selection?: "buy" | "sell" | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Live WS candidate for this outcome — already folded across all venues for
|
|
25
|
+
* the outcome's MVMO group (see `buildLiveBestPriceCandidates`). Carries the
|
|
26
|
+
* venue that owns each side, so when a different venue takes the best live
|
|
27
|
+
* price the logo follows the price.
|
|
28
|
+
*/
|
|
29
|
+
live?: LiveBestPriceCandidate | null | undefined;
|
|
30
|
+
/** REST cross-venue best bid/ask (fallback when WS hasn't landed). */
|
|
31
|
+
restBest?: {
|
|
32
|
+
bestBid?: number;
|
|
33
|
+
bestAsk?: number;
|
|
34
|
+
} | null | undefined;
|
|
35
|
+
/** REST venue that produced each side of `restBest`. */
|
|
36
|
+
restBestVenues?: {
|
|
37
|
+
bestBidVenue?: string;
|
|
38
|
+
bestAskVenue?: string;
|
|
39
|
+
} | null | undefined;
|
|
40
|
+
/** REST per-outcome midpoint (display-path fallback). */
|
|
41
|
+
restMidpoint?: number | null | undefined;
|
|
42
|
+
/** Venue that produced `restMidpoint`. */
|
|
43
|
+
restMidpointVenue?: string | null | undefined;
|
|
44
|
+
/** Cluster-wide "Yes" reference midpoint (display path, "yes" labels only). */
|
|
45
|
+
bestMidpoint?: number | null | undefined;
|
|
46
|
+
/** Venue that produced `bestMidpoint`. */
|
|
47
|
+
bestMidpointVenue?: string | null | undefined;
|
|
48
|
+
/** Final static fallback — the outcome's payload price. */
|
|
49
|
+
staticPrice?: number | null | undefined;
|
|
50
|
+
/** Venue for the static fallback (typically the local market's own venue). */
|
|
51
|
+
staticVenue?: string | null | undefined;
|
|
52
|
+
/** Resolves a venue name → its venueMarketId within the cluster (best effort). */
|
|
53
|
+
venueMarketIdByVenue?: ReadonlyMap<string, string> | null | undefined;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Resolve the single best price + venue for an outcome across all venues.
|
|
57
|
+
*
|
|
58
|
+
* Candidate priority (price and venue are always taken from the SAME tier):
|
|
59
|
+
* With a trade selection (buy/sell):
|
|
60
|
+
* 1. fresh WS best ask/bid for that side → source "ws"
|
|
61
|
+
* 2. REST best ask/bid for that side → source "rest-best"
|
|
62
|
+
* 3. fresh WS midpoint → source "ws"
|
|
63
|
+
* 4. REST per-outcome midpoint → source "rest-midpoint"
|
|
64
|
+
* 5. static outcome price → source "static"
|
|
65
|
+
* Display path (no selection):
|
|
66
|
+
* 1. fresh WS midpoint → source "ws"
|
|
67
|
+
* 2. cluster "Yes" reference (yes labels) → source "rest-midpoint"
|
|
68
|
+
* 3. REST per-outcome midpoint → source "rest-midpoint"
|
|
69
|
+
* 4. static outcome price → source "static"
|
|
70
|
+
*
|
|
71
|
+
* Because WS is preferred per side over REST, a stale REST snapshot can never
|
|
72
|
+
* override newer live data — and because the venue is read from whichever tier
|
|
73
|
+
* supplied the price, the logo and the price switch together.
|
|
74
|
+
*/
|
|
75
|
+
export declare const selectBestOutcomeCandidate: (args: SelectBestOutcomeArgs) => BestOutcomeCandidate | undefined;
|
|
76
|
+
/**
|
|
77
|
+
* Build a venue-name → venueMarketId lookup across a cluster (including matched
|
|
78
|
+
* siblings). First occurrence wins. Used to resolve the winning venue's market
|
|
79
|
+
* id for {@link selectBestOutcomeCandidate}.
|
|
80
|
+
*/
|
|
81
|
+
export declare const buildVenueMarketIdByVenue: (venueMarkets: ReadonlyArray<{
|
|
82
|
+
id?: string;
|
|
83
|
+
venue?: string | null;
|
|
84
|
+
matchedVenueMarkets?: ReadonlyArray<{
|
|
85
|
+
id?: string;
|
|
86
|
+
venue?: string | null;
|
|
87
|
+
}> | null;
|
|
88
|
+
}> | null | undefined) => Map<string, string>;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import type { LiveBestPriceCandidate } from "@agg-build/hooks";
|
|
2
|
+
/** Which data tier produced the winning price + venue. */
|
|
3
|
+
export type BestOutcomeSource = "ws" | "rest-best" | "rest-midpoint" | "static";
|
|
4
|
+
/**
|
|
5
|
+
* The single, unified result for an outcome pill: price and venue resolved
|
|
6
|
+
* together from the *same* tier, so the displayed price and the venue logo can
|
|
7
|
+
* never disagree. `venueMarketId`, `source` and `updatedAt` are carried for
|
|
8
|
+
* telemetry/debugging and to let callers reason about freshness.
|
|
9
|
+
*/
|
|
10
|
+
export interface BestOutcomeCandidate {
|
|
11
|
+
price: number;
|
|
12
|
+
venue: string | undefined;
|
|
13
|
+
venueMarketId: string | undefined;
|
|
14
|
+
outcomeId: string;
|
|
15
|
+
source: BestOutcomeSource;
|
|
16
|
+
updatedAt: number | undefined;
|
|
17
|
+
}
|
|
18
|
+
export interface SelectBestOutcomeArgs {
|
|
19
|
+
outcomeId: string | null | undefined;
|
|
20
|
+
outcomeLabel?: string | null | undefined;
|
|
21
|
+
/** Active trade side. When set, the best ask (buy) / best bid (sell) wins. */
|
|
22
|
+
selection?: "buy" | "sell" | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Live WS candidate for this outcome — already folded across all venues for
|
|
25
|
+
* the outcome's MVMO group (see `buildLiveBestPriceCandidates`). Carries the
|
|
26
|
+
* venue that owns each side, so when a different venue takes the best live
|
|
27
|
+
* price the logo follows the price.
|
|
28
|
+
*/
|
|
29
|
+
live?: LiveBestPriceCandidate | null | undefined;
|
|
30
|
+
/** REST cross-venue best bid/ask (fallback when WS hasn't landed). */
|
|
31
|
+
restBest?: {
|
|
32
|
+
bestBid?: number;
|
|
33
|
+
bestAsk?: number;
|
|
34
|
+
} | null | undefined;
|
|
35
|
+
/** REST venue that produced each side of `restBest`. */
|
|
36
|
+
restBestVenues?: {
|
|
37
|
+
bestBidVenue?: string;
|
|
38
|
+
bestAskVenue?: string;
|
|
39
|
+
} | null | undefined;
|
|
40
|
+
/** REST per-outcome midpoint (display-path fallback). */
|
|
41
|
+
restMidpoint?: number | null | undefined;
|
|
42
|
+
/** Venue that produced `restMidpoint`. */
|
|
43
|
+
restMidpointVenue?: string | null | undefined;
|
|
44
|
+
/** Cluster-wide "Yes" reference midpoint (display path, "yes" labels only). */
|
|
45
|
+
bestMidpoint?: number | null | undefined;
|
|
46
|
+
/** Venue that produced `bestMidpoint`. */
|
|
47
|
+
bestMidpointVenue?: string | null | undefined;
|
|
48
|
+
/** Final static fallback — the outcome's payload price. */
|
|
49
|
+
staticPrice?: number | null | undefined;
|
|
50
|
+
/** Venue for the static fallback (typically the local market's own venue). */
|
|
51
|
+
staticVenue?: string | null | undefined;
|
|
52
|
+
/** Resolves a venue name → its venueMarketId within the cluster (best effort). */
|
|
53
|
+
venueMarketIdByVenue?: ReadonlyMap<string, string> | null | undefined;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Resolve the single best price + venue for an outcome across all venues.
|
|
57
|
+
*
|
|
58
|
+
* Candidate priority (price and venue are always taken from the SAME tier):
|
|
59
|
+
* With a trade selection (buy/sell):
|
|
60
|
+
* 1. fresh WS best ask/bid for that side → source "ws"
|
|
61
|
+
* 2. REST best ask/bid for that side → source "rest-best"
|
|
62
|
+
* 3. fresh WS midpoint → source "ws"
|
|
63
|
+
* 4. REST per-outcome midpoint → source "rest-midpoint"
|
|
64
|
+
* 5. static outcome price → source "static"
|
|
65
|
+
* Display path (no selection):
|
|
66
|
+
* 1. fresh WS midpoint → source "ws"
|
|
67
|
+
* 2. cluster "Yes" reference (yes labels) → source "rest-midpoint"
|
|
68
|
+
* 3. REST per-outcome midpoint → source "rest-midpoint"
|
|
69
|
+
* 4. static outcome price → source "static"
|
|
70
|
+
*
|
|
71
|
+
* Because WS is preferred per side over REST, a stale REST snapshot can never
|
|
72
|
+
* override newer live data — and because the venue is read from whichever tier
|
|
73
|
+
* supplied the price, the logo and the price switch together.
|
|
74
|
+
*/
|
|
75
|
+
export declare const selectBestOutcomeCandidate: (args: SelectBestOutcomeArgs) => BestOutcomeCandidate | undefined;
|
|
76
|
+
/**
|
|
77
|
+
* Build a venue-name → venueMarketId lookup across a cluster (including matched
|
|
78
|
+
* siblings). First occurrence wins. Used to resolve the winning venue's market
|
|
79
|
+
* id for {@link selectBestOutcomeCandidate}.
|
|
80
|
+
*/
|
|
81
|
+
export declare const buildVenueMarketIdByVenue: (venueMarkets: ReadonlyArray<{
|
|
82
|
+
id?: string;
|
|
83
|
+
venue?: string | null;
|
|
84
|
+
matchedVenueMarkets?: ReadonlyArray<{
|
|
85
|
+
id?: string;
|
|
86
|
+
venue?: string | null;
|
|
87
|
+
}> | null;
|
|
88
|
+
}> | null | undefined) => Map<string, string>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { VenueEventWithMarkets } from "../../events/item/event-list-item.types";
|
|
2
2
|
import type { PlaceOrderResolvedClaimSummary } from "../../trading";
|
|
3
|
+
import type { PlaceOrderProps } from "../../trading/place-order/index.place-order.types";
|
|
3
4
|
export type EventMarketPageClassNames = Partial<{
|
|
4
5
|
root: string;
|
|
5
6
|
content: string;
|
|
@@ -44,6 +45,12 @@ export type EventMarketPageBaseProps = {
|
|
|
44
45
|
defaultOutcomeId?: string;
|
|
45
46
|
/** Whether to render the place-order panel. */
|
|
46
47
|
showPlaceOrder?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Pre-flight gate run before the internal quote execution, forwarded to the
|
|
50
|
+
* place-order panel. When it resolves the order fills as usual; return
|
|
51
|
+
* `false` to cancel or throw to abort. See `PlaceOrderProps.onBeforePrimaryAction`.
|
|
52
|
+
*/
|
|
53
|
+
onBeforePrimaryAction?: PlaceOrderProps["onBeforePrimaryAction"];
|
|
47
54
|
executionMode?: "live" | "paper";
|
|
48
55
|
/** Optional resolved-event claim summary shown inside the read-only order panel. */
|
|
49
56
|
resolvedClaim?: PlaceOrderResolvedClaimSummary;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { VenueEventWithMarkets } from "../../events/item/event-list-item.types";
|
|
2
2
|
import type { PlaceOrderResolvedClaimSummary } from "../../trading";
|
|
3
|
+
import type { PlaceOrderProps } from "../../trading/place-order/index.place-order.types";
|
|
3
4
|
export type EventMarketPageClassNames = Partial<{
|
|
4
5
|
root: string;
|
|
5
6
|
content: string;
|
|
@@ -44,6 +45,12 @@ export type EventMarketPageBaseProps = {
|
|
|
44
45
|
defaultOutcomeId?: string;
|
|
45
46
|
/** Whether to render the place-order panel. */
|
|
46
47
|
showPlaceOrder?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Pre-flight gate run before the internal quote execution, forwarded to the
|
|
50
|
+
* place-order panel. When it resolves the order fills as usual; return
|
|
51
|
+
* `false` to cancel or throw to abort. See `PlaceOrderProps.onBeforePrimaryAction`.
|
|
52
|
+
*/
|
|
53
|
+
onBeforePrimaryAction?: PlaceOrderProps["onBeforePrimaryAction"];
|
|
47
54
|
executionMode?: "live" | "paper";
|
|
48
55
|
/** Optional resolved-event claim summary shown inside the read-only order panel. */
|
|
49
56
|
resolvedClaim?: PlaceOrderResolvedClaimSummary;
|
|
@@ -2,6 +2,7 @@ import type { UserProfilePageProps } from "./user-profile.types";
|
|
|
2
2
|
export type { UserProfileActivity, UserProfileActivityStatus, UserProfileBalance, UserProfileConnectedExchange, UserProfileConnectedWallet, UserProfileInfo, UserProfilePageClassNames, UserProfilePageProps, UserProfilePosition, UserProfilePositionFilter, UserProfilePositionVenueShare, UserProfileSocialLink, UserProfileTransferStatus, UserProfileVenueBalance, } from "./user-profile.types";
|
|
3
3
|
export { USER_PROFILE_TAB_ACTIVITY, USER_PROFILE_TAB_OPEN_ORDERS, USER_PROFILE_TAB_POSITIONS, } from "./user-profile.constants";
|
|
4
4
|
export type { UserProfileTabValue } from "./user-profile.constants";
|
|
5
|
+
export { buildAggTxExplorerHref } from "./transaction-explorer";
|
|
5
6
|
export declare const UserProfilePage: {
|
|
6
7
|
({ user, balanceChainsOverride, venueBalances: _venueBalances, balance, activePositions, closedPositions, activities, executionMode, onEditProfile, onDeposit, onWithdraw, openOrders, initialPositionFilter, tab, onTabChange, onPositionClick, getPositionHref, onClaim, claimingPositionKeys, onClaimResult, onClaimSubmitError, onActivityClick, getActivityHref, onOpenOrderClick, onCancelOrder, cancellingOrderIds, isLoadingPositions, isLoadingActivities, isLoadingOpenOrders, positionsError, activitiesError, openOrdersError, hasMoreActivePositions, isLoadingMoreActivePositions, onLoadMoreActivePositions, hasMoreClosedPositions, isLoadingMoreClosedPositions, onLoadMoreClosedPositions, onPositionFilterChange: onPositionFilterChangeProp, hasMoreActivities, isLoadingMoreActivities, onLoadMoreActivities, hasMoreOpenOrders, isLoadingMoreOpenOrders, onLoadMoreOpenOrders, classNames, onError, }: UserProfilePageProps & {
|
|
7
8
|
onError?: (error: Error) => void;
|
|
@@ -2,6 +2,7 @@ import type { UserProfilePageProps } from "./user-profile.types";
|
|
|
2
2
|
export type { UserProfileActivity, UserProfileActivityStatus, UserProfileBalance, UserProfileConnectedExchange, UserProfileConnectedWallet, UserProfileInfo, UserProfilePageClassNames, UserProfilePageProps, UserProfilePosition, UserProfilePositionFilter, UserProfilePositionVenueShare, UserProfileSocialLink, UserProfileTransferStatus, UserProfileVenueBalance, } from "./user-profile.types";
|
|
3
3
|
export { USER_PROFILE_TAB_ACTIVITY, USER_PROFILE_TAB_OPEN_ORDERS, USER_PROFILE_TAB_POSITIONS, } from "./user-profile.constants";
|
|
4
4
|
export type { UserProfileTabValue } from "./user-profile.constants";
|
|
5
|
+
export { buildAggTxExplorerHref } from "./transaction-explorer";
|
|
5
6
|
export declare const UserProfilePage: {
|
|
6
7
|
({ user, balanceChainsOverride, venueBalances: _venueBalances, balance, activePositions, closedPositions, activities, executionMode, onEditProfile, onDeposit, onWithdraw, openOrders, initialPositionFilter, tab, onTabChange, onPositionClick, getPositionHref, onClaim, claimingPositionKeys, onClaimResult, onClaimSubmitError, onActivityClick, getActivityHref, onOpenOrderClick, onCancelOrder, cancellingOrderIds, isLoadingPositions, isLoadingActivities, isLoadingOpenOrders, positionsError, activitiesError, openOrdersError, hasMoreActivePositions, isLoadingMoreActivePositions, onLoadMoreActivePositions, hasMoreClosedPositions, isLoadingMoreClosedPositions, onLoadMoreClosedPositions, onPositionFilterChange: onPositionFilterChangeProp, hasMoreActivities, isLoadingMoreActivities, onLoadMoreActivities, hasMoreOpenOrders, isLoadingMoreOpenOrders, onLoadMoreOpenOrders, classNames, onError, }: UserProfilePageProps & {
|
|
7
8
|
onError?: (error: Error) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const buildAggTxExplorerHref: (chainId: string | number | null | undefined, txHash: string | null | undefined) => string | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const buildAggTxExplorerHref: (chainId: string | number | null | undefined, txHash: string | null | undefined) => string | undefined;
|
|
@@ -156,6 +156,10 @@ export interface UserProfileTradeActivity {
|
|
|
156
156
|
export interface UserProfileRedeemActivity {
|
|
157
157
|
kind: "redeem";
|
|
158
158
|
id: string;
|
|
159
|
+
/** Chain ID used to build an explorer link for the redeem transaction. */
|
|
160
|
+
chainId?: string;
|
|
161
|
+
/** Transaction hash used to build an explorer link for the redeem transaction. */
|
|
162
|
+
txHash?: string;
|
|
159
163
|
/** Whether the activity failed and should render in a degraded state. */
|
|
160
164
|
isFailed?: boolean;
|
|
161
165
|
/** Whether the row should use error-colored text because the activity has an error. */
|
|
@@ -191,6 +195,10 @@ export type UserProfileTransferStatus = UserProfileActivityStatus;
|
|
|
191
195
|
export interface UserProfileTransferActivity {
|
|
192
196
|
kind: "withdrawal" | "deposit" | "bridge" | "user_op" | "unknown";
|
|
193
197
|
id: string;
|
|
198
|
+
/** Chain ID used to build an explorer link for the activity transaction. */
|
|
199
|
+
chainId?: string;
|
|
200
|
+
/** Transaction hash used to build an explorer link for the activity transaction. */
|
|
201
|
+
txHash?: string;
|
|
194
202
|
/** Whether the activity failed and should render in a degraded state. */
|
|
195
203
|
isFailed?: boolean;
|
|
196
204
|
/** Whether the row should use error-colored text because the activity has an error. */
|
|
@@ -211,8 +219,6 @@ export interface UserProfileTransferActivity {
|
|
|
211
219
|
timeLabel: string;
|
|
212
220
|
/** Deposit source — determines the icon in the thumbnail square. Only set when kind is "deposit". */
|
|
213
221
|
depositSource?: "wallet" | "crypto" | "card";
|
|
214
|
-
/** Chain ID for chain-aware deposit icons. */
|
|
215
|
-
chainId?: string | number;
|
|
216
222
|
}
|
|
217
223
|
export type UserProfileActivity = UserProfileTradeActivity | UserProfileRedeemActivity | UserProfileTransferActivity;
|
|
218
224
|
export interface UserProfileOpenOrder {
|
|
@@ -156,6 +156,10 @@ export interface UserProfileTradeActivity {
|
|
|
156
156
|
export interface UserProfileRedeemActivity {
|
|
157
157
|
kind: "redeem";
|
|
158
158
|
id: string;
|
|
159
|
+
/** Chain ID used to build an explorer link for the redeem transaction. */
|
|
160
|
+
chainId?: string;
|
|
161
|
+
/** Transaction hash used to build an explorer link for the redeem transaction. */
|
|
162
|
+
txHash?: string;
|
|
159
163
|
/** Whether the activity failed and should render in a degraded state. */
|
|
160
164
|
isFailed?: boolean;
|
|
161
165
|
/** Whether the row should use error-colored text because the activity has an error. */
|
|
@@ -191,6 +195,10 @@ export type UserProfileTransferStatus = UserProfileActivityStatus;
|
|
|
191
195
|
export interface UserProfileTransferActivity {
|
|
192
196
|
kind: "withdrawal" | "deposit" | "bridge" | "user_op" | "unknown";
|
|
193
197
|
id: string;
|
|
198
|
+
/** Chain ID used to build an explorer link for the activity transaction. */
|
|
199
|
+
chainId?: string;
|
|
200
|
+
/** Transaction hash used to build an explorer link for the activity transaction. */
|
|
201
|
+
txHash?: string;
|
|
194
202
|
/** Whether the activity failed and should render in a degraded state. */
|
|
195
203
|
isFailed?: boolean;
|
|
196
204
|
/** Whether the row should use error-colored text because the activity has an error. */
|
|
@@ -211,8 +219,6 @@ export interface UserProfileTransferActivity {
|
|
|
211
219
|
timeLabel: string;
|
|
212
220
|
/** Deposit source — determines the icon in the thumbnail square. Only set when kind is "deposit". */
|
|
213
221
|
depositSource?: "wallet" | "crypto" | "card";
|
|
214
|
-
/** Chain ID for chain-aware deposit icons. */
|
|
215
|
-
chainId?: string | number;
|
|
216
222
|
}
|
|
217
223
|
export type UserProfileActivity = UserProfileTradeActivity | UserProfileRedeemActivity | UserProfileTransferActivity;
|
|
218
224
|
export interface UserProfileOpenOrder {
|
|
@@ -38,6 +38,7 @@ import { InfoIcon } from "./svg/info";
|
|
|
38
38
|
import { iconNames } from "./registry";
|
|
39
39
|
import { LinkAccountsIcon } from "./svg/link-accounts";
|
|
40
40
|
import { LockIcon } from "./svg/lock";
|
|
41
|
+
import { PaperModeIcon } from "./svg/paper-mode";
|
|
41
42
|
import { PencilIcon } from "./svg/pencil";
|
|
42
43
|
import { PlaySquareIcon } from "./svg/play-square";
|
|
43
44
|
import { PolygonIcon } from "./svg/polygon";
|
|
@@ -71,4 +72,4 @@ export declare const Icon: {
|
|
|
71
72
|
({ name, color, size, className, style, ...props }: IconProps): JSX.Element | null;
|
|
72
73
|
displayName: string;
|
|
73
74
|
};
|
|
74
|
-
export { ActivityChartIcon, AppleIcon, AppsIcon, BadgeCheckThinIcon, ArbitrumIcon, ArrowRightIcon, ArrowTrendUpIcon, ArrowsToDotIcon, BankIcon, BaseIcon, BestPricesIcon, BnbIcon, BoltIcon, CheckCircleIcon, ChartCandlestickIcon, ChartLineIcon, CircleOverlapIcon, CircleXmarkIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CloseIcon, CopyIcon, CreateAccountIcon, CreditCardIcon, DisconnectIcon, DotsHorizontalIcon, DocumentIcon, DownloadIcon, ErrorFilledIcon, EthereumIcon, ExternalLinkIcon, GiftBonusIcon, GoogleIcon, HourglassStartIcon, iconNames, ImageIcon, InfoIcon, LinkAccountsIcon, LockIcon, PencilIcon, PlaySquareIcon, PolygonIcon, ProfileIcon, RevenueAltIcon, SearchIcon, ShieldTrustIcon, SolanaIcon, SparklesFilledIcon, StayInControlIcon, SuccessCheckIcon, TriangleDownIcon, TriangleUpFilledIcon, TriangleUpIcon, UploadIcon, UserTrustIcon, UsdcIcon, PaperPlaneIcon, WalletAvatarIcon, WalletFilledIcon, WalletIcon, WarningFilledIcon, WarningIcon, };
|
|
75
|
+
export { ActivityChartIcon, AppleIcon, AppsIcon, BadgeCheckThinIcon, ArbitrumIcon, ArrowRightIcon, ArrowTrendUpIcon, ArrowsToDotIcon, BankIcon, BaseIcon, BestPricesIcon, BnbIcon, BoltIcon, CheckCircleIcon, ChartCandlestickIcon, ChartLineIcon, CircleOverlapIcon, CircleXmarkIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CloseIcon, CopyIcon, CreateAccountIcon, CreditCardIcon, DisconnectIcon, DotsHorizontalIcon, DocumentIcon, DownloadIcon, ErrorFilledIcon, EthereumIcon, ExternalLinkIcon, GiftBonusIcon, GoogleIcon, HourglassStartIcon, iconNames, ImageIcon, InfoIcon, LinkAccountsIcon, LockIcon, PaperModeIcon, PencilIcon, PlaySquareIcon, PolygonIcon, ProfileIcon, RevenueAltIcon, SearchIcon, ShieldTrustIcon, SolanaIcon, SparklesFilledIcon, StayInControlIcon, SuccessCheckIcon, TriangleDownIcon, TriangleUpFilledIcon, TriangleUpIcon, UploadIcon, UserTrustIcon, UsdcIcon, PaperPlaneIcon, WalletAvatarIcon, WalletFilledIcon, WalletIcon, WarningFilledIcon, WarningIcon, };
|
|
@@ -38,6 +38,7 @@ import { InfoIcon } from "./svg/info";
|
|
|
38
38
|
import { iconNames } from "./registry";
|
|
39
39
|
import { LinkAccountsIcon } from "./svg/link-accounts";
|
|
40
40
|
import { LockIcon } from "./svg/lock";
|
|
41
|
+
import { PaperModeIcon } from "./svg/paper-mode";
|
|
41
42
|
import { PencilIcon } from "./svg/pencil";
|
|
42
43
|
import { PlaySquareIcon } from "./svg/play-square";
|
|
43
44
|
import { PolygonIcon } from "./svg/polygon";
|
|
@@ -71,4 +72,4 @@ export declare const Icon: {
|
|
|
71
72
|
({ name, color, size, className, style, ...props }: IconProps): JSX.Element | null;
|
|
72
73
|
displayName: string;
|
|
73
74
|
};
|
|
74
|
-
export { ActivityChartIcon, AppleIcon, AppsIcon, BadgeCheckThinIcon, ArbitrumIcon, ArrowRightIcon, ArrowTrendUpIcon, ArrowsToDotIcon, BankIcon, BaseIcon, BestPricesIcon, BnbIcon, BoltIcon, CheckCircleIcon, ChartCandlestickIcon, ChartLineIcon, CircleOverlapIcon, CircleXmarkIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CloseIcon, CopyIcon, CreateAccountIcon, CreditCardIcon, DisconnectIcon, DotsHorizontalIcon, DocumentIcon, DownloadIcon, ErrorFilledIcon, EthereumIcon, ExternalLinkIcon, GiftBonusIcon, GoogleIcon, HourglassStartIcon, iconNames, ImageIcon, InfoIcon, LinkAccountsIcon, LockIcon, PencilIcon, PlaySquareIcon, PolygonIcon, ProfileIcon, RevenueAltIcon, SearchIcon, ShieldTrustIcon, SolanaIcon, SparklesFilledIcon, StayInControlIcon, SuccessCheckIcon, TriangleDownIcon, TriangleUpFilledIcon, TriangleUpIcon, UploadIcon, UserTrustIcon, UsdcIcon, PaperPlaneIcon, WalletAvatarIcon, WalletFilledIcon, WalletIcon, WarningFilledIcon, WarningIcon, };
|
|
75
|
+
export { ActivityChartIcon, AppleIcon, AppsIcon, BadgeCheckThinIcon, ArbitrumIcon, ArrowRightIcon, ArrowTrendUpIcon, ArrowsToDotIcon, BankIcon, BaseIcon, BestPricesIcon, BnbIcon, BoltIcon, CheckCircleIcon, ChartCandlestickIcon, ChartLineIcon, CircleOverlapIcon, CircleXmarkIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CloseIcon, CopyIcon, CreateAccountIcon, CreditCardIcon, DisconnectIcon, DotsHorizontalIcon, DocumentIcon, DownloadIcon, ErrorFilledIcon, EthereumIcon, ExternalLinkIcon, GiftBonusIcon, GoogleIcon, HourglassStartIcon, iconNames, ImageIcon, InfoIcon, LinkAccountsIcon, LockIcon, PaperModeIcon, PencilIcon, PlaySquareIcon, PolygonIcon, ProfileIcon, RevenueAltIcon, SearchIcon, ShieldTrustIcon, SolanaIcon, SparklesFilledIcon, StayInControlIcon, SuccessCheckIcon, TriangleDownIcon, TriangleUpFilledIcon, TriangleUpIcon, UploadIcon, UserTrustIcon, UsdcIcon, PaperPlaneIcon, WalletAvatarIcon, WalletFilledIcon, WalletIcon, WarningFilledIcon, WarningIcon, };
|
|
@@ -188,6 +188,10 @@ export declare const iconRegistry: {
|
|
|
188
188
|
({ title, className, ...props }: import("./types").IconSvgProps): JSX.Element;
|
|
189
189
|
displayName: string;
|
|
190
190
|
};
|
|
191
|
+
readonly "paper-mode": {
|
|
192
|
+
({ title, className, ...props }: import("./types").IconSvgProps): JSX.Element;
|
|
193
|
+
displayName: string;
|
|
194
|
+
};
|
|
191
195
|
readonly pencil: {
|
|
192
196
|
({ title, className, ...props }: import("./types").IconSvgProps): JSX.Element;
|
|
193
197
|
displayName: string;
|
|
@@ -188,6 +188,10 @@ export declare const iconRegistry: {
|
|
|
188
188
|
({ title, className, ...props }: import("./types").IconSvgProps): JSX.Element;
|
|
189
189
|
displayName: string;
|
|
190
190
|
};
|
|
191
|
+
readonly "paper-mode": {
|
|
192
|
+
({ title, className, ...props }: import("./types").IconSvgProps): JSX.Element;
|
|
193
|
+
displayName: string;
|
|
194
|
+
};
|
|
191
195
|
readonly pencil: {
|
|
192
196
|
({ title, className, ...props }: import("./types").IconSvgProps): JSX.Element;
|
|
193
197
|
displayName: string;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { AggUiLabels } from "@agg-build/hooks";
|
|
2
2
|
import type { VenueEventWithMarkets } from "../../events/item";
|
|
3
3
|
import type { SearchResultItem } from "./search.types";
|
|
4
|
-
export declare const mapVenueEventToSearchResult: (event: VenueEventWithMarkets, labels: AggUiLabels, formatPercent: (value: number) => string, formatCompactCurrency: (value: number) => string
|
|
4
|
+
export declare const mapVenueEventToSearchResult: (event: VenueEventWithMarkets, labels: AggUiLabels, formatPercent: (value: number) => string, formatCompactCurrency: (value: number) => string, options?: {
|
|
5
|
+
locale?: string;
|
|
6
|
+
}) => SearchResultItem | null;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { AggUiLabels } from "@agg-build/hooks";
|
|
2
2
|
import type { VenueEventWithMarkets } from "../../events/item";
|
|
3
3
|
import type { SearchResultItem } from "./search.types";
|
|
4
|
-
export declare const mapVenueEventToSearchResult: (event: VenueEventWithMarkets, labels: AggUiLabels, formatPercent: (value: number) => string, formatCompactCurrency: (value: number) => string
|
|
4
|
+
export declare const mapVenueEventToSearchResult: (event: VenueEventWithMarkets, labels: AggUiLabels, formatPercent: (value: number) => string, formatCompactCurrency: (value: number) => string, options?: {
|
|
5
|
+
locale?: string;
|
|
6
|
+
}) => SearchResultItem | null;
|
|
@@ -5,6 +5,6 @@ export { PlaceOrderSuccessView } from "./index.place-order.success";
|
|
|
5
5
|
export type { PlaceOrderSuccessViewProps } from "./index.place-order.success";
|
|
6
6
|
export type { PlaceOrderClassNames, PlaceOrderExecutionSummary, PlaceOrderResolvedClaimSummary, PlaceOrderTradingLabels, } from "./index.place-order.types";
|
|
7
7
|
export declare const PlaceOrder: {
|
|
8
|
-
({ className, classNames, eventTradingState, executionMode, isLoading, isPrimaryActionDisabled, isPrimaryActionLoading, chainBalancesOverride, onAmountChange, onClose, onOutcomeChange, onPrimaryAction, onTabChange, onSuccess, onError, onExecutionStateChange, resolvedClaim, midpointsResult, }: PlaceOrderProps): JSX.Element;
|
|
8
|
+
({ className, classNames, eventTradingState, executionMode, isLoading, isPrimaryActionDisabled, isPrimaryActionLoading, chainBalancesOverride, onAmountChange, onClose, onOutcomeChange, onPrimaryAction, onBeforePrimaryAction, onTabChange, onSuccess, onError, onExecutionStateChange, resolvedClaim, midpointsResult, }: PlaceOrderProps): JSX.Element;
|
|
9
9
|
displayName: string;
|
|
10
10
|
};
|
|
@@ -5,6 +5,6 @@ export { PlaceOrderSuccessView } from "./index.place-order.success";
|
|
|
5
5
|
export type { PlaceOrderSuccessViewProps } from "./index.place-order.success";
|
|
6
6
|
export type { PlaceOrderClassNames, PlaceOrderExecutionSummary, PlaceOrderResolvedClaimSummary, PlaceOrderTradingLabels, } from "./index.place-order.types";
|
|
7
7
|
export declare const PlaceOrder: {
|
|
8
|
-
({ className, classNames, eventTradingState, executionMode, isLoading, isPrimaryActionDisabled, isPrimaryActionLoading, chainBalancesOverride, onAmountChange, onClose, onOutcomeChange, onPrimaryAction, onTabChange, onSuccess, onError, onExecutionStateChange, resolvedClaim, midpointsResult, }: PlaceOrderProps): JSX.Element;
|
|
8
|
+
({ className, classNames, eventTradingState, executionMode, isLoading, isPrimaryActionDisabled, isPrimaryActionLoading, chainBalancesOverride, onAmountChange, onClose, onOutcomeChange, onPrimaryAction, onBeforePrimaryAction, onTabChange, onSuccess, onError, onExecutionStateChange, resolvedClaim, midpointsResult, }: PlaceOrderProps): JSX.Element;
|
|
9
9
|
displayName: string;
|
|
10
10
|
};
|
|
@@ -22,11 +22,33 @@ export type PlaceOrderProps = {
|
|
|
22
22
|
onClose?: () => void;
|
|
23
23
|
/** Called when the selected outcome changes. */
|
|
24
24
|
onOutcomeChange?: (outcomeId: string) => void;
|
|
25
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* Called when the primary action is triggered, in place of the internal
|
|
27
|
+
* quote execution. When provided, the component delegates the fill entirely
|
|
28
|
+
* to this callback and does NOT run its own execution. For a pre-flight gate
|
|
29
|
+
* that should run *before* the normal fill (and let it proceed), use
|
|
30
|
+
* `onBeforePrimaryAction` instead.
|
|
31
|
+
*/
|
|
26
32
|
onPrimaryAction?: (context?: {
|
|
27
33
|
quoteId?: string;
|
|
28
34
|
mode?: ExecutionMode;
|
|
29
35
|
}) => void;
|
|
36
|
+
/**
|
|
37
|
+
* Called when the primary action is triggered, BEFORE the internal quote
|
|
38
|
+
* execution. Unlike `onPrimaryAction`, this does not replace the fill — it
|
|
39
|
+
* runs in between and, when it resolves, the order is filled as usual. Use it
|
|
40
|
+
* for a partner gate such as a verification/KYC modal that must complete
|
|
41
|
+
* before the order goes through.
|
|
42
|
+
*
|
|
43
|
+
* The returned promise is awaited before execution proceeds:
|
|
44
|
+
* - resolve (return `undefined`/`true`) → continue with the normal fill
|
|
45
|
+
* - return `false` → cancel silently; the panel returns to idle
|
|
46
|
+
* - throw → abort and surface the error as submission feedback
|
|
47
|
+
*/
|
|
48
|
+
onBeforePrimaryAction?: (context?: {
|
|
49
|
+
quoteId?: string;
|
|
50
|
+
mode?: ExecutionMode;
|
|
51
|
+
}) => void | boolean | Promise<void | boolean>;
|
|
30
52
|
/** Called when the slippage control value changes. */
|
|
31
53
|
onSlippageChange?: (value: string) => void;
|
|
32
54
|
/** Called when the active trade tab changes. */
|
|
@@ -22,11 +22,33 @@ export type PlaceOrderProps = {
|
|
|
22
22
|
onClose?: () => void;
|
|
23
23
|
/** Called when the selected outcome changes. */
|
|
24
24
|
onOutcomeChange?: (outcomeId: string) => void;
|
|
25
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* Called when the primary action is triggered, in place of the internal
|
|
27
|
+
* quote execution. When provided, the component delegates the fill entirely
|
|
28
|
+
* to this callback and does NOT run its own execution. For a pre-flight gate
|
|
29
|
+
* that should run *before* the normal fill (and let it proceed), use
|
|
30
|
+
* `onBeforePrimaryAction` instead.
|
|
31
|
+
*/
|
|
26
32
|
onPrimaryAction?: (context?: {
|
|
27
33
|
quoteId?: string;
|
|
28
34
|
mode?: ExecutionMode;
|
|
29
35
|
}) => void;
|
|
36
|
+
/**
|
|
37
|
+
* Called when the primary action is triggered, BEFORE the internal quote
|
|
38
|
+
* execution. Unlike `onPrimaryAction`, this does not replace the fill — it
|
|
39
|
+
* runs in between and, when it resolves, the order is filled as usual. Use it
|
|
40
|
+
* for a partner gate such as a verification/KYC modal that must complete
|
|
41
|
+
* before the order goes through.
|
|
42
|
+
*
|
|
43
|
+
* The returned promise is awaited before execution proceeds:
|
|
44
|
+
* - resolve (return `undefined`/`true`) → continue with the normal fill
|
|
45
|
+
* - return `false` → cancel silently; the panel returns to idle
|
|
46
|
+
* - throw → abort and surface the error as submission feedback
|
|
47
|
+
*/
|
|
48
|
+
onBeforePrimaryAction?: (context?: {
|
|
49
|
+
quoteId?: string;
|
|
50
|
+
mode?: ExecutionMode;
|
|
51
|
+
}) => void | boolean | Promise<void | boolean>;
|
|
30
52
|
/** Called when the slippage control value changes. */
|
|
31
53
|
onSlippageChange?: (value: string) => void;
|
|
32
54
|
/** Called when the active trade tab changes. */
|