@funkit/connect 12.20.0 → 12.21.0
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/CHANGELOG.md +37 -0
- package/dist/clients/{chunk-N46CL4ZT.js → chunk-4NWQR25X.js} +1 -1
- package/dist/clients/{chunk-VFKEUHZT.js → chunk-6XJV626L.js} +1 -1
- package/dist/clients/chunk-B67ESBGC.js +108 -0
- package/dist/clients/{chunk-TLFE74BL.js → chunk-DAMICUCH.js} +3 -3
- package/dist/clients/{chunk-2BBOZQLZ.js → chunk-FIJU6HZM.js} +1 -1
- package/dist/clients/{chunk-TFIJZTGQ.js → chunk-MTKOZB6U.js} +1 -1
- package/dist/clients/{chunk-5NYKSTGH.js → chunk-S4SMCBQ4.js} +1 -1
- package/dist/clients/{chunk-Y7ONHWCW.js → chunk-T4Q43DNC.js} +2 -2
- package/dist/clients/{chunk-R5VAX6YA.js → chunk-YSQX5Z3F.js} +41 -25
- package/dist/clients/fanatics.d.ts +5 -7
- package/dist/clients/fanatics.js +4 -4
- package/dist/clients/internal/nado/withdrawalCallback.js +4 -4
- package/dist/clients/internal/nado/withdrawalErrors.js +2 -2
- package/dist/clients/internal/nado/withdrawalForm.js +4 -4
- package/dist/clients/internal/nado/withdrawalStatus.js +4 -4
- package/dist/clients/lighter.js +5 -5
- package/dist/clients/lighterRh.js +1 -1
- package/dist/clients/mallard.js +3 -3
- package/dist/clients/nado.js +4 -4
- package/dist/clients/polymarket/createPolymarketDepositConfig.js +3 -3
- package/dist/clients/polymarket/index.js +3 -3
- package/dist/clients/polymarket/polymarket.d.ts +22 -22
- package/dist/clients/polymarket/polymarket.js +2 -2
- package/dist/components/Avatar/emojiAvatarForAddress.d.ts +35 -35
- package/dist/components/Box/Box.d.ts +63 -63
- package/dist/components/ConnectButton/ConnectButton.d.ts +16 -15
- package/dist/components/Dialog/Dialog.d.ts +12 -4
- package/dist/components/Dialog/hooks.d.ts +3 -3
- package/dist/components/FreeUsdcBanner/FreeUsdcBanner.d.ts +2 -2
- package/dist/components/FunBottomBar/FunBottomBar.d.ts +3 -1
- package/dist/components/FunInfoBanner/InfoBanner.d.ts +1 -1
- package/dist/components/FunInput/FunInput.d.ts +1 -1
- package/dist/components/FunOptionBox/FunOptionBox.css.d.ts +1 -1
- package/dist/components/FunTooltip/FunTooltip.d.ts +2 -2
- package/dist/components/HighPriceImpactAlert/HighPriceImpactAlert.d.ts +7 -0
- package/dist/components/Icons/GreenRoundCheckmark.d.ts +2 -1
- package/dist/components/Icons/StatusIcons.css.d.ts +2 -2
- package/dist/components/Icons/StatusIcons.d.ts +2 -2
- package/dist/components/LargeAmountInput/LargeAmountInput.d.ts +3 -1
- package/dist/components/ModalSelection/ModalSelection.d.ts +4 -4
- package/dist/components/TokenSwapWidget/TokenSwapCard/TokenSwapCard.d.ts +5 -2
- package/dist/components/TokenSwapWidget/TokenSwapWidget.d.ts +2 -0
- package/dist/consts/checkout.d.ts +8 -8
- package/dist/consts/polymarket.d.ts +2 -2
- package/dist/consts/quote.d.ts +25 -15
- package/dist/css/cssObjectFromTheme.d.ts +1 -1
- package/dist/css/sprinkles.css.d.ts +78 -78
- package/dist/domains/bridge.d.ts +1 -1
- package/dist/domains/convert/assets.d.ts +6 -0
- package/dist/domains/convert/screen.d.ts +4 -0
- package/dist/domains/priceImpact.d.ts +14 -0
- package/dist/hooks/queries/useMeldLimits.d.ts +45 -45
- package/dist/hooks/queries/useWithdrawalQuote.d.ts +62 -62
- package/dist/hooks/track/useTrack.d.ts +1 -1
- package/dist/hooks/useCheckoutQuoteNotification.d.ts +3 -3
- package/dist/hooks/useConvertBalances.d.ts +1 -1
- package/dist/hooks/useConvertQuote.d.ts +1 -1
- package/dist/hooks/useDynamicRoutes.d.ts +1 -1
- package/dist/hooks/useFrogAccount.d.ts +77 -77
- package/dist/hooks/useIsomorphicEffect.d.ts +2 -2
- package/dist/hooks/usePaymentMethodIcon.d.ts +1 -1
- package/dist/hooks/usePaymentSources.d.ts +1 -1
- package/dist/hooks/usePolymarketAccountBalances.d.ts +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1437 -1157
- package/dist/modals/CheckoutModal/Convert/ConvertChainRail.d.ts +13 -0
- package/dist/modals/CheckoutModal/Convert/ConvertSelectDestinationStep.d.ts +6 -4
- package/dist/modals/CheckoutModal/SwappedIframe/SwappedIframe.d.ts +13 -2
- package/dist/modals/PolymarketPerpsTransfer/PolymarketPerpsTransferScreen.d.ts +6 -1
- package/dist/modals/PolymarketPerpsTransfer/usePerpsTransferForm.d.ts +6 -1
- package/dist/modals/ProfileDetails/FunProfileViews/Home/HomeCheckoutDisplayRow.css.d.ts +1 -1
- package/dist/modals/WithdrawalModal/LighterWithdrawal.d.ts +1 -1
- package/dist/modals/WithdrawalModal/useMultiSourceWithdrawal.d.ts +1 -1
- package/dist/providers/FunkitCheckoutContext/types.d.ts +3 -0
- package/dist/providers/FunkitStatsigProvider.d.ts +1 -1
- package/dist/providers/GeneralWalletProvider.d.ts +21 -21
- package/dist/providers/ModalSizeContext.d.ts +4 -4
- package/dist/themes/baseTheme.d.ts +1 -1
- package/dist/themes/darkTheme.d.ts +6 -4
- package/dist/themes/lightTheme.d.ts +6 -4
- package/dist/utils/checkout.d.ts +1 -1
- package/dist/utils/customer.d.ts +96 -96
- package/dist/utils/datadogBrowserLogsTransport.d.ts +11 -5
- package/dist/utils/datadogPageExit.d.ts +5 -0
- package/dist/utils/funError.d.ts +26 -0
- package/dist/utils/funLogger.d.ts +2 -1
- package/dist/utils/shakeElement.d.ts +7 -0
- package/dist/wallets/computeWalletConnectMetaData.d.ts +1 -1
- package/dist/wallets/walletConnectors/index.js +34 -34
- package/package.json +9 -9
- package/dist/clients/chunk-GTPMJGCF.js +0 -52
- package/dist/modals/CheckoutModal/Convert/ConvertChainPills.d.ts +0 -14
|
@@ -11,22 +11,23 @@ export interface ConnectButtonProps {
|
|
|
11
11
|
showChainSelector?: boolean;
|
|
12
12
|
suffixIcon?: React.ReactNode;
|
|
13
13
|
}
|
|
14
|
+
declare const defaultProps: {
|
|
15
|
+
readonly accountStatus: 'full';
|
|
16
|
+
readonly chainStatus: {
|
|
17
|
+
readonly largeScreen: 'full';
|
|
18
|
+
readonly smallScreen: 'icon';
|
|
19
|
+
};
|
|
20
|
+
readonly label: 'Sign In';
|
|
21
|
+
readonly showBalance: {
|
|
22
|
+
readonly largeScreen: true;
|
|
23
|
+
readonly smallScreen: false;
|
|
24
|
+
};
|
|
25
|
+
readonly showChainSelector: true;
|
|
26
|
+
readonly suffixIcon: null;
|
|
27
|
+
};
|
|
14
28
|
export declare function ConnectButton({ accountStatus, chainStatus, label, showBalance, showChainSelector, suffixIcon, }: ConnectButtonProps): React.JSX.Element;
|
|
15
29
|
export declare namespace ConnectButton {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
readonly chainStatus: {
|
|
19
|
-
readonly largeScreen: "full";
|
|
20
|
-
readonly smallScreen: "icon";
|
|
21
|
-
};
|
|
22
|
-
readonly label: "Sign In";
|
|
23
|
-
readonly showBalance: {
|
|
24
|
-
readonly largeScreen: true;
|
|
25
|
-
readonly smallScreen: false;
|
|
26
|
-
};
|
|
27
|
-
readonly showChainSelector: true;
|
|
28
|
-
readonly suffixIcon: null;
|
|
29
|
-
};
|
|
30
|
-
var Custom: typeof ConnectButtonRenderer;
|
|
30
|
+
export { defaultProps as __defaultProps };
|
|
31
|
+
export { ConnectButtonRenderer as Custom };
|
|
31
32
|
}
|
|
32
33
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { type ReactNode } from 'react';
|
|
2
2
|
import { type BoxProps } from '../Box/Box';
|
|
3
|
+
import { FunBottomBar } from '../FunBottomBar/FunBottomBar';
|
|
3
4
|
export { CHECKOUT_MODAL_TITLE_COUNTDOWN_ID, MODAL_BOTTOM_BAR_IDS, type ModalBottomBarIdType, useBottomSectionRef, useTitleCountdownRef, } from './hooks';
|
|
4
5
|
interface DialogProps {
|
|
5
6
|
open: boolean;
|
|
@@ -37,10 +38,10 @@ interface DialogProps {
|
|
|
37
38
|
*/
|
|
38
39
|
export declare function Dialog({ children, onClose, onAnimationComplete, open, titleId, isHidden, isSmartCloseable, withoutSidePadding, withTransition, testId, isFanaticsBottomSheet, backgroundOverlay, withoutBorder, }: DialogProps): React.ReactPortal | null;
|
|
39
40
|
export declare namespace Dialog {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
export { DialogTitle as Title };
|
|
42
|
+
export { DialogContent as Content };
|
|
43
|
+
export { DialogBottom as BottomSection };
|
|
44
|
+
export { FunBottomBar as BottomBar };
|
|
44
45
|
}
|
|
45
46
|
interface DialogContentProps extends Omit<BoxProps, 'padding' | 'paddingX' | 'paddingY' | 'paddingLeft' | 'paddingRight' | 'paddingBottom'> {
|
|
46
47
|
children: ReactNode;
|
|
@@ -62,6 +63,12 @@ interface DialogContentProps extends Omit<BoxProps, 'padding' | 'paddingX' | 'pa
|
|
|
62
63
|
*/
|
|
63
64
|
withChildScrollArea?: boolean;
|
|
64
65
|
}
|
|
66
|
+
declare const DialogContent: ({ children, fullHeight, className, id, paddingTop, withTopDivider, withBottomDivider, withoutBottomPadding, withoutSidePadding, extraContentTopPadding, withChildScrollArea, ...boxProps }: DialogContentProps) => React.JSX.Element;
|
|
67
|
+
/**
|
|
68
|
+
* Only use this component if modal has deeply nested components with complicated logic
|
|
69
|
+
* @returns a placeholder wrapper that should be used as an element into which the bottom bar is rendered (with a portal)
|
|
70
|
+
*/
|
|
71
|
+
declare const DialogBottom: ({ paddingX, children, ...boxProps }: BoxProps) => React.JSX.Element;
|
|
65
72
|
export interface DialogTitleProps {
|
|
66
73
|
title?: string;
|
|
67
74
|
titleMeta?: string;
|
|
@@ -81,3 +88,4 @@ export interface DialogTitleProps {
|
|
|
81
88
|
onBack?: () => void;
|
|
82
89
|
className?: string;
|
|
83
90
|
}
|
|
91
|
+
declare const DialogTitle: ({ title, titleMeta, customContent, background, hasCloseButton: hasCloseButtonProp, isCloseDisabled, onClose, hasBackButton: hasBackButtonProp, isBackDisabled, onBack, className, }: DialogTitleProps) => React.JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export declare const MODAL_BOTTOM_BAR_WRAPPER_ID = "fun-modal-bottom-bar-wrapper";
|
|
2
2
|
export declare const MODAL_BOTTOM_BAR_IDS: {
|
|
3
|
-
readonly checkout:
|
|
4
|
-
readonly withdrawal:
|
|
5
|
-
readonly connectwallet:
|
|
3
|
+
readonly checkout: 'checkout-modal-bottom-bar';
|
|
4
|
+
readonly withdrawal: 'withdrawal-modal-bottom-bar';
|
|
5
|
+
readonly connectwallet: 'connect-wallet-modal-bottom-bar';
|
|
6
6
|
};
|
|
7
7
|
export type ModalBottomBarIdType = keyof typeof MODAL_BOTTOM_BAR_IDS;
|
|
8
8
|
export declare function useBottomSectionRef(modalBottomBarIdType?: ModalBottomBarIdType): HTMLElement | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type BoxProps } from '../Box/Box';
|
|
3
|
-
export declare const FreeUsdcBanner: ({ marginBottom, type, }: Pick<BoxProps,
|
|
4
|
-
type:
|
|
3
|
+
export declare const FreeUsdcBanner: ({ marginBottom, type, }: Pick<BoxProps, 'marginBottom'> & {
|
|
4
|
+
type: 'deposit' | 'withdrawal';
|
|
5
5
|
}) => React.JSX.Element | null;
|
|
@@ -3,8 +3,10 @@ import { type FunButtonProps } from '../FunButton/FunButton';
|
|
|
3
3
|
export interface FunBottomBarProps {
|
|
4
4
|
topSection?: React.ReactNode;
|
|
5
5
|
topSectionVisible?: boolean;
|
|
6
|
+
/** Allows for smooth height transition when toggling visibility of top section */
|
|
7
|
+
isTopSectionAnimated?: boolean;
|
|
6
8
|
actionButtonProps?: FunButtonProps;
|
|
7
9
|
onClose?: () => void;
|
|
8
10
|
onCloseLabel?: string;
|
|
9
11
|
}
|
|
10
|
-
export declare const FunBottomBar: ({ topSection, topSectionVisible, actionButtonProps, onClose, onCloseLabel, }: FunBottomBarProps) => React.JSX.Element | null;
|
|
12
|
+
export declare const FunBottomBar: ({ topSection, topSectionVisible, isTopSectionAnimated, actionButtonProps, onClose, onCloseLabel, }: FunBottomBarProps) => React.JSX.Element | null;
|
|
@@ -5,4 +5,4 @@ export type InfoBannerProps = {
|
|
|
5
5
|
type: 'warning' | 'alert' | 'announcement';
|
|
6
6
|
expireAtMs?: number;
|
|
7
7
|
};
|
|
8
|
-
export declare const InfoBanner: ({ message, type, }: Omit<InfoBannerProps,
|
|
8
|
+
export declare const InfoBanner: ({ message, type, }: Omit<InfoBannerProps, 'expireAtMs'>) => React.JSX.Element;
|
|
@@ -42,4 +42,4 @@ export interface FunInputProps<T = HTMLInputElement | HTMLTextAreaElement> {
|
|
|
42
42
|
testId?: string;
|
|
43
43
|
}
|
|
44
44
|
export type FunInputChangeEvent = ChangeEvent<HTMLInputElement | HTMLTextAreaElement>;
|
|
45
|
-
export declare const FunInput: React.ForwardRefExoticComponent<FunInputProps<
|
|
45
|
+
export declare const FunInput: React.ForwardRefExoticComponent<FunInputProps<HTMLInputElement | HTMLTextAreaElement> & React.RefAttributes<HTMLInputElement | HTMLTextAreaElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const funOptionBoxStyle: Record<"
|
|
1
|
+
export declare const funOptionBoxStyle: Record<"activeBackground" | "activeBorder" | "baseStyle" | "borderedBackground" | "compactListStyle" | "defaultBackground" | "defaultBorder" | "defaultModeNotActiveBorder" | "disabledOptionBorder" | "uninteractiveBackground", string>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { type ReactNode } from 'react';
|
|
1
|
+
import React, { type ReactNode, type RefObject } from 'react';
|
|
2
2
|
import { type BoxProps } from '../Box/Box';
|
|
3
3
|
export interface FunTooltipProps {
|
|
4
4
|
content: ReactNode;
|
|
@@ -34,5 +34,5 @@ export interface FunTooltipProps {
|
|
|
34
34
|
startDelay?: number;
|
|
35
35
|
width?: BoxProps['width'];
|
|
36
36
|
}
|
|
37
|
-
export declare const TooltipAnchorRefContext: React.Context<
|
|
37
|
+
export declare const TooltipAnchorRefContext: React.Context<RefObject<HTMLElement | null> | null>;
|
|
38
38
|
export declare const FunTooltip: ({ content, children, tooltipPosition, side, sideOffset, maxWidth, startDelay, width, }: FunTooltipProps) => React.JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface HighPriceImpactAlertProps {
|
|
3
|
+
/** Expected loss on the quote, in percent. */
|
|
4
|
+
impactPercent: number;
|
|
5
|
+
}
|
|
6
|
+
export declare function HighPriceImpactAlert({ impactPercent, }: HighPriceImpactAlertProps): React.JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -9,8 +9,8 @@ declare const variants: {
|
|
|
9
9
|
};
|
|
10
10
|
export declare const slots: {
|
|
11
11
|
container: string;
|
|
12
|
-
icon: Record<"
|
|
13
|
-
background: Record<"
|
|
12
|
+
icon: Record<"secondary" | "success", string>;
|
|
13
|
+
background: Record<"secondary" | "success", string>;
|
|
14
14
|
innerShadow: string;
|
|
15
15
|
};
|
|
16
16
|
export {};
|
|
@@ -7,9 +7,9 @@ export type TransactionIconProps = {
|
|
|
7
7
|
pathRef: RefObject<SVGPathElement>;
|
|
8
8
|
} & SVGAttributes<SVGSVGElement>;
|
|
9
9
|
export declare const TransactionIcon: React.ForwardRefExoticComponent<{
|
|
10
|
-
type:
|
|
10
|
+
type: 'loading' | 'success' | 'merge';
|
|
11
11
|
pathRef: RefObject<SVGPathElement>;
|
|
12
|
-
} &
|
|
12
|
+
} & SVGAttributes<SVGSVGElement> & React.RefAttributes<unknown>>;
|
|
13
13
|
export type StatusIconProps = {
|
|
14
14
|
animateEntrance?: boolean;
|
|
15
15
|
backgroundSize?: number;
|
|
@@ -13,6 +13,8 @@ export interface LargeAmountInputProps {
|
|
|
13
13
|
suffix?: string;
|
|
14
14
|
placeholder?: string;
|
|
15
15
|
readOnly?: boolean;
|
|
16
|
+
/** A press anywhere on the amount, affixes included; fires on read-only fields too. */
|
|
17
|
+
onClick?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
16
18
|
autoFocus?: boolean;
|
|
17
19
|
/** Defaults to the theme `inputAmount` size. */
|
|
18
20
|
maxFontSize?: number;
|
|
@@ -25,4 +27,4 @@ export interface LargeAmountInputProps {
|
|
|
25
27
|
/**
|
|
26
28
|
* Big "$<amount>" field that shrinks its font to fit the available width.
|
|
27
29
|
*/
|
|
28
|
-
export declare function LargeAmountInput({ amount, onAmountChange, ariaLabel, align, prefix, suffix, placeholder, readOnly, autoFocus, maxFontSize: maxFontSizeProp, maxAvailableWidth, width, testId, }: LargeAmountInputProps): React.JSX.Element;
|
|
30
|
+
export declare function LargeAmountInput({ amount, onAmountChange, ariaLabel, align, prefix, suffix, placeholder, readOnly, onClick, autoFocus, maxFontSize: maxFontSizeProp, maxAvailableWidth, width, testId, }: LargeAmountInputProps): React.JSX.Element;
|
|
@@ -12,8 +12,8 @@ type Props = {
|
|
|
12
12
|
testId?: string;
|
|
13
13
|
isFunkitSdkConnector?: boolean;
|
|
14
14
|
};
|
|
15
|
-
export declare
|
|
16
|
-
|
|
17
|
-
displayName: string;
|
|
18
|
-
}
|
|
15
|
+
export declare function ModalSelection({ as, currentlySelected, iconBackground, iconUrl, icon, name, onClick, ready, recent, testId, isFunkitSdkConnector, ...urlProps }: Props): React.JSX.Element;
|
|
16
|
+
export declare namespace ModalSelection {
|
|
17
|
+
var displayName: string;
|
|
18
|
+
}
|
|
19
19
|
export {};
|
|
@@ -18,6 +18,8 @@ interface TokenSwapCardContentProps {
|
|
|
18
18
|
amountPrefix?: string;
|
|
19
19
|
/** Present only on the editable (source) card. */
|
|
20
20
|
onAmountChange?: (next: string) => void;
|
|
21
|
+
/** To card only: a press on the read-only amount shakes its row and calls this; omit to leave it inert. */
|
|
22
|
+
onAmountClick?: () => void;
|
|
21
23
|
/** The amount in the other unit, already formatted. */
|
|
22
24
|
convertedAmount: string;
|
|
23
25
|
onToggleUnit?: () => void;
|
|
@@ -37,13 +39,14 @@ export declare function TokenSwapCardFrame({ variant, testId, children, }: {
|
|
|
37
39
|
children: React.ReactNode;
|
|
38
40
|
}): React.JSX.Element;
|
|
39
41
|
/** One row of a swap card: content at the start, content at the end. */
|
|
40
|
-
export declare function TokenSwapCardRow({ children }: {
|
|
42
|
+
export declare function TokenSwapCardRow({ children, ref, }: {
|
|
41
43
|
children: React.ReactNode;
|
|
44
|
+
ref?: React.Ref<HTMLElement>;
|
|
42
45
|
}): React.JSX.Element;
|
|
43
46
|
/**
|
|
44
47
|
* One card of the swap widget.
|
|
45
48
|
* - `from`: outlined, unit toggle, percentage presets; editable unless a deposit is required.
|
|
46
49
|
* - `to`: filled background, read-only, amount comes from the quote.
|
|
47
50
|
*/
|
|
48
|
-
export declare function TokenSwapCard({ variant, label, token, isDepositRequired, onDeposit, onTokenClick, amount, amountPrefix, onAmountChange, convertedAmount, onToggleUnit, balance, onPercentSelect, isLoading, isDisabled, testId, }: TokenSwapCardProps): React.JSX.Element;
|
|
51
|
+
export declare function TokenSwapCard({ variant, label, token, isDepositRequired, onDeposit, onTokenClick, amount, amountPrefix, onAmountChange, onAmountClick, convertedAmount, onToggleUnit, balance, onPercentSelect, isLoading, isDisabled, testId, }: TokenSwapCardProps): React.JSX.Element;
|
|
49
52
|
export {};
|
|
@@ -22,6 +22,8 @@ export type TokenSwapFrom = TokenSwapAmounts & TokenSwapDepositState & {
|
|
|
22
22
|
export interface TokenSwapTo extends TokenSwapAmounts {
|
|
23
23
|
/** Shows a skeleton in place of the amount while the quote loads. */
|
|
24
24
|
isLoading?: boolean;
|
|
25
|
+
/** A press on the read-only amount shakes its row and calls this, e.g. to point to From. */
|
|
26
|
+
onAmountClick?: () => void;
|
|
25
27
|
}
|
|
26
28
|
export interface TokenSwapWidgetProps {
|
|
27
29
|
from: TokenSwapFrom;
|
|
@@ -7,11 +7,11 @@ export declare enum CheckoutInitStepMessage {
|
|
|
7
7
|
WAITING_FOR_CONFIRMATION = 4
|
|
8
8
|
}
|
|
9
9
|
export declare const getCheckoutStepMessage: (t: TFunction) => {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
[CheckoutInitStepMessage.PREPARING_DATA]: string;
|
|
11
|
+
[CheckoutInitStepMessage.CONFIRMING]: string;
|
|
12
|
+
[CheckoutInitStepMessage.SWITCH_CHAIN]: string;
|
|
13
|
+
[CheckoutInitStepMessage.WAITING_FOR_SIGNATURE]: string;
|
|
14
|
+
[CheckoutInitStepMessage.WAITING_FOR_CONFIRMATION]: string;
|
|
15
15
|
};
|
|
16
16
|
export declare enum Web3AccountBalanceMessage {
|
|
17
17
|
SIGN_TX = 0,
|
|
@@ -19,7 +19,7 @@ export declare enum Web3AccountBalanceMessage {
|
|
|
19
19
|
APPROVE_TRANSFER = 2
|
|
20
20
|
}
|
|
21
21
|
export declare const getWeb3AccountBalanceMessage: (t: TFunction) => {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
[Web3AccountBalanceMessage.SIGN_TX]: string;
|
|
23
|
+
[Web3AccountBalanceMessage.SWITCH_CHAIN]: string;
|
|
24
|
+
[Web3AccountBalanceMessage.APPROVE_TRANSFER]: (tokenSymbol: string) => string;
|
|
25
25
|
};
|
|
@@ -17,8 +17,8 @@ export declare const POLYMARKET_PERPS_ROUTING_ID = "POLYMARKET_PERPS";
|
|
|
17
17
|
export declare const POLYGON_USDCE: Address;
|
|
18
18
|
export declare const PUSD_TOKEN: {
|
|
19
19
|
readonly address: `0x${string}`;
|
|
20
|
-
readonly symbol:
|
|
21
|
-
readonly iconSrc:
|
|
20
|
+
readonly symbol: 'pUSD';
|
|
21
|
+
readonly iconSrc: 'https://sdk-cdn.fun.xyz/images/pusd.svg';
|
|
22
22
|
};
|
|
23
23
|
/**
|
|
24
24
|
* Customer-scoped destination-token override for the token-transfer param
|
package/dist/consts/quote.d.ts
CHANGED
|
@@ -7,37 +7,46 @@ export declare enum PendingQuoteMessage {
|
|
|
7
7
|
FINALIZING = 3
|
|
8
8
|
}
|
|
9
9
|
export declare const getPendingQuoteMessageGenerator: (t: TFunction) => {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
[PendingQuoteMessage.PREPARING]: () => string;
|
|
11
|
+
[PendingQuoteMessage.VERIFYING_PROVIDER]: (provider: string) => string;
|
|
12
|
+
[PendingQuoteMessage.ESTIMATING_GAS]: () => string;
|
|
13
|
+
[PendingQuoteMessage.FINALIZING]: () => string;
|
|
14
14
|
};
|
|
15
|
+
declare enum QuoteApiErrorType {
|
|
16
|
+
NO_ROUTE_FOUND_1 = 0,
|
|
17
|
+
NO_ROUTE_FOUND_2 = 1,
|
|
18
|
+
INSUFFICIENT_AMOUNT_GENERAL_1 = 2,
|
|
19
|
+
INSUFFICIENT_AMOUNT_GENERAL_2 = 3,
|
|
20
|
+
INSUFFICIENT_AMOUNT_FOR_BRDIGE_1 = 4,
|
|
21
|
+
INSUFFICIENT_AMOUNT_FOR_BRDIGE_2 = 5,
|
|
22
|
+
NO_ROUTE_FOUND_RELAY = 6
|
|
23
|
+
}
|
|
15
24
|
export declare const getQuoteApiErrorDisplayInfo: (t: TFunction) => {
|
|
16
|
-
|
|
25
|
+
[QuoteApiErrorType.NO_ROUTE_FOUND_1]: {
|
|
17
26
|
check: string;
|
|
18
27
|
display: ErrorNotification;
|
|
19
28
|
};
|
|
20
|
-
|
|
29
|
+
[QuoteApiErrorType.NO_ROUTE_FOUND_2]: {
|
|
21
30
|
check: string;
|
|
22
31
|
display: ErrorNotification;
|
|
23
32
|
};
|
|
24
|
-
|
|
33
|
+
[QuoteApiErrorType.NO_ROUTE_FOUND_RELAY]: {
|
|
25
34
|
check: string;
|
|
26
35
|
display: DisplayedError;
|
|
27
36
|
};
|
|
28
|
-
|
|
37
|
+
[QuoteApiErrorType.INSUFFICIENT_AMOUNT_GENERAL_1]: {
|
|
29
38
|
check: string;
|
|
30
39
|
display: DisplayedError;
|
|
31
40
|
};
|
|
32
|
-
|
|
41
|
+
[QuoteApiErrorType.INSUFFICIENT_AMOUNT_GENERAL_2]: {
|
|
33
42
|
check: string;
|
|
34
43
|
display: DisplayedError;
|
|
35
44
|
};
|
|
36
|
-
|
|
45
|
+
[QuoteApiErrorType.INSUFFICIENT_AMOUNT_FOR_BRDIGE_1]: {
|
|
37
46
|
check: string;
|
|
38
47
|
display: DisplayedError;
|
|
39
48
|
};
|
|
40
|
-
|
|
49
|
+
[QuoteApiErrorType.INSUFFICIENT_AMOUNT_FOR_BRDIGE_2]: {
|
|
41
50
|
check: string;
|
|
42
51
|
display: DisplayedError;
|
|
43
52
|
};
|
|
@@ -49,21 +58,22 @@ export declare enum QuoteCustomErrorType {
|
|
|
49
58
|
INSUFFICIENT_AMOUNT_POST_CHECK = 3
|
|
50
59
|
}
|
|
51
60
|
export declare const getQuoteCustomErrorDisplayInfo: (t: TFunction) => {
|
|
52
|
-
|
|
61
|
+
[QuoteCustomErrorType.INSUFFICIENT_BALANCE_PRE_CHECK]: {
|
|
53
62
|
check: string;
|
|
54
63
|
display: DisplayedError;
|
|
55
64
|
};
|
|
56
|
-
|
|
65
|
+
[QuoteCustomErrorType.INSUFFICIENT_TOKEN_BALANCE_PRE_CHECK]: {
|
|
57
66
|
check: string;
|
|
58
67
|
display: DisplayedError;
|
|
59
68
|
};
|
|
60
|
-
|
|
69
|
+
[QuoteCustomErrorType.INSUFFICIENT_BALANCE_POST_CHECK]: {
|
|
61
70
|
check: string;
|
|
62
71
|
display: DisplayedError;
|
|
63
72
|
};
|
|
64
|
-
|
|
73
|
+
[QuoteCustomErrorType.INSUFFICIENT_AMOUNT_POST_CHECK]: {
|
|
65
74
|
check: string;
|
|
66
75
|
display: DisplayedError;
|
|
67
76
|
};
|
|
68
77
|
};
|
|
69
78
|
export declare function generateQuoteApiErrorForDisplay(err: Error, t: TFunction): DisplayedError;
|
|
79
|
+
export {};
|