@funkit/connect 6.14.4 → 6.14.5
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 +14 -0
- package/dist/components/Dialog/Dialog.d.ts +2 -1
- package/dist/components/Dropdown/BaseDropdown.d.ts +2 -1
- package/dist/components/Dropdown/ChainDropdown.d.ts +2 -1
- package/dist/components/Dropdown/TokenDropdown.d.ts +5 -1
- package/dist/components/FunAlert/FunAlert.d.ts +2 -1
- package/dist/components/FunAsset/FunAssetItem.d.ts +2 -1
- package/dist/components/FunButton/FunButton.d.ts +2 -1
- package/dist/components/FunButton/FunIconButton.d.ts +2 -1
- package/dist/components/FunInput/FunInput.d.ts +1 -0
- package/dist/components/FunNotification/FunNotification.d.ts +2 -1
- package/dist/components/FunPaymentMethodItem/FunPaymentMethodItem.d.ts +4 -2
- package/dist/components/FunPayments/FunPaymentMethods.d.ts +6 -3
- package/dist/components/MeldQuoteItem/MeldQuoteItem.d.ts +2 -1
- package/dist/components/SourceMeldQuoteItem/SourceMeldQuoteItem.d.ts +2 -1
- package/dist/components/SourcePaymentMethodItem/SourcePaymentMethodItem.d.ts +2 -1
- package/dist/components/Text/Text.d.ts +1 -0
- package/dist/consts/customers.d.ts +1 -0
- package/dist/hooks/useCheckoutAccountBalanceTransfer.d.ts +1 -1
- package/dist/hooks/useIsUsUser.d.ts +1 -0
- package/dist/index.js +1968 -1736
- package/dist/modals/CheckoutModal/InputAmount/InputAmountLoaded.d.ts +2 -5
- package/dist/modals/CheckoutModal/InputAmount/state.d.ts +5 -1
- package/dist/modals/CheckoutModal/InputAmount/useAmountInput.d.ts +1 -2
- package/dist/modals/CheckoutModal/InputAmount/useMeld.d.ts +38 -0
- package/dist/modals/CheckoutModal/TransferToken/CheckoutNotifications.d.ts +1 -9
- package/dist/modals/CheckoutModal/TransferToken/types.d.ts +15 -0
- package/dist/modals/CheckoutModal/stepTransition.d.ts +1 -1
- package/dist/providers/FunkitCheckoutContext.d.ts +10 -0
- package/dist/utils/checkout.d.ts +1 -1
- package/dist/wallets/walletConnectors/index.js +51 -51
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @funkit/connect
|
|
2
2
|
|
|
3
|
+
## 6.14.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 6becc31: Refactor Meld UI logic into dedicated useMeldUI hook
|
|
8
|
+
- 725878d: feat(connect): do not notify for intermediate multi-step direct executions
|
|
9
|
+
- 9d7d1f1: remove source tab if there is only single source
|
|
10
|
+
- 4c6c74e: if user is hyperdash us user then show only wallet source
|
|
11
|
+
- Updated dependencies [fd171fa]
|
|
12
|
+
- Updated dependencies [725878d]
|
|
13
|
+
- @funkit/api-base@1.12.6
|
|
14
|
+
- @funkit/core@2.3.51
|
|
15
|
+
- @funkit/wagmi-tools@3.0.74
|
|
16
|
+
|
|
3
17
|
## 6.14.4
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -18,11 +18,12 @@ interface DialogProps {
|
|
|
18
18
|
withoutBottomPadding?: boolean;
|
|
19
19
|
/** Whether the transition animation should be used on open/close */
|
|
20
20
|
withTransition?: boolean;
|
|
21
|
+
testId?: string;
|
|
21
22
|
}
|
|
22
23
|
/**
|
|
23
24
|
* Dialog components (title, content, bottom bar) must be rendered as direct children of Dialog for correct scrolling behavior
|
|
24
25
|
*/
|
|
25
|
-
export declare function Dialog({ children, onClose, onAnimationComplete, open, titleId, isHidden, isSmartCloseable, withoutSidePadding, withoutBottomPadding, withTransition, }: DialogProps): React.ReactPortal | null;
|
|
26
|
+
export declare function Dialog({ children, onClose, onAnimationComplete, open, titleId, isHidden, isSmartCloseable, withoutSidePadding, withoutBottomPadding, withTransition, testId, }: DialogProps): React.ReactPortal | null;
|
|
26
27
|
export declare namespace Dialog {
|
|
27
28
|
var Title: ({ title, titleMeta, hasCloseButton: hasCloseButtonProp, isCloseDisabled, onClose, hasBackButton: hasBackButtonProp, helpButtonUrl, isBackDisabled, onBack, className, }: DialogTitleProps) => React.JSX.Element;
|
|
28
29
|
var Content: ({ children, fullHeight, paddingLeft, paddingBottom, paddingTop, className, withTopDivider, withBottomDivider, id, withoutInternalPadding, ...boxProps }: DialogContentProps) => React.JSX.Element;
|
|
@@ -35,6 +35,7 @@ export interface BaseDropdownProps {
|
|
|
35
35
|
* This values should be set so that the last dropdown item is partially visible to indicate that there are more options.
|
|
36
36
|
*/
|
|
37
37
|
maxDropdownHeight?: number;
|
|
38
|
+
testId?: string;
|
|
38
39
|
}
|
|
39
|
-
declare function BaseDropdown({ activeItemProps, value, options, onOptionSelected, onOpen, renderDropdownOption, searchableOptions, searchPlaceholder, placeholder, resetSearchOnClose, openToTopOnMobile, alwaysOpenToTop, openDropdownFullWidth, isLoading, preloadIconUrls, horizontalIconGap, openDropdownBackgroundColor, size, label, maxDropdownHeight, }: BaseDropdownProps): React.JSX.Element;
|
|
40
|
+
declare function BaseDropdown({ activeItemProps, value, options, onOptionSelected, onOpen, renderDropdownOption, searchableOptions, searchPlaceholder, placeholder, resetSearchOnClose, openToTopOnMobile, alwaysOpenToTop, openDropdownFullWidth, isLoading, preloadIconUrls, horizontalIconGap, openDropdownBackgroundColor, size, label, maxDropdownHeight, testId, }: BaseDropdownProps): React.JSX.Element;
|
|
40
41
|
export default BaseDropdown;
|
|
@@ -22,6 +22,7 @@ interface ChainDropdownProps {
|
|
|
22
22
|
alwaysOpenToTop?: BaseDropdownProps['alwaysOpenToTop'];
|
|
23
23
|
maxDropdownHeight?: BaseDropdownProps['maxDropdownHeight'];
|
|
24
24
|
tagComponent?: (value: string) => React.ReactNode;
|
|
25
|
+
testId?: string;
|
|
25
26
|
}
|
|
26
|
-
export declare const ChainDropdown: ({ assets, chainIds: chains, selectedChainId: propSelectedChainId, selectedToken, allowUnselect, onChainSelected, activeItemProps, size, openDropdownBackgroundColor, openDropdownFullWidth, isLoading, alwaysOpenToTop, maxDropdownHeight, tagComponent, }: ChainDropdownProps) => React.JSX.Element;
|
|
27
|
+
export declare const ChainDropdown: ({ assets, chainIds: chains, selectedChainId: propSelectedChainId, selectedToken, allowUnselect, onChainSelected, activeItemProps, size, openDropdownBackgroundColor, openDropdownFullWidth, isLoading, alwaysOpenToTop, maxDropdownHeight, tagComponent, testId, }: ChainDropdownProps) => React.JSX.Element;
|
|
27
28
|
export {};
|
|
@@ -17,6 +17,10 @@ interface TokenDropdownProps {
|
|
|
17
17
|
* Override to hide the new token badge
|
|
18
18
|
*/
|
|
19
19
|
hideNewTokenBadge?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Test ID for the token dropdown
|
|
22
|
+
*/
|
|
23
|
+
testId?: string;
|
|
20
24
|
}
|
|
21
|
-
export declare const TokenDropdown: ({ assets, selectedChainId, selectedToken, onTokenSelected, isLoading, alwaysOpenToTop, maxDropdownHeight, hideNewTokenBadge, }: TokenDropdownProps) => React.JSX.Element;
|
|
25
|
+
export declare const TokenDropdown: ({ assets, selectedChainId, selectedToken, onTokenSelected, isLoading, alwaysOpenToTop, maxDropdownHeight, hideNewTokenBadge, testId, }: TokenDropdownProps) => React.JSX.Element;
|
|
22
26
|
export {};
|
|
@@ -6,6 +6,7 @@ interface FunAlertProps {
|
|
|
6
6
|
type?: 'info' | 'error';
|
|
7
7
|
verticalAlignment?: 'top' | 'center';
|
|
8
8
|
paddingX?: BoxProps['paddingX'];
|
|
9
|
+
testId?: string;
|
|
9
10
|
}
|
|
10
|
-
export declare function FunAlert({ icon, description, type, verticalAlignment, paddingX, }: FunAlertProps): React.JSX.Element;
|
|
11
|
+
export declare function FunAlert({ icon, description, type, verticalAlignment, paddingX, testId, }: FunAlertProps): React.JSX.Element;
|
|
11
12
|
export {};
|
|
@@ -6,7 +6,8 @@ interface FunAssetItemProps {
|
|
|
6
6
|
isDisabled?: boolean;
|
|
7
7
|
badgeText: string | null;
|
|
8
8
|
onClick: () => void;
|
|
9
|
+
testId?: string;
|
|
9
10
|
}
|
|
10
|
-
export declare const FunAssetItem: ({ asset, isActive, isDisabled, badgeText, onClick, }: FunAssetItemProps) => React.JSX.Element;
|
|
11
|
+
export declare const FunAssetItem: ({ asset, isActive, isDisabled, badgeText, onClick, testId, }: FunAssetItemProps) => React.JSX.Element;
|
|
11
12
|
export declare function FunAssetItemSkeleton(): React.JSX.Element;
|
|
12
13
|
export {};
|
|
@@ -15,5 +15,6 @@ export interface FunButtonProps {
|
|
|
15
15
|
textSize?: BoxProps['fontSize'];
|
|
16
16
|
uppercase?: boolean;
|
|
17
17
|
textWeight?: BoxProps['fontWeight'];
|
|
18
|
+
testId?: string;
|
|
18
19
|
}
|
|
19
|
-
export declare function FunButton({ id, title, customTitleComponent, onClick, isDisabled, type, isLoading, loaderSize, textSize, textWeight, borderRadius, height, uppercase, }: FunButtonProps): React.JSX.Element;
|
|
20
|
+
export declare function FunButton({ id, title, customTitleComponent, onClick, isDisabled, type, isLoading, loaderSize, textSize, textWeight, borderRadius, height, uppercase, testId, }: FunButtonProps): React.JSX.Element;
|
|
@@ -38,6 +38,7 @@ export interface FunIconButtonProps extends Pick<BoxProps, 'as' | 'borderRadius'
|
|
|
38
38
|
isHighlighted?: boolean;
|
|
39
39
|
colorOverrides?: FunIconButtonCustomColors;
|
|
40
40
|
href?: string;
|
|
41
|
+
testId?: string;
|
|
41
42
|
}
|
|
42
|
-
export declare const FunIconButton: ({ children, onClick, icon, iconVisualWeightCenter, size, width, gap, ariaLabel, color, as, isDisabled, borderRadius, style, variant, colorOverrides, ...props }: FunIconButtonProps) => React.JSX.Element;
|
|
43
|
+
export declare const FunIconButton: ({ children, onClick, icon, iconVisualWeightCenter, size, width, gap, ariaLabel, color, as, isDisabled, borderRadius, style, variant, colorOverrides, testId, ...props }: FunIconButtonProps) => React.JSX.Element;
|
|
43
44
|
export {};
|
|
@@ -29,6 +29,7 @@ export interface FunInputProps<T = HTMLInputElement | HTMLTextAreaElement> {
|
|
|
29
29
|
isLoading?: boolean;
|
|
30
30
|
/** Allow multiline input. Defaults to false. This option replaces the internal `input` element with a `textarea` element. */
|
|
31
31
|
allowMultiline?: T extends HTMLInputElement ? false : true;
|
|
32
|
+
testId?: string;
|
|
32
33
|
}
|
|
33
34
|
export type FunInputChangeEvent = ChangeEvent<HTMLInputElement | HTMLTextAreaElement>;
|
|
34
35
|
export declare const FunInput: React.ForwardRefExoticComponent<FunInputProps<HTMLTextAreaElement | HTMLInputElement> & React.RefAttributes<HTMLTextAreaElement | HTMLInputElement>>;
|
|
@@ -5,6 +5,7 @@ interface FunNotificationProps {
|
|
|
5
5
|
actionText?: string;
|
|
6
6
|
onAction?: () => void;
|
|
7
7
|
isVisible?: boolean;
|
|
8
|
+
testId?: string;
|
|
8
9
|
}
|
|
9
10
|
export type FunNotificationType = 'default' | 'error' | 'warning' | 'hint';
|
|
10
11
|
export interface ErrorNotification {
|
|
@@ -15,5 +16,5 @@ export interface ErrorNotification {
|
|
|
15
16
|
* A notification/message component with height resizing animation.
|
|
16
17
|
* Control visibility by enabling/disabling `isVisible` prop instead of doing an outer conditional rendering.
|
|
17
18
|
*/
|
|
18
|
-
export declare function FunNotification({ type, description, actionText, onAction, isVisible: isVisibleProps, }: FunNotificationProps): React.JSX.Element;
|
|
19
|
+
export declare function FunNotification({ type, description, actionText, onAction, isVisible: isVisibleProps, testId, }: FunNotificationProps): React.JSX.Element;
|
|
19
20
|
export {};
|
|
@@ -3,8 +3,9 @@ import { type BoxProps } from '../Box/Box';
|
|
|
3
3
|
interface PaymentMethodWrapperProps extends Pick<FunPaymentMethodItemProps, 'isActive' | 'isDisabled' | 'onClick'> {
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
paddingY?: BoxProps['paddingY'];
|
|
6
|
+
testId?: string;
|
|
6
7
|
}
|
|
7
|
-
export declare const PaymentMethodWrapper: ({ paddingY, isActive, isDisabled, onClick, children, }: PaymentMethodWrapperProps) => React.JSX.Element;
|
|
8
|
+
export declare const PaymentMethodWrapper: ({ paddingY, isActive, isDisabled, onClick, children, testId, }: PaymentMethodWrapperProps) => React.JSX.Element;
|
|
8
9
|
export interface FunPaymentMethodItemProps {
|
|
9
10
|
keyIcon?: ReactNode;
|
|
10
11
|
keyText: string;
|
|
@@ -15,6 +16,7 @@ export interface FunPaymentMethodItemProps {
|
|
|
15
16
|
isError?: boolean;
|
|
16
17
|
isDisabled?: boolean;
|
|
17
18
|
isActive?: boolean;
|
|
19
|
+
testId?: string;
|
|
18
20
|
}
|
|
19
|
-
export declare const FunPaymentMethodItem: ({ keyIcon, keyText, valueIcon, disclaimerText, badge, onClick, isError, isDisabled, isActive, }: FunPaymentMethodItemProps) => React.JSX.Element;
|
|
21
|
+
export declare const FunPaymentMethodItem: ({ keyIcon, keyText, valueIcon, disclaimerText, badge, onClick, isError, isDisabled, isActive, testId, }: FunPaymentMethodItemProps) => React.JSX.Element;
|
|
20
22
|
export {};
|
|
@@ -10,18 +10,21 @@ interface ConnectedPaymentMethodItemProps {
|
|
|
10
10
|
showSelectedCheckmark?: boolean;
|
|
11
11
|
onSelect: () => void;
|
|
12
12
|
targetChainId: string;
|
|
13
|
+
testId?: string;
|
|
13
14
|
}
|
|
14
|
-
export declare const AccountBalancePaymentMethodItem: ({ isSelected, showSelectedCheckmark, onSelect, targetChainId, }: ConnectedPaymentMethodItemProps) => React.JSX.Element;
|
|
15
|
-
export declare const ActiveFiatAccountPaymentMethodItem: ({ isActive, onClick, paymentMethodInfo, customValueIcon, }: BasePaymentMethodItemProps & {
|
|
15
|
+
export declare const AccountBalancePaymentMethodItem: ({ isSelected, showSelectedCheckmark, onSelect, targetChainId, testId, }: ConnectedPaymentMethodItemProps) => React.JSX.Element;
|
|
16
|
+
export declare const ActiveFiatAccountPaymentMethodItem: ({ isActive, onClick, paymentMethodInfo, customValueIcon, testId, }: BasePaymentMethodItemProps & {
|
|
16
17
|
paymentMethodInfo: PaymentMethodVirtualBankInfo;
|
|
18
|
+
testId?: string;
|
|
17
19
|
}) => React.JSX.Element;
|
|
18
20
|
type BasePaymentMethodItemProps = {
|
|
19
21
|
isActive: boolean;
|
|
20
22
|
onClick: () => void;
|
|
21
23
|
isClickable?: boolean;
|
|
22
24
|
customValueIcon?: ReactNode;
|
|
25
|
+
testId?: string;
|
|
23
26
|
};
|
|
24
|
-
export declare function AddPaymentMethodItem({ paymentMethod, isClickable, isActive, onClick, customValueIcon, }: BasePaymentMethodItemProps & {
|
|
27
|
+
export declare function AddPaymentMethodItem({ paymentMethod, isClickable, isActive, onClick, customValueIcon, testId, }: BasePaymentMethodItemProps & {
|
|
25
28
|
paymentMethod: PaymentMethod;
|
|
26
29
|
dynamicLimit?: string;
|
|
27
30
|
}): React.JSX.Element | null | undefined;
|
|
@@ -9,5 +9,6 @@ export interface MeldQuoteItemProps {
|
|
|
9
9
|
isError?: boolean;
|
|
10
10
|
isDisabled?: boolean;
|
|
11
11
|
isActive?: boolean;
|
|
12
|
+
testId?: string;
|
|
12
13
|
}
|
|
13
|
-
export declare const MeldQuoteItem: ({ quote, isBestQuote, bestQuoteLabel, onClick, isDisabled, isActive, }: MeldQuoteItemProps) => React.JSX.Element;
|
|
14
|
+
export declare const MeldQuoteItem: ({ quote, isBestQuote, bestQuoteLabel, onClick, isDisabled, isActive, testId, }: MeldQuoteItemProps) => React.JSX.Element;
|
|
@@ -9,8 +9,9 @@ interface SourceMeldQuoteItemProps {
|
|
|
9
9
|
isPreselected?: boolean;
|
|
10
10
|
disabled?: boolean;
|
|
11
11
|
error?: string;
|
|
12
|
+
testId?: string;
|
|
12
13
|
}
|
|
13
|
-
export declare const SourceMeldQuoteItem: ({ quote, onClick, isLoading, isBestQuote, bestQuoteLabel, isPreselected, disabled, error, }: SourceMeldQuoteItemProps) => React.JSX.Element;
|
|
14
|
+
export declare const SourceMeldQuoteItem: ({ quote, onClick, isLoading, isBestQuote, bestQuoteLabel, isPreselected, disabled, error, testId, }: SourceMeldQuoteItemProps) => React.JSX.Element;
|
|
14
15
|
interface MeldProviderLabelProps {
|
|
15
16
|
serviceProvider: MeldServiceProvider;
|
|
16
17
|
isBest?: boolean;
|
|
@@ -3,6 +3,7 @@ import { PaymentMethod } from '~/domains/paymentMethods';
|
|
|
3
3
|
import { type FunPaymentMethodItemProps } from '../FunPaymentMethodItem/FunPaymentMethodItem';
|
|
4
4
|
interface SourcePaymentMethodItemProps extends Omit<FunPaymentMethodItemProps, 'valueIcon'> {
|
|
5
5
|
type: PaymentMethod;
|
|
6
|
+
testId?: string;
|
|
6
7
|
}
|
|
7
|
-
export declare const SourcePaymentMethodItem: ({ keyIcon, keyText, disclaimerText, onClick, isError, isDisabled, isActive, type, }: SourcePaymentMethodItemProps) => React.JSX.Element;
|
|
8
|
+
export declare const SourcePaymentMethodItem: ({ keyIcon, keyText, disclaimerText, onClick, isError, isDisabled, isActive, type, testId, }: SourcePaymentMethodItemProps) => React.JSX.Element;
|
|
8
9
|
export {};
|
|
@@ -5,5 +5,6 @@ export declare function isBsxCustomer(apiKey: string): apiKey is "zN1zrkmLQn4oZt
|
|
|
5
5
|
export declare function isEtherealCustomer(apiKey: string): apiKey is "M3uox3cw0u8YCPV9cIREA6AugUMvPFTk6qOpm4um";
|
|
6
6
|
export declare function isKatanaCustomer(apiKey: string): apiKey is "OXLUmejkh9PlNDS4gSvi9gcEWacOpTz2KUVepVf4";
|
|
7
7
|
export declare function isHyperbeatCustomer(apiKey: string): apiKey is "lUzTaIRxs95iin3pCAafB1ChA5akBiuQ1tjhXnau";
|
|
8
|
+
export declare function isHyperdashCustomer(apiKey: string): apiKey is "di9ZSqn1Ya68Y2XpBPUV1rCtNGXh8Xe5MGWzb1Xe";
|
|
8
9
|
export declare function isMonkeyTiltCustomer(apiKey: string): apiKey is "2SrxurU07T2XPDxCAItjj4yYEMXlwV8K2kJB78AX";
|
|
9
10
|
export declare function isBasedCustomer(apiKey: string): apiKey is "clDebbfo9edXq1GydZ0CahSAfSimPj616lFa9p8e";
|
|
@@ -14,7 +14,6 @@ export declare function useCheckoutAccountBalanceTransfer(): {
|
|
|
14
14
|
bypassInit: boolean;
|
|
15
15
|
apiKey?: string;
|
|
16
16
|
nonce?: bigint | undefined;
|
|
17
|
-
logger?: import("@funkit/api-base").Logger | undefined;
|
|
18
17
|
fee?: {
|
|
19
18
|
token?: string;
|
|
20
19
|
amount?: number;
|
|
@@ -22,6 +21,7 @@ export declare function useCheckoutAccountBalanceTransfer(): {
|
|
|
22
21
|
recipient: import("viem").Address;
|
|
23
22
|
} | undefined;
|
|
24
23
|
skipDBAction?: boolean | undefined;
|
|
24
|
+
logger?: import("@funkit/api-base").Logger | undefined;
|
|
25
25
|
};
|
|
26
26
|
} | {
|
|
27
27
|
rFunWallet: null;
|