@funkit/connect 6.15.3 → 6.15.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.
@@ -0,0 +1,4 @@
1
+ import i18n from 'i18next';
2
+ import type { Locale } from './index';
3
+ export declare const localeMapping: Record<Locale, string>;
4
+ export default i18n;
@@ -1 +1,2 @@
1
- export type Locale = 'ar' | 'ar-AR' | 'en' | 'en-US' | 'es' | 'es-419' | 'fr' | 'fr-FR' | 'hi' | 'hi-IN' | 'id' | 'id-ID' | 'ja' | 'ja-JP' | 'ko' | 'ko-KR' | 'pt' | 'pt-BR' | 'ru' | 'ru-RU' | 'th' | 'th-TH' | 'tr' | 'tr-TR' | 'ua' | 'uk-UA' | 'zh' | 'zh-CN';
1
+ export type Locale = 'en' | 'zh' | 'ko' | 'ja' | 'tr' | 'es' | 'ru';
2
+ export { default as i18n, localeMapping } from './i18n';
@@ -20,10 +20,7 @@ declare enum BrokerageTwoFAStatus {
20
20
  addressWhitelistRequired = "addressWhitelistRequired",
21
21
  secondMfaRequired = "secondMfaRequired"
22
22
  }
23
- type MeshExchangeType = {
24
- icon: () => JSX.Element | null;
25
- name: string;
26
- };
23
+ import type { BluvoExchangeInfo } from '~/consts/bluvo';
27
24
  import type { PaymentMethodBrokerageInfo } from '~/domains/paymentMethods';
28
25
  import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
29
26
  export type BrokerageTwoFAState = CheckoutModalCommonState & {
@@ -33,7 +30,7 @@ export type BrokerageTwoFANext = {
33
30
  depositAddress: Address;
34
31
  } | {
35
32
  depositAddress: null;
36
- brokerType: MeshExchangeType;
33
+ brokerType: BluvoExchangeInfo;
37
34
  };
38
35
  export interface BrokerageTwoFAExecuteTransferResponse {
39
36
  status: BrokerageTwoFAStatus;
@@ -17,6 +17,5 @@ export type ConfirmationStepNext = {
17
17
  redirectBackToSourceChange?: boolean;
18
18
  };
19
19
  export declare const ConfirmationStepInfo: ModalStepInfo<FunCheckoutStep.CONFIRMATION>;
20
- export declare const DEFAULT_CONTINUE_TEXT = "Confirm Order";
21
20
  export declare function ConfirmationStep({ modalState, onNext, setModalState, }: ModalStepComponentProps<FunCheckoutStep.CONFIRMATION>): React.JSX.Element;
22
21
  export {};
@@ -1,3 +1,4 @@
1
+ import type { TFunction } from 'i18next';
1
2
  import type { Address } from 'viem';
2
3
  import type { ErrorNotification } from '~/components/FunNotification/FunNotification';
3
4
  export interface CheckoutConfirmationError extends ErrorNotification {
@@ -22,6 +23,6 @@ interface UseCheckoutConfirmationResult {
22
23
  handleCheckoutConfirmation(): Promise<void>;
23
24
  isConfirming: boolean;
24
25
  }
25
- export declare function toCheckoutConfirmationError(error: unknown): CheckoutConfirmationError;
26
+ export declare function toCheckoutConfirmationError(t: TFunction, error: unknown): CheckoutConfirmationError;
26
27
  export declare function useCheckoutConfirmation({ onError, onSuccess, }: UseCheckoutConfirmationOptions): UseCheckoutConfirmationResult;
27
28
  export {};
@@ -24,6 +24,5 @@ interface UsePostCheckoutResult {
24
24
  postCheckoutError: PostCheckoutError | null;
25
25
  postCheckoutStepMessage: string | null;
26
26
  }
27
- export declare function toPostCheckoutError(error: unknown): PostCheckoutError;
28
27
  export declare function usePostCheckout({ onSuccess, }: UsePostCheckoutOptions): UsePostCheckoutResult;
29
28
  export {};
@@ -1,5 +1,7 @@
1
1
  import type { ErrorNotification } from '~/components/FunNotification/FunNotification';
2
+ import type { useFunkitTranslation } from '~/hooks/useFunkitTranslation';
2
3
  import type { AmountInputError } from './state';
4
+ type TFunction = ReturnType<typeof useFunkitTranslation>['t'];
3
5
  export declare const ASSET_DECIMALS = 5;
4
6
  export declare const USD_DECIMALS = 2;
5
7
  export declare const USD_INITIAL_AMOUNT = 100;
@@ -15,8 +17,8 @@ export interface InputAmountSuggestion {
15
17
  * Get suggested amount from error
16
18
  * Allow recovery actions to user in the CTA Continue button
17
19
  */
18
- export declare const getInputAmountSuggestion: (error: AmountInputError | null) => InputAmountSuggestion | undefined;
19
- export declare const getInputErrorNotification: (error: AmountInputError | null) => ErrorNotification | undefined;
20
+ export declare const getInputAmountSuggestion: (error: AmountInputError | null, t: TFunction) => InputAmountSuggestion | undefined;
21
+ export declare const getInputErrorNotification: (error: AmountInputError | null, t: TFunction) => ErrorNotification | undefined;
20
22
  export type NumberSeparators = {
21
23
  decimalSeparator: string;
22
24
  groupSeparator: RegExp;
@@ -44,3 +46,4 @@ export declare function formatCurrencyAmountWithLocale(value: number, options: {
44
46
  export declare function replaceStringRange(original: string, replacement: string, start: number, end: number): string;
45
47
  export declare function reformatDecimalPart(decimalPart: string, decimals: number): string;
46
48
  export declare function reformatIntegerPart(integerPart: string, locale: Intl.LocalesArgument, preserveLeadingZeroes: boolean): string;
49
+ export {};
@@ -8,7 +8,7 @@ import type { ReactNode } from 'react';
8
8
  * - Query errors are discarded while the input amount is not equal to its debounced value.
9
9
  * - In that case, `isOutdated` is also set to `true`.
10
10
  */
11
- export declare const useMeldQuotes: (sourceAmount: number | undefined, fiatCurrency: string | undefined) => {
11
+ export declare const useMeldQuotes: (sourceAmount: number | undefined, fiatCurrency: string | undefined, meldEnabled?: boolean) => {
12
12
  countdown: ReactNode;
13
13
  query: UseQueryResult<MeldQuote[]> & {
14
14
  isOutdated: boolean;
@@ -0,0 +1,12 @@
1
+ import React, { type ReactNode } from 'react';
2
+ import { type Locale } from '~/locales';
3
+ interface FunkitI18nProviderProps {
4
+ children: ReactNode;
5
+ locale?: Locale;
6
+ }
7
+ /**
8
+ * Provider for internationalization using react-i18next
9
+ * Wraps the application with I18nextProvider and manages locale changes
10
+ */
11
+ export declare function FunkitI18nProvider({ children, locale, }: FunkitI18nProviderProps): React.JSX.Element;
12
+ export {};
@@ -16,7 +16,6 @@ interface FunkitProviderInnerProps {
16
16
  children: ReactNode;
17
17
  theme?: Theme;
18
18
  avatar?: AvatarComponent;
19
- /** @deprecated This currently has no effect, localization is not yet supported */
20
19
  locale?: Locale;
21
20
  funkitConfig: FunkitConfig;
22
21
  debug?: boolean | undefined;
@@ -49,7 +49,7 @@ export declare const flagConfig: {
49
49
  readonly if_any: [{
50
50
  readonly key: "apiKey";
51
51
  readonly type: "isAnyOf";
52
- readonly values: ["Y53dikxXdT4E3afI1l8BMBSWgyhKvf65k6Dut1k6", "SMbBD7DS9b3EPcyBVg4a8az1rRWR9xB068chHoUN", "vWe20Dfyui2ouvfOhtSTY3Czeo8lFdbo5xXQBALZ", "clDebbfo9edXq1GydZ0CahSAfSimPj616lFa9p8e", "OXLUmejkh9PlNDS4gSvi9gcEWacOpTz2KUVepVf4", "BPVeP8zThG467vVIYzuiu5aVWAkS9KiR6tT1TdTP", "pLQBJsA6zS9tg990rbdBD6UdABkWRv5O60vlrVcW", "lUzTaIRxs95iin3pCAafB1ChA5akBiuQ1tjhXnau", "AH7lRIhbsL167nptv6eub9xDJXVHnYUm2vL7FLjK", "di9ZSqn1Ya68Y2XpBPUV1rCtNGXh8Xe5MGWzb1Xe", "2SrxurU07T2XPDxCAItjj4yYEMXlwV8K2kJB78AX", "5UzOrcAE2F3rcuMX2EeIlaYv5VUcDe6Lyh0PeZX2", "M3uox3cw0u8YCPV9cIREA6AugUMvPFTk6qOpm4um", "6TUi99Tq3O9MWj1IFX8Pv6spmPXzcvhy9NvBoeW2", "2hicPxo2vy2NMHcg2cEU9crOeKtDpc14NEfMCthc", "57G91zNoew4nYxIoqSCpS1vWr8JT3gGVasNqMwgG", "i6e1I8cfX625TTwRJlD2DshKyAoaUtO8aeoaR4i2", "wQDLu86Qab61vbtru7thf8Yj0xaeqVUH4ohoXESu", "53OWivH0fK2VIAuMZTycr52EnSEnPWj97Jy3Dpiz", "cGlmpTmNh657m8TiV5RFdwna6FG5pxM6ajiNHvw3"];
52
+ readonly values: ["Y53dikxXdT4E3afI1l8BMBSWgyhKvf65k6Dut1k6", "SMbBD7DS9b3EPcyBVg4a8az1rRWR9xB068chHoUN", "vWe20Dfyui2ouvfOhtSTY3Czeo8lFdbo5xXQBALZ", "clDebbfo9edXq1GydZ0CahSAfSimPj616lFa9p8e", "OXLUmejkh9PlNDS4gSvi9gcEWacOpTz2KUVepVf4", "BPVeP8zThG467vVIYzuiu5aVWAkS9KiR6tT1TdTP", "pLQBJsA6zS9tg990rbdBD6UdABkWRv5O60vlrVcW", "lUzTaIRxs95iin3pCAafB1ChA5akBiuQ1tjhXnau", "AH7lRIhbsL167nptv6eub9xDJXVHnYUm2vL7FLjK", "di9ZSqn1Ya68Y2XpBPUV1rCtNGXh8Xe5MGWzb1Xe", "2SrxurU07T2XPDxCAItjj4yYEMXlwV8K2kJB78AX", "5UzOrcAE2F3rcuMX2EeIlaYv5VUcDe6Lyh0PeZX2", "M3uox3cw0u8YCPV9cIREA6AugUMvPFTk6qOpm4um", "6TUi99Tq3O9MWj1IFX8Pv6spmPXzcvhy9NvBoeW2", "2hicPxo2vy2NMHcg2cEU9crOeKtDpc14NEfMCthc", "57G91zNoew4nYxIoqSCpS1vWr8JT3gGVasNqMwgG", "i6e1I8cfX625TTwRJlD2DshKyAoaUtO8aeoaR4i2", "wQDLu86Qab61vbtru7thf8Yj0xaeqVUH4ohoXESu", "53OWivH0fK2VIAuMZTycr52EnSEnPWj97Jy3Dpiz", "cGlmpTmNh657m8TiV5RFdwna6FG5pxM6ajiNHvw3", "i6e1I8cfX625TTwRJlD2DshKyAoaUtO8aeoaR4i2"];
53
53
  }];
54
54
  readonly value: true;
55
55
  }];
@@ -76,6 +76,14 @@ export declare const flagConfig: {
76
76
  readonly token_transfer_source_chains_and_assets: {
77
77
  readonly type: "string";
78
78
  readonly default_value: string;
79
+ readonly overrides: [{
80
+ readonly if_any: [{
81
+ readonly key: "apiKey";
82
+ readonly type: "isAnyOf";
83
+ readonly values: ["M3uox3cw0u8YCPV9cIREA6AugUMvPFTk6qOpm4um"];
84
+ }];
85
+ readonly value: string;
86
+ }];
79
87
  };
80
88
  readonly withdrawal_chains_and_assets: {
81
89
  readonly type: "string";
@@ -99,15 +107,7 @@ export declare const flagConfig: {
99
107
  };
100
108
  readonly checkout_time_estimate_overrides: {
101
109
  readonly type: "string";
102
- readonly default_value: "";
103
- readonly overrides: [{
104
- readonly if_any: [{
105
- readonly key: "apiKey";
106
- readonly type: "isAnyOf";
107
- readonly values: ["Y53dikxXdT4E3afI1l8BMBSWgyhKvf65k6Dut1k6", "SMbBD7DS9b3EPcyBVg4a8az1rRWR9xB068chHoUN", "vWe20Dfyui2ouvfOhtSTY3Czeo8lFdbo5xXQBALZ", "OXLUmejkh9PlNDS4gSvi9gcEWacOpTz2KUVepVf4"];
108
- }];
109
- readonly value: string;
110
- }];
110
+ readonly default_value: string;
111
111
  };
112
112
  readonly token_transfer_default_chain_id: {
113
113
  readonly type: "string";
@@ -116,7 +116,7 @@ export declare const flagConfig: {
116
116
  readonly if_any: [{
117
117
  readonly key: "apiKey";
118
118
  readonly type: "isAnyOf";
119
- readonly values: ["SMbBD7DS9b3EPcyBVg4a8az1rRWR9xB068chHoUN"];
119
+ readonly values: ["SMbBD7DS9b3EPcyBVg4a8az1rRWR9xB068chHoUN", "M3uox3cw0u8YCPV9cIREA6AugUMvPFTk6qOpm4um"];
120
120
  }];
121
121
  readonly value: string;
122
122
  }, {
@@ -215,7 +215,7 @@ export declare const flagConfig: {
215
215
  readonly value: true;
216
216
  }, Override<boolean>, {
217
217
  readonly if_all: [{
218
- readonly pct: 30;
218
+ readonly pct: 50;
219
219
  readonly type: "pctRollout";
220
220
  readonly key: "userId";
221
221
  }, {
@@ -308,6 +308,7 @@ export declare const flagConfig: {
308
308
  readonly type: "string";
309
309
  readonly default_value: string;
310
310
  };
311
+ /** @deprecated Use frog quoteConfig */
311
312
  readonly permit2_tokens: {
312
313
  readonly type: "string";
313
314
  readonly default_value: string;
@@ -0,0 +1,16 @@
1
+ import type { TFunction } from 'i18next';
2
+ /**
3
+ * Formats seconds to mins and seconds string with i18n support
4
+ * This is a translatable wrapper around the formatSecondsToReadableForm function
5
+ *
6
+ * @param seconds - Number of seconds to format
7
+ * @param t - Translation function from i18next
8
+ * @param specifyUnderMinute - If true, shows "< 1 min" for values under 60 seconds
9
+ * @param omitSeconds - If true, rounds up to nearest minute
10
+ * @returns Formatted and translated time string
11
+ *
12
+ * @example
13
+ * formatSecondsTranslated(20, t, true) // "< 1分钟" in Chinese or "< 1 min" in English
14
+ * formatSecondsTranslated(90, t) // "1分钟30秒" in Chinese or "1 min 30 s" in English
15
+ */
16
+ export declare function formatSecondsTranslated(seconds: number, t: TFunction, specifyUnderMinute?: boolean, omitSeconds?: boolean): string;
@@ -1,16 +1,16 @@
1
1
  "use client";
2
- import {
3
- xdefiWallet
4
- } from "./chunk-BOU4WKRZ.js";
5
2
  import {
6
3
  zealWallet
7
4
  } from "./chunk-RNBEDQHF.js";
5
+ import {
6
+ xdefiWallet
7
+ } from "./chunk-BOU4WKRZ.js";
8
8
  import {
9
9
  zerionWallet
10
10
  } from "./chunk-SULRQO27.js";
11
11
  import {
12
- subWallet
13
- } from "./chunk-JWFF4AAL.js";
12
+ safeheronWallet
13
+ } from "./chunk-RZIO5TFF.js";
14
14
  import {
15
15
  tahoWallet
16
16
  } from "./chunk-ZZZRUXZE.js";
@@ -38,24 +38,24 @@ import {
38
38
  import {
39
39
  rabbyWallet
40
40
  } from "./chunk-BBOM42DL.js";
41
- import {
42
- rainbowWallet
43
- } from "./chunk-2KUBG3S6.js";
44
41
  import {
45
42
  ramperWallet
46
43
  } from "./chunk-BYXPFMI7.js";
44
+ import {
45
+ rainbowWallet
46
+ } from "./chunk-2KUBG3S6.js";
47
47
  import {
48
48
  roninWallet
49
49
  } from "./chunk-NWIQNBJU.js";
50
50
  import {
51
51
  safeWallet
52
52
  } from "./chunk-BQQQL6UD.js";
53
- import {
54
- safeheronWallet
55
- } from "./chunk-RZIO5TFF.js";
56
53
  import {
57
54
  safepalWallet
58
55
  } from "./chunk-NT2HYJKW.js";
56
+ import {
57
+ subWallet
58
+ } from "./chunk-JWFF4AAL.js";
59
59
  import {
60
60
  ledgerWallet
61
61
  } from "./chunk-BRBKM4PW.js";
@@ -83,12 +83,12 @@ import {
83
83
  import {
84
84
  foxWallet
85
85
  } from "./chunk-7QONTUXT.js";
86
- import {
87
- frameWallet
88
- } from "./chunk-IFON7E6U.js";
89
86
  import {
90
87
  frontierWallet
91
88
  } from "./chunk-TCAGNB4B.js";
89
+ import {
90
+ frameWallet
91
+ } from "./chunk-IFON7E6U.js";
92
92
  import {
93
93
  gateWallet
94
94
  } from "./chunk-FKJJQNKX.js";
@@ -125,12 +125,12 @@ import {
125
125
  import {
126
126
  enkryptWallet
127
127
  } from "./chunk-OLOIXTYS.js";
128
- import {
129
- bifrostWallet
130
- } from "./chunk-A5N6B5UW.js";
131
128
  import {
132
129
  argentWallet
133
130
  } from "./chunk-WSQ2YJO2.js";
131
+ import {
132
+ bifrostWallet
133
+ } from "./chunk-A5N6B5UW.js";
134
134
  import {
135
135
  bitgetWallet
136
136
  } from "./chunk-TDAVGY5F.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funkit/connect",
3
- "version": "6.15.3",
3
+ "version": "6.15.5",
4
4
  "description": "Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.",
5
5
  "files": [
6
6
  "dist",
@@ -44,6 +44,7 @@
44
44
  "wagmi": "2.x"
45
45
  },
46
46
  "devDependencies": {
47
+ "i18next-cli": "1.24.14",
47
48
  "@aws-sdk/client-cloudfront": "3.858.0",
48
49
  "@aws-sdk/client-s3": "3.840.0",
49
50
  "@chromatic-com/storybook": "^4.1.1",
@@ -91,19 +92,21 @@
91
92
  "@vanilla-extract/sprinkles": "1.6.1",
92
93
  "@wagmi/core": "2.21.1",
93
94
  "clsx": "2.1.1",
95
+ "i18next": "25.6.2",
94
96
  "motion": "^12.0.11",
95
97
  "qrcode": "1.5.3",
98
+ "react-i18next": "16.3.3",
96
99
  "react-remove-scroll": "2.5.7",
97
100
  "react-virtuoso": "4.10.1",
98
101
  "ua-parser-js": "^1.0.37",
99
102
  "use-debounce": "^10.0.5",
100
103
  "uuid": "^9.0.1",
101
- "@funkit/api-base": "1.12.16",
102
- "@funkit/chains": "0.4.5",
103
- "@funkit/core": "2.3.61",
104
- "@funkit/fun-relay": "2.1.12",
105
- "@funkit/utils": "1.1.17",
106
- "@funkit/wagmi-tools": "3.0.84"
104
+ "@funkit/api-base": "1.12.18",
105
+ "@funkit/chains": "0.4.6",
106
+ "@funkit/core": "2.3.63",
107
+ "@funkit/fun-relay": "2.1.13",
108
+ "@funkit/utils": "1.1.19",
109
+ "@funkit/wagmi-tools": "3.0.86"
107
110
  },
108
111
  "repository": {
109
112
  "type": "git",