@funkit/connect 9.0.3 → 9.2.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.
Files changed (54) hide show
  1. package/CHANGELOG.md +56 -0
  2. package/dist/__generated__/default_configs.d.ts +6 -0
  3. package/dist/{chunk-SC53AFEE.js → chunk-3U6TWV25.js} +14 -4
  4. package/dist/{chunk-XCM74QX2.js → chunk-P6FYL3PM.js} +5 -1
  5. package/dist/{chunk-WSCXOKCX.js → chunk-VLXKSNSJ.js} +5 -1
  6. package/dist/clients/chunk-SBQ2UUPK.js +214 -0
  7. package/dist/clients/fanatics.css +4075 -3817
  8. package/dist/clients/fanatics.js +5 -213
  9. package/dist/clients/polymarket.d.ts +41 -0
  10. package/dist/clients/polymarket.js +345 -0
  11. package/dist/components/Box/Box.d.ts +22 -22
  12. package/dist/components/Dropdown/ReceiveTokenDropdown.d.ts +3 -1
  13. package/dist/components/FunCheckoutHistory/PendingSuccessScreen.d.ts +13 -0
  14. package/dist/components/FunDivider/FunDivider.d.ts +3 -1
  15. package/dist/consts/bluvo.d.ts +5 -1
  16. package/dist/consts/customers.d.ts +0 -1
  17. package/dist/css/sprinkles.css.d.ts +34 -22
  18. package/dist/domains/swapped.d.ts +5 -1
  19. package/dist/hooks/queries/useFops.d.ts +4 -198
  20. package/dist/hooks/statsig/useDynamicConfig.d.ts +3 -1
  21. package/dist/hooks/track/CheckoutModalEvent.d.ts +2 -1
  22. package/dist/hooks/useCheckoutDirectExecution.d.ts +1 -1
  23. package/dist/hooks/useCheckoutTransferInit.d.ts +5 -1
  24. package/dist/hooks/useFrogAccount.d.ts +1 -1
  25. package/dist/hooks/useFunkitMaxCheckoutUsdInfo.d.ts +5 -5
  26. package/dist/hooks/useIsUsUser.d.ts +0 -1
  27. package/dist/hooks/usePaymentSources.d.ts +6 -2
  28. package/dist/hooks/useScrollDivider.d.ts +1 -0
  29. package/dist/index.css +4260 -3951
  30. package/dist/index.js +14274 -13956
  31. package/dist/modals/CheckoutModal/Brokerage/components/BrokerageSuccess.d.ts +1 -1
  32. package/dist/modals/CheckoutModal/FunCheckoutStep.d.ts +0 -1
  33. package/dist/modals/CheckoutModal/InputAmount/InputAmountLoaded.d.ts +1 -4
  34. package/dist/modals/CheckoutModal/InputAmount/state.d.ts +1 -5
  35. package/dist/modals/CheckoutModal/SourceChange/FormOfPaymentsList.d.ts +4 -3
  36. package/dist/modals/CheckoutModal/SourceChange/SourceList.d.ts +4 -3
  37. package/dist/modals/CheckoutModal/SourceChange/sourceChange.css.d.ts +5 -0
  38. package/dist/modals/CheckoutModal/stepTransition.d.ts +1 -7
  39. package/dist/modals/WithdrwalModal/WithdrawalCallbackSuccess.d.ts +10 -0
  40. package/dist/providers/FunkitCheckoutContext/index.d.ts +1 -1
  41. package/dist/providers/FunkitCheckoutContext/types.d.ts +6 -4
  42. package/dist/providers/FunkitConfigContext.d.ts +2 -0
  43. package/dist/providers/FunkitThemeProvider.d.ts +18 -0
  44. package/dist/themes/baseTheme.js +1 -1
  45. package/dist/themes/darkTheme.js +2 -2
  46. package/dist/themes/lightTheme.js +2 -2
  47. package/dist/utils/flags/config.d.ts +15 -1
  48. package/dist/utils/withdrawal.d.ts +13 -0
  49. package/dist/wallets/walletConnectors/index.js +30 -30
  50. package/package.json +3 -3
  51. package/dist/modals/CheckoutModal/DirectExecutionNotifCenter/DirectExecutionNotifCenter.d.ts +0 -12
  52. package/dist/modals/CheckoutModal/DirectExecutionNotifCenter/DirectExecutionNotifCenterContent.d.ts +0 -10
  53. package/dist/modals/CheckoutModal/SourceChange/DefiPurchaseSection.d.ts +0 -7
  54. package/dist/modals/WithdrwalModal/WithdrawalNotification.d.ts +0 -12
@@ -1,206 +1,12 @@
1
+ import { type GenericFormOfPayment, type SavedFormOfPayment } from '@funkit/api-base';
1
2
  /**
2
3
  * Hook to fetch available forms of payment from the /fops API.
3
4
  * Returns generic and saved payment options from providers like Swapped.
4
5
  */
5
6
  export declare const useFops: () => {
6
- isLoading: boolean;
7
- data: {
8
- genericFormsOfPayments: import("@funkit/api-base").GenericFormOfPayment[];
9
- savedFormsOfPayments: import("@funkit/api-base").SavedFormOfPayment[];
10
- };
11
- error: Error;
12
- isError: true;
13
- isPending: false;
14
- isLoadingError: false;
15
- isRefetchError: true;
16
- isSuccess: false;
17
- isPlaceholderData: false;
18
- status: "error";
19
- dataUpdatedAt: number;
20
- errorUpdatedAt: number;
21
- failureCount: number;
22
- failureReason: Error | null;
23
- errorUpdateCount: number;
24
- isFetched: boolean;
25
- isFetchedAfterMount: boolean;
26
- isFetching: boolean;
27
- isInitialLoading: boolean;
28
- isPaused: boolean;
29
- isRefetching: boolean;
30
- isStale: boolean;
31
- refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<{
32
- genericFormsOfPayments: import("@funkit/api-base").GenericFormOfPayment[];
33
- savedFormsOfPayments: import("@funkit/api-base").SavedFormOfPayment[];
34
- }, Error>>;
35
- fetchStatus: import("@tanstack/react-query").FetchStatus;
36
- promise: Promise<{
37
- genericFormsOfPayments: import("@funkit/api-base").GenericFormOfPayment[];
38
- savedFormsOfPayments: import("@funkit/api-base").SavedFormOfPayment[];
39
- }>;
40
- } | {
41
- isLoading: boolean;
42
7
  data: {
43
- genericFormsOfPayments: import("@funkit/api-base").GenericFormOfPayment[];
44
- savedFormsOfPayments: import("@funkit/api-base").SavedFormOfPayment[];
45
- };
46
- error: null;
47
- isError: false;
48
- isPending: false;
49
- isLoadingError: false;
50
- isRefetchError: false;
51
- isSuccess: true;
52
- isPlaceholderData: false;
53
- status: "success";
54
- dataUpdatedAt: number;
55
- errorUpdatedAt: number;
56
- failureCount: number;
57
- failureReason: Error | null;
58
- errorUpdateCount: number;
59
- isFetched: boolean;
60
- isFetchedAfterMount: boolean;
61
- isFetching: boolean;
62
- isInitialLoading: boolean;
63
- isPaused: boolean;
64
- isRefetching: boolean;
65
- isStale: boolean;
66
- refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<{
67
- genericFormsOfPayments: import("@funkit/api-base").GenericFormOfPayment[];
68
- savedFormsOfPayments: import("@funkit/api-base").SavedFormOfPayment[];
69
- }, Error>>;
70
- fetchStatus: import("@tanstack/react-query").FetchStatus;
71
- promise: Promise<{
72
- genericFormsOfPayments: import("@funkit/api-base").GenericFormOfPayment[];
73
- savedFormsOfPayments: import("@funkit/api-base").SavedFormOfPayment[];
74
- }>;
75
- } | {
76
- isLoading: boolean;
77
- data: undefined;
78
- error: Error;
79
- isError: true;
80
- isPending: false;
81
- isLoadingError: true;
82
- isRefetchError: false;
83
- isSuccess: false;
84
- isPlaceholderData: false;
85
- status: "error";
86
- dataUpdatedAt: number;
87
- errorUpdatedAt: number;
88
- failureCount: number;
89
- failureReason: Error | null;
90
- errorUpdateCount: number;
91
- isFetched: boolean;
92
- isFetchedAfterMount: boolean;
93
- isFetching: boolean;
94
- isInitialLoading: boolean;
95
- isPaused: boolean;
96
- isRefetching: boolean;
97
- isStale: boolean;
98
- refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<{
99
- genericFormsOfPayments: import("@funkit/api-base").GenericFormOfPayment[];
100
- savedFormsOfPayments: import("@funkit/api-base").SavedFormOfPayment[];
101
- }, Error>>;
102
- fetchStatus: import("@tanstack/react-query").FetchStatus;
103
- promise: Promise<{
104
- genericFormsOfPayments: import("@funkit/api-base").GenericFormOfPayment[];
105
- savedFormsOfPayments: import("@funkit/api-base").SavedFormOfPayment[];
106
- }>;
107
- } | {
8
+ genericFormsOfPayments: GenericFormOfPayment[];
9
+ savedFormsOfPayments: SavedFormOfPayment[];
10
+ } | undefined;
108
11
  isLoading: boolean;
109
- data: undefined;
110
- error: null;
111
- isError: false;
112
- isPending: true;
113
- isLoadingError: false;
114
- isRefetchError: false;
115
- isSuccess: false;
116
- isPlaceholderData: false;
117
- status: "pending";
118
- dataUpdatedAt: number;
119
- errorUpdatedAt: number;
120
- failureCount: number;
121
- failureReason: Error | null;
122
- errorUpdateCount: number;
123
- isFetched: boolean;
124
- isFetchedAfterMount: boolean;
125
- isFetching: boolean;
126
- isInitialLoading: boolean;
127
- isPaused: boolean;
128
- isRefetching: boolean;
129
- isStale: boolean;
130
- refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<{
131
- genericFormsOfPayments: import("@funkit/api-base").GenericFormOfPayment[];
132
- savedFormsOfPayments: import("@funkit/api-base").SavedFormOfPayment[];
133
- }, Error>>;
134
- fetchStatus: import("@tanstack/react-query").FetchStatus;
135
- promise: Promise<{
136
- genericFormsOfPayments: import("@funkit/api-base").GenericFormOfPayment[];
137
- savedFormsOfPayments: import("@funkit/api-base").SavedFormOfPayment[];
138
- }>;
139
- } | {
140
- isLoading: boolean;
141
- data: undefined;
142
- error: null;
143
- isError: false;
144
- isPending: true;
145
- isLoadingError: false;
146
- isRefetchError: false;
147
- isSuccess: false;
148
- isPlaceholderData: false;
149
- status: "pending";
150
- dataUpdatedAt: number;
151
- errorUpdatedAt: number;
152
- failureCount: number;
153
- failureReason: Error | null;
154
- errorUpdateCount: number;
155
- isFetched: boolean;
156
- isFetchedAfterMount: boolean;
157
- isFetching: boolean;
158
- isInitialLoading: boolean;
159
- isPaused: boolean;
160
- isRefetching: boolean;
161
- isStale: boolean;
162
- refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<{
163
- genericFormsOfPayments: import("@funkit/api-base").GenericFormOfPayment[];
164
- savedFormsOfPayments: import("@funkit/api-base").SavedFormOfPayment[];
165
- }, Error>>;
166
- fetchStatus: import("@tanstack/react-query").FetchStatus;
167
- promise: Promise<{
168
- genericFormsOfPayments: import("@funkit/api-base").GenericFormOfPayment[];
169
- savedFormsOfPayments: import("@funkit/api-base").SavedFormOfPayment[];
170
- }>;
171
- } | {
172
- isLoading: boolean;
173
- data: {
174
- genericFormsOfPayments: import("@funkit/api-base").GenericFormOfPayment[];
175
- savedFormsOfPayments: import("@funkit/api-base").SavedFormOfPayment[];
176
- };
177
- isError: false;
178
- error: null;
179
- isPending: false;
180
- isLoadingError: false;
181
- isRefetchError: false;
182
- isSuccess: true;
183
- isPlaceholderData: true;
184
- status: "success";
185
- dataUpdatedAt: number;
186
- errorUpdatedAt: number;
187
- failureCount: number;
188
- failureReason: Error | null;
189
- errorUpdateCount: number;
190
- isFetched: boolean;
191
- isFetchedAfterMount: boolean;
192
- isFetching: boolean;
193
- isInitialLoading: boolean;
194
- isPaused: boolean;
195
- isRefetching: boolean;
196
- isStale: boolean;
197
- refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<{
198
- genericFormsOfPayments: import("@funkit/api-base").GenericFormOfPayment[];
199
- savedFormsOfPayments: import("@funkit/api-base").SavedFormOfPayment[];
200
- }, Error>>;
201
- fetchStatus: import("@tanstack/react-query").FetchStatus;
202
- promise: Promise<{
203
- genericFormsOfPayments: import("@funkit/api-base").GenericFormOfPayment[];
204
- savedFormsOfPayments: import("@funkit/api-base").SavedFormOfPayment[];
205
- }>;
206
12
  };
@@ -2,5 +2,7 @@ import fallbackDynamicConfigs from '../../__generated__/default_configs';
2
2
  type FallbackDynamicConfigs = typeof fallbackDynamicConfigs;
3
3
  type DynamicConfigName = keyof FallbackDynamicConfigs;
4
4
  export type DynamicConfigValue<Name extends DynamicConfigName> = FallbackDynamicConfigs[Name]['value'];
5
- export declare const useDynamicConfig: <Name extends DynamicConfigName>(name: Name) => DynamicConfigValue<Name>;
5
+ export declare const useDynamicConfig: <Name extends DynamicConfigName>(name: Name, options?: {
6
+ bypassCountryCode?: boolean;
7
+ }) => DynamicConfigValue<Name>;
6
8
  export {};
@@ -15,7 +15,6 @@ export declare enum CheckoutModalEvent {
15
15
  NAVIGATE_MELD_QUOTES = "fc::navigate::meld_quotes",
16
16
  NAVIGATE_MELD_REDIRECT = "fc::navigate::meld_redirect",
17
17
  NAVIGATE_MELD_CURRENCY_SELECT = "fc::navigate::meld_currency_select",
18
- NAVIGATE_DIRECT_EXECUTION_NOTIF_CENTER = "fc::navigate::direct_execution_notif_center",
19
18
  NAVIGATE_KYC_IFRAME = "fc::navigate::kyc_iframe",
20
19
  NAVIGATE_CREATE_FIAT_ACCOUNT = "fc::navigate::create_fiat_account",
21
20
  NAVIGATE_LOADING_ACCOUNT = "fc::navigate::loading_account",
@@ -47,6 +46,8 @@ export declare enum CheckoutModalEvent {
47
46
  QUICK_OPTION_SELECTED = "fc::input_amount::quick_option_selected",
48
47
  SWAPPED_IFRAME_NAVIGATION = "fc::swapped_iframe::navigation",
49
48
  SWAPPED_IFRAME_NAVIGATION_INITIAL = "fc::swapped_iframe::navigation::initial",
49
+ SWAPPED_IFRAME_NAVIGATION_LOGIN = "fc::swapped_iframe::navigation::login",
50
+ SWAPPED_IFRAME_NAVIGATION_2FA = "fc::swapped_iframe::navigation::2fa",
50
51
  SWAPPED_IFRAME_NAVIGATION_KYC = "fc::swapped_iframe::navigation::kyc",
51
52
  SWAPPED_IFRAME_NAVIGATION_PAYMENT = "fc::swapped_iframe::navigation::payment",
52
53
  SWAPPED_IFRAME_NAVIGATION_CONFIRMATION = "fc::swapped_iframe::navigation::confirmation",
@@ -22,7 +22,7 @@ interface RegularDEQuoteRequest extends DirectExecutionQuoteRequestParamsBase {
22
22
  isExactIn?: false;
23
23
  }
24
24
  interface WithdrawalDEQuoteRequest extends DirectExecutionQuoteRequestParamsBase {
25
- fromTokenAmount: number;
25
+ fromTokenAmount: string;
26
26
  isExactIn: true;
27
27
  fromTokenDecimals: number;
28
28
  }
@@ -22,7 +22,11 @@ export declare function getCheckoutTokenTransferParams({ checkoutConfig, userId,
22
22
  apiKey: string;
23
23
  recipientAddr: FunAddress;
24
24
  } | undefined;
25
- export declare function useIsQRCodeTransferEnabled(): boolean;
25
+ export declare function useIsQRCodeTransferEnabled(): {
26
+ enabled: boolean;
27
+ comingSoon: boolean;
28
+ geoblocked: boolean;
29
+ };
26
30
  /**
27
31
  * creates QR code transfer EOA
28
32
  */
@@ -1,6 +1,6 @@
1
1
  import { type BridgeVirtualBankAccount, type Guid } from '@funkit/api-base';
2
2
  import { type AllFiatAccounts } from '../domains/bridge';
3
- export declare function useIfFiatEnabledRegardlessOfUDA(): boolean;
3
+ export declare function useIsSepaUser(): boolean;
4
4
  export declare function useFiatEnabled(): boolean;
5
5
  export declare function useFrogAccounts(): import("@tanstack/react-query").UseQueryResult<import("@funkit/api-base").SubAccount[] | null, Error>;
6
6
  export declare function useClearFrogAccountsCache(): {
@@ -2,19 +2,19 @@
2
2
  * Retrieves the maximum checkout amount in USD and formats the limit text.
3
3
  *
4
4
  * @description
5
- * This hook uses a feature flag to determine the maximum checkout amount.
6
- * If the amount is Number.MAX_VALUE, it returns 'no' as the limit text.
5
+ * This hook uses a Statsig dynamic config to determine the maximum checkout amount.
6
+ * If the amount is negative (e.g. -1), it returns 'no' as the limit text (no limit).
7
7
  * Otherwise, it formats the amount as a currency string with specific formatting options.
8
8
  *
9
9
  * @returns {Object} An object containing:
10
- * - `value`: The maximum checkout amount in USD (number). Defaults to Number.MAX_VALUE.
10
+ * - `value`: The maximum checkout amount in USD (number). Defaults to Number.MAX_VALUE (no limit).
11
11
  * - `limitLabel`: A formatted string representing the checkout limit
12
- * - Returns 'no' if the limit is Number.MAX_VALUE (default)
12
+ * - Returns 'no' if the limit is negative (no limit, e.g. -1)
13
13
  * - Otherwise, returns a formatted currency string (e.g., '$1k')
14
14
  *
15
15
  * @example
16
16
  * // Example usage in a component
17
- * const { value, limitLabel } = useFunkitMaxCheckoutUsd();
17
+ * const { value, limitLabel } = useFunkitMaxCheckoutUsdInfo();
18
18
  * console.log(value); // e.g., 1000
19
19
  * console.log(limitLabel); // e.g., '$1k'
20
20
  * console.log(limitLabel); // e.g., 'no'
@@ -1,2 +1 @@
1
1
  export declare function useIsUsUser(): boolean;
2
- export declare function useIsUsBankrUser(): boolean;
@@ -1,16 +1,20 @@
1
1
  import { type ConnectablePaymentMethodInfo, PaymentMethod } from '../domains/paymentMethods';
2
2
  export declare function usePaymentMethodEnablement(): {
3
- isSwappedEnabled: false;
3
+ isSwappedEnabled: boolean;
4
4
  isFiatEnabled: boolean;
5
5
  isTokenTransferEnabled: boolean;
6
6
  isMeldEnabled: boolean;
7
7
  isBrokerageEnabled: boolean;
8
8
  };
9
9
  export type PaymentMethodType = 'crypto' | 'fiat';
10
+ export type UnavailablePaymentSource = {
11
+ method: PaymentMethod;
12
+ reason: 'geoblocked' | 'comingSoon';
13
+ };
10
14
  export declare const usePaymentSources: (currentPaymentMethodInfo: ConnectablePaymentMethodInfo | null, targetChainId: string) => {
11
15
  isFallback: boolean;
12
16
  preferred: PaymentMethod[] | (import("../domains/paymentMethods").PaymentMethodBrokerageInfo | import("../domains/paymentMethods").PaymentMethodAccountInfo | import("../domains/paymentMethods").PaymentMethodVirtualBankInfo)[];
13
17
  moreSources: PaymentMethod[];
14
- comingSoon: PaymentMethod[];
18
+ unavailable: UnavailablePaymentSource[];
15
19
  hasUsableBalance: boolean;
16
20
  };
@@ -7,4 +7,5 @@ export declare const useScrollDivider: () => {
7
7
  hasBottomDivider: boolean;
8
8
  isScrolling: boolean;
9
9
  isScrollable: boolean;
10
+ isAtBottom: boolean;
10
11
  };