@funkit/connect 9.5.1 → 9.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +35 -0
- package/dist/__generated__/default_feature_gates.d.ts +1 -0
- package/dist/components/CopyAddress/CopyInputDisplayedAddress.d.ts +1 -0
- package/dist/components/Dialog/Dialog.d.ts +13 -7
- package/dist/components/Dialog/DialogContent.css.d.ts +7 -2
- package/dist/components/FunFeatureList/FunFeatureList.d.ts +2 -1
- package/dist/components/FunNotificationBanner/FunNotificationBanner.d.ts +2 -1
- package/dist/components/FunTransactionSummary/PaymentAmountSummary.d.ts +4 -1
- package/dist/components/Icons/GlobeIcon.d.ts +4 -0
- package/dist/components/PaddedScrollableArea/PaddedScrollableArea.d.ts +28 -0
- package/dist/components/PaddedScrollableArea/paddedScrollableArea.css.d.ts +4 -0
- package/dist/components/TransferTokenDetails/TransferTokenDetails.d.ts +2 -1
- package/dist/domains/asset.d.ts +0 -1
- package/dist/domains/quote.d.ts +6 -4
- package/dist/domains/quoteMode/index.d.ts +2 -2
- package/dist/domains/quoteMode/resolveQuoteMode.d.ts +8 -7
- package/dist/domains/quoteMode/types.d.ts +13 -5
- package/dist/domains/swapped.d.ts +7 -1
- package/dist/domains/wallet.d.ts +6 -0
- package/dist/hooks/queries/useWithdrawFops.d.ts +7 -4
- package/dist/hooks/track/CheckoutModalEvent.d.ts +13 -1
- package/dist/hooks/useAssetPrice.d.ts +3 -1
- package/dist/hooks/useNewTokenBanner.d.ts +2 -0
- package/dist/index.css +67 -81
- package/dist/index.js +4712 -3306
- package/dist/modals/CheckoutModal/ConfirmationStep/CheckoutPrimaryInfo.d.ts +6 -1
- package/dist/modals/CheckoutModal/ConfirmationStep/mapRetryAction.d.ts +18 -0
- package/dist/modals/CheckoutModal/ConfirmationStep/useCheckoutQuote.d.ts +3 -2
- package/dist/modals/CheckoutModal/InputAmount/InputAmount.d.ts +4 -0
- package/dist/modals/CheckoutModal/InputAmount/InputAmountLoaded.d.ts +3 -1
- package/dist/modals/CheckoutModal/InputAmount/state.d.ts +32 -1
- package/dist/modals/CheckoutModal/InputAmount/useAmountInput.d.ts +3 -0
- package/dist/modals/CheckoutModal/InputAmount/utils.d.ts +19 -0
- package/dist/modals/CheckoutModal/SourceChange/EmptyFormOfPaymentsMessage.d.ts +4 -0
- package/dist/modals/CheckoutModal/SourceChange/FormOfPaymentsList.d.ts +2 -1
- package/dist/modals/CheckoutModal/SourceChange/sourceChange.css.d.ts +0 -3
- package/dist/modals/CheckoutModal/TransferToken/CheckoutNotifications.track.d.ts +2 -0
- package/dist/modals/CheckoutModal/TransferToken/useTransferTokenTracking.d.ts +29 -0
- package/dist/modals/CheckoutModal/stepTransition.d.ts +3 -3
- package/dist/modals/WithdrawalModal/WithdrawalMethodSelect.d.ts +3 -1
- package/dist/providers/FunkitCheckoutContext/index.d.ts +1 -1
- package/dist/providers/FunkitCheckoutContext/types.d.ts +7 -0
- package/dist/providers/FunkitQuoteContext.d.ts +5 -4
- package/dist/providers/FunkitQuoteContext.track.d.ts +3 -2
- package/dist/providers/QuoteModeContext.d.ts +6 -0
- package/dist/utils/address.d.ts +3 -4
- package/dist/utils/checkout.d.ts +2 -1
- package/dist/utils/tokenTransfer/types.d.ts +7 -1
- package/dist/wagmi/hooks.d.ts +1 -1
- package/dist/wallets/walletConnectors/argentWallet/argentWallet.js +3 -3
- package/dist/wallets/walletConnectors/bifrostWallet/bifrostWallet.js +4 -4
- package/dist/wallets/walletConnectors/bitgetWallet/bitgetWallet.js +4 -4
- package/dist/wallets/walletConnectors/bitskiWallet/bitskiWallet.js +3 -3
- package/dist/wallets/walletConnectors/bitverseWallet/bitverseWallet.js +3 -3
- package/dist/wallets/walletConnectors/bloomWallet/bloomWallet.js +3 -3
- package/dist/wallets/walletConnectors/braveWallet/braveWallet.js +3 -3
- package/dist/wallets/walletConnectors/bybitWallet/bybitWallet.js +4 -4
- package/dist/wallets/walletConnectors/{chunk-W6TXXLCO.js → chunk-2DKNXOPL.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-KV4HGYM3.js → chunk-3K2MFXCO.js} +1 -0
- package/dist/wallets/walletConnectors/{chunk-CMLFDRCP.js → chunk-3ZJN3PXP.js} +4 -4
- package/dist/wallets/walletConnectors/{chunk-TIT5F32X.js → chunk-55VS2NKG.js} +4 -4
- package/dist/wallets/walletConnectors/{chunk-XMNVOYSJ.js → chunk-57GN4W23.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-I7K6LUZR.js → chunk-7IEUTLHY.js} +4 -4
- package/dist/wallets/walletConnectors/{chunk-WFNPWKU3.js → chunk-7PVUEV4M.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-HE2LMIPD.js → chunk-A5EZBNME.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-4R4AARTG.js → chunk-AM5MSNVQ.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-UVYZSGIX.js → chunk-AZYMJ4C6.js} +4 -4
- package/dist/wallets/walletConnectors/{chunk-BVX22N7L.js → chunk-BBPTPMH7.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-YKVWTGU7.js → chunk-BHAPTB57.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-IUVO4IN3.js → chunk-BWLMNATA.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-HKVDCVCG.js → chunk-DP5ICBEB.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-HE5J5T7X.js → chunk-E3NZE4UP.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-RVWLP4IM.js → chunk-EUMOVTRQ.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-MAPXJUOO.js → chunk-FMVNQKZL.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-ZMRIQOR5.js → chunk-FWM4KTOV.js} +4 -4
- package/dist/wallets/walletConnectors/{chunk-INNF7G5X.js → chunk-G3RQSCYR.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-W6MXINYY.js → chunk-HPUEYLLS.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-C4RP2DNH.js → chunk-IMNI4AGV.js} +4 -4
- package/dist/wallets/walletConnectors/{chunk-3YCR2ZB4.js → chunk-IRHK6SOW.js} +4 -4
- package/dist/wallets/walletConnectors/{chunk-FDVJHNLL.js → chunk-J3PJOMO7.js} +4 -4
- package/dist/wallets/walletConnectors/{chunk-4BMUFNMT.js → chunk-KS5MJNGD.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-O7RSASRH.js → chunk-KSNA53EX.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-DWMUM4F6.js → chunk-LEAZMT5Y.js} +4 -4
- package/dist/wallets/walletConnectors/{chunk-WDTNOIMF.js → chunk-MTJIPVYB.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-G4V5B6YC.js → chunk-O4IDLNBH.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-J34FG3W4.js → chunk-O7ZCUI2Y.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-CT3QPTAU.js → chunk-OD6B2ISG.js} +4 -4
- package/dist/wallets/walletConnectors/{chunk-RLLTYOWT.js → chunk-OSOB6QYX.js} +4 -4
- package/dist/wallets/walletConnectors/{chunk-RZXMOPIV.js → chunk-OUM6H3WU.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-R4S234FL.js → chunk-P4E2ZFQB.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-TFVCCI2D.js → chunk-PARFRRNI.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-34LO6Q7A.js → chunk-R7X5RIO7.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-GROWFRGP.js → chunk-RZH4FSX7.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-3Y2GG3PM.js → chunk-RZQ4B4Z7.js} +4 -4
- package/dist/wallets/walletConnectors/{chunk-UB2SSFH7.js → chunk-S6R4B763.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-6MFOL6EB.js → chunk-T3VMQBBI.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-JYVLYSH3.js → chunk-TNVLCMJD.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-UPUDLUBT.js → chunk-UFYNHHDU.js} +4 -4
- package/dist/wallets/walletConnectors/{chunk-NHLG5PVD.js → chunk-UKSIXGWC.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-NEK7T3IC.js → chunk-UYW6MV74.js} +4 -4
- package/dist/wallets/walletConnectors/{chunk-WKCCLGHJ.js → chunk-V4EXM3KB.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-CBI3SGOC.js → chunk-VMMROPXK.js} +4 -4
- package/dist/wallets/walletConnectors/{chunk-VUOAIUZE.js → chunk-XTD6OMZP.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-ZRNBHLUU.js → chunk-XVH4JIXB.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-A7FNGC4A.js → chunk-Y36HPFB3.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-UVMMPRDM.js → chunk-YGMU5VWD.js} +4 -4
- package/dist/wallets/walletConnectors/{chunk-BAVE62IL.js → chunk-YYYRPQHB.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-N3UJMC3V.js → chunk-ZJJWGKB6.js} +4 -4
- package/dist/wallets/walletConnectors/{chunk-COX3VEDR.js → chunk-ZL6XCMV5.js} +4 -4
- package/dist/wallets/walletConnectors/clvWallet/clvWallet.js +4 -4
- package/dist/wallets/walletConnectors/coin98Wallet/coin98Wallet.js +4 -4
- package/dist/wallets/walletConnectors/coinbaseWallet/coinbaseWallet.js +2 -2
- package/dist/wallets/walletConnectors/coreWallet/coreWallet.js +4 -4
- package/dist/wallets/walletConnectors/dawnWallet/dawnWallet.js +3 -3
- package/dist/wallets/walletConnectors/desigWallet/desigWallet.js +3 -3
- package/dist/wallets/walletConnectors/enkryptWallet/enkryptWallet.js +3 -3
- package/dist/wallets/walletConnectors/foxWallet/foxWallet.js +4 -4
- package/dist/wallets/walletConnectors/frameWallet/frameWallet.js +3 -3
- package/dist/wallets/walletConnectors/frontierWallet/frontierWallet.js +4 -4
- package/dist/wallets/walletConnectors/gateWallet/gateWallet.js +4 -4
- package/dist/wallets/walletConnectors/imTokenWallet/imTokenWallet.js +3 -3
- package/dist/wallets/walletConnectors/index.js +71 -71
- package/dist/wallets/walletConnectors/injectedWallet/injectedWallet.js +3 -3
- package/dist/wallets/walletConnectors/kresusWallet/kresusWallet.js +3 -3
- package/dist/wallets/walletConnectors/ledgerWallet/ledgerWallet.js +3 -3
- package/dist/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.js +4 -4
- package/dist/wallets/walletConnectors/mewWallet/mewWallet.js +3 -3
- package/dist/wallets/walletConnectors/oktoWallet/oktoWallet.js +3 -3
- package/dist/wallets/walletConnectors/okxWallet/okxWallet.js +4 -4
- package/dist/wallets/walletConnectors/omniWallet/omniWallet.js +3 -3
- package/dist/wallets/walletConnectors/oneInchWallet/oneInchWallet.js +3 -3
- package/dist/wallets/walletConnectors/oneKeyWallet/oneKeyWallet.js +3 -3
- package/dist/wallets/walletConnectors/phantomWallet/phantomWallet.js +3 -3
- package/dist/wallets/walletConnectors/rabbyWallet/rabbyWallet.js +3 -3
- package/dist/wallets/walletConnectors/rainbowWallet/rainbowWallet.js +4 -4
- package/dist/wallets/walletConnectors/ramperWallet/ramperWallet.js +3 -3
- package/dist/wallets/walletConnectors/roninWallet/roninWallet.js +4 -4
- package/dist/wallets/walletConnectors/safeWallet/safeWallet.js +2 -2
- package/dist/wallets/walletConnectors/safeheronWallet/safeheronWallet.js +3 -3
- package/dist/wallets/walletConnectors/safepalWallet/safepalWallet.js +4 -4
- package/dist/wallets/walletConnectors/subWallet/subWallet.js +4 -4
- package/dist/wallets/walletConnectors/tahoWallet/tahoWallet.js +3 -3
- package/dist/wallets/walletConnectors/talismanWallet/talismanWallet.js +3 -3
- package/dist/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.js +4 -4
- package/dist/wallets/walletConnectors/tokenaryWallet/tokenaryWallet.js +3 -3
- package/dist/wallets/walletConnectors/trustWallet/trustWallet.js +4 -4
- package/dist/wallets/walletConnectors/uniswapWallet/uniswapWallet.js +3 -3
- package/dist/wallets/walletConnectors/walletConnectWallet/walletConnectWallet.js +3 -3
- package/dist/wallets/walletConnectors/xdefiWallet/xdefiWallet.js +3 -3
- package/dist/wallets/walletConnectors/zealWallet/zealWallet.js +3 -3
- package/dist/wallets/walletConnectors/zerionWallet/zerionWallet.js +4 -4
- package/package.json +4 -4
- package/dist/components/Dropdown/TokenAndChainDropdown.css.d.ts +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
# @funkit/connect
|
|
2
2
|
|
|
3
|
+
## 9.6.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- b67400f: Add 2s timeout to wallet getCapabilities call to prevent WaaS providers with aggressive retry behavior from blocking the signing flow
|
|
8
|
+
|
|
9
|
+
## 9.6.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 2c480aa: Add exact-in quoting support and improve max button accuracy
|
|
14
|
+
- 114cbaf: Add CRYPTO_FIAT rail config types and integrate /fops API for swapped withdrawal off-ramp
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- 7c75d3c: empty form of payments message implemented
|
|
19
|
+
- 2c480aa: fix(connect): use live gas price instead of hardcoded 50 gwei for max button
|
|
20
|
+
- 2c480aa: fix(connect): round fiat amount to 2 decimal places for quick options
|
|
21
|
+
- 3cff3a7: update labels and restore min deposit on mobile
|
|
22
|
+
- d4da769: refactor(connect): remove dirty global css for source change inner scroll area
|
|
23
|
+
- c261752: require countrycode for fops call
|
|
24
|
+
- f987707: feat(connect): instrument quote mode and quick option events for rollout telemetry
|
|
25
|
+
- b8fec96: fix(connect): fix withdrawal amount debounce
|
|
26
|
+
- 8dec5f9: feat(connect): sync amounts while instant quoting
|
|
27
|
+
- 78c4d50: feat(connect): add statsig events for checkout notifications
|
|
28
|
+
- 6c5c1ba: feat(connect): migrate TokenTransferNewTokens and NewTokenAssetSelectionBanner flags to statsig
|
|
29
|
+
- 14763f9: feat: support tron USDT withdrawals
|
|
30
|
+
- 5aafb0a: Feature gate excluded withdrawal tokens logic
|
|
31
|
+
- d4da769: fix(connect): fix source change without initial wallet
|
|
32
|
+
- Updated dependencies [514b734]
|
|
33
|
+
- Updated dependencies [6c5c1ba]
|
|
34
|
+
- Updated dependencies [114cbaf]
|
|
35
|
+
- @funkit/api-base@4.0.0
|
|
36
|
+
- @funkit/utils@2.0.0
|
|
37
|
+
|
|
3
38
|
## 9.5.1
|
|
4
39
|
|
|
5
40
|
### Patch Changes
|
|
@@ -14,8 +14,6 @@ interface DialogProps {
|
|
|
14
14
|
isSmartCloseable?: boolean;
|
|
15
15
|
/** Whether side padding around the content of the modal should be applied */
|
|
16
16
|
withoutSidePadding?: boolean;
|
|
17
|
-
/** Whether bottom padding around the content of the modal should be applied */
|
|
18
|
-
withoutBottomPadding?: boolean;
|
|
19
17
|
/** Whether the transition animation should be used on open/close */
|
|
20
18
|
withTransition?: boolean;
|
|
21
19
|
testId?: string;
|
|
@@ -25,24 +23,32 @@ interface DialogProps {
|
|
|
25
23
|
/**
|
|
26
24
|
* Dialog components (title, content, bottom bar) must be rendered as direct children of Dialog for correct scrolling behavior
|
|
27
25
|
*/
|
|
28
|
-
export declare function Dialog({ children, onClose, onAnimationComplete, open, titleId, isHidden, isSmartCloseable, withoutSidePadding,
|
|
26
|
+
export declare function Dialog({ children, onClose, onAnimationComplete, open, titleId, isHidden, isSmartCloseable, withoutSidePadding, withTransition, testId, isFanaticsBottomSheet, }: DialogProps): React.ReactPortal | null;
|
|
29
27
|
export declare namespace Dialog {
|
|
30
28
|
var Title: ({ title, titleMeta, hasCloseButton: hasCloseButtonProp, isCloseDisabled, onClose, hasBackButton: hasBackButtonProp, isBackDisabled, onBack, className, }: DialogTitleProps) => React.JSX.Element;
|
|
31
|
-
var Content: ({ children, fullHeight,
|
|
29
|
+
var Content: ({ children, fullHeight, className, id, paddingTop, withTopDivider, withBottomDivider, withoutBottomPadding, withoutSidePadding, extraContentTopPadding, withChildScrollArea, ...boxProps }: DialogContentProps) => React.JSX.Element;
|
|
32
30
|
var BottomSection: ({ paddingX, children, ...boxProps }: BoxProps) => React.JSX.Element;
|
|
33
31
|
var BottomBar: ({ topSection, topSectionVisible, actionButtonProps, onClose, onCloseLabel, }: import("../FunBottomBar/FunBottomBar").FunBottomBarProps) => React.JSX.Element | null;
|
|
34
32
|
}
|
|
35
|
-
interface DialogContentProps extends BoxProps {
|
|
33
|
+
interface DialogContentProps extends Omit<BoxProps, 'padding' | 'paddingX' | 'paddingY' | 'paddingLeft' | 'paddingRight' | 'paddingBottom'> {
|
|
36
34
|
children: ReactNode;
|
|
37
35
|
/** Whether the content should fill all available space */
|
|
38
36
|
fullHeight?: boolean;
|
|
39
37
|
withTopDivider?: 'always' | 'scroll' | 'never';
|
|
40
38
|
withBottomDivider?: 'always' | 'scroll' | 'never';
|
|
41
39
|
id?: string;
|
|
42
|
-
/** Whether
|
|
43
|
-
|
|
40
|
+
/** Whether bottom padding should be applied */
|
|
41
|
+
withoutBottomPadding?: boolean;
|
|
42
|
+
/** Whether side padding should be applied */
|
|
43
|
+
withoutSidePadding?: boolean;
|
|
44
44
|
/** Whether to add extra top padding to visually balance the FunBottomBar */
|
|
45
45
|
extraContentTopPadding?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* When true, Dialog.Content becomes a non-scrolling flex column container, delegating
|
|
48
|
+
* scrolling to a child PaddedScrollableArea. Applies expanded side margins so that
|
|
49
|
+
* full-width dividers inside the child can visually reach the dialog border edges.
|
|
50
|
+
*/
|
|
51
|
+
withChildScrollArea?: boolean;
|
|
46
52
|
}
|
|
47
53
|
export interface DialogTitleProps {
|
|
48
54
|
title?: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export declare const DIALOG_WIDTH_WIDE = "450px";
|
|
2
2
|
export declare const DIALOG_HEIGHT = 525;
|
|
3
3
|
export declare const DIALOG_HEIGHT_SWAPPED_IFRAME = 580;
|
|
4
|
+
export declare const DIALOG_INNER_PADDING_X = 12;
|
|
4
5
|
export declare const SCROLL_BAR_WIDTH = 6;
|
|
5
6
|
export declare const DIALOG_BOTTOM_PADDING = "15";
|
|
6
|
-
export declare const bottomPaddingVariable = "--bottom-padding-value";
|
|
7
7
|
/**
|
|
8
8
|
* note the border defined here is taken into account in the FunCheckoutModalHeightAnimationWrapper component in the `getPermittedHeight` function
|
|
9
9
|
* adjusting the border width will require adjusting the `getPermittedHeight` function
|
|
@@ -13,7 +13,6 @@ export declare const dialogCompact: string;
|
|
|
13
13
|
export declare const dialogMedium: string;
|
|
14
14
|
export declare const dialogWide: string;
|
|
15
15
|
export declare const withoutSidePadding: string;
|
|
16
|
-
export declare const withoutBottomPadding: string;
|
|
17
16
|
export declare const dialogMobile: string;
|
|
18
17
|
/**
|
|
19
18
|
* Fanatics-specific bottom sheet style for mobile
|
|
@@ -27,6 +26,12 @@ export declare const dialogFanaticsBottomSheet: string;
|
|
|
27
26
|
export declare const scrollContent: string;
|
|
28
27
|
export declare const scrollbarHidden: string;
|
|
29
28
|
export declare const fullHeightContent: string;
|
|
29
|
+
/**
|
|
30
|
+
* Used when a child component (e.g. PaddedScrollableArea) owns its own scrolling.
|
|
31
|
+
* Dialog.Content becomes a non-scrolling flex column container.
|
|
32
|
+
* The margin/padding expansion needed for full-width dividers is applied as inline styles in Dialog.tsx.
|
|
33
|
+
*/
|
|
34
|
+
export declare const childScrollAreaContent: string;
|
|
30
35
|
export declare const noPaddingContent: string;
|
|
31
36
|
export declare const dividerTransition: string;
|
|
32
37
|
export declare const contentExpanded: string;
|
|
@@ -10,6 +10,7 @@ interface FunFeatureListProps {
|
|
|
10
10
|
/** Whether background should be applied only to individual items. Defaults to false since background is applied to the container by default */
|
|
11
11
|
withBackgroundItem?: boolean;
|
|
12
12
|
gapBetweenItems?: Extract<BoxProps['gap'], string>;
|
|
13
|
+
onExpanded?: () => void;
|
|
13
14
|
}
|
|
14
|
-
export declare const FunFeatureList: ({ items, isExpandable, disabled, withBackgroundContainer, withBackgroundItem, gapBetweenItems, }: FunFeatureListProps) => React.JSX.Element;
|
|
15
|
+
export declare const FunFeatureList: ({ items, isExpandable, disabled, withBackgroundContainer, withBackgroundItem, gapBetweenItems, onExpanded, }: FunFeatureListProps) => React.JSX.Element;
|
|
15
16
|
export {};
|
|
@@ -7,6 +7,7 @@ interface FunNotificationBannerProps extends FunNotificationBannerIconProps {
|
|
|
7
7
|
disclaimer?: ReactNode;
|
|
8
8
|
children?: ReactNode;
|
|
9
9
|
onClosed?: () => void;
|
|
10
|
+
onShowMore?: () => void;
|
|
10
11
|
}
|
|
11
|
-
export declare const FunNotificationBanner: ({ iconUrl, status, fallbackIconUrl, description, disclaimer, title, children, onClosed, }: FunNotificationBannerProps) => React.JSX.Element;
|
|
12
|
+
export declare const FunNotificationBanner: ({ iconUrl, status, fallbackIconUrl, description, disclaimer, title, children, onClosed, onShowMore, }: FunNotificationBannerProps) => React.JSX.Element;
|
|
12
13
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { DirectExecutionType } from '@funkit/api-base';
|
|
3
3
|
import type { FunkitCheckoutQuoteResult } from '../../domains/quote';
|
|
4
|
+
import type { QuoteDisplayAmounts } from '../../domains/quoteMode';
|
|
4
5
|
import type { FunkitActiveCheckoutItem } from '../../providers/FunkitCheckoutContext';
|
|
5
6
|
interface PaymentAmountSummaryProps {
|
|
6
7
|
isLoading: boolean;
|
|
@@ -8,6 +9,8 @@ interface PaymentAmountSummaryProps {
|
|
|
8
9
|
checkoutItem: FunkitActiveCheckoutItem | null;
|
|
9
10
|
quote: FunkitCheckoutQuoteResult | null;
|
|
10
11
|
directExecutionType?: DirectExecutionType | null;
|
|
12
|
+
/** Mode-aware display amounts from QuoteBuilder.getDisplayAmounts() */
|
|
13
|
+
displayAmounts?: QuoteDisplayAmounts | null;
|
|
11
14
|
}
|
|
12
|
-
export declare function PaymentAmountSummary({ isLoading, targetChainId: originalChainId, quote, checkoutItem, directExecutionType, }: PaymentAmountSummaryProps): React.JSX.Element;
|
|
15
|
+
export declare function PaymentAmountSummary({ isLoading, targetChainId: originalChainId, quote, checkoutItem, directExecutionType, displayAmounts, }: PaymentAmountSummaryProps): React.JSX.Element;
|
|
13
16
|
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type BoxProps } from '../../components/Box/Box';
|
|
3
|
+
/** Discount scrollbar width, except on Safari */
|
|
4
|
+
export declare function subtractScrollbarWidth(padding: number): number;
|
|
5
|
+
interface PaddedScrollableAreaProps {
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
className?: string;
|
|
8
|
+
/** Controls whether the scrollbar thumb is visible. Pass `isScrolling` from useScrollDivider. */
|
|
9
|
+
isScrolling: boolean;
|
|
10
|
+
/** Nominal right-side padding in px (matches what a non-scrolling sibling uses).
|
|
11
|
+
* Internal paddingRight is set to `padding - SCROLL_BAR_WIDTH` so that the scrollbar
|
|
12
|
+
* occupies the remaining space and content always sees `padding` px on the right. */
|
|
13
|
+
padding: number;
|
|
14
|
+
/** Optional bottom padding (sprinkle value) applied inside the scroll area, e.g. when no bottom bar is present. */
|
|
15
|
+
paddingBottom?: BoxProps['paddingBottom'];
|
|
16
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
17
|
+
style?: React.CSSProperties;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* A flex-1 scrollable container with a thin (6px) rounded scrollbar that reserves
|
|
21
|
+
* stable gutter space. The scrollbar thumb is hidden when not scrolling and appears
|
|
22
|
+
* on hover/active scroll.
|
|
23
|
+
*
|
|
24
|
+
* paddingRight is automatically calculated as `padding - SCROLL_BAR_WIDTH` so that
|
|
25
|
+
* content appears to have `padding`px of right-side spacing regardless of scrollbar state.
|
|
26
|
+
*/
|
|
27
|
+
export declare function PaddedScrollableArea({ padding, isScrolling, paddingBottom, children, className, ref, style, }: PaddedScrollableAreaProps): React.JSX.Element;
|
|
28
|
+
export {};
|
|
@@ -5,6 +5,7 @@ interface TransferTokenDetailsProps {
|
|
|
5
5
|
estProcessingTime?: number;
|
|
6
6
|
estPriceImpact: FeeValue | undefined;
|
|
7
7
|
maxSlippage: FeeValue | undefined;
|
|
8
|
+
onExpanded?: () => void;
|
|
8
9
|
}
|
|
9
|
-
export declare const TransferTokenDetails: ({ estProcessingTime, disabled, estPriceImpact, maxSlippage, }: TransferTokenDetailsProps) => React.JSX.Element;
|
|
10
|
+
export declare const TransferTokenDetails: ({ estProcessingTime, disabled, estPriceImpact, maxSlippage, onExpanded, }: TransferTokenDetailsProps) => React.JSX.Element;
|
|
10
11
|
export {};
|
package/dist/domains/asset.d.ts
CHANGED
|
@@ -32,5 +32,4 @@ export declare const isAssetUsableToPayForCheckout: ({ config, payerAddress, pay
|
|
|
32
32
|
reason: string;
|
|
33
33
|
minUsdWithFees?: number;
|
|
34
34
|
};
|
|
35
|
-
export declare function getUsdAvailableAmount(targetChainId: string, assetChainId: string | undefined, assetUsdAmount: number | null | undefined, paymentMethod: PaymentMethod | undefined): number | null;
|
|
36
35
|
export {};
|
package/dist/domains/quote.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ApiFunkitCheckoutQuoteResult, CheckoutQuoteResponse } from '@funkit/utils';
|
|
2
|
-
import type {
|
|
2
|
+
import type { Dnum } from 'dnum';
|
|
3
|
+
import { type Address } from 'viem';
|
|
3
4
|
import type { Config } from '../wagmi/hooks';
|
|
4
5
|
import type { BluvoBrokerageQuote } from '../hooks/useBluvo';
|
|
5
6
|
import type { FunkitDirectExecutionInfo } from '../hooks/useCheckoutDirectExecution';
|
|
@@ -7,11 +8,12 @@ import type { FunkitActiveCheckoutItem } from '../providers/FunkitCheckoutContex
|
|
|
7
8
|
import type { LoginType } from '../providers/GeneralWalletProvider';
|
|
8
9
|
import { type BrokerageDetails, type CheckoutFees } from './fees';
|
|
9
10
|
import { type PaymentMethodInfo } from './paymentMethods';
|
|
11
|
+
import type { QuoteBuilder } from './quoteMode';
|
|
10
12
|
export interface FunkitCheckoutQuoteResult extends Omit<ApiFunkitCheckoutQuoteResult, 'finalFeesBreakdown'> {
|
|
11
13
|
finalSpreadUsd: string;
|
|
12
14
|
finalFeesBreakdown: CheckoutFees;
|
|
13
15
|
}
|
|
14
|
-
export declare function getCheckoutBaseQuote(checkoutItem: FunkitActiveCheckoutItem, userId: string, walletAddress: Address, apiKey: string, wagmiConfig: Config, directExecutionInfo: FunkitDirectExecutionInfo, senderAddress?: Address, isWithdrawal?: boolean): Promise<CheckoutQuoteResponse>;
|
|
16
|
+
export declare function getCheckoutBaseQuote(checkoutItem: FunkitActiveCheckoutItem, userId: string, walletAddress: Address, apiKey: string, wagmiConfig: Config, directExecutionInfo: FunkitDirectExecutionInfo, senderAddress?: Address, isWithdrawal?: boolean, quoteBuilder?: QuoteBuilder): Promise<CheckoutQuoteResponse>;
|
|
15
17
|
export declare function getQuoteFinalEstimation(baseQuote: CheckoutQuoteResponse, checkoutItem: FunkitActiveCheckoutItem, newPaymentMethodInfo: PaymentMethodInfo, wagmiConfig: Config, apiKey: string, loginType: LoginType, isWithdrawal?: boolean, brokerageQuote?: BluvoBrokerageQuote): Promise<{
|
|
16
18
|
finalEstimation: FunkitCheckoutQuoteResult;
|
|
17
19
|
brokerage?: BrokerageDetails;
|
|
@@ -19,8 +21,8 @@ export declare function getQuoteFinalEstimation(baseQuote: CheckoutQuoteResponse
|
|
|
19
21
|
export interface CheckedAssetAmount {
|
|
20
22
|
isAboveMaximum: boolean;
|
|
21
23
|
isBelowMinimum: boolean;
|
|
22
|
-
maxTargetAssetAmount?:
|
|
23
|
-
minTargetAssetAmount?:
|
|
24
|
+
maxTargetAssetAmount?: Dnum;
|
|
25
|
+
minTargetAssetAmount?: Dnum;
|
|
24
26
|
}
|
|
25
27
|
export declare function checkAssetAmount(checkoutItem: FunkitActiveCheckoutItem, finalEstimation: FunkitCheckoutQuoteResult, wagmiConfig: Config, walletAddress: Address, brokerage?: BrokerageDetails): Promise<CheckedAssetAmount>;
|
|
26
28
|
export interface CheckoutQuoteParams {
|
|
@@ -4,6 +4,6 @@ export type { Dnum } from 'dnum';
|
|
|
4
4
|
export { createExactOutBuilder } from './exactOut';
|
|
5
5
|
export { createExactInBuilder } from './exactIn';
|
|
6
6
|
export { createOneToOneBuilder } from './oneToOne';
|
|
7
|
-
export {
|
|
8
|
-
export type {
|
|
7
|
+
export { resolveQuoteBuilder, _resolveQuoteMode } from './resolveQuoteMode';
|
|
8
|
+
export type { ResolveQuoteBuilderParams } from './resolveQuoteMode';
|
|
9
9
|
export { getGasEstimateWei, CHECKOUT_GAS_UNITS } from './gasEstimate';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type QuoteBuilder } from './types';
|
|
2
|
-
export interface
|
|
3
|
-
hasPostAction: boolean;
|
|
2
|
+
export interface ResolveQuoteBuilderParams {
|
|
3
|
+
hasPostAction: boolean | undefined;
|
|
4
4
|
isExactInEnabled: boolean;
|
|
5
5
|
providerSupportsExactInWithActions?: boolean;
|
|
6
6
|
}
|
|
@@ -8,12 +8,13 @@ export interface CreateQuoteBuilderParams {
|
|
|
8
8
|
* Determines the quote mode and returns the corresponding builder.
|
|
9
9
|
*
|
|
10
10
|
* Resolution order:
|
|
11
|
-
* 1.
|
|
12
|
-
* 2.
|
|
13
|
-
* 3.
|
|
14
|
-
* 4. Action params +
|
|
11
|
+
* 1. No checkout config (hasPostAction is undefined) → EXACT_OUT (safe default)
|
|
12
|
+
* 2. Feature gate off → EXACT_OUT (Stage 1 default)
|
|
13
|
+
* 3. No action params → EXACT_IN
|
|
14
|
+
* 4. Action params + provider supports → EXACT_IN
|
|
15
|
+
* 5. Action params + no support → EXACT_OUT
|
|
15
16
|
*
|
|
16
17
|
* Note: ONE_TO_ONE (subsidized routes) is not yet auto-detected.
|
|
17
18
|
* It will be enabled in a future phase when subsidy detection is implemented.
|
|
18
19
|
*/
|
|
19
|
-
export declare function
|
|
20
|
+
export declare function resolveQuoteBuilder({ hasPostAction, isExactInEnabled, providerSupportsExactInWithActions, }: ResolveQuoteBuilderParams): QuoteBuilder;
|
|
@@ -49,8 +49,8 @@ export interface QuoteDisplayAmounts {
|
|
|
49
49
|
confirmationScreenDisplayAmount: string;
|
|
50
50
|
/** "You send" line */
|
|
51
51
|
sendAmount: string;
|
|
52
|
-
/** "You receive" line */
|
|
53
|
-
receiveAmount: string;
|
|
52
|
+
/** "You receive" line — null when the value cannot be derived (e.g. missing metadata) */
|
|
53
|
+
receiveAmount: string | null;
|
|
54
54
|
/** Whether the send amount is exact (vs estimated) */
|
|
55
55
|
isSendExact: boolean;
|
|
56
56
|
/** Whether the receive amount is exact (vs estimated) */
|
|
@@ -86,6 +86,8 @@ export interface UsdAvailableAmountParams {
|
|
|
86
86
|
}
|
|
87
87
|
export interface QuoteBuilder {
|
|
88
88
|
readonly mode: QuoteMode;
|
|
89
|
+
/** Whether the quote mode is EXACT_IN */
|
|
90
|
+
isExactIn(): boolean;
|
|
89
91
|
/** Compute the USD available amount for the source asset, accounting for fees where applicable */
|
|
90
92
|
getUsdAvailableAmount(params: UsdAvailableAmountParams): number | null;
|
|
91
93
|
/** Compute max sendable token amount for the max button */
|
|
@@ -98,9 +100,14 @@ export interface QuoteBuilder {
|
|
|
98
100
|
handleRetry(params: {
|
|
99
101
|
error: QuoteRetryError;
|
|
100
102
|
}): RetryAction;
|
|
101
|
-
/** Derive display amounts for confirmation screen.
|
|
102
|
-
|
|
103
|
-
|
|
103
|
+
/** Derive display amounts for confirmation screen. */
|
|
104
|
+
getDisplayAmounts(params: {
|
|
105
|
+
quote: FunkitCheckoutQuoteResult;
|
|
106
|
+
/** The user's input in human-readable form (e.g., 15.9) */
|
|
107
|
+
inputAmount: number;
|
|
108
|
+
/** Target asset ticker (e.g. "USDC") — used for stablecoin display logic */
|
|
109
|
+
targetAssetTicker: string;
|
|
110
|
+
}): QuoteDisplayAmounts;
|
|
104
111
|
/** Whether the confirmation screen can show a dollar amount before the quote resolves */
|
|
105
112
|
hasKnownAmountBeforeQuote(config: {
|
|
106
113
|
targetAssetAmount?: number;
|
|
@@ -114,6 +121,7 @@ export interface QuoteBuilder {
|
|
|
114
121
|
tokenBalanceBaseUnit: Dnum | null;
|
|
115
122
|
frozenUnitPrice: number | null;
|
|
116
123
|
usdAvailableAmount: number | null;
|
|
124
|
+
maxSendableAmount: Dnum | null;
|
|
117
125
|
}): {
|
|
118
126
|
type: QuickOptionType.SET_TOKEN_AMOUNT;
|
|
119
127
|
tokenAmountBaseUnit: Dnum;
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ExchangeRates, type GetFopsResponse, type SwappedFormOfPayment } from '@funkit/api-base';
|
|
2
|
+
export declare const FOPS_STALE_TIME: number;
|
|
3
|
+
/**
|
|
4
|
+
* Validates FOPs by checking icon URL, embedded flow URL, and payment group.
|
|
5
|
+
* Deduplicates generic FOPs whose fopType already appears in saved FOPs.
|
|
6
|
+
*/
|
|
7
|
+
export declare function validateFops(res: GetFopsResponse, logTag: 'useFops' | 'useWithdrawFops'): GetFopsResponse;
|
|
2
8
|
/**
|
|
3
9
|
* Sorts fops by a priority order list (array of fopType strings, index = priority).
|
|
4
10
|
* Fops not in the list are sorted by max checkout limit descending.
|
package/dist/domains/wallet.d.ts
CHANGED
|
@@ -6,6 +6,12 @@ export interface AssetHoldingsItem {
|
|
|
6
6
|
usdAmount: null | number;
|
|
7
7
|
pickedChainId: string;
|
|
8
8
|
chainSymbolKey: string;
|
|
9
|
+
/** Raw token balance in base units (e.g. "6999920" for 6.99992 USDC) */
|
|
10
|
+
tokenBalanceRaw?: string;
|
|
11
|
+
/** Token decimals for base-unit conversion */
|
|
12
|
+
decimals?: number;
|
|
13
|
+
/** Per-token price in USD from the API (unrounded) */
|
|
14
|
+
unitPriceUsd?: number | null;
|
|
9
15
|
}
|
|
10
16
|
export interface KnownAssetHoldingsItem extends AssetHoldingsItem {
|
|
11
17
|
usdAmount: number;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { type GetFopsResponse } from '@funkit/api-base';
|
|
2
2
|
/**
|
|
3
|
-
* Hook to fetch available withdrawal forms of payment.
|
|
4
|
-
*
|
|
3
|
+
* Hook to fetch available withdrawal (off-ramp) forms of payment from /fops.
|
|
4
|
+
* Sends a CRYPTO_TO_FIAT rail config to get sell/payout methods.
|
|
5
5
|
*/
|
|
6
|
-
export declare const useWithdrawFops: (
|
|
7
|
-
|
|
6
|
+
export declare const useWithdrawFops: (params: {
|
|
7
|
+
sourceChainId: string;
|
|
8
|
+
sourceTokenAddress: string;
|
|
9
|
+
}) => {
|
|
10
|
+
data: GetFopsResponse | undefined;
|
|
8
11
|
isLoading: boolean;
|
|
9
12
|
};
|
|
@@ -39,6 +39,7 @@ export declare enum CheckoutModalEvent {
|
|
|
39
39
|
QUERY_VIRTUAL_FIAT_ACCOUNTS = "fc::query::virtual_fiat_accounts",
|
|
40
40
|
BASE_QUOTE = "fc::quote::base_quote",
|
|
41
41
|
FINAL_QUOTE = "fc::quote::final_quote",
|
|
42
|
+
QUOTE_MODE_RESOLVED = "fc::quote::mode_resolved",
|
|
42
43
|
VIEW_TRANSACTION_BREAKDOWN = "fc::quote::view_transaction_breakdown",
|
|
43
44
|
ACCOUNT_BALANCE_SUCCESS = "fc::success::account_balance",
|
|
44
45
|
TOKEN_TRANSFER_SUCCESS = "fc::success::token_transfer",
|
|
@@ -58,5 +59,16 @@ export declare enum CheckoutModalEvent {
|
|
|
58
59
|
SWAPPED_IFRAME_EXIT = "fc::swapped_iframe::exit",
|
|
59
60
|
SWAPPED_IFRAME_ORDER_DATA = "fc::swapped_iframe::order_data",
|
|
60
61
|
SWAPPED_IFRAME_TRANSACTION_SUCCESSFUL = "fc::swapped_iframe::transaction_successful",
|
|
61
|
-
SWAPPED_IFRAME_LOGOUT = "fc::swapped_iframe::logout"
|
|
62
|
+
SWAPPED_IFRAME_LOGOUT = "fc::swapped_iframe::logout",
|
|
63
|
+
DEPOSIT_TRANSFER_ADDRESS_LOADED = "fc::deposit::transfer::address::loaded",
|
|
64
|
+
DEPOSIT_TRANSFER_ADDRESS_COPIED = "fc::deposit::transfer::address::copied",
|
|
65
|
+
DEPOSIT_TRANSFER_CHAIN_CHANGED = "fc::deposit::transfer::chain::changed",
|
|
66
|
+
DEPOSIT_TRANSFER_TOKEN_CHANGED = "fc::deposit::transfer::token::changed",
|
|
67
|
+
DEPOSIT_TRANSFER_IMPACT_VIEWED = "fc::deposit::transfer::impact::viewed",
|
|
68
|
+
DEPOSIT_TRANSFER_DEPOSIT_DETECTED = "fc::deposit::transfer::deposit::detected",
|
|
69
|
+
DEPOSIT_TRANSFER_DEPOSIT_CREDITED = "fc::deposit::transfer::deposit::credited",
|
|
70
|
+
DEPOSIT_TRANSFER_NOTIFICATION_DISPLAYED = "fc::deposit::transfer::notification::displayed",
|
|
71
|
+
DEPOSIT_TRANSFER_NOTIFICATION_DISMISSED = "fc::deposit::transfer::notification::dismissed",
|
|
72
|
+
DEPOSIT_TRANSFER_NOTIFICATION_EXPANDED = "fc::deposit::transfer::notification::expanded",
|
|
73
|
+
DEPOSIT_TRANSFER_NOTIFICATION_HIDDEN = "fc::deposit::transfer::notification::hidden"
|
|
62
74
|
}
|
|
@@ -6,6 +6,8 @@ interface UseAssetAddressPriceParams {
|
|
|
6
6
|
refetchInterval?: number;
|
|
7
7
|
/** defaults to 1 hence price returned is unit price */
|
|
8
8
|
amount?: number;
|
|
9
|
+
/** Asset symbol — when provided and the symbol is a stablecoin, price is hardcoded to 1 */
|
|
10
|
+
symbol?: string;
|
|
9
11
|
}
|
|
10
12
|
type AssetPriceResult = {
|
|
11
13
|
error: Error | null;
|
|
@@ -13,7 +15,7 @@ type AssetPriceResult = {
|
|
|
13
15
|
/** unit price if custom amount is not provided */
|
|
14
16
|
price: number | undefined;
|
|
15
17
|
};
|
|
16
|
-
export declare function useAssetAddressPrice({ chainId, assetTokenAddress, amount, refetchInterval, }: UseAssetAddressPriceParams): AssetPriceResult;
|
|
18
|
+
export declare function useAssetAddressPrice({ chainId, assetTokenAddress, amount, refetchInterval, symbol, }: UseAssetAddressPriceParams): AssetPriceResult;
|
|
17
19
|
type AssetSymbolPriceParams = {
|
|
18
20
|
chainId: string | undefined;
|
|
19
21
|
symbol: string | undefined;
|