@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
@@ -4,5 +4,5 @@ interface BrokerageSuccessProps {
4
4
  onClose: () => void;
5
5
  onNewDeposit: () => void;
6
6
  }
7
- export declare const BrokerageSuccess: ({ bottomBarId, onClose, onNewDeposit, }: BrokerageSuccessProps) => React.JSX.Element | null;
7
+ export declare const BrokerageSuccess: ({ bottomBarId, onClose, onNewDeposit, }: BrokerageSuccessProps) => React.JSX.Element;
8
8
  export {};
@@ -16,7 +16,6 @@ export declare enum FunCheckoutStep {
16
16
  MELD_QUOTES = "meld_quotes",
17
17
  MELD_REDIRECT = "meld_redirect",
18
18
  MELD_CURRENCY_SELECT = "meld_currency_select",
19
- DIRECT_EXECUTION_NOTIF_CENTER = "direct_execution_notif_center",
20
19
  SELECT_BROKERAGE = "select_brokerage",
21
20
  CONNECT_EXCHANGE = "connect_exchange",
22
21
  BROKERAGE_TWO_FA = "brokerage_two_fa",
@@ -1,4 +1,3 @@
1
- import type { ExchangeRates } from '@funkit/api-base';
2
1
  import React from 'react';
3
2
  import { type FunkitTextCustomizationsConfig } from '../../../providers/FunkitConfigContext';
4
3
  import type { AssetHoldingsItem } from '../../../utils/assets';
@@ -9,11 +8,9 @@ interface InputAmountLoadedProps extends ModalStepComponentProps<FunCheckoutStep
9
8
  checkoutConfig: FunkitCheckoutConfig;
10
9
  /** unit price of target asset */
11
10
  unitPrice: number;
12
- /** currency exchange rates */
13
- currencyExchangeRates: ExchangeRates | undefined;
14
11
  /** default fiat currency to be used*/
15
12
  defaultFiatCurrency?: string;
16
13
  textCustomizations: FunkitTextCustomizationsConfig['confirmationScreen'];
17
14
  }
18
- export declare function InputAmountLoaded({ checkoutConfig, modalState, onNext, onClose, setModalState, sourceHolding, unitPrice, currencyExchangeRates, defaultFiatCurrency, textCustomizations, }: InputAmountLoadedProps): React.JSX.Element;
15
+ export declare function InputAmountLoaded({ checkoutConfig, modalState, onNext, onClose, setModalState, sourceHolding, unitPrice, defaultFiatCurrency, textCustomizations, }: InputAmountLoadedProps): React.JSX.Element;
19
16
  export {};
@@ -19,8 +19,6 @@ export interface AmountInputInitOptions {
19
19
  locale: Intl.LocalesArgument;
20
20
  /** Quick options, in fiat (not %) */
21
21
  quickOptions?: number[];
22
- /** Exchange rate of the `fiatCurrency` to USD */
23
- fiatCurrencyExchangeRate: number | undefined;
24
22
  /** Whether meld is enabled */
25
23
  meldEnabled: boolean;
26
24
  apiKey: string;
@@ -46,8 +44,6 @@ export interface AmountInputState {
46
44
  usdMaxAmount: number | null;
47
45
  /** Minimum amount, in USD (defaults to 0) */
48
46
  usdMinAmount: number | null;
49
- /** Exchange rate of the `fiatCurrency` to USD */
50
- fiatCurrencyExchangeRate: number | undefined;
51
47
  /** Whether meld is enabled */
52
48
  meldEnabled: boolean;
53
49
  /** Whether the input amount is in vault deposit mode
@@ -110,6 +106,6 @@ export type AmountInputError = {
110
106
  * Return half the balance and round up to nearest 10, 100, 1000 etc
111
107
  */
112
108
  export declare function calcInitialFiatAmount(balance: number): number;
113
- export declare function initializeState({ checkoutConfig, defaultAmount, fiatCurrency, locale, maxUsd, minUsd, paymentMethodInfo, quickOptions, sourceHolding, unitPrice: realUnitPrice, fiatCurrencyExchangeRate, meldEnabled, defaultIsInputInFiat, }: AmountInputInitOptions): AmountInputState;
109
+ export declare function initializeState({ checkoutConfig, defaultAmount, fiatCurrency, locale, maxUsd, minUsd, paymentMethodInfo, quickOptions, sourceHolding, unitPrice: realUnitPrice, meldEnabled, defaultIsInputInFiat, }: AmountInputInitOptions): AmountInputState;
114
110
  export declare function reduceState(state: AmountInputState, action: AmountInputAction): AmountInputState;
115
111
  export declare function getDerivedState(state: AmountInputState, targetAssetTicker: string): AmountInputDerivedState;
@@ -1,18 +1,19 @@
1
- import { type GetFopsResponse, type SwappedFormOfPayment } from '@funkit/api-base';
1
+ import type { ExchangeRates, GetFopsResponse, SwappedFormOfPayment } from '@funkit/api-base';
2
2
  import React from 'react';
3
3
  interface FormOfPaymentsListProps {
4
4
  fopsData?: GetFopsResponse;
5
5
  isLoading: boolean;
6
6
  selectedFop?: SwappedFormOfPayment | null;
7
7
  onFopSelect: (fop: SwappedFormOfPayment) => void;
8
+ exchangeRatesData?: ExchangeRates;
8
9
  }
9
10
  interface FormOfPaymentSection {
10
11
  items: SwappedFormOfPayment[];
11
12
  labelKey: 'sourceChange.mostPopular' | 'sourceChange.savedPaymentMethods' | 'sourceChange.moreOptions' | 'sourceChange.otherOptions';
12
13
  }
13
- export declare function getFormOfPaymentSections(fopsData: GetFopsResponse): {
14
+ export declare function getFormOfPaymentSections(fopsData: GetFopsResponse, fopPriority: readonly string[]): {
14
15
  primary: FormOfPaymentSection;
15
16
  secondary: FormOfPaymentSection;
16
17
  };
17
- export declare function FormOfPaymentsList({ fopsData, isLoading, selectedFop, onFopSelect, }: FormOfPaymentsListProps): React.JSX.Element;
18
+ export declare function FormOfPaymentsList({ fopsData, isLoading, selectedFop, onFopSelect, exchangeRatesData, }: FormOfPaymentsListProps): React.JSX.Element;
18
19
  export {};
@@ -1,12 +1,13 @@
1
1
  import React from 'react';
2
2
  import type { ConnectablePaymentMethodInfo, PaymentMethod } from '../../../domains/paymentMethods';
3
+ import { type UnavailablePaymentSource } from '../../../hooks/usePaymentSources';
3
4
  interface SourceListProps {
4
5
  preferred: (ConnectablePaymentMethodInfo | PaymentMethod)[];
5
6
  moreSources: (ConnectablePaymentMethodInfo | PaymentMethod)[];
6
- comingSoon: PaymentMethod[];
7
+ unavailable: UnavailablePaymentSource[];
7
8
  isFallback: boolean;
8
9
  renderSource: (source: ConnectablePaymentMethodInfo | PaymentMethod) => React.ReactNode;
9
- renderComingSoon: (source: PaymentMethod) => React.ReactNode;
10
+ renderUnavailable: (source: UnavailablePaymentSource) => React.ReactNode;
10
11
  }
11
- export declare function SourceList({ preferred, moreSources, comingSoon, isFallback, renderSource, renderComingSoon, }: SourceListProps): React.JSX.Element;
12
+ export declare function SourceList({ preferred, moreSources, unavailable, isFallback, renderSource, renderUnavailable, }: SourceListProps): React.JSX.Element;
12
13
  export {};
@@ -2,3 +2,8 @@ export declare const WITH_EMPTY_STATE_DATA_ATTRIBUTE = "data-with-empty-state";
2
2
  export declare const emptyStateStyles: string;
3
3
  export declare const sourceListBoxStyles: string;
4
4
  export declare const sourceListCompactBoxStyles: string;
5
+ export declare const removeBottomPaddingFromSurroundingDialog: string;
6
+ export declare const paymentMethodStaticArea: string;
7
+ export declare const paymentMethodScrollArea: string;
8
+ export declare const paymentMethodScrollbarHidden: string;
9
+ export declare const fullWidthContentDivider: string;
@@ -12,7 +12,6 @@ import { type SelectBrokerageNext, type SelectBrokerageState } from './Brokerage
12
12
  import { type CheckoutCompleteNext, type CheckoutCompleteState } from './CheckoutComplete/CheckoutComplete';
13
13
  import { type CheckoutHelpState } from './CheckoutHelp/CheckoutHelp';
14
14
  import { type ConfirmationStepNext, type ConfirmationStepState } from './ConfirmationStep/ConfirmationStep';
15
- import { type DirectExecutionNotifCenterState } from './DirectExecutionNotifCenter/DirectExecutionNotifCenter';
16
15
  import { FunCheckoutStep } from './FunCheckoutStep';
17
16
  import { type InputAmountNext, type InputAmountState } from './InputAmount/InputAmount';
18
17
  import { type LoadingAccountNext, type LoadingAccountState } from './LoadingAccount';
@@ -32,8 +31,6 @@ export interface CheckoutModalCommonState {
32
31
  isSoftHidden: boolean;
33
32
  /** Whether checkout should not be allowed to continue due to security reasons*/
34
33
  isBlocked?: boolean;
35
- /** Whether checkout is started in a defi mode which has various flow implications (most importantly targetAssetAmount must be set and is not editable throughout the checkout)*/
36
- isDefiMode: boolean;
37
34
  startingStep: FunCheckoutStartingStep;
38
35
  targetChainId: string;
39
36
  showWalletOptions?: boolean;
@@ -53,7 +50,6 @@ export declare function extractCommonState(state: CheckoutModalState): CheckoutM
53
50
  interface ModalStepInput<S extends FunCheckoutStep> {
54
51
  state: CheckoutModalState<S>;
55
52
  apiKey: string;
56
- isDefiMode?: boolean;
57
53
  isSourceNavWidgetEnabled: boolean;
58
54
  }
59
55
  export type ModalStepInfo<S extends FunCheckoutStep> = {
@@ -67,7 +63,7 @@ export type ModalStepInfo<S extends FunCheckoutStep> = {
67
63
  onNext(state: CheckoutModalState<S>, payload: NextPayload<S>): CheckoutModalState;
68
64
  showFullHeight?: boolean;
69
65
  /** Defaults to checkoutItem.initSettings.config.modalTitle (returning undefined uses default) */
70
- title?(textCustomizations: FunkitTextCustomizationsConfig, isDefiMode: boolean): string | undefined;
66
+ title?(textCustomizations: FunkitTextCustomizationsConfig): string | undefined;
71
67
  /** If title is not defined in config nor with the title() function, this is used instead. Defaults to 'Checkout' */
72
68
  fallbackTitle?: string;
73
69
  };
@@ -93,7 +89,6 @@ export type CheckoutModalState<S extends FunCheckoutStep = FunCheckoutStep> = {
93
89
  [FunCheckoutStep.MELD_QUOTES]: MeldQuotesState;
94
90
  [FunCheckoutStep.MELD_REDIRECT]: MeldRedirectState;
95
91
  [FunCheckoutStep.MELD_CURRENCY_SELECT]: MeldCurrencySelectState;
96
- [FunCheckoutStep.DIRECT_EXECUTION_NOTIF_CENTER]: DirectExecutionNotifCenterState;
97
92
  [FunCheckoutStep.SELECT_BROKERAGE]: SelectBrokerageState;
98
93
  [FunCheckoutStep.CONNECT_EXCHANGE]: ConnectExchangeState;
99
94
  [FunCheckoutStep.BROKERAGE_TWO_FA]: BrokerageTwoFAState;
@@ -122,7 +117,6 @@ export type NextPayload<S extends FunCheckoutStep = FunCheckoutStep> = {
122
117
  [FunCheckoutStep.MELD_QUOTES]: MeldQuotesNext;
123
118
  [FunCheckoutStep.MELD_REDIRECT]: MeldRedirectNext;
124
119
  [FunCheckoutStep.MELD_CURRENCY_SELECT]: MeldCurrencySelectNext;
125
- [FunCheckoutStep.DIRECT_EXECUTION_NOTIF_CENTER]: null;
126
120
  [FunCheckoutStep.SELECT_BROKERAGE]: SelectBrokerageNext;
127
121
  [FunCheckoutStep.CONNECT_EXCHANGE]: ConnectExchangeNext;
128
122
  [FunCheckoutStep.BROKERAGE_TWO_FA]: BrokerageTwoFANext;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import type { FunkitCheckoutQuoteResult } from '../../domains/quote';
3
+ interface WithdrawalCallbackSuccessProps {
4
+ bottomBarId: string;
5
+ onClose: () => void;
6
+ onNewWithdrawal: () => void;
7
+ quote: FunkitCheckoutQuoteResult | undefined;
8
+ }
9
+ export declare const WithdrawalCallbackSuccess: ({ bottomBarId, onClose, onNewWithdrawal, quote, }: WithdrawalCallbackSuccessProps) => React.JSX.Element;
10
+ export {};
@@ -32,7 +32,7 @@ interface FunkitCheckoutContextInterface {
32
32
  setCompletedTimestamp(timestampMs: number): void;
33
33
  withdrawalItem: FunkitActiveWithdrawalItem | null;
34
34
  initNewWithdrawal(initSettings: Partial<UseFunkitCheckoutPropsWithFullConfig>, config: UseFunkitCheckoutPropsWithFullConfig): string;
35
- updateWithdrawalSourceAssetAmount(newSourceAmount: number): void;
35
+ updateWithdrawalSourceAssetAmount(newSourceAmount: string): void;
36
36
  resetForNewWithdrawal(): void;
37
37
  applyDynamicRouting(path: Omit<DynamicRoutePath, 'getCustomRecipient' | 'generateActionsParams'> & {
38
38
  customRecipient?: FunkitCheckoutConfig['customRecipient'];
@@ -50,8 +50,8 @@ export interface FunkitCheckoutConfig extends Omit<ApiFunkitCheckoutConfig, 'gen
50
50
  /** Title of the item being checked out. e.g. Staked Ether, XYZ Option, Solar Bond ABC **/
51
51
  checkoutItemTitle: string;
52
52
  /** amount of source token. it is not baseUnit **/
53
- withdrawalSourceTokenBalance?: () => number;
54
- /** Whether checkout should be started in Defi mode, which has various flow implications (most importantly targetAssetAmount must be set and is not editable throughout the checkout) */
53
+ withdrawalSourceTokenBalance?: () => string | number;
54
+ /** @deprecated isDefiMode has been removed. This field is ignored. */
55
55
  isDefiMode?: boolean;
56
56
  /** The step at which the checkout process should start */
57
57
  startingStep?: FunCheckoutStartingStep;
@@ -99,6 +99,8 @@ export interface WithdrawalConfigBase {
99
99
  sourceTokenAddress: Address;
100
100
  /** Disable connected option for email login user */
101
101
  disableConnectedWallet?: boolean;
102
+ /** Default token to select in the receive token dropdown. Falls back to sourceTokenSymbol if not set. */
103
+ defaultReceiveToken?: string;
102
104
  /** minimal USD needed to withdraw */
103
105
  getMinWithdrawalUSD?: (asset: TokenInfo) => number;
104
106
  }
@@ -196,12 +198,12 @@ export interface FunkitActiveCheckoutItem extends Omit<ApiCheckoutClientMetadata
196
198
  };
197
199
  /** Time of completion of the active checkout item. For frontend use only. **/
198
200
  completedTimestampMs: number | null;
199
- sourceAssetAmount: number | null;
201
+ sourceAssetAmount: string | null;
200
202
  }
201
203
  export interface FunkitActiveWithdrawalItem {
202
204
  /** Unique identifier for frontend use only. */
203
205
  id: string;
204
206
  /** Final settings the withdrawal was init-ed with **/
205
207
  initSettings: Partial<UseFunkitCheckoutPropsWithFullConfig>;
206
- withdrawalSourceTokenBalance: () => number;
208
+ withdrawalSourceTokenBalance: () => string | number;
207
209
  }
@@ -85,6 +85,8 @@ export type FunkitPaymentMethodIconsConfig = Partial<Record<PaymentMethod, {
85
85
  export interface FunkitUiCustomizationsConfig {
86
86
  /** Title alignment - defaults to "center" */
87
87
  alignTitle?: 'left' | 'center';
88
+ /** Always shows checkout modal top divider even if content cannot scroll - defaults to `false` */
89
+ alwaysShowTopDivider?: boolean;
88
90
  /** Whether to show CTA in uppercase - defaults to false */
89
91
  callToActionsUppercase?: boolean;
90
92
  /** Whether to enable compact list style for option boxes - defaults to false */
@@ -55,6 +55,7 @@ export declare const useActiveTheme: () => {
55
55
  secondaryText: string;
56
56
  tertiaryText: string;
57
57
  textSelection: string;
58
+ selectedDropdownItemText: string;
58
59
  inputBackground: string;
59
60
  inputBorderBase: string;
60
61
  inputBorderHover: string;
@@ -130,9 +131,12 @@ export declare const useActiveTheme: () => {
130
131
  fiatAccountGradientTo: string;
131
132
  optionBoxBackground: string;
132
133
  optionBoxBackgroundUninteractive: string;
134
+ optionBoxBorderHover: string;
135
+ openDropdownBackgroundColor: string;
133
136
  dropdownActiveItemBackgroundBase: string;
134
137
  dropdownActiveItemBackgroundHover: string;
135
138
  dropdownActiveItemBackgroundDisabled: string;
139
+ selectedDropdownItemBackground: string;
136
140
  spinnerBackground: string;
137
141
  spinnerIndicator: string;
138
142
  spinnerBackgroundVerifyAccount: string;
@@ -373,7 +377,9 @@ export declare const useActiveTheme: () => {
373
377
  tooltip: string;
374
378
  dropdown: string;
375
379
  dropdownItem: string;
380
+ dropdownList: string;
376
381
  modalTopbarIcon: string;
382
+ withdrawalInput: string;
377
383
  };
378
384
  borderWidths: {
379
385
  activeOptionBorderWidth: string;
@@ -491,6 +497,7 @@ export declare const useActiveTheme: () => {
491
497
  secondaryText: string;
492
498
  tertiaryText: string;
493
499
  textSelection: string;
500
+ selectedDropdownItemText: string;
494
501
  inputBackground: string;
495
502
  inputBorderBase: string;
496
503
  inputBorderHover: string;
@@ -566,9 +573,12 @@ export declare const useActiveTheme: () => {
566
573
  fiatAccountGradientTo: string;
567
574
  optionBoxBackground: string;
568
575
  optionBoxBackgroundUninteractive: string;
576
+ optionBoxBorderHover: string;
577
+ openDropdownBackgroundColor: string;
569
578
  dropdownActiveItemBackgroundBase: string;
570
579
  dropdownActiveItemBackgroundHover: string;
571
580
  dropdownActiveItemBackgroundDisabled: string;
581
+ selectedDropdownItemBackground: string;
572
582
  spinnerBackground: string;
573
583
  spinnerIndicator: string;
574
584
  spinnerBackgroundVerifyAccount: string;
@@ -809,7 +819,9 @@ export declare const useActiveTheme: () => {
809
819
  tooltip: string;
810
820
  dropdown: string;
811
821
  dropdownItem: string;
822
+ dropdownList: string;
812
823
  modalTopbarIcon: string;
824
+ withdrawalInput: string;
813
825
  };
814
826
  borderWidths: {
815
827
  activeOptionBorderWidth: string;
@@ -925,6 +937,7 @@ export declare const useActiveTheme: () => {
925
937
  secondaryText: string;
926
938
  tertiaryText: string;
927
939
  textSelection: string;
940
+ selectedDropdownItemText: string;
928
941
  inputBackground: string;
929
942
  inputBorderBase: string;
930
943
  inputBorderHover: string;
@@ -1000,9 +1013,12 @@ export declare const useActiveTheme: () => {
1000
1013
  fiatAccountGradientTo: string;
1001
1014
  optionBoxBackground: string;
1002
1015
  optionBoxBackgroundUninteractive: string;
1016
+ optionBoxBorderHover: string;
1017
+ openDropdownBackgroundColor: string;
1003
1018
  dropdownActiveItemBackgroundBase: string;
1004
1019
  dropdownActiveItemBackgroundHover: string;
1005
1020
  dropdownActiveItemBackgroundDisabled: string;
1021
+ selectedDropdownItemBackground: string;
1006
1022
  spinnerBackground: string;
1007
1023
  spinnerIndicator: string;
1008
1024
  spinnerBackgroundVerifyAccount: string;
@@ -1243,7 +1259,9 @@ export declare const useActiveTheme: () => {
1243
1259
  tooltip: string;
1244
1260
  dropdown: string;
1245
1261
  dropdownItem: string;
1262
+ dropdownList: string;
1246
1263
  modalTopbarIcon: string;
1264
+ withdrawalInput: string;
1247
1265
  };
1248
1266
  borderWidths: {
1249
1267
  activeOptionBorderWidth: string;
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  baseTheme,
4
4
  systemFontStack
5
- } from "../chunk-SC53AFEE.js";
5
+ } from "../chunk-3U6TWV25.js";
6
6
  export {
7
7
  baseTheme,
8
8
  systemFontStack
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import {
3
3
  darkTheme
4
- } from "../chunk-WSCXOKCX.js";
5
- import "../chunk-SC53AFEE.js";
4
+ } from "../chunk-VLXKSNSJ.js";
5
+ import "../chunk-3U6TWV25.js";
6
6
  export {
7
7
  darkTheme
8
8
  };
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import {
3
3
  lightTheme
4
- } from "../chunk-XCM74QX2.js";
5
- import "../chunk-SC53AFEE.js";
4
+ } from "../chunk-P6FYL3PM.js";
5
+ import "../chunk-3U6TWV25.js";
6
6
  export {
7
7
  lightTheme
8
8
  };
@@ -62,6 +62,13 @@ export declare const flagConfig: {
62
62
  readonly values: ["Y53dikxXdT4E3afI1l8BMBSWgyhKvf65k6Dut1k6"];
63
63
  }];
64
64
  readonly value: string;
65
+ }, {
66
+ readonly if_any: [{
67
+ readonly key: "apiKey";
68
+ readonly type: "isAnyOf";
69
+ readonly values: ["0IEOb9q4Kd9akgyPbIdW17HGYLY7MWEB2yRHyMxo"];
70
+ }];
71
+ readonly value: string;
65
72
  }, {
66
73
  readonly if_any: [{
67
74
  readonly key: "apiKey";
@@ -144,7 +151,7 @@ export declare const flagConfig: {
144
151
  readonly if_any: [{
145
152
  readonly key: "apiKey";
146
153
  readonly type: "isAnyOf";
147
- readonly values: ["vWe20Dfyui2ouvfOhtSTY3Czeo8lFdbo5xXQBALZ", "6TUi99Tq3O9MWj1IFX8Pv6spmPXzcvhy9NvBoeW2"];
154
+ readonly values: ["6TUi99Tq3O9MWj1IFX8Pv6spmPXzcvhy9NvBoeW2"];
148
155
  }];
149
156
  readonly value: string;
150
157
  }, {
@@ -154,6 +161,13 @@ export declare const flagConfig: {
154
161
  readonly values: ["Y53dikxXdT4E3afI1l8BMBSWgyhKvf65k6Dut1k6"];
155
162
  }];
156
163
  readonly value: string;
164
+ }, {
165
+ readonly if_any: [{
166
+ readonly key: "apiKey";
167
+ readonly type: "isAnyOf";
168
+ readonly values: ["0IEOb9q4Kd9akgyPbIdW17HGYLY7MWEB2yRHyMxo"];
169
+ }];
170
+ readonly value: string;
157
171
  }];
158
172
  };
159
173
  readonly is_checkout_activated: {
@@ -7,3 +7,16 @@ export declare function isWalletWithdrawalConfig(config: FunkitWithdrawalConfig)
7
7
  * Type guard to check if withdrawal config uses custom callback flow
8
8
  */
9
9
  export declare function isCustomWithdrawalConfig(config: FunkitWithdrawalConfig): config is CustomWithdrawalConfig;
10
+ /**
11
+ * Converts a human-readable token amount to base units using string arithmetic
12
+ * to avoid floating-point precision loss.
13
+ *
14
+ * The precision is preserved because the original user-input string is passed
15
+ * directly — it is never coerced to a JS Number/float first.
16
+ *
17
+ * e.g. passing the already-truncated float string '8.967660226710157' would
18
+ * still produce 8967660226710157000n (lossy).
19
+ * But keeping the original full-precision string '8.967660226710157512'
20
+ * produces 8967660226710157512n (exact).
21
+ */
22
+ export declare function toWithdrawalAmountBaseUnit(amount: string, decimals: number): bigint;
@@ -1,10 +1,13 @@
1
1
  "use client";
2
+ import {
3
+ zealWallet
4
+ } from "./chunk-HE2LMIPD.js";
2
5
  import {
3
6
  zerionWallet
4
7
  } from "./chunk-UPUDLUBT.js";
5
8
  import {
6
- kresusWallet
7
- } from "./chunk-G4V5B6YC.js";
9
+ tahoWallet
10
+ } from "./chunk-4BMUFNMT.js";
8
11
  import {
9
12
  talismanWallet
10
13
  } from "./chunk-6MFOL6EB.js";
@@ -27,8 +30,8 @@ import {
27
30
  xdefiWallet
28
31
  } from "./chunk-O7RSASRH.js";
29
32
  import {
30
- zealWallet
31
- } from "./chunk-HE2LMIPD.js";
33
+ rabbyWallet
34
+ } from "./chunk-WFNPWKU3.js";
32
35
  import {
33
36
  rainbowWallet
34
37
  } from "./chunk-UVYZSGIX.js";
@@ -51,62 +54,59 @@ import {
51
54
  subWallet
52
55
  } from "./chunk-N3UJMC3V.js";
53
56
  import {
54
- tahoWallet
55
- } from "./chunk-4BMUFNMT.js";
57
+ metaMaskWallet
58
+ } from "./chunk-3YCR2ZB4.js";
56
59
  import {
57
60
  mewWallet
58
61
  } from "./chunk-HKVDCVCG.js";
59
62
  import {
60
63
  oktoWallet
61
64
  } from "./chunk-BVX22N7L.js";
62
- import {
63
- okxWallet
64
- } from "./chunk-COX3VEDR.js";
65
- import {
66
- omniWallet
67
- } from "./chunk-INNF7G5X.js";
68
65
  import {
69
66
  oneInchWallet
70
67
  } from "./chunk-RVWLP4IM.js";
71
68
  import {
72
69
  oneKeyWallet
73
70
  } from "./chunk-HE5J5T7X.js";
71
+ import {
72
+ okxWallet
73
+ } from "./chunk-COX3VEDR.js";
74
74
  import {
75
75
  phantomWallet
76
76
  } from "./chunk-XMNVOYSJ.js";
77
77
  import {
78
- rabbyWallet
79
- } from "./chunk-WFNPWKU3.js";
78
+ omniWallet
79
+ } from "./chunk-INNF7G5X.js";
80
80
  import {
81
- dawnWallet
82
- } from "./chunk-TFVCCI2D.js";
81
+ foxWallet
82
+ } from "./chunk-UVMMPRDM.js";
83
83
  import {
84
84
  frontierWallet
85
85
  } from "./chunk-FDVJHNLL.js";
86
86
  import {
87
- frameWallet
88
- } from "./chunk-WDTNOIMF.js";
87
+ imTokenWallet
88
+ } from "./chunk-IUVO4IN3.js";
89
89
  import {
90
90
  gateWallet
91
91
  } from "./chunk-DWMUM4F6.js";
92
92
  import {
93
- imTokenWallet
94
- } from "./chunk-IUVO4IN3.js";
93
+ frameWallet
94
+ } from "./chunk-WDTNOIMF.js";
95
95
  import {
96
96
  injectedWallet
97
97
  } from "./chunk-W6MXINYY.js";
98
+ import {
99
+ kresusWallet
100
+ } from "./chunk-G4V5B6YC.js";
98
101
  import {
99
102
  ledgerWallet
100
103
  } from "./chunk-WKCCLGHJ.js";
101
104
  import {
102
- metaMaskWallet
103
- } from "./chunk-3YCR2ZB4.js";
105
+ clvWallet
106
+ } from "./chunk-CMLFDRCP.js";
104
107
  import {
105
108
  coin98Wallet
106
109
  } from "./chunk-3Y2GG3PM.js";
107
- import {
108
- clvWallet
109
- } from "./chunk-CMLFDRCP.js";
110
110
  import {
111
111
  coinbaseWallet
112
112
  } from "./chunk-RZXMOPIV.js";
@@ -123,17 +123,17 @@ import {
123
123
  desigWallet
124
124
  } from "./chunk-JYVLYSH3.js";
125
125
  import {
126
- foxWallet
127
- } from "./chunk-UVMMPRDM.js";
126
+ dawnWallet
127
+ } from "./chunk-TFVCCI2D.js";
128
+ import {
129
+ bifrostWallet
130
+ } from "./chunk-CT3QPTAU.js";
128
131
  import {
129
132
  argentWallet
130
133
  } from "./chunk-VUOAIUZE.js";
131
134
  import {
132
135
  bitgetWallet
133
136
  } from "./chunk-C4RP2DNH.js";
134
- import {
135
- bifrostWallet
136
- } from "./chunk-CT3QPTAU.js";
137
137
  import {
138
138
  bitskiWallet
139
139
  } from "./chunk-A7FNGC4A.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funkit/connect",
3
- "version": "9.0.3",
3
+ "version": "9.2.1",
4
4
  "description": "Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.",
5
5
  "files": [
6
6
  "dist",
@@ -102,10 +102,10 @@
102
102
  "ua-parser-js": "^1.0.37",
103
103
  "use-debounce": "^10.0.5",
104
104
  "uuid": "^9.0.1",
105
- "@funkit/api-base": "2.3.2",
105
+ "@funkit/api-base": "3.0.0",
106
106
  "@funkit/chains": "1.1.0",
107
107
  "@funkit/fun-relay": "2.6.3",
108
- "@funkit/utils": "1.2.3"
108
+ "@funkit/utils": "1.2.4"
109
109
  },
110
110
  "repository": {
111
111
  "type": "git",
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- import type { Address } from 'viem';
3
- import type { PaymentMethodInfo } from '../../../domains/paymentMethods';
4
- import type { CheckoutModalCommonState, FunCheckoutStep, ModalStepComponentProps, ModalStepInfo } from '../stepTransition';
5
- export type DirectExecutionNotifCenterState = CheckoutModalCommonState & {
6
- depositAddress: Address;
7
- paymentMethodInfo?: PaymentMethodInfo;
8
- };
9
- export type DirectExecutionNotifCenterNext = Record<string, never>;
10
- export declare const DirectExecutionNotifCenterInfo: ModalStepInfo<FunCheckoutStep.DIRECT_EXECUTION_NOTIF_CENTER>;
11
- /** A checkout detail component to handle redirecting to the checkout history page */
12
- export declare function DirectExecutionNotifCenter({ modalState, onClose, }: ModalStepComponentProps<FunCheckoutStep.DIRECT_EXECUTION_NOTIF_CENTER>): React.JSX.Element | null;
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import type { PaymentMethodInfo } from '../../../domains/paymentMethods';
3
- interface DirectExecutionNotifCenterContentProps {
4
- onClose: (options?: {
5
- isNewDeposit?: boolean;
6
- }) => void;
7
- paymentMethodInfo: PaymentMethodInfo;
8
- }
9
- declare const DirectExecutionNotifCenterContent: ({ onClose, paymentMethodInfo, }: DirectExecutionNotifCenterContentProps) => React.JSX.Element;
10
- export default DirectExecutionNotifCenterContent;
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- import type { FunkitCheckoutConfig } from '../../../providers/FunkitCheckoutContext';
3
- interface DefiPurchaseSectionProps {
4
- config: FunkitCheckoutConfig;
5
- }
6
- export declare const DefiPurchaseSection: ({ config }: DefiPurchaseSectionProps) => React.JSX.Element;
7
- export {};
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- import type { PaymentMethodAccountInfo } from '../../domains/paymentMethods';
3
- import type { FunkitCheckoutQuoteResult } from '../../domains/quote';
4
- interface DirectExecutionNotifCenterContentProps {
5
- onClose: (options?: {
6
- isNewDeposit?: boolean;
7
- }) => void;
8
- paymentMethodInfo: PaymentMethodAccountInfo;
9
- quote: FunkitCheckoutQuoteResult | undefined;
10
- }
11
- declare const DirectExecutionNotifCenterContent: ({ onClose, paymentMethodInfo, quote, }: DirectExecutionNotifCenterContentProps) => React.JSX.Element;
12
- export default DirectExecutionNotifCenterContent;