@funkit/connect 5.0.3 → 5.0.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.
Files changed (47) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/dist/{chunk-3LPXAPO7.js → chunk-DRTHDG4D.js} +0 -1
  3. package/dist/{chunk-TPZ2ZISU.js → chunk-ZHSAPALJ.js} +0 -1
  4. package/dist/components/Box/Box.d.ts +21 -21
  5. package/dist/components/CopyAddress/CopyIconButton.d.ts +1 -0
  6. package/dist/components/FunAssetAvatar/FunAssetAvatar.css.d.ts +0 -2
  7. package/dist/components/FunAssetAvatar/FunAssetAvatar.d.ts +1 -2
  8. package/dist/components/FunBottomBar/FunBottomBar.d.ts +1 -1
  9. package/dist/components/FunButton/FunButton.css.d.ts +0 -2
  10. package/dist/components/FunCheckoutBlocked/FunCheckoutBlocked.d.ts +1 -1
  11. package/dist/components/FunCheckoutHistory/FunCheckoutHistoryContent.d.ts +2 -1
  12. package/dist/components/FunCheckoutHistory/FunCheckoutHistoryDetail.d.ts +2 -1
  13. package/dist/components/FunNotificationBanner/FunNotificationBanner.css.d.ts +0 -1
  14. package/dist/components/FunPaymentMethodItem/FunPaymentMethodItem.d.ts +6 -4
  15. package/dist/components/FunPayments/FunPaymentMethods.d.ts +1 -0
  16. package/dist/components/FunSkeletonLoader/FunSkeletonBlock.d.ts +2 -2
  17. package/dist/components/FunTooltip/FunTooltip.css.d.ts +0 -1
  18. package/dist/components/FunTooltip/FunTooltip.d.ts +1 -2
  19. package/dist/components/FunTransactionSummary/PaymentFeesSummary.css.d.ts +0 -1
  20. package/dist/components/QRCode/QRCodeSkeletonLoader.d.ts +7 -0
  21. package/dist/components/SourcePaymentMethodItem/SourcePaymentMethodItem.d.ts +7 -0
  22. package/dist/consts/animations.d.ts +1 -0
  23. package/dist/css/sprinkles.css.d.ts +21 -23
  24. package/dist/domains/{checkoutState.d.ts → checkout.d.ts} +3 -0
  25. package/dist/domains/{checkoutFees.d.ts → fees.d.ts} +1 -1
  26. package/dist/domains/paymentMethods.d.ts +1 -1
  27. package/dist/domains/quote.d.ts +1 -1
  28. package/dist/hooks/useCheckoutAccountBalanceTransfer.d.ts +1 -1
  29. package/dist/hooks/useIsBlacklisted.d.ts +6 -0
  30. package/dist/index.css +1299 -1410
  31. package/dist/index.js +1513 -1374
  32. package/dist/modals/CheckoutModal/CheckoutNotification.d.ts +1 -1
  33. package/dist/modals/CheckoutModal/ConfirmationStep/ConfirmationStep.d.ts +1 -1
  34. package/dist/modals/CheckoutModal/ConfirmationStep/useCheckoutConfirmation.d.ts +6 -0
  35. package/dist/modals/CheckoutModal/stepTransition.d.ts +4 -0
  36. package/dist/providers/FunkitMoonpayProvider.d.ts +0 -2
  37. package/dist/providers/FunkitThemeProvider.d.ts +0 -3
  38. package/dist/providers/GeneralWalletProvider.d.ts +9 -10
  39. package/dist/themes/darkTheme.js +1 -1
  40. package/dist/themes/lightTheme.js +1 -1
  41. package/dist/utils/checkout.d.ts +1 -1
  42. package/dist/utils/flags/config.d.ts +1 -1
  43. package/dist/wallets/walletConnectors/index.js +49 -49
  44. package/package.json +5 -5
  45. package/dist/components/FunConnectOptions/ConnectDetails.d.ts +0 -8
  46. package/dist/hooks/useIsCheckoutRisky.d.ts +0 -4
  47. /package/dist/components/{FunPaymentMethodItem/FunPaymentMethodItem.css.d.ts → SourcePaymentMethodItem/SourcePaymentMethodItem.css.d.ts} +0 -0
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import type { CheckoutHistoryItem } from '@funkit/api-base';
3
3
  import type { Address } from 'viem';
4
- import { type CheckoutStatus } from '~/domains/checkoutState';
4
+ import { type CheckoutStatus } from '~/domains/checkout';
5
5
  export type NotificationStatus = CheckoutStatus | 'delayed';
6
6
  interface CheckoutNotificationProps {
7
7
  checkout: CheckoutHistoryItem;
@@ -18,5 +18,5 @@ export type ConfirmationStepNext = {
18
18
  redirectBackToSourceChange?: boolean;
19
19
  };
20
20
  export declare const ConfirmationStepInfo: ModalStepInfo<FunCheckoutStep.CONFIRMATION>;
21
- export declare function ConfirmationStep({ modalState, onNext, }: ModalStepComponentProps<FunCheckoutStep.CONFIRMATION>): React.JSX.Element;
21
+ export declare function ConfirmationStep({ modalState, onNext, setModalState, }: ModalStepComponentProps<FunCheckoutStep.CONFIRMATION>): React.JSX.Element;
22
22
  export {};
@@ -2,6 +2,12 @@ import type { Address } from 'viem';
2
2
  import type { ErrorNotification } from '~/components/FunNotification/FunNotification';
3
3
  export interface CheckoutConfirmationError extends ErrorNotification {
4
4
  durationMs?: number;
5
+ code: ConfirmationErrorCode;
6
+ }
7
+ export declare enum ConfirmationErrorCode {
8
+ QUOTE_EXPIRED = "QUOTE_EXPIRED",
9
+ GENERIC_ERROR = "GENERIC_ERROR",
10
+ RISK_ERROR = "RISK_ERROR"
5
11
  }
6
12
  interface UseCheckoutConfirmationOptions {
7
13
  onError(error: CheckoutConfirmationError): void;
@@ -15,8 +15,12 @@ import { type SourceChangeNext, type SourceChangeState } from './SourceChange/So
15
15
  import { type TransferTokenNext, type TransferTokenState } from './TransferToken';
16
16
  export interface CheckoutModalCommonState {
17
17
  checkoutId: string;
18
+ /** Handles soft hiding of the dialog (without removing it from the DOM) */
18
19
  isSoftHidden: boolean;
20
+ /** Hides the close button in the Dialog Title element */
19
21
  isCloseButtonHidden?: boolean;
22
+ /** Whether checkout should not be allowed to continue due to security reasons*/
23
+ isBlocked?: boolean;
20
24
  targetChainId: string;
21
25
  }
22
26
  export interface ModalStepComponentProps<S extends FunCheckoutStep = FunCheckoutStep> {
@@ -1,5 +1,4 @@
1
1
  import React, { type ReactNode } from 'react';
2
- import type { FunButtonProps } from '../components/FunButton/FunButton';
3
2
  export declare function FunkitMoonpayProvider({ children, debug, }: {
4
3
  children: ReactNode;
5
4
  debug: boolean;
@@ -17,7 +16,6 @@ export interface UserIpInfoFromMoonpay {
17
16
  isLowLimitEnabled: boolean;
18
17
  state: string;
19
18
  }
20
- export declare const geoCheckInProgressProps: FunButtonProps;
21
19
  export declare function useFunkitUserIp(): {
22
20
  isLoadingGeoCheck: boolean;
23
21
  isUserGeoblocked: boolean;
@@ -45,7 +45,6 @@ export declare const useActiveTheme: () => {
45
45
  modalBackdrop: string;
46
46
  modalBackground: string;
47
47
  modalBorder: string;
48
- notificationPrimary: string;
49
48
  offBackground: string;
50
49
  offBackgroundComplimentary: string;
51
50
  hoverState: string;
@@ -193,7 +192,6 @@ export declare const useActiveTheme: () => {
193
192
  modalBackdrop: string;
194
193
  modalBackground: string;
195
194
  modalBorder: string;
196
- notificationPrimary: string;
197
195
  offBackground: string;
198
196
  offBackgroundComplimentary: string;
199
197
  hoverState: string;
@@ -339,7 +337,6 @@ export declare const useActiveTheme: () => {
339
337
  modalBackdrop: string;
340
338
  modalBackground: string;
341
339
  modalBorder: string;
342
- notificationPrimary: string;
343
340
  offBackground: string;
344
341
  offBackgroundComplimentary: string;
345
342
  hoverState: string;
@@ -15,7 +15,7 @@ export declare enum LoginType {
15
15
  Web3 = "web3",
16
16
  Guest = "guest"
17
17
  }
18
- interface GeneralWalletContextProps {
18
+ export interface GeneralWalletContextProps {
19
19
  walletAddress: Address | '';
20
20
  isUserLoggedIn: boolean;
21
21
  loginType: LoginType;
@@ -96,15 +96,15 @@ export declare const useFunkitDisconnect: () => {
96
96
  error: null;
97
97
  data: undefined;
98
98
  status: "idle";
99
- isPaused: boolean;
100
- context: unknown;
101
99
  isError: false;
102
100
  isPending: false;
103
101
  isSuccess: false;
104
102
  failureCount: number;
105
103
  failureReason: import("@wagmi/core").DisconnectErrorType | null;
104
+ isPaused: boolean;
106
105
  variables: undefined;
107
106
  isIdle: true;
107
+ context: unknown;
108
108
  submittedAt: number;
109
109
  connectors: readonly import("wagmi").Connector[];
110
110
  } | {
@@ -114,15 +114,15 @@ export declare const useFunkitDisconnect: () => {
114
114
  error: null;
115
115
  data: undefined;
116
116
  status: "pending";
117
- isPaused: boolean;
118
- context: unknown;
119
117
  isError: false;
120
118
  isPending: true;
121
119
  isSuccess: false;
122
120
  failureCount: number;
123
121
  failureReason: import("@wagmi/core").DisconnectErrorType | null;
122
+ isPaused: boolean;
124
123
  variables: import("wagmi/query").DisconnectVariables;
125
124
  isIdle: false;
125
+ context: unknown;
126
126
  submittedAt: number;
127
127
  connectors: readonly import("wagmi").Connector[];
128
128
  } | {
@@ -132,15 +132,15 @@ export declare const useFunkitDisconnect: () => {
132
132
  error: import("@wagmi/core").DisconnectErrorType;
133
133
  data: undefined;
134
134
  status: "error";
135
- isPaused: boolean;
136
- context: unknown;
137
135
  isError: true;
138
136
  isPending: false;
139
137
  isSuccess: false;
140
138
  failureCount: number;
141
139
  failureReason: import("@wagmi/core").DisconnectErrorType | null;
140
+ isPaused: boolean;
142
141
  variables: import("wagmi/query").DisconnectVariables;
143
142
  isIdle: false;
143
+ context: unknown;
144
144
  submittedAt: number;
145
145
  connectors: readonly import("wagmi").Connector[];
146
146
  } | {
@@ -150,15 +150,15 @@ export declare const useFunkitDisconnect: () => {
150
150
  error: null;
151
151
  data: void;
152
152
  status: "success";
153
- isPaused: boolean;
154
- context: unknown;
155
153
  isError: false;
156
154
  isPending: false;
157
155
  isSuccess: true;
158
156
  failureCount: number;
159
157
  failureReason: import("@wagmi/core").DisconnectErrorType | null;
158
+ isPaused: boolean;
160
159
  variables: import("wagmi/query").DisconnectVariables;
161
160
  isIdle: false;
161
+ context: unknown;
162
162
  submittedAt: number;
163
163
  connectors: readonly import("wagmi").Connector[];
164
164
  };
@@ -172,4 +172,3 @@ export declare const useFunkitSwitchChains: ({ onSettled, }: {
172
172
  switchChainAsync: (params: SwitchChainVariables<Config, number>) => Promise<void>;
173
173
  pendingChainId: number | null;
174
174
  };
175
- export {};
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  darkTheme
4
- } from "../chunk-TPZ2ZISU.js";
4
+ } from "../chunk-ZHSAPALJ.js";
5
5
  import "../chunk-2T4ZDGAO.js";
6
6
  export {
7
7
  darkTheme
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  lightTheme
4
- } from "../chunk-3LPXAPO7.js";
4
+ } from "../chunk-DRTHDG4D.js";
5
5
  import "../chunk-2T4ZDGAO.js";
6
6
  export {
7
7
  lightTheme
@@ -51,7 +51,6 @@ export declare function getFunkitEnvForCheckoutEstimation({ chainId, bypassWalle
51
51
  bypassInit: boolean;
52
52
  apiKey?: string;
53
53
  nonce?: bigint | undefined;
54
- logger?: import("@funkit/api-base").Logger | undefined;
55
54
  fee?: {
56
55
  token?: string;
57
56
  amount?: number;
@@ -59,6 +58,7 @@ export declare function getFunkitEnvForCheckoutEstimation({ chainId, bypassWalle
59
58
  recipient: Address;
60
59
  } | undefined;
61
60
  skipDBAction?: boolean | undefined;
61
+ logger?: import("@funkit/api-base").Logger | undefined;
62
62
  };
63
63
  export type TokenInfo = {
64
64
  symbol: string;
@@ -61,7 +61,7 @@ export declare const flagConfig: {
61
61
  };
62
62
  enable_token_transfer_universal_deposit_address: {
63
63
  type: "boolean";
64
- default_value: true;
64
+ default_value: false;
65
65
  };
66
66
  max_checkout_usd: {
67
67
  type: "string";
@@ -1,61 +1,61 @@
1
1
  "use client";
2
2
  import {
3
- zealWallet
4
- } from "./chunk-JROWU5BP.js";
5
- import {
6
- zerionWallet
7
- } from "./chunk-AXWP3GD4.js";
3
+ walletConnectWallet
4
+ } from "./chunk-NP5QGWNL.js";
8
5
  import {
9
6
  xdefiWallet
10
7
  } from "./chunk-NO7XMBB5.js";
11
8
  import {
12
- safeWallet
13
- } from "./chunk-BQQQL6UD.js";
9
+ zerionWallet
10
+ } from "./chunk-AXWP3GD4.js";
11
+ import {
12
+ subWallet
13
+ } from "./chunk-AD2KIJB6.js";
14
14
  import {
15
15
  tahoWallet
16
16
  } from "./chunk-6P2EMPZI.js";
17
+ import {
18
+ talismanWallet
19
+ } from "./chunk-ABFSXBE6.js";
17
20
  import {
18
21
  tokenaryWallet
19
22
  } from "./chunk-SLOIIJGP.js";
20
23
  import {
21
24
  tokenPocketWallet
22
25
  } from "./chunk-IDKVN5CF.js";
23
- import {
24
- talismanWallet
25
- } from "./chunk-ABFSXBE6.js";
26
26
  import {
27
27
  trustWallet
28
28
  } from "./chunk-ISIBREBO.js";
29
- import {
30
- walletConnectWallet
31
- } from "./chunk-NP5QGWNL.js";
32
29
  import {
33
30
  uniswapWallet
34
31
  } from "./chunk-LH7BMNFZ.js";
32
+ import {
33
+ zealWallet
34
+ } from "./chunk-JROWU5BP.js";
35
35
  import {
36
36
  phantomWallet
37
37
  } from "./chunk-ZSVTX6EK.js";
38
38
  import {
39
- oneKeyWallet
40
- } from "./chunk-4AD7VI2P.js";
39
+ ramperWallet
40
+ } from "./chunk-PIUNLQJG.js";
41
+ import {
42
+ roninWallet
43
+ } from "./chunk-63YLN6R5.js";
41
44
  import {
42
45
  rainbowWallet
43
46
  } from "./chunk-2UCNRD7H.js";
44
47
  import {
45
- roninWallet
46
- } from "./chunk-63YLN6R5.js";
48
+ rabbyWallet
49
+ } from "./chunk-BVX4XGNP.js";
47
50
  import {
48
- ramperWallet
49
- } from "./chunk-PIUNLQJG.js";
51
+ safeWallet
52
+ } from "./chunk-BQQQL6UD.js";
50
53
  import {
51
54
  safepalWallet
52
55
  } from "./chunk-MSFKSQBY.js";
53
56
  import {
54
57
  safeheronWallet
55
58
  } from "./chunk-R6RWZRFF.js";
56
- import {
57
- subWallet
58
- } from "./chunk-AD2KIJB6.js";
59
59
  import {
60
60
  ledgerWallet
61
61
  } from "./chunk-BRBKM4PW.js";
@@ -65,24 +65,24 @@ import {
65
65
  import {
66
66
  mewWallet
67
67
  } from "./chunk-V57WLZEE.js";
68
- import {
69
- oktoWallet
70
- } from "./chunk-ADIXAKUL.js";
71
- import {
72
- omniWallet
73
- } from "./chunk-7CUY5G6R.js";
74
68
  import {
75
69
  okxWallet
76
70
  } from "./chunk-4WEHDI4Y.js";
71
+ import {
72
+ oktoWallet
73
+ } from "./chunk-ADIXAKUL.js";
77
74
  import {
78
75
  oneInchWallet
79
76
  } from "./chunk-OESTDX6I.js";
80
77
  import {
81
- rabbyWallet
82
- } from "./chunk-BVX4XGNP.js";
78
+ omniWallet
79
+ } from "./chunk-7CUY5G6R.js";
83
80
  import {
84
- dawnWallet
85
- } from "./chunk-LN7OD5EC.js";
81
+ oneKeyWallet
82
+ } from "./chunk-4AD7VI2P.js";
83
+ import {
84
+ foxWallet
85
+ } from "./chunk-LMZMXEXL.js";
86
86
  import {
87
87
  frameWallet
88
88
  } from "./chunk-ZMYVTWDF.js";
@@ -92,18 +92,21 @@ import {
92
92
  import {
93
93
  gateWallet
94
94
  } from "./chunk-GSOYKKIS.js";
95
- import {
96
- kresusWallet
97
- } from "./chunk-MJXPRJZT.js";
98
95
  import {
99
96
  imTokenWallet
100
97
  } from "./chunk-COZ7MIQS.js";
98
+ import {
99
+ kresusWallet
100
+ } from "./chunk-MJXPRJZT.js";
101
101
  import {
102
102
  injectedWallet
103
103
  } from "./chunk-VCVVV2K7.js";
104
104
  import {
105
105
  bybitWallet
106
106
  } from "./chunk-6ONTSPEY.js";
107
+ import {
108
+ clvWallet
109
+ } from "./chunk-KR6JBW5E.js";
107
110
  import {
108
111
  coin98Wallet
109
112
  } from "./chunk-DTRYS3MO.js";
@@ -111,38 +114,35 @@ import {
111
114
  coinbaseWallet
112
115
  } from "./chunk-H4IRCEZN.js";
113
116
  import {
114
- clvWallet
115
- } from "./chunk-KR6JBW5E.js";
117
+ coreWallet
118
+ } from "./chunk-HBA36GW3.js";
116
119
  import {
117
120
  desigWallet
118
121
  } from "./chunk-CTU6JCOK.js";
119
122
  import {
120
- coreWallet
121
- } from "./chunk-HBA36GW3.js";
123
+ dawnWallet
124
+ } from "./chunk-LN7OD5EC.js";
122
125
  import {
123
126
  enkryptWallet
124
127
  } from "./chunk-SJTXS4ZW.js";
125
- import {
126
- foxWallet
127
- } from "./chunk-LMZMXEXL.js";
128
128
  import {
129
129
  argentWallet
130
130
  } from "./chunk-WSQ2YJO2.js";
131
131
  import {
132
- bitverseWallet
133
- } from "./chunk-3HZRRP4Y.js";
132
+ bifrostWallet
133
+ } from "./chunk-W6N74MS3.js";
134
+ import {
135
+ bitgetWallet
136
+ } from "./chunk-A5APNTGL.js";
134
137
  import {
135
138
  bitskiWallet
136
139
  } from "./chunk-P74YPRF6.js";
137
140
  import {
138
- bitgetWallet
139
- } from "./chunk-A5APNTGL.js";
141
+ bitverseWallet
142
+ } from "./chunk-3HZRRP4Y.js";
140
143
  import {
141
144
  bloomWallet
142
145
  } from "./chunk-S27IADFU.js";
143
- import {
144
- bifrostWallet
145
- } from "./chunk-W6N74MS3.js";
146
146
  import "./chunk-23WIEY36.js";
147
147
  import {
148
148
  braveWallet
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funkit/connect",
3
- "version": "5.0.3",
3
+ "version": "5.0.5",
4
4
  "description": "Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.",
5
5
  "files": [
6
6
  "dist",
@@ -90,11 +90,11 @@
90
90
  "react-virtuoso": "4.10.1",
91
91
  "ua-parser-js": "^1.0.37",
92
92
  "uuid": "^9.0.1",
93
- "@funkit/api-base": "1.5.7",
93
+ "@funkit/api-base": "1.5.8",
94
+ "@funkit/wagmi-tools": "3.0.31",
94
95
  "@funkit/chains": "0.1.2",
95
- "@funkit/wagmi-tools": "3.0.30",
96
- "@funkit/utils": "1.0.7",
97
- "@funkit/core": "2.3.8"
96
+ "@funkit/core": "2.3.9",
97
+ "@funkit/utils": "1.0.8"
98
98
  },
99
99
  "repository": {
100
100
  "type": "git",
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import type { WalletConnector } from '../../wallets/useWalletConnectors';
3
- interface Props {
4
- qrCodeUri?: string;
5
- wallet: WalletConnector;
6
- }
7
- export declare const ConnectDetail: ({ qrCodeUri, wallet }: Props) => React.JSX.Element;
8
- export {};
@@ -1,4 +0,0 @@
1
- import type { FunkitActiveCheckoutItem } from '~/providers/FunkitCheckoutContext';
2
- export declare const useIsCheckoutRisky: (checkoutItem: FunkitActiveCheckoutItem) => {
3
- isCheckoutRisky: boolean | undefined;
4
- };