@funkit/connect 8.4.0 → 8.6.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 +63 -0
- package/dist/__generated__/default_configs.d.ts +10 -1
- package/dist/{chunk-4WY7FNYP.js → chunk-EPHOZPMR.js} +11 -1
- package/dist/{chunk-Z4QDKBBG.js → chunk-FZZF5FGD.js} +1 -1
- package/dist/{chunk-UUHLEWAL.js → chunk-NAHADAYF.js} +1 -1
- package/dist/clients/fanatics.css +3730 -3724
- package/dist/clients/fanatics.js +2 -2
- package/dist/components/Box/Box.d.ts +2 -2
- package/dist/components/ConnectButton/abbreviateETHBalance.d.ts +0 -1
- package/dist/components/Dialog/Dialog.css.d.ts +0 -1
- package/dist/components/FunNotification/FunNotification.d.ts +2 -2
- package/dist/components/FunPayments/FunPaymentMethods.d.ts +4 -3
- package/dist/components/Icons/{New/BlueCircularWalletIcon.d.ts → FunWarningIcon.d.ts} +1 -1
- package/dist/components/ModalHeightAnimationLayer/ModalHeightAnimationLayer.d.ts +7 -0
- package/dist/components/ModalHeightAnimationLayer/WithdrawalModalHeightAnimationWrapper.d.ts +8 -0
- package/dist/css/sprinkles.css.d.ts +14 -2
- package/dist/domains/swapped.d.ts +7 -0
- package/dist/domains/wallet.d.ts +0 -7
- package/dist/hooks/queries/useFops.d.ts +202 -2
- package/dist/hooks/track/CheckoutModalEvent.d.ts +6 -1
- package/dist/hooks/useCheckoutDirectExecution.d.ts +1 -0
- package/dist/hooks/useCheckoutTransferInit.d.ts +1 -0
- package/dist/hooks/usePaymentSources.d.ts +3 -2
- package/dist/index.css +3732 -3726
- package/dist/index.js +3176 -2840
- package/dist/modals/CheckoutModal/ConfirmationStep/useCheckoutConfirmation.d.ts +7 -3
- package/dist/modals/CheckoutModal/SourceChange/FormOfPaymentsList.d.ts +5 -5
- package/dist/modals/CheckoutModal/SourceChange/SourceChange.d.ts +2 -2
- package/dist/modals/CheckoutModal/SwappedIframe/SwappedIframe.d.ts +2 -2
- package/dist/modals/WithdrwalModal/WithdrawalModal.d.ts +0 -5
- package/dist/modals/WithdrwalModal/types.d.ts +5 -0
- package/dist/providers/AuthenticationContext.d.ts +0 -1
- package/dist/providers/FunkitCheckoutContext/index.d.ts +1 -0
- package/dist/providers/FunkitCheckoutContext/types.d.ts +5 -0
- package/dist/providers/FunkitConfigContext.d.ts +0 -4
- package/dist/providers/FunkitThemeProvider.d.ts +18 -0
- package/dist/themes/baseTheme.d.ts +3 -1
- package/dist/themes/baseTheme.js +1 -1
- package/dist/themes/darkTheme.js +2 -2
- package/dist/themes/lightTheme.js +2 -2
- package/dist/utils/checkout.d.ts +0 -6
- package/dist/utils/polygonRpcCheck.d.ts +12 -0
- package/dist/utils/swapped.d.ts +4 -0
- package/dist/wallets/walletConnectors/index.js +42 -42
- package/package.json +16 -16
- package/dist/components/ConnectButton/formatAccountName.d.ts +0 -14
- package/dist/components/FunButton/FunSignInButton.d.ts +0 -8
- package/dist/components/FunCheckoutHistory/FunCheckoutStatus.css.d.ts +0 -1
- package/dist/components/FunInput/FunTextAreaInput.css copy.d.ts +0 -1
- package/dist/components/FunKeyValue/FunKeyValue.d.ts +0 -32
- package/dist/components/FunTransactionSummary/FunTxSummaryComponents.css.d.ts +0 -2
- package/dist/components/Icons/New/HelpIcon.d.ts +0 -2
- package/dist/components/Icons/New/UserIcon.d.ts +0 -4
- package/dist/components/index.d.ts +0 -2
- package/dist/hooks/queries/useClientId.d.ts +0 -3
- package/dist/hooks/useDynamicFont.d.ts +0 -5
- package/dist/modals/CheckoutModal/ConfirmationStep/DirectExecutionBrokerageAndCardAlert.d.ts +0 -2
- package/dist/modals/CheckoutModal/InputAmount/AvailableBalance.d.ts +0 -8
- /package/dist/components/{FunCheckoutModalHeightAnimationWrapper → ModalHeightAnimationLayer}/FunCheckoutModalHeightAnimationWrapper.d.ts +0 -0
|
@@ -53,8 +53,8 @@ export declare const Box: React.ForwardRefExoticComponent<{
|
|
|
53
53
|
readonly cursor?: "default" | "help" | "not-allowed" | "pointer" | undefined;
|
|
54
54
|
readonly flexDirection?: "column" | "row" | undefined;
|
|
55
55
|
readonly fontFamily?: "buttonTextPrimary" | "buttonTextTertiary" | "buttonTextSecondary" | "amountValue" | "body" | "header" | "inputAmount" | "txStatusDescription" | "txStatusTitle" | undefined;
|
|
56
|
-
readonly fontSize?: "inherit" | "buttonTextPrimary" | "buttonTextTertiary" | "buttonTextSecondary" | "body" | "inputAmount" | "txStatusDescription" | "txStatusTitle" | "cryptoCashToggle" | "modalTopbarTitle" | "modalBottomBarButtonText" | "paymentMethodItemSubtitle" | "paymentMethodItemTitle" | "selectAssetItemSubtitle" | "selectAssetItemTitle" | "txBreakdown" | "txSummaryLabel" | "txSummaryValue" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "21" | "40" | "57" | "header-14" | "header-36" | "dollarValue" | "modalTopbarSubtitle" | "youPayYouReceivePrimaryFontSize" | "youPayYouReceiveSecondaryFontSize" | "transferTokenLabelFontSize" | "depositAddressFontSize" | "funFeatureListItemFontSize" | "dropdownItemFontSize" | "sourceListSectionLabelFontSize" | undefined;
|
|
57
|
-
readonly fontWeight?: "inherit" | "medium" | "bold" | "inputAmount" | "txStatusDescription" | "txStatusTitle" | "regular" | "semibold" | "heavy" | "cryptoCashToggle" | "modalTopbarTitle" | "modalBottomBarButtonText" | "paymentMethodItemSubtitle" | "paymentMethodItemTitle" | "selectAssetItemSubtitle" | "selectAssetItemTitle" | "transferTokenLabelFontWeight" | "txBreakdown" | "txSummaryLabel" | "txSummaryValue" | "sourceListSectionLabelFontWeight" | undefined;
|
|
56
|
+
readonly fontSize?: "inherit" | "buttonTextPrimary" | "buttonTextTertiary" | "buttonTextSecondary" | "body" | "inputAmount" | "txStatusDescription" | "txStatusTitle" | "cryptoCashToggle" | "modalTopbarTitle" | "modalBottomBarButtonText" | "paymentMethodItemSubtitle" | "paymentMethodItemTitle" | "selectAssetItemSubtitle" | "selectAssetItemTitle" | "txBreakdown" | "txSummaryLabel" | "txSummaryValue" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "21" | "40" | "57" | "header-14" | "header-36" | "dollarValue" | "modalTopbarSubtitle" | "youPayYouReceivePrimaryFontSize" | "youPayYouReceiveSecondaryFontSize" | "transferTokenLabelFontSize" | "depositAddressFontSize" | "funFeatureListItemFontSize" | "dropdownItemFontSize" | "sourceListSectionLabelFontSize" | "formOfPaymentsListSectionLabelFontSize" | undefined;
|
|
57
|
+
readonly fontWeight?: "inherit" | "medium" | "bold" | "inputAmount" | "txStatusDescription" | "txStatusTitle" | "regular" | "semibold" | "heavy" | "cryptoCashToggle" | "modalTopbarTitle" | "modalBottomBarButtonText" | "paymentMethodItemSubtitle" | "paymentMethodItemTitle" | "selectAssetItemSubtitle" | "selectAssetItemTitle" | "transferTokenLabelFontWeight" | "txBreakdown" | "txSummaryLabel" | "txSummaryValue" | "sourceListSectionLabelFontWeight" | "formOfPaymentsListSectionLabelFontWeight" | undefined;
|
|
58
58
|
readonly gap?: "0" | "1" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "40" | "confirmationStepMarginTop" | "confirmationStepVerticalGap" | "cryptoCashToggleContainerPadding" | "cryptoCashToggleMarginBottom" | "cryptoCashToggleMarginTop" | "cryptoCashToggleTabPaddingY" | "modalBaseHorizontalPadding" | "modalBottomHorizontalPadding" | "modalPaddingBottomUpper" | "modalPaddingBottomLower" | "modalTopBarVerticalTextSpacing" | "modalBottomBarButtonPaddingY" | "selectAssetItemPaddingX" | "selectAssetItemPaddingY" | "selectAssetItemTextGap" | "selectBrokerageItemPaddingX" | "selectBrokerageItemPaddingY" | "txBreakdownMarginY" | "txBreakdownPaddingX" | "txSummaryBoxPaddingX" | "txSummaryBoxPaddingY" | "txSummaryLineItemPadding" | "txSummaryDividerMarginX" | "txSummaryDividerMarginY" | "verticalSectionGap" | "youPayYouReceivePaddingLeft" | "youPayYouReceivePaddingRight" | "youPayYouReceivePaddingY" | "2" | "3" | "4" | "6" | "8" | "11" | "24" | "30" | "15" | "28" | "32" | "36" | "44" | "-1" | "5" | "7" | "9" | "64" | undefined;
|
|
59
59
|
readonly height?: "1" | "connectExchangeIconSize" | "cryptoCashToggleIconSize" | "dollarValueSkeletonHeight" | "dollarValueSkeletonWidth" | "inputAmountQuickOptionButtonHeight" | "inputAmountMinHeight" | "modalBottomBarButtonHeight" | "modalBottomBarCloseButtonHeight" | "modalTopBarHeight" | "paymentAmountSkeletonBlockHeight" | "paymentAmountSkeletonBlockWidth" | "paymentAmountSkeletonCircleSize" | "paymentMethodItemIconSize" | "selectAssetItemIconSize" | "txBreakdownSkeletonWidth" | "txSummaryLineSkeletonHeight" | "txSummaryLineSkeletonWidth" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "40" | "57" | "2" | "4" | "8" | "11" | "24" | "30" | "full" | "15" | "28" | "32" | "34" | "36" | "44" | "48" | "50" | "54" | "60" | "72" | "76" | "93" | "96" | "100" | "108" | "120" | "160" | "180" | "200" | "240" | "300" | "half" | "max" | undefined;
|
|
60
60
|
readonly justifyContent?: "center" | "space-around" | "space-between" | "flex-end" | "flex-start" | undefined;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export declare const easing: number[];
|
|
2
2
|
export declare const DialogAnimationTimeIn = 0.25;
|
|
3
3
|
export declare const DialogAnimationTimeOut = 0.12;
|
|
4
|
-
export declare const FunModalZIndex: number;
|
|
5
4
|
export declare const overlay: string;
|
|
6
5
|
export declare const content: string;
|
|
7
6
|
export declare const titleContainer: string;
|
|
@@ -7,7 +7,7 @@ interface FunNotificationProps {
|
|
|
7
7
|
isVisible?: boolean;
|
|
8
8
|
testId?: string;
|
|
9
9
|
}
|
|
10
|
-
export type FunNotificationType = 'default' | 'error' | 'warning' | 'hint';
|
|
10
|
+
export type FunNotificationType = 'default' | 'error' | 'warning' | 'hint' | 'warningAlert';
|
|
11
11
|
export interface ErrorNotification {
|
|
12
12
|
message: ReactNode;
|
|
13
13
|
type: FunNotificationType;
|
|
@@ -16,5 +16,5 @@ export interface ErrorNotification {
|
|
|
16
16
|
* A notification/message component with height resizing animation.
|
|
17
17
|
* Control visibility by enabling/disabling `isVisible` prop instead of doing an outer conditional rendering.
|
|
18
18
|
*/
|
|
19
|
-
export declare function FunNotification({ type, description, actionText, onAction, isVisible: isVisibleProps, testId, }: FunNotificationProps): React.JSX.Element;
|
|
19
|
+
export declare function FunNotification({ type, description, actionText, onAction, isVisible: isVisibleProps, testId, }: FunNotificationProps): React.JSX.Element | null;
|
|
20
20
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type SwappedFormOfPayment } from '@funkit/api-base';
|
|
2
2
|
import React, { type ReactNode } from 'react';
|
|
3
3
|
import { type FunkitPaymentMethodIconsConfig } from '../../providers/FunkitConfigContext';
|
|
4
4
|
import { PaymentMethod, type PaymentMethodBrokerageInfo, type PaymentMethodVirtualBankInfo } from '../../domains/paymentMethods';
|
|
@@ -57,7 +57,8 @@ export declare function PayPalPaymentMethodItem({ isActive, isClickable, onClick
|
|
|
57
57
|
/**
|
|
58
58
|
* Payment method item for a Form of Payment from the fops API (Swapped providers)
|
|
59
59
|
*/
|
|
60
|
-
export declare function FopPaymentMethodItem({ fop, isActive, onClick, testId, }: BasePaymentMethodItemProps & {
|
|
61
|
-
fop:
|
|
60
|
+
export declare function FopPaymentMethodItem({ fop, isActive, onClick, testId, disclaimerLimit, }: BasePaymentMethodItemProps & {
|
|
61
|
+
fop: SwappedFormOfPayment;
|
|
62
|
+
disclaimerLimit: string;
|
|
62
63
|
}): React.JSX.Element;
|
|
63
64
|
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface ModalHeightAnimationLayerProps {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
permittedHeight: number;
|
|
5
|
+
}
|
|
6
|
+
export declare function ModalHeightAnimationLayer({ children, permittedHeight, }: ModalHeightAnimationLayerProps): React.JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { WithdrawalModalStep } from '../../modals/WithdrwalModal/types';
|
|
3
|
+
interface WithdrawalModalHeightAnimationWrapperProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
withdrawalStep: WithdrawalModalStep;
|
|
6
|
+
}
|
|
7
|
+
export declare function WithdrawalModalHeightAnimationWrapper({ children, withdrawalStep, }: WithdrawalModalHeightAnimationWrapperProps): React.JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -180,6 +180,7 @@ declare const themeContractValues: {
|
|
|
180
180
|
txSummaryLabel: string;
|
|
181
181
|
txSummaryValue: string;
|
|
182
182
|
sourceListSectionLabelFontWeight: string;
|
|
183
|
+
formOfPaymentsListSectionLabelFontWeight: string;
|
|
183
184
|
};
|
|
184
185
|
fontSize: {
|
|
185
186
|
'10': {
|
|
@@ -334,6 +335,10 @@ declare const themeContractValues: {
|
|
|
334
335
|
fontSize: string;
|
|
335
336
|
lineHeight: string;
|
|
336
337
|
};
|
|
338
|
+
formOfPaymentsListSectionLabelFontSize: {
|
|
339
|
+
fontSize: string;
|
|
340
|
+
lineHeight: string;
|
|
341
|
+
};
|
|
337
342
|
};
|
|
338
343
|
radii: {
|
|
339
344
|
actionButton: string;
|
|
@@ -424,6 +429,7 @@ declare const themeContractValues: {
|
|
|
424
429
|
modalOverlay: string;
|
|
425
430
|
};
|
|
426
431
|
moonpayTheme: string;
|
|
432
|
+
modalZIndex: string;
|
|
427
433
|
};
|
|
428
434
|
export declare const validColorNames: string[];
|
|
429
435
|
export type ThemeVars = typeof themeContractValues;
|
|
@@ -607,6 +613,7 @@ export declare const themeVars: {
|
|
|
607
613
|
txSummaryLabel: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
608
614
|
txSummaryValue: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
609
615
|
sourceListSectionLabelFontWeight: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
616
|
+
formOfPaymentsListSectionLabelFontWeight: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
610
617
|
};
|
|
611
618
|
fontSize: {
|
|
612
619
|
'10': {
|
|
@@ -761,6 +768,10 @@ export declare const themeVars: {
|
|
|
761
768
|
fontSize: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
762
769
|
lineHeight: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
763
770
|
};
|
|
771
|
+
formOfPaymentsListSectionLabelFontSize: {
|
|
772
|
+
fontSize: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
773
|
+
lineHeight: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
774
|
+
};
|
|
764
775
|
};
|
|
765
776
|
radii: {
|
|
766
777
|
actionButton: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
@@ -851,6 +862,7 @@ export declare const themeVars: {
|
|
|
851
862
|
modalOverlay: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
852
863
|
};
|
|
853
864
|
moonpayTheme: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
865
|
+
modalZIndex: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
854
866
|
};
|
|
855
867
|
export declare const largeScreenMinWidth = 768;
|
|
856
868
|
declare const responsiveProperties: {
|
|
@@ -1100,8 +1112,8 @@ export declare const sprinkles: ((props: {
|
|
|
1100
1112
|
readonly cursor?: "default" | "help" | "not-allowed" | "pointer" | undefined;
|
|
1101
1113
|
readonly flexDirection?: "column" | "row" | undefined;
|
|
1102
1114
|
readonly fontFamily?: "buttonTextPrimary" | "buttonTextTertiary" | "buttonTextSecondary" | "amountValue" | "body" | "header" | "inputAmount" | "txStatusDescription" | "txStatusTitle" | undefined;
|
|
1103
|
-
readonly fontSize?: "inherit" | "buttonTextPrimary" | "buttonTextTertiary" | "buttonTextSecondary" | "body" | "inputAmount" | "txStatusDescription" | "txStatusTitle" | "cryptoCashToggle" | "modalTopbarTitle" | "modalBottomBarButtonText" | "paymentMethodItemSubtitle" | "paymentMethodItemTitle" | "selectAssetItemSubtitle" | "selectAssetItemTitle" | "txBreakdown" | "txSummaryLabel" | "txSummaryValue" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "21" | "40" | "57" | "header-14" | "header-36" | "dollarValue" | "modalTopbarSubtitle" | "youPayYouReceivePrimaryFontSize" | "youPayYouReceiveSecondaryFontSize" | "transferTokenLabelFontSize" | "depositAddressFontSize" | "funFeatureListItemFontSize" | "dropdownItemFontSize" | "sourceListSectionLabelFontSize" | undefined;
|
|
1104
|
-
readonly fontWeight?: "inherit" | "medium" | "bold" | "inputAmount" | "txStatusDescription" | "txStatusTitle" | "regular" | "semibold" | "heavy" | "cryptoCashToggle" | "modalTopbarTitle" | "modalBottomBarButtonText" | "paymentMethodItemSubtitle" | "paymentMethodItemTitle" | "selectAssetItemSubtitle" | "selectAssetItemTitle" | "transferTokenLabelFontWeight" | "txBreakdown" | "txSummaryLabel" | "txSummaryValue" | "sourceListSectionLabelFontWeight" | undefined;
|
|
1115
|
+
readonly fontSize?: "inherit" | "buttonTextPrimary" | "buttonTextTertiary" | "buttonTextSecondary" | "body" | "inputAmount" | "txStatusDescription" | "txStatusTitle" | "cryptoCashToggle" | "modalTopbarTitle" | "modalBottomBarButtonText" | "paymentMethodItemSubtitle" | "paymentMethodItemTitle" | "selectAssetItemSubtitle" | "selectAssetItemTitle" | "txBreakdown" | "txSummaryLabel" | "txSummaryValue" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "21" | "40" | "57" | "header-14" | "header-36" | "dollarValue" | "modalTopbarSubtitle" | "youPayYouReceivePrimaryFontSize" | "youPayYouReceiveSecondaryFontSize" | "transferTokenLabelFontSize" | "depositAddressFontSize" | "funFeatureListItemFontSize" | "dropdownItemFontSize" | "sourceListSectionLabelFontSize" | "formOfPaymentsListSectionLabelFontSize" | undefined;
|
|
1116
|
+
readonly fontWeight?: "inherit" | "medium" | "bold" | "inputAmount" | "txStatusDescription" | "txStatusTitle" | "regular" | "semibold" | "heavy" | "cryptoCashToggle" | "modalTopbarTitle" | "modalBottomBarButtonText" | "paymentMethodItemSubtitle" | "paymentMethodItemTitle" | "selectAssetItemSubtitle" | "selectAssetItemTitle" | "transferTokenLabelFontWeight" | "txBreakdown" | "txSummaryLabel" | "txSummaryValue" | "sourceListSectionLabelFontWeight" | "formOfPaymentsListSectionLabelFontWeight" | undefined;
|
|
1105
1117
|
readonly gap?: "0" | "1" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "40" | "confirmationStepMarginTop" | "confirmationStepVerticalGap" | "cryptoCashToggleContainerPadding" | "cryptoCashToggleMarginBottom" | "cryptoCashToggleMarginTop" | "cryptoCashToggleTabPaddingY" | "modalBaseHorizontalPadding" | "modalBottomHorizontalPadding" | "modalPaddingBottomUpper" | "modalPaddingBottomLower" | "modalTopBarVerticalTextSpacing" | "modalBottomBarButtonPaddingY" | "selectAssetItemPaddingX" | "selectAssetItemPaddingY" | "selectAssetItemTextGap" | "selectBrokerageItemPaddingX" | "selectBrokerageItemPaddingY" | "txBreakdownMarginY" | "txBreakdownPaddingX" | "txSummaryBoxPaddingX" | "txSummaryBoxPaddingY" | "txSummaryLineItemPadding" | "txSummaryDividerMarginX" | "txSummaryDividerMarginY" | "verticalSectionGap" | "youPayYouReceivePaddingLeft" | "youPayYouReceivePaddingRight" | "youPayYouReceivePaddingY" | "2" | "3" | "4" | "6" | "8" | "11" | "24" | "30" | "15" | "28" | "32" | "36" | "44" | "-1" | "5" | "7" | "9" | "64" | undefined;
|
|
1106
1118
|
readonly height?: "1" | "connectExchangeIconSize" | "cryptoCashToggleIconSize" | "dollarValueSkeletonHeight" | "dollarValueSkeletonWidth" | "inputAmountQuickOptionButtonHeight" | "inputAmountMinHeight" | "modalBottomBarButtonHeight" | "modalBottomBarCloseButtonHeight" | "modalTopBarHeight" | "paymentAmountSkeletonBlockHeight" | "paymentAmountSkeletonBlockWidth" | "paymentAmountSkeletonCircleSize" | "paymentMethodItemIconSize" | "selectAssetItemIconSize" | "txBreakdownSkeletonWidth" | "txSummaryLineSkeletonHeight" | "txSummaryLineSkeletonWidth" | "10" | "12" | "13" | "14" | "16" | "18" | "20" | "40" | "57" | "2" | "4" | "8" | "11" | "24" | "30" | "full" | "15" | "28" | "32" | "34" | "36" | "44" | "48" | "50" | "54" | "60" | "72" | "76" | "93" | "96" | "100" | "108" | "120" | "160" | "180" | "200" | "240" | "300" | "half" | "max" | undefined;
|
|
1107
1119
|
readonly justifyContent?: "center" | "space-around" | "space-between" | "flex-end" | "flex-start" | undefined;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ExchangeRates, SwappedFormOfPayment } from '@funkit/api-base';
|
|
2
|
+
export declare function sortFops<T extends SwappedFormOfPayment>(fops: T[]): T[];
|
|
3
|
+
/**
|
|
4
|
+
* Get the limit for a given form of payment in USD.
|
|
5
|
+
* Backend returns min/max in Euros - we convert to USD and round down to the nearest $100
|
|
6
|
+
*/
|
|
7
|
+
export declare function getFopsLimit(fop: SwappedFormOfPayment, exchangeRates: ExchangeRates | undefined, defaultMaxLimit?: string): string;
|
package/dist/domains/wallet.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { FunkitActiveCheckoutItem } from '../providers/FunkitCheckoutContext';
|
|
2
1
|
export interface AssetHoldingsItem {
|
|
3
2
|
iconSrc: string | undefined;
|
|
4
3
|
symbol: string;
|
|
@@ -25,9 +24,3 @@ export declare function getTotalAssetBalance(assets: AssetHoldingsMap): number;
|
|
|
25
24
|
export declare const isPolygonEcosystemToken: (chainId: string, tokenAddress: string) => boolean;
|
|
26
25
|
export declare const L2_COST_MARGIN_MULTIPLIER = 1.2;
|
|
27
26
|
export declare const ASSETS_LOW_VALUE_THRESHOLD = 0.1;
|
|
28
|
-
type RecommendedAsset = {
|
|
29
|
-
chainSymbolKey: string;
|
|
30
|
-
label: string | null;
|
|
31
|
-
};
|
|
32
|
-
export declare const getRecommendedAsset: (checkoutItem: FunkitActiveCheckoutItem, accountHoldings: KnownAssetHoldingsItem[]) => RecommendedAsset | null;
|
|
33
|
-
export {};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { type GetFopsResponse } from '@funkit/api-base';
|
|
2
1
|
export interface UseFopsParams {
|
|
3
2
|
/** User's email for Swapped integration */
|
|
4
3
|
email?: string;
|
|
@@ -14,4 +13,205 @@ export interface UseFopsParams {
|
|
|
14
13
|
* @param params - Optional parameters including email, enabled state, and themeConfig
|
|
15
14
|
* @returns Query result with genericFormsOfPayments and savedFormsOfPayments
|
|
16
15
|
*/
|
|
17
|
-
export declare const useFops: ({ enabled, themeConfig, }?: UseFopsParams) =>
|
|
16
|
+
export declare const useFops: ({ enabled, themeConfig, }?: UseFopsParams) => {
|
|
17
|
+
isLoading: boolean;
|
|
18
|
+
data: {
|
|
19
|
+
genericFormsOfPayments: import("@funkit/api-base").GenericFormOfPayment[];
|
|
20
|
+
savedFormsOfPayments: import("@funkit/api-base").SavedFormOfPayment[];
|
|
21
|
+
};
|
|
22
|
+
error: Error;
|
|
23
|
+
isError: true;
|
|
24
|
+
isPending: false;
|
|
25
|
+
isLoadingError: false;
|
|
26
|
+
isRefetchError: true;
|
|
27
|
+
isSuccess: false;
|
|
28
|
+
isPlaceholderData: false;
|
|
29
|
+
status: "error";
|
|
30
|
+
dataUpdatedAt: number;
|
|
31
|
+
errorUpdatedAt: number;
|
|
32
|
+
failureCount: number;
|
|
33
|
+
failureReason: Error | null;
|
|
34
|
+
errorUpdateCount: number;
|
|
35
|
+
isFetched: boolean;
|
|
36
|
+
isFetchedAfterMount: boolean;
|
|
37
|
+
isFetching: boolean;
|
|
38
|
+
isInitialLoading: boolean;
|
|
39
|
+
isPaused: boolean;
|
|
40
|
+
isRefetching: boolean;
|
|
41
|
+
isStale: boolean;
|
|
42
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<{
|
|
43
|
+
genericFormsOfPayments: import("@funkit/api-base").GenericFormOfPayment[];
|
|
44
|
+
savedFormsOfPayments: import("@funkit/api-base").SavedFormOfPayment[];
|
|
45
|
+
}, Error>>;
|
|
46
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
47
|
+
promise: Promise<{
|
|
48
|
+
genericFormsOfPayments: import("@funkit/api-base").GenericFormOfPayment[];
|
|
49
|
+
savedFormsOfPayments: import("@funkit/api-base").SavedFormOfPayment[];
|
|
50
|
+
}>;
|
|
51
|
+
} | {
|
|
52
|
+
isLoading: boolean;
|
|
53
|
+
data: {
|
|
54
|
+
genericFormsOfPayments: import("@funkit/api-base").GenericFormOfPayment[];
|
|
55
|
+
savedFormsOfPayments: import("@funkit/api-base").SavedFormOfPayment[];
|
|
56
|
+
};
|
|
57
|
+
error: null;
|
|
58
|
+
isError: false;
|
|
59
|
+
isPending: false;
|
|
60
|
+
isLoadingError: false;
|
|
61
|
+
isRefetchError: false;
|
|
62
|
+
isSuccess: true;
|
|
63
|
+
isPlaceholderData: false;
|
|
64
|
+
status: "success";
|
|
65
|
+
dataUpdatedAt: number;
|
|
66
|
+
errorUpdatedAt: number;
|
|
67
|
+
failureCount: number;
|
|
68
|
+
failureReason: Error | null;
|
|
69
|
+
errorUpdateCount: number;
|
|
70
|
+
isFetched: boolean;
|
|
71
|
+
isFetchedAfterMount: boolean;
|
|
72
|
+
isFetching: boolean;
|
|
73
|
+
isInitialLoading: boolean;
|
|
74
|
+
isPaused: boolean;
|
|
75
|
+
isRefetching: boolean;
|
|
76
|
+
isStale: boolean;
|
|
77
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<{
|
|
78
|
+
genericFormsOfPayments: import("@funkit/api-base").GenericFormOfPayment[];
|
|
79
|
+
savedFormsOfPayments: import("@funkit/api-base").SavedFormOfPayment[];
|
|
80
|
+
}, Error>>;
|
|
81
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
82
|
+
promise: Promise<{
|
|
83
|
+
genericFormsOfPayments: import("@funkit/api-base").GenericFormOfPayment[];
|
|
84
|
+
savedFormsOfPayments: import("@funkit/api-base").SavedFormOfPayment[];
|
|
85
|
+
}>;
|
|
86
|
+
} | {
|
|
87
|
+
isLoading: boolean;
|
|
88
|
+
data: undefined;
|
|
89
|
+
error: Error;
|
|
90
|
+
isError: true;
|
|
91
|
+
isPending: false;
|
|
92
|
+
isLoadingError: true;
|
|
93
|
+
isRefetchError: false;
|
|
94
|
+
isSuccess: false;
|
|
95
|
+
isPlaceholderData: false;
|
|
96
|
+
status: "error";
|
|
97
|
+
dataUpdatedAt: number;
|
|
98
|
+
errorUpdatedAt: number;
|
|
99
|
+
failureCount: number;
|
|
100
|
+
failureReason: Error | null;
|
|
101
|
+
errorUpdateCount: number;
|
|
102
|
+
isFetched: boolean;
|
|
103
|
+
isFetchedAfterMount: boolean;
|
|
104
|
+
isFetching: boolean;
|
|
105
|
+
isInitialLoading: boolean;
|
|
106
|
+
isPaused: boolean;
|
|
107
|
+
isRefetching: boolean;
|
|
108
|
+
isStale: boolean;
|
|
109
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<{
|
|
110
|
+
genericFormsOfPayments: import("@funkit/api-base").GenericFormOfPayment[];
|
|
111
|
+
savedFormsOfPayments: import("@funkit/api-base").SavedFormOfPayment[];
|
|
112
|
+
}, Error>>;
|
|
113
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
114
|
+
promise: Promise<{
|
|
115
|
+
genericFormsOfPayments: import("@funkit/api-base").GenericFormOfPayment[];
|
|
116
|
+
savedFormsOfPayments: import("@funkit/api-base").SavedFormOfPayment[];
|
|
117
|
+
}>;
|
|
118
|
+
} | {
|
|
119
|
+
isLoading: boolean;
|
|
120
|
+
data: undefined;
|
|
121
|
+
error: null;
|
|
122
|
+
isError: false;
|
|
123
|
+
isPending: true;
|
|
124
|
+
isLoadingError: false;
|
|
125
|
+
isRefetchError: false;
|
|
126
|
+
isSuccess: false;
|
|
127
|
+
isPlaceholderData: false;
|
|
128
|
+
status: "pending";
|
|
129
|
+
dataUpdatedAt: number;
|
|
130
|
+
errorUpdatedAt: number;
|
|
131
|
+
failureCount: number;
|
|
132
|
+
failureReason: Error | null;
|
|
133
|
+
errorUpdateCount: number;
|
|
134
|
+
isFetched: boolean;
|
|
135
|
+
isFetchedAfterMount: boolean;
|
|
136
|
+
isFetching: boolean;
|
|
137
|
+
isInitialLoading: boolean;
|
|
138
|
+
isPaused: boolean;
|
|
139
|
+
isRefetching: boolean;
|
|
140
|
+
isStale: boolean;
|
|
141
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<{
|
|
142
|
+
genericFormsOfPayments: import("@funkit/api-base").GenericFormOfPayment[];
|
|
143
|
+
savedFormsOfPayments: import("@funkit/api-base").SavedFormOfPayment[];
|
|
144
|
+
}, Error>>;
|
|
145
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
146
|
+
promise: Promise<{
|
|
147
|
+
genericFormsOfPayments: import("@funkit/api-base").GenericFormOfPayment[];
|
|
148
|
+
savedFormsOfPayments: import("@funkit/api-base").SavedFormOfPayment[];
|
|
149
|
+
}>;
|
|
150
|
+
} | {
|
|
151
|
+
isLoading: boolean;
|
|
152
|
+
data: undefined;
|
|
153
|
+
error: null;
|
|
154
|
+
isError: false;
|
|
155
|
+
isPending: true;
|
|
156
|
+
isLoadingError: false;
|
|
157
|
+
isRefetchError: false;
|
|
158
|
+
isSuccess: false;
|
|
159
|
+
isPlaceholderData: false;
|
|
160
|
+
status: "pending";
|
|
161
|
+
dataUpdatedAt: number;
|
|
162
|
+
errorUpdatedAt: number;
|
|
163
|
+
failureCount: number;
|
|
164
|
+
failureReason: Error | null;
|
|
165
|
+
errorUpdateCount: number;
|
|
166
|
+
isFetched: boolean;
|
|
167
|
+
isFetchedAfterMount: boolean;
|
|
168
|
+
isFetching: boolean;
|
|
169
|
+
isInitialLoading: boolean;
|
|
170
|
+
isPaused: boolean;
|
|
171
|
+
isRefetching: boolean;
|
|
172
|
+
isStale: boolean;
|
|
173
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<{
|
|
174
|
+
genericFormsOfPayments: import("@funkit/api-base").GenericFormOfPayment[];
|
|
175
|
+
savedFormsOfPayments: import("@funkit/api-base").SavedFormOfPayment[];
|
|
176
|
+
}, Error>>;
|
|
177
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
178
|
+
promise: Promise<{
|
|
179
|
+
genericFormsOfPayments: import("@funkit/api-base").GenericFormOfPayment[];
|
|
180
|
+
savedFormsOfPayments: import("@funkit/api-base").SavedFormOfPayment[];
|
|
181
|
+
}>;
|
|
182
|
+
} | {
|
|
183
|
+
isLoading: boolean;
|
|
184
|
+
data: {
|
|
185
|
+
genericFormsOfPayments: import("@funkit/api-base").GenericFormOfPayment[];
|
|
186
|
+
savedFormsOfPayments: import("@funkit/api-base").SavedFormOfPayment[];
|
|
187
|
+
};
|
|
188
|
+
isError: false;
|
|
189
|
+
error: null;
|
|
190
|
+
isPending: false;
|
|
191
|
+
isLoadingError: false;
|
|
192
|
+
isRefetchError: false;
|
|
193
|
+
isSuccess: true;
|
|
194
|
+
isPlaceholderData: true;
|
|
195
|
+
status: "success";
|
|
196
|
+
dataUpdatedAt: number;
|
|
197
|
+
errorUpdatedAt: number;
|
|
198
|
+
failureCount: number;
|
|
199
|
+
failureReason: Error | null;
|
|
200
|
+
errorUpdateCount: number;
|
|
201
|
+
isFetched: boolean;
|
|
202
|
+
isFetchedAfterMount: boolean;
|
|
203
|
+
isFetching: boolean;
|
|
204
|
+
isInitialLoading: boolean;
|
|
205
|
+
isPaused: boolean;
|
|
206
|
+
isRefetching: boolean;
|
|
207
|
+
isStale: boolean;
|
|
208
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<{
|
|
209
|
+
genericFormsOfPayments: import("@funkit/api-base").GenericFormOfPayment[];
|
|
210
|
+
savedFormsOfPayments: import("@funkit/api-base").SavedFormOfPayment[];
|
|
211
|
+
}, Error>>;
|
|
212
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
213
|
+
promise: Promise<{
|
|
214
|
+
genericFormsOfPayments: import("@funkit/api-base").GenericFormOfPayment[];
|
|
215
|
+
savedFormsOfPayments: import("@funkit/api-base").SavedFormOfPayment[];
|
|
216
|
+
}>;
|
|
217
|
+
};
|
|
@@ -31,6 +31,7 @@ export declare enum CheckoutModalEvent {
|
|
|
31
31
|
READY_SOURCE_CHANGE = "fc::ready::source_change",
|
|
32
32
|
READY_TRANSFER_TOKEN = "fc::ready::transfer_token",
|
|
33
33
|
READY_LOADING_ACCOUNT = "fc::ready::loading_account",
|
|
34
|
+
READY_SWAPPED_IFRAME = "fc::ready::swapped_iframe",
|
|
34
35
|
QUERY_FROG_SUB_ACCOUNTS = "fc::query::frog_sub_accounts",
|
|
35
36
|
QUERY_UDA_ADDRESS = "fc::query::uda_address",
|
|
36
37
|
QUERY_WALLET_ASSETS = "fc::query::wallet_assets",
|
|
@@ -41,5 +42,9 @@ export declare enum CheckoutModalEvent {
|
|
|
41
42
|
ACCOUNT_BALANCE_SUCCESS = "fc::success::account_balance",
|
|
42
43
|
TOKEN_TRANSFER_SUCCESS = "fc::success::token_transfer",
|
|
43
44
|
BLUVO_WITHDRAWAL_COMPLETED = "fc::success::bluvo_withdrawal_completed",
|
|
44
|
-
QUICK_OPTION_SELECTED = "fc::input_amount::quick_option_selected"
|
|
45
|
+
QUICK_OPTION_SELECTED = "fc::input_amount::quick_option_selected",
|
|
46
|
+
SWAPPED_IFRAME_NAVIGATION = "fc::swapped_iframe::navigation",
|
|
47
|
+
SWAPPED_IFRAME_COMPLETE = "fc::swapped_iframe::complete",
|
|
48
|
+
SWAPPED_IFRAME_ERROR = "fc::swapped_iframe::error",
|
|
49
|
+
SWAPPED_IFRAME_EXIT = "fc::swapped_iframe::exit"
|
|
45
50
|
}
|
|
@@ -7,6 +7,7 @@ import type { FunkitActiveCheckoutItem, FunkitCheckoutActionParams } from '../pr
|
|
|
7
7
|
import type { WithdrawalClient } from '../wallets/Wallet';
|
|
8
8
|
interface DirectExecutionQuoteRequestParamsBase {
|
|
9
9
|
actionParams: FunkitCheckoutActionParams[];
|
|
10
|
+
bridgeOverride?: 'across' | 'relay';
|
|
10
11
|
fromChainId: string;
|
|
11
12
|
fromTokenAddress: Address;
|
|
12
13
|
isExactIn?: boolean;
|
|
@@ -4,6 +4,7 @@ import { type UDAConfig } from './useUDAParams';
|
|
|
4
4
|
interface UseCheckoutTransferInitResponse {
|
|
5
5
|
transferInit: CheckoutInitTokenTransferResponse | undefined;
|
|
6
6
|
recipientAddr: FunAddress;
|
|
7
|
+
isLoading: boolean;
|
|
7
8
|
}
|
|
8
9
|
type CheckoutTokenTransferParams = Omit<CheckoutInitTokenTransferAddressParams, 'logger' | 'clientMetadata'>;
|
|
9
10
|
export declare function checkoutTransferFetch(params: CheckoutTokenTransferParams): Promise<CheckoutInitTokenTransferResponse>;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { type ConnectablePaymentMethodInfo, PaymentMethod } from '../domains/paymentMethods';
|
|
2
2
|
export declare function usePaymentMethodEnablement(): {
|
|
3
|
+
isSwappedEnabled: false;
|
|
3
4
|
isFiatEnabled: boolean;
|
|
4
5
|
isTokenTransferEnabled: boolean;
|
|
5
6
|
isMeldEnabled: boolean;
|
|
6
|
-
isBrokerageEnabled:
|
|
7
|
+
isBrokerageEnabled: boolean;
|
|
7
8
|
};
|
|
8
9
|
export type PaymentMethodType = 'crypto' | 'fiat';
|
|
9
|
-
export declare const usePaymentSources: (currentPaymentMethodInfo: ConnectablePaymentMethodInfo | null, targetChainId: string
|
|
10
|
+
export declare const usePaymentSources: (currentPaymentMethodInfo: ConnectablePaymentMethodInfo | null, targetChainId: string) => {
|
|
10
11
|
isFallback: boolean;
|
|
11
12
|
preferred: PaymentMethod[] | (import("../domains/paymentMethods").PaymentMethodBrokerageInfo | import("../domains/paymentMethods").PaymentMethodAccountInfo | import("../domains/paymentMethods").PaymentMethodVirtualBankInfo)[];
|
|
12
13
|
moreSources: PaymentMethod[];
|