@agg-build/ui 1.2.10 → 1.2.12
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-K23CJ5UP.mjs → chunk-3JXBOU24.mjs} +580 -307
- package/dist/{chunk-5MTIBPDY.mjs → chunk-4WBQTUPW.mjs} +1091 -441
- package/dist/{chunk-5PSAIGOT.mjs → chunk-IBOE7DRY.mjs} +137 -61
- package/dist/{chunk-XKADJNAJ.mjs → chunk-J6WELNCX.mjs} +601 -326
- package/dist/{chunk-7JKGAWU5.mjs → chunk-U55T5BPE.mjs} +1802 -1564
- package/dist/{chunk-QFW5NDJ6.mjs → chunk-X3KCFWXN.mjs} +1312 -1040
- package/dist/{chunk-5MDFM2MX.mjs → chunk-YSW4ULL5.mjs} +1 -1
- package/dist/events.js +2892 -1746
- package/dist/events.mjs +3 -3
- package/dist/index.js +7085 -4956
- package/dist/index.mjs +520 -139
- package/dist/modals.js +3434 -2315
- package/dist/modals.mjs +3 -3
- package/dist/pages.js +4175 -2764
- package/dist/pages.mjs +6 -6
- package/dist/primitives.js +1295 -942
- package/dist/primitives.mjs +5 -1
- package/dist/styles.css +1 -1
- package/dist/tailwind.css +1 -1
- package/dist/trading.js +1677 -1249
- package/dist/trading.mjs +4 -4
- package/dist/types/agg-provider.d.mts +27 -0
- package/dist/types/agg-provider.d.ts +27 -0
- package/dist/types/deposit/deposit-modal.types.d.mts +10 -1
- package/dist/types/deposit/deposit-modal.types.d.ts +10 -1
- package/dist/types/deposit/index.d.mts +1 -1
- package/dist/types/deposit/index.d.ts +1 -1
- package/dist/types/deposit/steps/crypto-transfer.d.mts +1 -2
- package/dist/types/deposit/steps/crypto-transfer.d.ts +1 -2
- package/dist/types/deposit/steps/deposit-method.d.mts +2 -1
- package/dist/types/deposit/steps/deposit-method.d.ts +2 -1
- package/dist/types/events/item/event-list-item.types.d.mts +3 -1
- package/dist/types/events/item/event-list-item.types.d.ts +3 -1
- package/dist/types/events/item/event-list-item.utils.d.mts +26 -2
- package/dist/types/events/item/event-list-item.utils.d.ts +26 -2
- package/dist/types/events/item-details/event-list-item-details.types.d.mts +30 -1
- package/dist/types/events/item-details/event-list-item-details.types.d.ts +30 -1
- package/dist/types/events/list/event-list-tabs.d.mts +6 -1
- package/dist/types/events/list/event-list-tabs.d.ts +6 -1
- package/dist/types/events/market-details/index.d.mts +1 -1
- package/dist/types/events/market-details/index.d.ts +1 -1
- package/dist/types/events/market-details/market-details.types.d.mts +27 -2
- package/dist/types/events/market-details/market-details.types.d.ts +27 -2
- package/dist/types/events/market-details/market-details.utils.d.mts +18 -4
- package/dist/types/events/market-details/market-details.utils.d.ts +18 -4
- package/dist/types/events/market-details/orderbook-aggregation.d.mts +30 -10
- package/dist/types/events/market-details/orderbook-aggregation.d.ts +30 -10
- package/dist/types/events/shared/chart-auto-fallback.d.mts +43 -0
- package/dist/types/events/shared/chart-auto-fallback.d.ts +43 -0
- package/dist/types/events/shared/display-outcome-price.d.mts +14 -0
- package/dist/types/events/shared/display-outcome-price.d.ts +14 -0
- package/dist/types/events/shared/display-outcome-venue.d.mts +30 -0
- package/dist/types/events/shared/display-outcome-venue.d.ts +30 -0
- package/dist/types/events/shared/display-reference-price.d.mts +4 -0
- package/dist/types/events/shared/display-reference-price.d.ts +4 -0
- package/dist/types/events/shared/select-outcome-price.d.mts +21 -0
- package/dist/types/events/shared/select-outcome-price.d.ts +21 -0
- package/dist/types/index.d.mts +2 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/notifications/agg-notification-events-provider.d.mts +35 -0
- package/dist/types/notifications/agg-notification-events-provider.d.ts +35 -0
- package/dist/types/notifications/agg-toast-provider.d.mts +27 -0
- package/dist/types/notifications/agg-toast-provider.d.ts +27 -0
- package/dist/types/notifications/deposit-notification-events.d.mts +10 -0
- package/dist/types/notifications/deposit-notification-events.d.ts +10 -0
- package/dist/types/notifications/index.d.mts +2 -0
- package/dist/types/notifications/index.d.ts +2 -0
- package/dist/types/pages/user-profile/components/available-balance-card.d.mts +2 -1
- package/dist/types/pages/user-profile/components/available-balance-card.d.ts +2 -1
- package/dist/types/pages/user-profile/components/positions-value-card.d.mts +2 -1
- package/dist/types/pages/user-profile/components/positions-value-card.d.ts +2 -1
- package/dist/types/pages/user-profile/index.d.mts +2 -2
- package/dist/types/pages/user-profile/index.d.ts +2 -2
- package/dist/types/pages/user-profile/user-profile.types.d.mts +54 -1
- package/dist/types/pages/user-profile/user-profile.types.d.ts +54 -1
- package/dist/types/primitives/button/button.types.d.mts +4 -0
- package/dist/types/primitives/button/button.types.d.ts +4 -0
- package/dist/types/primitives/button/index.d.mts +1 -1
- package/dist/types/primitives/button/index.d.ts +1 -1
- package/dist/types/primitives/chart/chart.utils.d.mts +9 -10
- package/dist/types/primitives/chart/chart.utils.d.ts +9 -10
- 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 +24 -0
- package/dist/types/primitives/icon/registry.d.ts +24 -0
- package/dist/types/primitives/icon/svg/circle-xmark.d.mts +5 -0
- package/dist/types/primitives/icon/svg/circle-xmark.d.ts +5 -0
- package/dist/types/primitives/icon/svg/sort-end-date.d.mts +5 -0
- package/dist/types/primitives/icon/svg/sort-end-date.d.ts +5 -0
- package/dist/types/primitives/icon/svg/sort-top-arbitrage.d.mts +5 -0
- package/dist/types/primitives/icon/svg/sort-top-arbitrage.d.ts +5 -0
- package/dist/types/primitives/icon/svg/sort-volume-24hr.d.mts +5 -0
- package/dist/types/primitives/icon/svg/sort-volume-24hr.d.ts +5 -0
- package/dist/types/primitives/icon/svg/sort-volume.d.mts +5 -0
- package/dist/types/primitives/icon/svg/sort-volume.d.ts +5 -0
- package/dist/types/primitives/icon/svg/spinner.d.mts +5 -0
- package/dist/types/primitives/icon/svg/spinner.d.ts +5 -0
- package/dist/types/primitives/select/index.d.mts +1 -1
- package/dist/types/primitives/select/index.d.ts +1 -1
- package/dist/types/primitives/select/select.types.d.mts +9 -0
- package/dist/types/primitives/select/select.types.d.ts +9 -0
- package/dist/types/primitives/toast/index.d.mts +2 -0
- package/dist/types/primitives/toast/index.d.ts +2 -0
- package/dist/types/primitives/toast/toast.types.d.mts +3 -0
- package/dist/types/primitives/toast/toast.types.d.ts +3 -0
- package/dist/types/primitives/tooltip/tooltip.types.d.mts +1 -0
- package/dist/types/primitives/tooltip/tooltip.types.d.ts +1 -0
- package/dist/types/primitives/typography/index.d.mts +1 -1
- package/dist/types/primitives/typography/index.d.ts +1 -1
- package/dist/types/primitives/typography/typography.types.d.mts +2 -0
- package/dist/types/primitives/typography/typography.types.d.ts +2 -0
- package/dist/types/profile/index.d.mts +1 -1
- package/dist/types/profile/index.d.ts +1 -1
- package/dist/types/profile/profile-modal.constants.d.mts +2 -2
- package/dist/types/profile/profile-modal.constants.d.ts +2 -2
- package/dist/types/profile/tabs/accounts-wallets-tab.d.mts +2 -17
- package/dist/types/profile/tabs/accounts-wallets-tab.d.ts +2 -17
- package/dist/types/profile/tabs/trading-access-tab.d.mts +15 -0
- package/dist/types/profile/tabs/trading-access-tab.d.ts +15 -0
- package/dist/types/shared/transfer-fee-summary.d.mts +10 -0
- package/dist/types/shared/transfer-fee-summary.d.ts +10 -0
- package/dist/types/shared/utils.d.mts +3 -0
- package/dist/types/shared/utils.d.ts +3 -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.execution-steps.d.mts +9 -0
- package/dist/types/trading/place-order/index.place-order.execution-steps.d.ts +9 -0
- package/dist/types/trading/place-order/index.place-order.types.d.mts +15 -2
- package/dist/types/trading/place-order/index.place-order.types.d.ts +15 -2
- package/dist/types/trading/place-order/index.place-order.utils.d.mts +49 -6
- package/dist/types/trading/place-order/index.place-order.utils.d.ts +49 -6
- package/dist/types/withdraw/index.d.mts +1 -1
- package/dist/types/withdraw/index.d.ts +1 -1
- package/dist/types/withdraw/steps/withdraw-success.d.mts +13 -7
- package/dist/types/withdraw/steps/withdraw-success.d.ts +13 -7
- package/dist/types/withdraw/steps/withdraw-success.utils.d.mts +2 -0
- package/dist/types/withdraw/steps/withdraw-success.utils.d.ts +2 -0
- package/dist/types/withdraw/withdraw-modal.types.d.mts +5 -0
- package/dist/types/withdraw/withdraw-modal.types.d.ts +5 -0
- package/package.json +3 -3
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
export type SelectItem<TValue extends string = string> = {
|
|
2
|
+
/** The value of the option */
|
|
2
3
|
value: TValue;
|
|
4
|
+
/** The display label for the option */
|
|
3
5
|
label: string;
|
|
6
|
+
/** If true, the option will be disabled and not clickable */
|
|
4
7
|
disabled?: boolean;
|
|
8
|
+
/** If true, the option will be hidden and not displayed in the dropdown */
|
|
9
|
+
hidden?: boolean;
|
|
5
10
|
/** Optional icon URL rendered beside the label in trigger and dropdown. */
|
|
6
11
|
iconUrl?: string;
|
|
7
12
|
/** Optional React node rendered as an icon beside the label (takes precedence over iconUrl). */
|
|
@@ -20,6 +25,10 @@ export type SelectProps<TValue extends string = string> = {
|
|
|
20
25
|
className?: string;
|
|
21
26
|
/** Extra classes for the trigger button, e.g. corner radius. */
|
|
22
27
|
triggerClassName?: string;
|
|
28
|
+
/** Extra classes for the dropdown content container. */
|
|
29
|
+
contentClassName?: string;
|
|
30
|
+
/** Extra classes for each option row. */
|
|
31
|
+
itemClassName?: string;
|
|
23
32
|
/** Whether the select should block user interaction. */
|
|
24
33
|
disabled?: boolean;
|
|
25
34
|
};
|
|
@@ -2,3 +2,5 @@ import type { ToastContextValue, ToastProviderProps } from "./toast.types";
|
|
|
2
2
|
export type { ToastContextValue, ToastEntry, ToastOptions, ToastProviderProps, ToastSwipeDirection, ToastTone, } from "./toast.types";
|
|
3
3
|
export declare function ToastProvider({ children, defaultDurationMs, swipeDirection, swipeThreshold, viewportClassName, }: ToastProviderProps): JSX.Element;
|
|
4
4
|
export declare function useToast(): ToastContextValue;
|
|
5
|
+
/** Like {@link useToast}, but returns `null` when no `<ToastProvider>` is mounted. */
|
|
6
|
+
export declare function useOptionalToast(): ToastContextValue | null;
|
|
@@ -2,3 +2,5 @@ import type { ToastContextValue, ToastProviderProps } from "./toast.types";
|
|
|
2
2
|
export type { ToastContextValue, ToastEntry, ToastOptions, ToastProviderProps, ToastSwipeDirection, ToastTone, } from "./toast.types";
|
|
3
3
|
export declare function ToastProvider({ children, defaultDurationMs, swipeDirection, swipeThreshold, viewportClassName, }: ToastProviderProps): JSX.Element;
|
|
4
4
|
export declare function useToast(): ToastContextValue;
|
|
5
|
+
/** Like {@link useToast}, but returns `null` when no `<ToastProvider>` is mounted. */
|
|
6
|
+
export declare function useOptionalToast(): ToastContextValue | null;
|
|
@@ -3,6 +3,8 @@ export type ToastTone = "info" | "success" | "warning" | "error";
|
|
|
3
3
|
export interface ToastOptions {
|
|
4
4
|
tone?: ToastTone;
|
|
5
5
|
title?: string;
|
|
6
|
+
/** Optional muted supporting line shown below the main message. */
|
|
7
|
+
detail?: string;
|
|
6
8
|
/** Auto-dismiss duration in ms. Pass `Infinity` (or `0`) to require manual dismissal. Defaults to 5000. */
|
|
7
9
|
durationMs?: number;
|
|
8
10
|
}
|
|
@@ -11,6 +13,7 @@ export interface ToastEntry {
|
|
|
11
13
|
message: string;
|
|
12
14
|
tone: ToastTone;
|
|
13
15
|
title?: string;
|
|
16
|
+
detail?: string;
|
|
14
17
|
durationMs: number;
|
|
15
18
|
}
|
|
16
19
|
export interface ToastContextValue {
|
|
@@ -3,6 +3,8 @@ export type ToastTone = "info" | "success" | "warning" | "error";
|
|
|
3
3
|
export interface ToastOptions {
|
|
4
4
|
tone?: ToastTone;
|
|
5
5
|
title?: string;
|
|
6
|
+
/** Optional muted supporting line shown below the main message. */
|
|
7
|
+
detail?: string;
|
|
6
8
|
/** Auto-dismiss duration in ms. Pass `Infinity` (or `0`) to require manual dismissal. Defaults to 5000. */
|
|
7
9
|
durationMs?: number;
|
|
8
10
|
}
|
|
@@ -11,6 +13,7 @@ export interface ToastEntry {
|
|
|
11
13
|
message: string;
|
|
12
14
|
tone: ToastTone;
|
|
13
15
|
title?: string;
|
|
16
|
+
detail?: string;
|
|
14
17
|
durationMs: number;
|
|
15
18
|
}
|
|
16
19
|
export interface ToastContextValue {
|
|
@@ -3,6 +3,6 @@ export type { LegacyTypographyVariant, TokenTypographyVariant, TypographyProps,
|
|
|
3
3
|
export { typographyVariants } from "./typography.constants";
|
|
4
4
|
/** Renders semantic text content using the selected typography variant styles. */
|
|
5
5
|
export declare const Typography: {
|
|
6
|
-
({ as: Component, variant, className, children, }: TypographyProps): JSX.Element;
|
|
6
|
+
({ as: Component, variant, className, children, "aria-label": ariaLabel, }: TypographyProps): JSX.Element;
|
|
7
7
|
displayName: string;
|
|
8
8
|
};
|
|
@@ -3,6 +3,6 @@ export type { LegacyTypographyVariant, TokenTypographyVariant, TypographyProps,
|
|
|
3
3
|
export { typographyVariants } from "./typography.constants";
|
|
4
4
|
/** Renders semantic text content using the selected typography variant styles. */
|
|
5
5
|
export declare const Typography: {
|
|
6
|
-
({ as: Component, variant, className, children, }: TypographyProps): JSX.Element;
|
|
6
|
+
({ as: Component, variant, className, children, "aria-label": ariaLabel, }: TypographyProps): JSX.Element;
|
|
7
7
|
displayName: string;
|
|
8
8
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ProfileModalProps } from "./profile-modal.types";
|
|
2
2
|
export type { ProfileModalProps, ExchangeAccount, SocialAccountInfo, SocialAccountState, WalletAccountInfo, } from "./profile-modal.types";
|
|
3
3
|
export declare const ProfileModal: {
|
|
4
|
-
({ open, onOpenChange, username, avatarPreview, onSave, onDeleteProfile,
|
|
4
|
+
({ open, onOpenChange, username, avatarPreview, onSave, onDeleteProfile, socialAccounts, wallets, email, onConnectTwitter, onDisconnectTwitter, onConnectGoogle, onDisconnectGoogle, onConnectApple, onDisconnectApple, onDisconnectWallet, onConnectEmail, onKycError, }: ProfileModalProps): JSX.Element;
|
|
5
5
|
displayName: string;
|
|
6
6
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ProfileModalProps } from "./profile-modal.types";
|
|
2
2
|
export type { ProfileModalProps, ExchangeAccount, SocialAccountInfo, SocialAccountState, WalletAccountInfo, } from "./profile-modal.types";
|
|
3
3
|
export declare const ProfileModal: {
|
|
4
|
-
({ open, onOpenChange, username, avatarPreview, onSave, onDeleteProfile,
|
|
4
|
+
({ open, onOpenChange, username, avatarPreview, onSave, onDeleteProfile, socialAccounts, wallets, email, onConnectTwitter, onDisconnectTwitter, onConnectGoogle, onDisconnectGoogle, onConnectApple, onDisconnectApple, onDisconnectWallet, onConnectEmail, onKycError, }: ProfileModalProps): JSX.Element;
|
|
5
5
|
displayName: string;
|
|
6
6
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { IconName } from "../primitives/icon/registry";
|
|
2
2
|
export declare const PROFILE_TAB_KEYS: {
|
|
3
|
-
readonly
|
|
4
|
-
readonly
|
|
3
|
+
readonly PROFILE_ACCOUNTS: "profile-accounts";
|
|
4
|
+
readonly TRADING_ACCESS: "trading-access";
|
|
5
5
|
};
|
|
6
6
|
export type ProfileTabKey = (typeof PROFILE_TAB_KEYS)[keyof typeof PROFILE_TAB_KEYS];
|
|
7
7
|
export interface ProfileTabItem {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { IconName } from "../primitives/icon/registry";
|
|
2
2
|
export declare const PROFILE_TAB_KEYS: {
|
|
3
|
-
readonly
|
|
4
|
-
readonly
|
|
3
|
+
readonly PROFILE_ACCOUNTS: "profile-accounts";
|
|
4
|
+
readonly TRADING_ACCESS: "trading-access";
|
|
5
5
|
};
|
|
6
6
|
export type ProfileTabKey = (typeof PROFILE_TAB_KEYS)[keyof typeof PROFILE_TAB_KEYS];
|
|
7
7
|
export interface ProfileTabItem {
|
|
@@ -1,33 +1,18 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
interface VenueAccountInfo {
|
|
3
|
-
id: string;
|
|
4
|
-
venue: string;
|
|
5
|
-
status: string;
|
|
6
|
-
kycStatus: string;
|
|
7
|
-
}
|
|
1
|
+
import type { SocialAccountState, WalletAccountInfo } from "../profile-modal.types";
|
|
8
2
|
export interface AccountsWalletsTabProps {
|
|
9
|
-
exchanges: ExchangeAccount[];
|
|
10
3
|
wallets?: WalletAccountInfo[];
|
|
11
4
|
socialAccounts?: SocialAccountState;
|
|
12
5
|
email?: string | null;
|
|
13
|
-
venueAccounts?: VenueAccountInfo[] | null;
|
|
14
|
-
onKycError?: (error: Error) => void;
|
|
15
|
-
onDisconnectExchange?: (venue: string) => void;
|
|
16
6
|
onConnectTwitter?: () => void;
|
|
17
7
|
onDisconnectTwitter?: () => void;
|
|
18
8
|
onConnectGoogle?: () => void;
|
|
19
9
|
onDisconnectGoogle?: () => void;
|
|
20
10
|
onConnectApple?: () => void;
|
|
21
11
|
onDisconnectApple?: () => void;
|
|
22
|
-
onConnectDiscord?: () => void;
|
|
23
|
-
onDisconnectDiscord?: () => void;
|
|
24
|
-
onConnectTelegram?: () => void;
|
|
25
|
-
onDisconnectTelegram?: () => void;
|
|
26
12
|
onDisconnectWallet?: (wallet: WalletAccountInfo) => void;
|
|
27
13
|
onConnectEmail?: () => void;
|
|
28
14
|
}
|
|
29
15
|
export declare const AccountsWalletsTab: {
|
|
30
|
-
({
|
|
16
|
+
({ socialAccounts, email, wallets, onConnectTwitter, onDisconnectTwitter, onConnectGoogle, onDisconnectGoogle, onConnectApple, onDisconnectApple, onDisconnectWallet, onConnectEmail, }: AccountsWalletsTabProps): JSX.Element;
|
|
31
17
|
displayName: string;
|
|
32
18
|
};
|
|
33
|
-
export {};
|
|
@@ -1,33 +1,18 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
interface VenueAccountInfo {
|
|
3
|
-
id: string;
|
|
4
|
-
venue: string;
|
|
5
|
-
status: string;
|
|
6
|
-
kycStatus: string;
|
|
7
|
-
}
|
|
1
|
+
import type { SocialAccountState, WalletAccountInfo } from "../profile-modal.types";
|
|
8
2
|
export interface AccountsWalletsTabProps {
|
|
9
|
-
exchanges: ExchangeAccount[];
|
|
10
3
|
wallets?: WalletAccountInfo[];
|
|
11
4
|
socialAccounts?: SocialAccountState;
|
|
12
5
|
email?: string | null;
|
|
13
|
-
venueAccounts?: VenueAccountInfo[] | null;
|
|
14
|
-
onKycError?: (error: Error) => void;
|
|
15
|
-
onDisconnectExchange?: (venue: string) => void;
|
|
16
6
|
onConnectTwitter?: () => void;
|
|
17
7
|
onDisconnectTwitter?: () => void;
|
|
18
8
|
onConnectGoogle?: () => void;
|
|
19
9
|
onDisconnectGoogle?: () => void;
|
|
20
10
|
onConnectApple?: () => void;
|
|
21
11
|
onDisconnectApple?: () => void;
|
|
22
|
-
onConnectDiscord?: () => void;
|
|
23
|
-
onDisconnectDiscord?: () => void;
|
|
24
|
-
onConnectTelegram?: () => void;
|
|
25
|
-
onDisconnectTelegram?: () => void;
|
|
26
12
|
onDisconnectWallet?: (wallet: WalletAccountInfo) => void;
|
|
27
13
|
onConnectEmail?: () => void;
|
|
28
14
|
}
|
|
29
15
|
export declare const AccountsWalletsTab: {
|
|
30
|
-
({
|
|
16
|
+
({ socialAccounts, email, wallets, onConnectTwitter, onDisconnectTwitter, onConnectGoogle, onDisconnectGoogle, onConnectApple, onDisconnectApple, onDisconnectWallet, onConnectEmail, }: AccountsWalletsTabProps): JSX.Element;
|
|
31
17
|
displayName: string;
|
|
32
18
|
};
|
|
33
|
-
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
interface VenueAccountInfo {
|
|
2
|
+
id: string;
|
|
3
|
+
venue: string;
|
|
4
|
+
status: string;
|
|
5
|
+
kycStatus: string;
|
|
6
|
+
}
|
|
7
|
+
export interface TradingAccessTabProps {
|
|
8
|
+
venueAccounts?: VenueAccountInfo[] | null;
|
|
9
|
+
onKycError?: (error: Error) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const TradingAccessTab: {
|
|
12
|
+
({ venueAccounts, onKycError, }: TradingAccessTabProps): JSX.Element;
|
|
13
|
+
displayName: string;
|
|
14
|
+
};
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
interface VenueAccountInfo {
|
|
2
|
+
id: string;
|
|
3
|
+
venue: string;
|
|
4
|
+
status: string;
|
|
5
|
+
kycStatus: string;
|
|
6
|
+
}
|
|
7
|
+
export interface TradingAccessTabProps {
|
|
8
|
+
venueAccounts?: VenueAccountInfo[] | null;
|
|
9
|
+
onKycError?: (error: Error) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const TradingAccessTab: {
|
|
12
|
+
({ venueAccounts, onKycError, }: TradingAccessTabProps): JSX.Element;
|
|
13
|
+
displayName: string;
|
|
14
|
+
};
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type WithdrawFeeEstimate } from "@agg-build/hooks";
|
|
2
|
+
type TransferFeeSummaryView = "deposit" | "withdraw";
|
|
3
|
+
export interface TransferFeeSummaryProps {
|
|
4
|
+
estimate: WithdrawFeeEstimate | null;
|
|
5
|
+
view: TransferFeeSummaryView;
|
|
6
|
+
minDeposit?: string;
|
|
7
|
+
eta?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const TransferFeeSummary: ({ estimate, view, minDeposit, eta, }: TransferFeeSummaryProps) => JSX.Element | null;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type WithdrawFeeEstimate } from "@agg-build/hooks";
|
|
2
|
+
type TransferFeeSummaryView = "deposit" | "withdraw";
|
|
3
|
+
export interface TransferFeeSummaryProps {
|
|
4
|
+
estimate: WithdrawFeeEstimate | null;
|
|
5
|
+
view: TransferFeeSummaryView;
|
|
6
|
+
minDeposit?: string;
|
|
7
|
+
eta?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const TransferFeeSummary: ({ estimate, view, minDeposit, eta, }: TransferFeeSummaryProps) => JSX.Element | null;
|
|
10
|
+
export {};
|
|
@@ -17,5 +17,8 @@ type FormatUsdOptions = {
|
|
|
17
17
|
export declare const formatUsd: (value: number, options?: FormatUsdOptions) => string;
|
|
18
18
|
/** Compact USD format (e.g. 127.8 → "$127.8", 50 → "$50"). */
|
|
19
19
|
export declare const formatCompactUsd: (amount: number) => string;
|
|
20
|
+
export declare const formatTokenAmount: (amount: number, symbol: string, options?: {
|
|
21
|
+
maximumFractionDigits?: number;
|
|
22
|
+
}) => string;
|
|
20
23
|
/** Format a raw numeric string for the amount input (adds locale grouping). */
|
|
21
24
|
export declare const formatAmountDisplay: (value: string) => string;
|
|
@@ -17,5 +17,8 @@ type FormatUsdOptions = {
|
|
|
17
17
|
export declare const formatUsd: (value: number, options?: FormatUsdOptions) => string;
|
|
18
18
|
/** Compact USD format (e.g. 127.8 → "$127.8", 50 → "$50"). */
|
|
19
19
|
export declare const formatCompactUsd: (amount: number) => string;
|
|
20
|
+
export declare const formatTokenAmount: (amount: number, symbol: string, options?: {
|
|
21
|
+
maximumFractionDigits?: number;
|
|
22
|
+
}) => string;
|
|
20
23
|
/** Format a raw numeric string for the amount input (adds locale grouping). */
|
|
21
24
|
export declare const formatAmountDisplay: (value: string) => string;
|
|
@@ -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, isLoading, isPrimaryActionDisabled, isPrimaryActionLoading, chainBalancesOverride, onAmountChange, onClose, onOutcomeChange, onPrimaryAction, onSlippageChange, onTabChange, onSuccess, onError, onExecutionStateChange, resolvedClaim, }: PlaceOrderProps): JSX.Element;
|
|
8
|
+
({ className, classNames, eventTradingState, isLoading, isPrimaryActionDisabled, isPrimaryActionLoading, chainBalancesOverride, onAmountChange, onClose, onOutcomeChange, onPrimaryAction, onSlippageChange, 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, isLoading, isPrimaryActionDisabled, isPrimaryActionLoading, chainBalancesOverride, onAmountChange, onClose, onOutcomeChange, onPrimaryAction, onSlippageChange, onTabChange, onSuccess, onError, onExecutionStateChange, resolvedClaim, }: PlaceOrderProps): JSX.Element;
|
|
8
|
+
({ className, classNames, eventTradingState, isLoading, isPrimaryActionDisabled, isPrimaryActionLoading, chainBalancesOverride, onAmountChange, onClose, onOutcomeChange, onPrimaryAction, onSlippageChange, onTabChange, onSuccess, onError, onExecutionStateChange, resolvedClaim, midpointsResult, }: PlaceOrderProps): JSX.Element;
|
|
9
9
|
displayName: string;
|
|
10
10
|
};
|
|
@@ -48,6 +48,15 @@ type PhaseTimelineEntry = NormalizedExecutionPhase & {
|
|
|
48
48
|
* A merged entry is `allCompleted` only when every underlying sequence has
|
|
49
49
|
* finished — so a single in-flight `bridge-submit` keeps the merged
|
|
50
50
|
* "submitting" row pending even if `bridge-fetch-quote` already completed.
|
|
51
|
+
*
|
|
52
|
+
* Post-pass: the DAG only emits `step_completed` for a subset of sequences
|
|
53
|
+
* (record-state steps, position-reserve, etc.) — sub-steps like
|
|
54
|
+
* `polymarket-deposit-wallet-submit` and `wait` never report completion
|
|
55
|
+
* individually. That means a merged "submitting" block can stay
|
|
56
|
+
* `allCompleted=false` forever even after the executor has moved on to a
|
|
57
|
+
* later block. To preserve the "only the last visible row is pending"
|
|
58
|
+
* invariant, force-complete any block that has any later block with at
|
|
59
|
+
* least one completed sequence.
|
|
51
60
|
*/
|
|
52
61
|
export declare const buildPhaseTimeline: (dag: DagStepProgress) => PhaseTimelineEntry[];
|
|
53
62
|
export type BuildSubmissionDisplayRowsArgs = {
|
|
@@ -48,6 +48,15 @@ type PhaseTimelineEntry = NormalizedExecutionPhase & {
|
|
|
48
48
|
* A merged entry is `allCompleted` only when every underlying sequence has
|
|
49
49
|
* finished — so a single in-flight `bridge-submit` keeps the merged
|
|
50
50
|
* "submitting" row pending even if `bridge-fetch-quote` already completed.
|
|
51
|
+
*
|
|
52
|
+
* Post-pass: the DAG only emits `step_completed` for a subset of sequences
|
|
53
|
+
* (record-state steps, position-reserve, etc.) — sub-steps like
|
|
54
|
+
* `polymarket-deposit-wallet-submit` and `wait` never report completion
|
|
55
|
+
* individually. That means a merged "submitting" block can stay
|
|
56
|
+
* `allCompleted=false` forever even after the executor has moved on to a
|
|
57
|
+
* later block. To preserve the "only the last visible row is pending"
|
|
58
|
+
* invariant, force-complete any block that has any later block with at
|
|
59
|
+
* least one completed sequence.
|
|
51
60
|
*/
|
|
52
61
|
export declare const buildPhaseTimeline: (dag: DagStepProgress) => PhaseTimelineEntry[];
|
|
53
62
|
export type BuildSubmissionDisplayRowsArgs = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AggUiLabels, DagStepProgress, EventTradingState, VenueMarket, VenueMarketOutcome } from "@agg-build/hooks";
|
|
1
|
+
import type { AggUiLabels, DagStepProgress, EventTradingState, UseMidpointsResult, VenueMarket, VenueMarketOutcome } from "@agg-build/hooks";
|
|
2
2
|
import type { SmartRouteResponse } from "@agg-build/sdk";
|
|
3
3
|
import type { PlaceOrderRoutingRow, PlaceOrderStatus, PlaceOrderTab, TradingVenue } from "../types";
|
|
4
4
|
export type PlaceOrderProps = {
|
|
@@ -38,6 +38,8 @@ export type PlaceOrderProps = {
|
|
|
38
38
|
onExecutionStateChange?: (state: PlaceOrderSubmissionProgressState) => void;
|
|
39
39
|
/** Optional resolved-event claim summary shown in read-only state. */
|
|
40
40
|
resolvedClaim?: PlaceOrderResolvedClaimSummary;
|
|
41
|
+
/** Pre-fetched midpoint data (best price included) passed from parent. Optional for backward compatibility. */
|
|
42
|
+
midpointsResult?: UseMidpointsResult;
|
|
41
43
|
};
|
|
42
44
|
export type PlaceOrderResolvedClaimSummary = {
|
|
43
45
|
/** Resolution date label, e.g. "Mar 21, 2026". */
|
|
@@ -91,7 +93,7 @@ export type PlaceOrderOutcomeClassNameParams = {
|
|
|
91
93
|
isActive: boolean;
|
|
92
94
|
isPositive: boolean;
|
|
93
95
|
};
|
|
94
|
-
export type PlaceOrderOutcomeLabelValue = Pick<VenueMarketOutcome, "id" | "label">;
|
|
96
|
+
export type PlaceOrderOutcomeLabelValue = Pick<VenueMarketOutcome, "id" | "label" | "title">;
|
|
95
97
|
export type PlaceOrderVenueOutcome = Pick<VenueMarketOutcome, "id" | "label" | "price"> & {
|
|
96
98
|
title?: string | null;
|
|
97
99
|
};
|
|
@@ -120,6 +122,17 @@ export type PlaceOrderTerminalOrderEvent = {
|
|
|
120
122
|
event: "filled" | "partial_fill" | "failed";
|
|
121
123
|
filledAmountRaw?: string;
|
|
122
124
|
remainingAmountRaw?: string;
|
|
125
|
+
/** Actual shares + payout received, 6-decimal atomic. Populated by the
|
|
126
|
+
* venue's finalize handler on filled/partial_fill and used to override
|
|
127
|
+
* the stale quote estimate in the execution summary. */
|
|
128
|
+
actualSharesRaw?: string;
|
|
129
|
+
actualToWinRaw?: string;
|
|
130
|
+
/** Quote-time shares + payout, 6-decimal atomic. */
|
|
131
|
+
quotedSharesRaw?: string;
|
|
132
|
+
quotedToWinRaw?: string;
|
|
133
|
+
/** Avg execution price as a numeric string (e.g. "0.087"). */
|
|
134
|
+
executionPriceRaw?: string;
|
|
135
|
+
quotedPriceRaw?: string;
|
|
123
136
|
errorReason?: string;
|
|
124
137
|
timestamp: number;
|
|
125
138
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AggUiLabels, DagStepProgress, EventTradingState, VenueMarket, VenueMarketOutcome } from "@agg-build/hooks";
|
|
1
|
+
import type { AggUiLabels, DagStepProgress, EventTradingState, UseMidpointsResult, VenueMarket, VenueMarketOutcome } from "@agg-build/hooks";
|
|
2
2
|
import type { SmartRouteResponse } from "@agg-build/sdk";
|
|
3
3
|
import type { PlaceOrderRoutingRow, PlaceOrderStatus, PlaceOrderTab, TradingVenue } from "../types";
|
|
4
4
|
export type PlaceOrderProps = {
|
|
@@ -38,6 +38,8 @@ export type PlaceOrderProps = {
|
|
|
38
38
|
onExecutionStateChange?: (state: PlaceOrderSubmissionProgressState) => void;
|
|
39
39
|
/** Optional resolved-event claim summary shown in read-only state. */
|
|
40
40
|
resolvedClaim?: PlaceOrderResolvedClaimSummary;
|
|
41
|
+
/** Pre-fetched midpoint data (best price included) passed from parent. Optional for backward compatibility. */
|
|
42
|
+
midpointsResult?: UseMidpointsResult;
|
|
41
43
|
};
|
|
42
44
|
export type PlaceOrderResolvedClaimSummary = {
|
|
43
45
|
/** Resolution date label, e.g. "Mar 21, 2026". */
|
|
@@ -91,7 +93,7 @@ export type PlaceOrderOutcomeClassNameParams = {
|
|
|
91
93
|
isActive: boolean;
|
|
92
94
|
isPositive: boolean;
|
|
93
95
|
};
|
|
94
|
-
export type PlaceOrderOutcomeLabelValue = Pick<VenueMarketOutcome, "id" | "label">;
|
|
96
|
+
export type PlaceOrderOutcomeLabelValue = Pick<VenueMarketOutcome, "id" | "label" | "title">;
|
|
95
97
|
export type PlaceOrderVenueOutcome = Pick<VenueMarketOutcome, "id" | "label" | "price"> & {
|
|
96
98
|
title?: string | null;
|
|
97
99
|
};
|
|
@@ -120,6 +122,17 @@ export type PlaceOrderTerminalOrderEvent = {
|
|
|
120
122
|
event: "filled" | "partial_fill" | "failed";
|
|
121
123
|
filledAmountRaw?: string;
|
|
122
124
|
remainingAmountRaw?: string;
|
|
125
|
+
/** Actual shares + payout received, 6-decimal atomic. Populated by the
|
|
126
|
+
* venue's finalize handler on filled/partial_fill and used to override
|
|
127
|
+
* the stale quote estimate in the execution summary. */
|
|
128
|
+
actualSharesRaw?: string;
|
|
129
|
+
actualToWinRaw?: string;
|
|
130
|
+
/** Quote-time shares + payout, 6-decimal atomic. */
|
|
131
|
+
quotedSharesRaw?: string;
|
|
132
|
+
quotedToWinRaw?: string;
|
|
133
|
+
/** Avg execution price as a numeric string (e.g. "0.087"). */
|
|
134
|
+
executionPriceRaw?: string;
|
|
135
|
+
quotedPriceRaw?: string;
|
|
123
136
|
errorReason?: string;
|
|
124
137
|
timestamp: number;
|
|
125
138
|
};
|
|
@@ -49,18 +49,61 @@ export declare const buildPlaceOrderExecutionStepGroupsFromFailureSummary: ({ la
|
|
|
49
49
|
summary: PlaceOrderFailureSummary;
|
|
50
50
|
treatPartialAsComplete?: boolean;
|
|
51
51
|
}) => PlaceOrderExecutionStepGroup[];
|
|
52
|
-
export declare const normalizePlaceOrderErrorMessage: ({ errorMessage, fallbackMessage, }: {
|
|
52
|
+
export declare const normalizePlaceOrderErrorMessage: ({ errorMessage, fallbackMessage, labels, }: {
|
|
53
53
|
errorMessage?: string | null;
|
|
54
54
|
fallbackMessage: string;
|
|
55
|
+
labels?: Pick<PlaceOrderTradingLabels, "quoteBalanceMismatch" | "quoteUnavailable" | "serviceTemporarilyUnavailable" | "orderDeadlineExpiredBeforeSubmission" | "sellNoOnchainPosition" | "venueQuoteUnfillable" | "venueMinOrderSize" | "sourceBalanceChanged" | "venueMarketResolved" | "dflowWalletUnverified" | "venueNoQuotePath" | "solanaBlockhashExpired" | "venueRateLimited" | "serviceBlockedOrder">;
|
|
55
56
|
}) => string;
|
|
56
57
|
/**
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
58
|
+
* Resolves the actual execution economics from terminal WS events, overriding
|
|
59
|
+
* the stale quote estimate after a `partial_fill` (or `filled`) event arrives.
|
|
60
|
+
*
|
|
61
|
+
* Returns the same shape as the relevant fields on `SmartRouteResponse`
|
|
62
|
+
* (`rawExecCost` = USD side, `totalFilled` = shares side) so call sites can
|
|
63
|
+
* swap the quote estimate for actuals without restructuring.
|
|
64
|
+
*
|
|
65
|
+
* Per-side semantics (matches `polymarket-finalize` / `kalshi-finalize`):
|
|
66
|
+
* - BUY: `filledAmountRaw` is USD spent (6dp atomic). Shares received come
|
|
67
|
+
* from `actualSharesRaw` if present, else derived from filled ÷ price.
|
|
68
|
+
* - SELL: `actualSharesRaw` is the authoritative share count (always set by
|
|
69
|
+
* `OrderExecutionService`). USD payout is `actualSharesRaw ×
|
|
70
|
+
* executionPriceRaw`; `filledAmountRaw` is venue-specific (USD on
|
|
71
|
+
* Polymarket, shares on Kalshi) so we don't rely on it here.
|
|
72
|
+
* - `actualToWinRaw` mirrors `actualSharesRaw` (binary outcome: 1 share = $1
|
|
73
|
+
* if it resolves YES) — it's NOT the realized sell payout.
|
|
74
|
+
*
|
|
75
|
+
* Execution-price precedence: `executionPriceRaw` → submittedOrders.price →
|
|
76
|
+
* quote fill avgPrice for the same venue → quote-wide vwap.
|
|
77
|
+
*
|
|
78
|
+
* When no fill data is present (`hasActualFillData === false`), callers should
|
|
79
|
+
* fall back to the quote estimate.
|
|
80
|
+
*/
|
|
81
|
+
export type PlaceOrderActualEconomics = {
|
|
82
|
+
hasActualFillData: boolean;
|
|
83
|
+
actualRawExecCost: number;
|
|
84
|
+
actualTotalFilled: number;
|
|
85
|
+
avgExecutionPrice: number;
|
|
86
|
+
};
|
|
87
|
+
export declare const resolveActualExecutionEconomics: ({ quoteData, tradeSide, terminalOrderEvents, submittedOrders, }: {
|
|
88
|
+
quoteData: SmartRouteResponse | null | undefined;
|
|
89
|
+
tradeSide: PlaceOrderTab;
|
|
90
|
+
terminalOrderEvents?: PlaceOrderTerminalOrderEvent[];
|
|
91
|
+
submittedOrders?: WsOrderSubmitted[];
|
|
92
|
+
}) => PlaceOrderActualEconomics;
|
|
93
|
+
/**
|
|
94
|
+
* Compute the unfilled remainder of an order from terminal WS events.
|
|
95
|
+
*
|
|
96
|
+
* `originalAmount` is in the same units as the user's input field:
|
|
97
|
+
* - BUY: USD requested → subtract `filledAmountRaw` (USD) per event.
|
|
98
|
+
* - SELL: shares requested → subtract `actualSharesRaw` (shares) per event.
|
|
99
|
+
* For sells we never subtract `filledAmountRaw` because its unit is
|
|
100
|
+
* venue-specific (USD on Polymarket, shares on Kalshi) — mixing
|
|
101
|
+
* units corrupts the "Retry remaining" amount and the auto-skip
|
|
102
|
+
* threshold. `actualSharesRaw` is always shares.
|
|
61
103
|
*/
|
|
62
|
-
export declare const getPlaceOrderUnfilledRemaining: ({ originalAmount, terminalOrderEvents, }: {
|
|
104
|
+
export declare const getPlaceOrderUnfilledRemaining: ({ originalAmount, tradeSide, terminalOrderEvents, }: {
|
|
63
105
|
originalAmount: number;
|
|
106
|
+
tradeSide: PlaceOrderTab;
|
|
64
107
|
terminalOrderEvents?: PlaceOrderTerminalOrderEvent[];
|
|
65
108
|
}) => number;
|
|
66
109
|
export declare const buildPlaceOrderFailureSummary: ({ actionLabel, canRetryRemaining, errorMessage, eventImage, eventSubtitle, eventTitle, labels, orderId, quoteData, submittedOrders, terminalOrderEvents, }: {
|
|
@@ -49,18 +49,61 @@ export declare const buildPlaceOrderExecutionStepGroupsFromFailureSummary: ({ la
|
|
|
49
49
|
summary: PlaceOrderFailureSummary;
|
|
50
50
|
treatPartialAsComplete?: boolean;
|
|
51
51
|
}) => PlaceOrderExecutionStepGroup[];
|
|
52
|
-
export declare const normalizePlaceOrderErrorMessage: ({ errorMessage, fallbackMessage, }: {
|
|
52
|
+
export declare const normalizePlaceOrderErrorMessage: ({ errorMessage, fallbackMessage, labels, }: {
|
|
53
53
|
errorMessage?: string | null;
|
|
54
54
|
fallbackMessage: string;
|
|
55
|
+
labels?: Pick<PlaceOrderTradingLabels, "quoteBalanceMismatch" | "quoteUnavailable" | "serviceTemporarilyUnavailable" | "orderDeadlineExpiredBeforeSubmission" | "sellNoOnchainPosition" | "venueQuoteUnfillable" | "venueMinOrderSize" | "sourceBalanceChanged" | "venueMarketResolved" | "dflowWalletUnverified" | "venueNoQuotePath" | "solanaBlockhashExpired" | "venueRateLimited" | "serviceBlockedOrder">;
|
|
55
56
|
}) => string;
|
|
56
57
|
/**
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
58
|
+
* Resolves the actual execution economics from terminal WS events, overriding
|
|
59
|
+
* the stale quote estimate after a `partial_fill` (or `filled`) event arrives.
|
|
60
|
+
*
|
|
61
|
+
* Returns the same shape as the relevant fields on `SmartRouteResponse`
|
|
62
|
+
* (`rawExecCost` = USD side, `totalFilled` = shares side) so call sites can
|
|
63
|
+
* swap the quote estimate for actuals without restructuring.
|
|
64
|
+
*
|
|
65
|
+
* Per-side semantics (matches `polymarket-finalize` / `kalshi-finalize`):
|
|
66
|
+
* - BUY: `filledAmountRaw` is USD spent (6dp atomic). Shares received come
|
|
67
|
+
* from `actualSharesRaw` if present, else derived from filled ÷ price.
|
|
68
|
+
* - SELL: `actualSharesRaw` is the authoritative share count (always set by
|
|
69
|
+
* `OrderExecutionService`). USD payout is `actualSharesRaw ×
|
|
70
|
+
* executionPriceRaw`; `filledAmountRaw` is venue-specific (USD on
|
|
71
|
+
* Polymarket, shares on Kalshi) so we don't rely on it here.
|
|
72
|
+
* - `actualToWinRaw` mirrors `actualSharesRaw` (binary outcome: 1 share = $1
|
|
73
|
+
* if it resolves YES) — it's NOT the realized sell payout.
|
|
74
|
+
*
|
|
75
|
+
* Execution-price precedence: `executionPriceRaw` → submittedOrders.price →
|
|
76
|
+
* quote fill avgPrice for the same venue → quote-wide vwap.
|
|
77
|
+
*
|
|
78
|
+
* When no fill data is present (`hasActualFillData === false`), callers should
|
|
79
|
+
* fall back to the quote estimate.
|
|
80
|
+
*/
|
|
81
|
+
export type PlaceOrderActualEconomics = {
|
|
82
|
+
hasActualFillData: boolean;
|
|
83
|
+
actualRawExecCost: number;
|
|
84
|
+
actualTotalFilled: number;
|
|
85
|
+
avgExecutionPrice: number;
|
|
86
|
+
};
|
|
87
|
+
export declare const resolveActualExecutionEconomics: ({ quoteData, tradeSide, terminalOrderEvents, submittedOrders, }: {
|
|
88
|
+
quoteData: SmartRouteResponse | null | undefined;
|
|
89
|
+
tradeSide: PlaceOrderTab;
|
|
90
|
+
terminalOrderEvents?: PlaceOrderTerminalOrderEvent[];
|
|
91
|
+
submittedOrders?: WsOrderSubmitted[];
|
|
92
|
+
}) => PlaceOrderActualEconomics;
|
|
93
|
+
/**
|
|
94
|
+
* Compute the unfilled remainder of an order from terminal WS events.
|
|
95
|
+
*
|
|
96
|
+
* `originalAmount` is in the same units as the user's input field:
|
|
97
|
+
* - BUY: USD requested → subtract `filledAmountRaw` (USD) per event.
|
|
98
|
+
* - SELL: shares requested → subtract `actualSharesRaw` (shares) per event.
|
|
99
|
+
* For sells we never subtract `filledAmountRaw` because its unit is
|
|
100
|
+
* venue-specific (USD on Polymarket, shares on Kalshi) — mixing
|
|
101
|
+
* units corrupts the "Retry remaining" amount and the auto-skip
|
|
102
|
+
* threshold. `actualSharesRaw` is always shares.
|
|
61
103
|
*/
|
|
62
|
-
export declare const getPlaceOrderUnfilledRemaining: ({ originalAmount, terminalOrderEvents, }: {
|
|
104
|
+
export declare const getPlaceOrderUnfilledRemaining: ({ originalAmount, tradeSide, terminalOrderEvents, }: {
|
|
63
105
|
originalAmount: number;
|
|
106
|
+
tradeSide: PlaceOrderTab;
|
|
64
107
|
terminalOrderEvents?: PlaceOrderTerminalOrderEvent[];
|
|
65
108
|
}) => number;
|
|
66
109
|
export declare const buildPlaceOrderFailureSummary: ({ actionLabel, canRetryRemaining, errorMessage, eventImage, eventSubtitle, eventTitle, labels, orderId, quoteData, submittedOrders, terminalOrderEvents, }: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { WithdrawModalProps } from "./withdraw-modal.types";
|
|
2
|
-
export type { WithdrawMethod, WithdrawModalControlledProps, WithdrawModalProps, WithdrawModalSelfDrivenProps, WithdrawFlowData, WithdrawSummary, } from "./withdraw-modal.types";
|
|
2
|
+
export type { WithdrawMethod, WithdrawModalControlledProps, WithdrawModalProps, WithdrawModalSelfDrivenProps, WithdrawFlowData, WithdrawFeeEstimate, WithdrawSummary, } from "./withdraw-modal.types";
|
|
3
3
|
export declare const WithdrawModal: {
|
|
4
4
|
(props: WithdrawModalProps): JSX.Element;
|
|
5
5
|
displayName: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { WithdrawModalProps } from "./withdraw-modal.types";
|
|
2
|
-
export type { WithdrawMethod, WithdrawModalControlledProps, WithdrawModalProps, WithdrawModalSelfDrivenProps, WithdrawFlowData, WithdrawSummary, } from "./withdraw-modal.types";
|
|
2
|
+
export type { WithdrawMethod, WithdrawModalControlledProps, WithdrawModalProps, WithdrawModalSelfDrivenProps, WithdrawFlowData, WithdrawFeeEstimate, WithdrawSummary, } from "./withdraw-modal.types";
|
|
3
3
|
export declare const WithdrawModal: {
|
|
4
4
|
(props: WithdrawModalProps): JSX.Element;
|
|
5
5
|
displayName: string;
|