@funkit/connect 5.0.1 → 5.0.3
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 +45 -0
- package/dist/{chunk-HAGQWE2B.js → chunk-3LPXAPO7.js} +6 -0
- package/dist/{chunk-A6B6WSM2.js → chunk-TPZ2ZISU.js} +6 -0
- package/dist/components/AnimatedDollarValue/AnimatedDollarValue.d.ts +7 -0
- package/dist/components/Box/Box.d.ts +28 -28
- package/dist/components/Dialog/DialogContent.css.d.ts +2 -0
- package/dist/components/Dropdown/BaseActiveDropdownItem.d.ts +5 -1
- package/dist/components/Dropdown/BaseDropdown.css.d.ts +0 -3
- package/dist/components/Dropdown/BaseDropdown.d.ts +11 -3
- package/dist/components/Dropdown/BaseDropdownItem.d.ts +4 -1
- package/dist/components/Dropdown/ReceiveTokenDropdown.d.ts +10 -0
- package/dist/components/FunAssetAvatar/FunAssetAvatar.css.d.ts +2 -0
- package/dist/components/FunAssetAvatar/FunAssetAvatar.d.ts +3 -1
- package/dist/components/FunButton/FunButton.d.ts +2 -1
- package/dist/{modals/FunCheckoutHistoryModal → components/FunCheckoutHistory}/FunCheckoutHistoryContent.d.ts +3 -2
- package/dist/{modals/FunCheckoutHistoryModal → components/FunCheckoutHistory}/FunCheckoutHistoryDetail.d.ts +3 -1
- package/dist/{modals/FunCheckoutHistoryModal → components/FunCheckoutHistory}/FunCheckoutHistoryHelp.d.ts +6 -2
- package/dist/components/FunCheckoutHistory/FunCheckoutHistoryTransaction.css.d.ts +1 -0
- package/dist/{modals/FunCheckoutHistoryModal → components/FunCheckoutHistory}/FunCheckoutHistoryTransaction.d.ts +4 -0
- package/dist/components/FunInfoBanner/EphemeralInfoBanner.d.ts +6 -0
- package/dist/components/FunInfoBanner/FunInfoBanner.d.ts +2 -0
- package/dist/components/FunInfoBanner/InfoBanner.css.d.ts +2 -0
- package/dist/components/FunInfoBanner/InfoBanner.d.ts +7 -0
- package/dist/components/FunNotificationBanner/FunNotificationBanner.css.d.ts +1 -1
- package/dist/components/FunNotificationBanner/FunNotificationBanner.d.ts +3 -4
- package/dist/components/FunNotificationBanner/FunNotificationBannerIcon.css.d.ts +4 -0
- package/dist/components/FunNotificationBanner/FunNotificationBannerIcon.d.ts +3 -2
- package/dist/components/FunNotificationBanner/FunNotificationBannerSummary.d.ts +3 -7
- package/dist/components/FunNotificationBanner/FunNotificationShowMoreButton.d.ts +8 -0
- package/dist/components/FunTransactionSummary/FunTxSummaryComponents.d.ts +1 -5
- package/dist/components/FunTransactionSummary/PaymentFeesSummary.css.d.ts +1 -0
- package/dist/components/Icons/Icons.css.d.ts +2 -0
- package/dist/components/Icons/SpinnerIconWithBackground.d.ts +6 -0
- package/dist/consts/layout.d.ts +1 -0
- package/dist/css/sprinkles.css.d.ts +40 -28
- package/dist/domains/checkoutState.d.ts +1 -0
- package/dist/domains/clientMetadata.d.ts +3 -1
- package/dist/hooks/queries/useCheckout.d.ts +3 -0
- package/dist/hooks/queries/useRecentCheckouts.d.ts +17 -0
- package/dist/hooks/useCheckoutAccountBalanceTransfer.d.ts +4 -3
- package/dist/hooks/useIsFunkitCheckoutActivated.d.ts +7 -0
- package/dist/hooks/useUpdateActiveFunkitCheckout.d.ts +8 -0
- package/dist/index.css +1642 -1286
- package/dist/index.d.ts +2 -1
- package/dist/index.js +3948 -2433
- package/dist/modals/CheckoutModal/CheckoutComplete/CheckoutComplete.d.ts +8 -3
- package/dist/modals/CheckoutModal/CheckoutComplete/useLogCheckoutCompletion.d.ts +3 -0
- package/dist/modals/CheckoutModal/CheckoutHelp/CheckoutHelp.d.ts +9 -0
- package/dist/modals/CheckoutModal/CheckoutNotification.d.ts +12 -0
- package/dist/modals/CheckoutModal/CheckoutNotifications.d.ts +9 -0
- package/dist/modals/CheckoutModal/stepTransition.d.ts +11 -2
- package/dist/providers/FunkitCheckoutContext.d.ts +2 -1
- package/dist/providers/FunkitProvider.d.ts +0 -6
- package/dist/providers/FunkitThemeProvider.d.ts +18 -0
- package/dist/providers/GeneralWalletProvider.d.ts +8 -8
- package/dist/providers/ModalContext.d.ts +0 -4
- package/dist/themes/darkTheme.js +1 -1
- package/dist/themes/lightTheme.js +1 -1
- package/dist/utils/checkout.d.ts +8 -3
- package/dist/utils/checkoutHistory.d.ts +0 -8
- package/dist/utils/flags/config.d.ts +8 -0
- package/dist/wallets/walletConnectors/index.js +53 -53
- package/package.json +16 -14
- package/dist/modals/CheckoutModal/CheckoutComplete/useRedirectToCheckoutHistory.d.ts +0 -3
- package/dist/modals/FunCheckoutHistoryModal/FunCheckoutHistoryModal.d.ts +0 -10
- package/dist/modals/FunCheckoutHistoryModal/FunCheckoutHistoryTransaction.css.d.ts +0 -3
- package/dist/providers/AppContext.d.ts +0 -20
- /package/dist/{modals/FunCheckoutHistoryModal → components/FunCheckoutHistory}/FunCheckoutStatus.css.d.ts +0 -0
- /package/dist/{modals/FunCheckoutHistoryModal → components/FunCheckoutHistory}/FunCheckoutStatus.d.ts +0 -0
- /package/dist/{modals/FunCheckoutHistoryModal → components/FunCheckoutHistory}/useCustomStatusAnimationAboveTopbar.d.ts +0 -0
|
@@ -1,8 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { Address } from 'viem';
|
|
2
|
-
import type
|
|
3
|
+
import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
|
|
3
4
|
export type CheckoutCompleteState = CheckoutModalCommonState & {
|
|
4
5
|
depositAddress: Address;
|
|
5
6
|
};
|
|
7
|
+
export type CheckoutCompleteNext = Record<string, never>;
|
|
8
|
+
export type ConfirmationStepNext = {
|
|
9
|
+
depositAddress: Address;
|
|
10
|
+
};
|
|
6
11
|
export declare const CheckoutCompleteInfo: ModalStepInfo<FunCheckoutStep.CHECKOUT_COMPLETE>;
|
|
7
|
-
/** A
|
|
8
|
-
export declare function CheckoutComplete({ modalState, onClose, }: ModalStepComponentProps<FunCheckoutStep.CHECKOUT_COMPLETE>):
|
|
12
|
+
/** A checkout detail component to handle redirecting to the checkout history page */
|
|
13
|
+
export declare function CheckoutComplete({ modalState, onClose, onNext, }: ModalStepComponentProps<FunCheckoutStep.CHECKOUT_COMPLETE>): React.JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Address } from 'viem';
|
|
3
|
+
import type { CheckoutModalCommonState, FunCheckoutStep, ModalStepComponentProps, ModalStepInfo } from '../stepTransition';
|
|
4
|
+
export type CheckoutHelpState = CheckoutModalCommonState & {
|
|
5
|
+
depositAddress: Address;
|
|
6
|
+
};
|
|
7
|
+
export declare const CheckoutHelpInfo: ModalStepInfo<FunCheckoutStep.CHECKOUT_HELP>;
|
|
8
|
+
/** Help Form in checkout modal */
|
|
9
|
+
export declare function CheckoutHelp({ modalState, onClose, onBack, }: ModalStepComponentProps<FunCheckoutStep.CHECKOUT_HELP>): React.JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { CheckoutHistoryItem } from '@funkit/api-base';
|
|
3
|
+
import type { Address } from 'viem';
|
|
4
|
+
import { type CheckoutStatus } from '~/domains/checkoutState';
|
|
5
|
+
export type NotificationStatus = CheckoutStatus | 'delayed';
|
|
6
|
+
interface CheckoutNotificationProps {
|
|
7
|
+
checkout: CheckoutHistoryItem;
|
|
8
|
+
onClose: (id: string) => void;
|
|
9
|
+
onHelp: (depositAddress: Address) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const CheckoutNotification: ({ checkout: defaultCheckout, onClose, onHelp, }: CheckoutNotificationProps) => React.JSX.Element | null;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Address } from 'viem';
|
|
3
|
+
interface CheckoutNotificationsProps {
|
|
4
|
+
onHelp: (depositAddress: Address) => void;
|
|
5
|
+
/** To control notifications visibility on specific pages, without changing internal dismissal state */
|
|
6
|
+
isVisible: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const CheckoutNotifications: ({ onHelp, isVisible, }: CheckoutNotificationsProps) => React.JSX.Element | null;
|
|
9
|
+
export {};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { type ComponentType, type SetStateAction } from 'react';
|
|
2
2
|
import type { FunkitActiveCheckoutItem } from '../../providers/FunkitCheckoutContext';
|
|
3
3
|
import { type FunkitTextCustomizationsConfig } from '../../providers/FunkitConfigContext';
|
|
4
|
-
import { type CheckoutCompleteState } from './CheckoutComplete/CheckoutComplete';
|
|
4
|
+
import { type CheckoutCompleteNext, type CheckoutCompleteState } from './CheckoutComplete/CheckoutComplete';
|
|
5
|
+
import { type CheckoutHelpState } from './CheckoutHelp/CheckoutHelp';
|
|
5
6
|
import { type ConfirmationStepNext, type ConfirmationStepState } from './ConfirmationStep/ConfirmationStep';
|
|
6
7
|
import { type ConnectExchangeNext, type ConnectExchangeState } from './ConnectExchange';
|
|
7
8
|
import { type InputAmountNext, type InputAmountState } from './InputAmount/InputAmount';
|
|
@@ -37,15 +38,19 @@ export declare enum FunCheckoutStep {
|
|
|
37
38
|
SELECT_ASSET = "select_asset",
|
|
38
39
|
MESH_VERIFICATION = "mesh_verification",
|
|
39
40
|
CHECKOUT_COMPLETE = "checkout_complete",
|
|
41
|
+
CHECKOUT_HELP = "checkout_help",
|
|
40
42
|
TRANSFER_TOKEN = "transfer_token"
|
|
41
43
|
}
|
|
42
44
|
export type ModalStepInfo<S extends FunCheckoutStep> = {
|
|
43
45
|
Component: ComponentType<ModalStepComponentProps<S>>;
|
|
44
46
|
disableBack?: boolean;
|
|
47
|
+
onBack?(state: CheckoutModalState<S>, prevState: CheckoutModalState): CheckoutModalState;
|
|
45
48
|
onNext(state: CheckoutModalState<S>, payload: NextPayload<S>): CheckoutModalState;
|
|
46
49
|
showFullHeight?: boolean;
|
|
47
50
|
/** Defaults to checkoutItem.initSettings.config.modalTitle (returning undefined uses default) */
|
|
48
51
|
title?(textCustomizations: FunkitTextCustomizationsConfig, isDydx: boolean): string | undefined;
|
|
52
|
+
/** If title is not defined in config nor with the title() function, this is used instead. Defaults to 'Checkout' */
|
|
53
|
+
fallbackTitle?: string;
|
|
49
54
|
};
|
|
50
55
|
export declare const CheckoutModalSteps: {
|
|
51
56
|
[S in FunCheckoutStep]: ModalStepInfo<S>;
|
|
@@ -53,6 +58,7 @@ export declare const CheckoutModalSteps: {
|
|
|
53
58
|
type CheckoutModalState<S extends FunCheckoutStep = FunCheckoutStep> = {
|
|
54
59
|
[T in S]: {
|
|
55
60
|
[FunCheckoutStep.CHECKOUT_COMPLETE]: CheckoutCompleteState;
|
|
61
|
+
[FunCheckoutStep.CHECKOUT_HELP]: CheckoutHelpState;
|
|
56
62
|
[FunCheckoutStep.CONFIRMATION]: ConfirmationStepState;
|
|
57
63
|
[FunCheckoutStep.CONNECT_EXCHANGE]: ConnectExchangeState;
|
|
58
64
|
[FunCheckoutStep.INPUT_AMOUNT]: InputAmountState;
|
|
@@ -68,7 +74,8 @@ type CheckoutModalState<S extends FunCheckoutStep = FunCheckoutStep> = {
|
|
|
68
74
|
};
|
|
69
75
|
}[S];
|
|
70
76
|
type NextPayload<S extends FunCheckoutStep = FunCheckoutStep> = {
|
|
71
|
-
[FunCheckoutStep.
|
|
77
|
+
[FunCheckoutStep.CHECKOUT_HELP]: null;
|
|
78
|
+
[FunCheckoutStep.CHECKOUT_COMPLETE]: CheckoutCompleteNext;
|
|
72
79
|
[FunCheckoutStep.CONFIRMATION]: ConfirmationStepNext;
|
|
73
80
|
[FunCheckoutStep.CONNECT_EXCHANGE]: ConnectExchangeNext;
|
|
74
81
|
[FunCheckoutStep.INPUT_AMOUNT]: InputAmountNext;
|
|
@@ -89,6 +96,8 @@ export declare function useCheckoutModalTransition(checkoutItem: FunkitActiveChe
|
|
|
89
96
|
onBack: () => void;
|
|
90
97
|
onCloseWrapper: () => void;
|
|
91
98
|
onNext: (payload: NextPayload) => void;
|
|
99
|
+
/** Only use as a last resort. Prefer next/back for proper navigation */
|
|
100
|
+
onStepChange: (nextState: CheckoutModalState) => void;
|
|
92
101
|
setModalState: import("react").Dispatch<SetStateAction<CheckoutModalState<FunCheckoutStep>>>;
|
|
93
102
|
hasHistoryEntry: boolean;
|
|
94
103
|
};
|
|
@@ -2,7 +2,7 @@ import { type ApiCheckoutClientMetadata, type ApiFunkitCheckoutActionParams, typ
|
|
|
2
2
|
import React, { type ReactNode } from 'react';
|
|
3
3
|
import { type Address } from 'viem';
|
|
4
4
|
import type { AssetHoldingsItem } from '~/utils/assets';
|
|
5
|
-
import type
|
|
5
|
+
import { type PaymentMethodInfo } from '../domains/paymentMethods';
|
|
6
6
|
import { type FunkitCheckoutQuoteResult } from './FunkitHistoryContext';
|
|
7
7
|
export type FunkitCheckoutActionParams = ApiFunkitCheckoutActionParams;
|
|
8
8
|
export interface DynamicTargetAssetCandidate {
|
|
@@ -101,6 +101,7 @@ export interface FunkitActiveCheckoutItem extends Omit<ApiCheckoutClientMetadata
|
|
|
101
101
|
interface FunkitCheckoutContextInterface {
|
|
102
102
|
checkoutItem: FunkitActiveCheckoutItem | null;
|
|
103
103
|
initNewCheckout(initSettings: UseFunkitCheckoutPropsWithFullConfig): string;
|
|
104
|
+
updateModalTitleMeta(newMeta: string): void;
|
|
104
105
|
updateSourceAsset(selectedSource: Omit<AssetHoldingsItem, 'amount' | 'usdAmount' | 'chainSymbolKey'>): void;
|
|
105
106
|
updateTargetAssetAmount(newTargetAssetAmount: number): void;
|
|
106
107
|
updateTargetAsset(asset: {
|
|
@@ -3,7 +3,6 @@ import React, { type ReactNode } from 'react';
|
|
|
3
3
|
import type { Chain } from 'wagmi/chains';
|
|
4
4
|
import type { Locale } from '~/locales';
|
|
5
5
|
import { type CreateFunkitWagmiConfigParameters } from '../config/getDefaultConfig';
|
|
6
|
-
import { type DisclaimerComponent } from './AppContext';
|
|
7
6
|
import { type AvatarComponent } from './AvatarContext';
|
|
8
7
|
import { type FunkitConfig } from './FunkitConfigContext';
|
|
9
8
|
import { type Theme } from './FunkitThemeProvider';
|
|
@@ -16,11 +15,6 @@ interface FunkitProviderInnerProps {
|
|
|
16
15
|
id?: string;
|
|
17
16
|
children: ReactNode;
|
|
18
17
|
theme?: Theme;
|
|
19
|
-
appInfo?: {
|
|
20
|
-
appName?: string;
|
|
21
|
-
learnMoreUrl?: string;
|
|
22
|
-
disclaimer?: DisclaimerComponent;
|
|
23
|
-
};
|
|
24
18
|
avatar?: AvatarComponent;
|
|
25
19
|
/** @deprecated This currently has no effect, localization is not yet supported */
|
|
26
20
|
locale?: Locale;
|
|
@@ -47,9 +47,11 @@ export declare const useActiveTheme: () => {
|
|
|
47
47
|
modalBorder: string;
|
|
48
48
|
notificationPrimary: string;
|
|
49
49
|
offBackground: string;
|
|
50
|
+
offBackgroundComplimentary: string;
|
|
50
51
|
hoverState: string;
|
|
51
52
|
lightStroke: string;
|
|
52
53
|
mediumStroke: string;
|
|
54
|
+
heavyStroke: string;
|
|
53
55
|
strokeColor: string;
|
|
54
56
|
dydxSwitchActiveBackground: string;
|
|
55
57
|
primaryText: string;
|
|
@@ -86,6 +88,8 @@ export declare const useActiveTheme: () => {
|
|
|
86
88
|
badgeBackgroundSuccess: string;
|
|
87
89
|
badgeBorderSuccess: string;
|
|
88
90
|
badgeTextSuccess: string;
|
|
91
|
+
announceGradientFrom: string;
|
|
92
|
+
announceGradientTo: string;
|
|
89
93
|
};
|
|
90
94
|
fonts: {
|
|
91
95
|
body: string;
|
|
@@ -154,6 +158,8 @@ export declare const useActiveTheme: () => {
|
|
|
154
158
|
selectedOption: string;
|
|
155
159
|
selectedWallet: string;
|
|
156
160
|
dropdown: string;
|
|
161
|
+
notification: string;
|
|
162
|
+
vertexDropdown: string;
|
|
157
163
|
};
|
|
158
164
|
blurs: {
|
|
159
165
|
modalOverlay: string;
|
|
@@ -189,9 +195,11 @@ export declare const useActiveTheme: () => {
|
|
|
189
195
|
modalBorder: string;
|
|
190
196
|
notificationPrimary: string;
|
|
191
197
|
offBackground: string;
|
|
198
|
+
offBackgroundComplimentary: string;
|
|
192
199
|
hoverState: string;
|
|
193
200
|
lightStroke: string;
|
|
194
201
|
mediumStroke: string;
|
|
202
|
+
heavyStroke: string;
|
|
195
203
|
strokeColor: string;
|
|
196
204
|
dydxSwitchActiveBackground: string;
|
|
197
205
|
primaryText: string;
|
|
@@ -228,6 +236,8 @@ export declare const useActiveTheme: () => {
|
|
|
228
236
|
badgeBackgroundSuccess: string;
|
|
229
237
|
badgeBorderSuccess: string;
|
|
230
238
|
badgeTextSuccess: string;
|
|
239
|
+
announceGradientFrom: string;
|
|
240
|
+
announceGradientTo: string;
|
|
231
241
|
};
|
|
232
242
|
fonts: {
|
|
233
243
|
body: string;
|
|
@@ -296,6 +306,8 @@ export declare const useActiveTheme: () => {
|
|
|
296
306
|
selectedOption: string;
|
|
297
307
|
selectedWallet: string;
|
|
298
308
|
dropdown: string;
|
|
309
|
+
notification: string;
|
|
310
|
+
vertexDropdown: string;
|
|
299
311
|
};
|
|
300
312
|
blurs: {
|
|
301
313
|
modalOverlay: string;
|
|
@@ -329,9 +341,11 @@ export declare const useActiveTheme: () => {
|
|
|
329
341
|
modalBorder: string;
|
|
330
342
|
notificationPrimary: string;
|
|
331
343
|
offBackground: string;
|
|
344
|
+
offBackgroundComplimentary: string;
|
|
332
345
|
hoverState: string;
|
|
333
346
|
lightStroke: string;
|
|
334
347
|
mediumStroke: string;
|
|
348
|
+
heavyStroke: string;
|
|
335
349
|
strokeColor: string;
|
|
336
350
|
dydxSwitchActiveBackground: string;
|
|
337
351
|
primaryText: string;
|
|
@@ -368,6 +382,8 @@ export declare const useActiveTheme: () => {
|
|
|
368
382
|
badgeBackgroundSuccess: string;
|
|
369
383
|
badgeBorderSuccess: string;
|
|
370
384
|
badgeTextSuccess: string;
|
|
385
|
+
announceGradientFrom: string;
|
|
386
|
+
announceGradientTo: string;
|
|
371
387
|
};
|
|
372
388
|
fonts: {
|
|
373
389
|
body: string;
|
|
@@ -436,6 +452,8 @@ export declare const useActiveTheme: () => {
|
|
|
436
452
|
selectedOption: string;
|
|
437
453
|
selectedWallet: string;
|
|
438
454
|
dropdown: string;
|
|
455
|
+
notification: string;
|
|
456
|
+
vertexDropdown: string;
|
|
439
457
|
};
|
|
440
458
|
blurs: {
|
|
441
459
|
modalOverlay: string;
|
|
@@ -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;
|
|
99
101
|
isError: false;
|
|
100
102
|
isPending: false;
|
|
101
103
|
isSuccess: false;
|
|
102
104
|
failureCount: number;
|
|
103
105
|
failureReason: import("@wagmi/core").DisconnectErrorType | null;
|
|
104
|
-
isPaused: boolean;
|
|
105
106
|
variables: undefined;
|
|
106
107
|
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;
|
|
117
119
|
isError: false;
|
|
118
120
|
isPending: true;
|
|
119
121
|
isSuccess: false;
|
|
120
122
|
failureCount: number;
|
|
121
123
|
failureReason: import("@wagmi/core").DisconnectErrorType | null;
|
|
122
|
-
isPaused: boolean;
|
|
123
124
|
variables: import("wagmi/query").DisconnectVariables;
|
|
124
125
|
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;
|
|
135
137
|
isError: true;
|
|
136
138
|
isPending: false;
|
|
137
139
|
isSuccess: false;
|
|
138
140
|
failureCount: number;
|
|
139
141
|
failureReason: import("@wagmi/core").DisconnectErrorType | null;
|
|
140
|
-
isPaused: boolean;
|
|
141
142
|
variables: import("wagmi/query").DisconnectVariables;
|
|
142
143
|
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;
|
|
153
155
|
isError: false;
|
|
154
156
|
isPending: false;
|
|
155
157
|
isSuccess: true;
|
|
156
158
|
failureCount: number;
|
|
157
159
|
failureReason: import("@wagmi/core").DisconnectErrorType | null;
|
|
158
|
-
isPaused: boolean;
|
|
159
160
|
variables: import("wagmi/query").DisconnectVariables;
|
|
160
161
|
isIdle: false;
|
|
161
|
-
context: unknown;
|
|
162
162
|
submittedAt: number;
|
|
163
163
|
connectors: readonly import("wagmi").Connector[];
|
|
164
164
|
};
|
|
@@ -29,8 +29,4 @@ export declare function useFunCheckoutModal(): {
|
|
|
29
29
|
funCheckoutModalOpen: boolean;
|
|
30
30
|
openFunCheckoutModal: ((checkoutId: string) => void) | undefined;
|
|
31
31
|
};
|
|
32
|
-
export declare function useFunCheckoutHistoryModal(): {
|
|
33
|
-
funCheckoutHistoryModalOpen: boolean;
|
|
34
|
-
openFunCheckoutHistoryModal: ((depositAddressInitialPageCombined: string) => void) | undefined;
|
|
35
|
-
};
|
|
36
32
|
export {};
|
package/dist/themes/darkTheme.js
CHANGED
package/dist/utils/checkout.d.ts
CHANGED
|
@@ -50,14 +50,15 @@ export declare function getFunkitEnvForCheckoutEstimation({ chainId, bypassWalle
|
|
|
50
50
|
};
|
|
51
51
|
bypassInit: boolean;
|
|
52
52
|
apiKey?: string;
|
|
53
|
+
nonce?: bigint | undefined;
|
|
54
|
+
logger?: import("@funkit/api-base").Logger | undefined;
|
|
53
55
|
fee?: {
|
|
54
56
|
token?: string;
|
|
55
57
|
amount?: number;
|
|
56
58
|
gasPercent?: number;
|
|
57
59
|
recipient: Address;
|
|
58
|
-
};
|
|
59
|
-
skipDBAction?: boolean;
|
|
60
|
-
nonce?: bigint;
|
|
60
|
+
} | undefined;
|
|
61
|
+
skipDBAction?: boolean | undefined;
|
|
61
62
|
};
|
|
62
63
|
export type TokenInfo = {
|
|
63
64
|
symbol: string;
|
|
@@ -117,3 +118,7 @@ export declare function isCheckoutCrFlow(checkoutItem: FunkitActiveCheckoutItem)
|
|
|
117
118
|
* @param config can be either be a config from live checkoutItem OR from checkout history's clientMetadata
|
|
118
119
|
*/
|
|
119
120
|
export declare function isCheckoutPostActionRequired(config: FunkitCheckoutConfig | ServerCheckoutConfig): boolean;
|
|
121
|
+
/**
|
|
122
|
+
* @returns whether we should show the checkout to the user (ie. supported in current sdk version & not cancelled)
|
|
123
|
+
*/
|
|
124
|
+
export declare const isCheckoutValid: (checkout: CheckoutHistoryItem) => boolean;
|
|
@@ -3,14 +3,6 @@ export declare enum HistoryContentPages {
|
|
|
3
3
|
DETAIL = "detail",
|
|
4
4
|
HELP = "help"
|
|
5
5
|
}
|
|
6
|
-
export declare const combineDepositAddressAndInitialPage: ({ depositAddress, initialPage, }: {
|
|
7
|
-
depositAddress: string;
|
|
8
|
-
initialPage: HistoryContentPages;
|
|
9
|
-
}) => string;
|
|
10
|
-
export declare const deconstructDepositAddressAndInitialPage: (combined: string) => {
|
|
11
|
-
depositAddress: `0x${string}`;
|
|
12
|
-
initialPage: HistoryContentPages;
|
|
13
|
-
};
|
|
14
6
|
export declare function getLatestReportSubmitTime(): number;
|
|
15
7
|
export declare function setLatestReportSubmitTime(timeMs: number): void;
|
|
16
8
|
export declare function clearLatestWalletId(): void;
|
|
@@ -106,4 +106,12 @@ export declare const flagConfig: {
|
|
|
106
106
|
type: "boolean";
|
|
107
107
|
default_value: true;
|
|
108
108
|
};
|
|
109
|
+
show_info_banner: {
|
|
110
|
+
type: "string";
|
|
111
|
+
default_value: string;
|
|
112
|
+
};
|
|
113
|
+
checkout_notifications_refresh_interval: {
|
|
114
|
+
type: "string";
|
|
115
|
+
default_value: string;
|
|
116
|
+
};
|
|
109
117
|
};
|
|
@@ -2,84 +2,87 @@
|
|
|
2
2
|
import {
|
|
3
3
|
zealWallet
|
|
4
4
|
} from "./chunk-JROWU5BP.js";
|
|
5
|
-
import {
|
|
6
|
-
uniswapWallet
|
|
7
|
-
} from "./chunk-LH7BMNFZ.js";
|
|
8
5
|
import {
|
|
9
6
|
zerionWallet
|
|
10
7
|
} from "./chunk-AXWP3GD4.js";
|
|
11
8
|
import {
|
|
12
|
-
|
|
13
|
-
} from "./chunk-
|
|
9
|
+
xdefiWallet
|
|
10
|
+
} from "./chunk-NO7XMBB5.js";
|
|
14
11
|
import {
|
|
15
|
-
|
|
16
|
-
} from "./chunk-
|
|
12
|
+
safeWallet
|
|
13
|
+
} from "./chunk-BQQQL6UD.js";
|
|
17
14
|
import {
|
|
18
|
-
|
|
19
|
-
} from "./chunk-
|
|
15
|
+
tahoWallet
|
|
16
|
+
} from "./chunk-6P2EMPZI.js";
|
|
20
17
|
import {
|
|
21
18
|
tokenaryWallet
|
|
22
19
|
} from "./chunk-SLOIIJGP.js";
|
|
20
|
+
import {
|
|
21
|
+
tokenPocketWallet
|
|
22
|
+
} from "./chunk-IDKVN5CF.js";
|
|
23
|
+
import {
|
|
24
|
+
talismanWallet
|
|
25
|
+
} from "./chunk-ABFSXBE6.js";
|
|
23
26
|
import {
|
|
24
27
|
trustWallet
|
|
25
28
|
} from "./chunk-ISIBREBO.js";
|
|
26
|
-
import {
|
|
27
|
-
rabbyWallet
|
|
28
|
-
} from "./chunk-BVX4XGNP.js";
|
|
29
29
|
import {
|
|
30
30
|
walletConnectWallet
|
|
31
31
|
} from "./chunk-NP5QGWNL.js";
|
|
32
32
|
import {
|
|
33
|
-
|
|
34
|
-
} from "./chunk-
|
|
33
|
+
uniswapWallet
|
|
34
|
+
} from "./chunk-LH7BMNFZ.js";
|
|
35
|
+
import {
|
|
36
|
+
phantomWallet
|
|
37
|
+
} from "./chunk-ZSVTX6EK.js";
|
|
38
|
+
import {
|
|
39
|
+
oneKeyWallet
|
|
40
|
+
} from "./chunk-4AD7VI2P.js";
|
|
35
41
|
import {
|
|
36
42
|
rainbowWallet
|
|
37
43
|
} from "./chunk-2UCNRD7H.js";
|
|
38
|
-
import {
|
|
39
|
-
ramperWallet
|
|
40
|
-
} from "./chunk-PIUNLQJG.js";
|
|
41
44
|
import {
|
|
42
45
|
roninWallet
|
|
43
46
|
} from "./chunk-63YLN6R5.js";
|
|
44
47
|
import {
|
|
45
|
-
|
|
46
|
-
} from "./chunk-
|
|
47
|
-
import {
|
|
48
|
-
phantomWallet
|
|
49
|
-
} from "./chunk-ZSVTX6EK.js";
|
|
48
|
+
ramperWallet
|
|
49
|
+
} from "./chunk-PIUNLQJG.js";
|
|
50
50
|
import {
|
|
51
51
|
safepalWallet
|
|
52
52
|
} from "./chunk-MSFKSQBY.js";
|
|
53
|
+
import {
|
|
54
|
+
safeheronWallet
|
|
55
|
+
} from "./chunk-R6RWZRFF.js";
|
|
53
56
|
import {
|
|
54
57
|
subWallet
|
|
55
58
|
} from "./chunk-AD2KIJB6.js";
|
|
56
59
|
import {
|
|
57
|
-
|
|
58
|
-
} from "./chunk-
|
|
60
|
+
ledgerWallet
|
|
61
|
+
} from "./chunk-BRBKM4PW.js";
|
|
62
|
+
import {
|
|
63
|
+
metaMaskWallet
|
|
64
|
+
} from "./chunk-G73C6P5P.js";
|
|
59
65
|
import {
|
|
60
66
|
mewWallet
|
|
61
67
|
} from "./chunk-V57WLZEE.js";
|
|
62
68
|
import {
|
|
63
69
|
oktoWallet
|
|
64
70
|
} from "./chunk-ADIXAKUL.js";
|
|
65
|
-
import {
|
|
66
|
-
okxWallet
|
|
67
|
-
} from "./chunk-4WEHDI4Y.js";
|
|
68
71
|
import {
|
|
69
72
|
omniWallet
|
|
70
73
|
} from "./chunk-7CUY5G6R.js";
|
|
71
74
|
import {
|
|
72
|
-
|
|
73
|
-
} from "./chunk-
|
|
74
|
-
import {
|
|
75
|
-
metaMaskWallet
|
|
76
|
-
} from "./chunk-G73C6P5P.js";
|
|
77
|
-
import {
|
|
78
|
-
oneKeyWallet
|
|
79
|
-
} from "./chunk-4AD7VI2P.js";
|
|
75
|
+
okxWallet
|
|
76
|
+
} from "./chunk-4WEHDI4Y.js";
|
|
80
77
|
import {
|
|
81
78
|
oneInchWallet
|
|
82
79
|
} from "./chunk-OESTDX6I.js";
|
|
80
|
+
import {
|
|
81
|
+
rabbyWallet
|
|
82
|
+
} from "./chunk-BVX4XGNP.js";
|
|
83
|
+
import {
|
|
84
|
+
dawnWallet
|
|
85
|
+
} from "./chunk-LN7OD5EC.js";
|
|
83
86
|
import {
|
|
84
87
|
frameWallet
|
|
85
88
|
} from "./chunk-ZMYVTWDF.js";
|
|
@@ -89,36 +92,33 @@ import {
|
|
|
89
92
|
import {
|
|
90
93
|
gateWallet
|
|
91
94
|
} from "./chunk-GSOYKKIS.js";
|
|
95
|
+
import {
|
|
96
|
+
kresusWallet
|
|
97
|
+
} from "./chunk-MJXPRJZT.js";
|
|
92
98
|
import {
|
|
93
99
|
imTokenWallet
|
|
94
100
|
} from "./chunk-COZ7MIQS.js";
|
|
95
101
|
import {
|
|
96
102
|
injectedWallet
|
|
97
103
|
} from "./chunk-VCVVV2K7.js";
|
|
98
|
-
import {
|
|
99
|
-
kresusWallet
|
|
100
|
-
} from "./chunk-MJXPRJZT.js";
|
|
101
|
-
import {
|
|
102
|
-
ledgerWallet
|
|
103
|
-
} from "./chunk-BRBKM4PW.js";
|
|
104
104
|
import {
|
|
105
105
|
bybitWallet
|
|
106
106
|
} from "./chunk-6ONTSPEY.js";
|
|
107
107
|
import {
|
|
108
|
-
|
|
109
|
-
} from "./chunk-
|
|
108
|
+
coin98Wallet
|
|
109
|
+
} from "./chunk-DTRYS3MO.js";
|
|
110
110
|
import {
|
|
111
111
|
coinbaseWallet
|
|
112
112
|
} from "./chunk-H4IRCEZN.js";
|
|
113
113
|
import {
|
|
114
|
-
|
|
115
|
-
} from "./chunk-
|
|
116
|
-
import {
|
|
117
|
-
dawnWallet
|
|
118
|
-
} from "./chunk-LN7OD5EC.js";
|
|
114
|
+
clvWallet
|
|
115
|
+
} from "./chunk-KR6JBW5E.js";
|
|
119
116
|
import {
|
|
120
117
|
desigWallet
|
|
121
118
|
} from "./chunk-CTU6JCOK.js";
|
|
119
|
+
import {
|
|
120
|
+
coreWallet
|
|
121
|
+
} from "./chunk-HBA36GW3.js";
|
|
122
122
|
import {
|
|
123
123
|
enkryptWallet
|
|
124
124
|
} from "./chunk-SJTXS4ZW.js";
|
|
@@ -129,20 +129,20 @@ import {
|
|
|
129
129
|
argentWallet
|
|
130
130
|
} from "./chunk-WSQ2YJO2.js";
|
|
131
131
|
import {
|
|
132
|
-
|
|
133
|
-
} from "./chunk-
|
|
132
|
+
bitverseWallet
|
|
133
|
+
} from "./chunk-3HZRRP4Y.js";
|
|
134
134
|
import {
|
|
135
135
|
bitskiWallet
|
|
136
136
|
} from "./chunk-P74YPRF6.js";
|
|
137
137
|
import {
|
|
138
138
|
bitgetWallet
|
|
139
139
|
} from "./chunk-A5APNTGL.js";
|
|
140
|
-
import {
|
|
141
|
-
bitverseWallet
|
|
142
|
-
} from "./chunk-3HZRRP4Y.js";
|
|
143
140
|
import {
|
|
144
141
|
bloomWallet
|
|
145
142
|
} 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
|
+
"version": "5.0.3",
|
|
4
4
|
"description": "Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -45,15 +45,15 @@
|
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@aws-sdk/client-s3": "^3.600.0",
|
|
48
|
-
"@chromatic-com/storybook": "^3.2.
|
|
48
|
+
"@chromatic-com/storybook": "^3.2.4",
|
|
49
49
|
"@meshconnect/node-api": "2.0.14",
|
|
50
|
-
"@storybook/addon-essentials": "^8.
|
|
51
|
-
"@storybook/addon-interactions": "^8.
|
|
52
|
-
"@storybook/addon-links": "^8.
|
|
53
|
-
"@storybook/blocks": "^8.
|
|
54
|
-
"@storybook/react": "^8.
|
|
55
|
-
"@storybook/react-vite": "^8.
|
|
56
|
-
"@storybook/test": "^8.
|
|
50
|
+
"@storybook/addon-essentials": "^8.5.3",
|
|
51
|
+
"@storybook/addon-interactions": "^8.5.3",
|
|
52
|
+
"@storybook/addon-links": "^8.5.3",
|
|
53
|
+
"@storybook/blocks": "^8.5.3",
|
|
54
|
+
"@storybook/react": "^8.5.3",
|
|
55
|
+
"@storybook/react-vite": "^8.5.3",
|
|
56
|
+
"@storybook/test": "^8.5.3",
|
|
57
57
|
"@testing-library/jest-dom": "^6.2.0",
|
|
58
58
|
"@testing-library/react": "^16.0.1",
|
|
59
59
|
"@testing-library/user-event": "^14.5.2",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"jsdom": "^25.0.1",
|
|
68
68
|
"postcss": "^8.4.32",
|
|
69
69
|
"react": "^18.3.0",
|
|
70
|
-
"storybook": "^8.
|
|
70
|
+
"storybook": "^8.5.3",
|
|
71
71
|
"tsx": "^4.19.2",
|
|
72
72
|
"vitest": "^2.0.5"
|
|
73
73
|
},
|
|
@@ -75,6 +75,7 @@
|
|
|
75
75
|
"@datadog/browser-logs": "5.22.0",
|
|
76
76
|
"@meshconnect/web-link-sdk": "2.1.1",
|
|
77
77
|
"@moonpay/moonpay-react": "^1.6.1",
|
|
78
|
+
"@number-flow/react": "^0.5.5",
|
|
78
79
|
"@privy-io/js-sdk-core": "^0.21.0",
|
|
79
80
|
"@types/uuid": "^9.0.8",
|
|
80
81
|
"@vanilla-extract/css": "1.15.3",
|
|
@@ -83,16 +84,17 @@
|
|
|
83
84
|
"@wagmi/core": "^2.13.0",
|
|
84
85
|
"bech32": "^2.0.0",
|
|
85
86
|
"clsx": "2.1.1",
|
|
87
|
+
"motion": "^12.0.11",
|
|
86
88
|
"qrcode": "1.5.3",
|
|
87
89
|
"react-remove-scroll": "2.5.7",
|
|
88
90
|
"react-virtuoso": "4.10.1",
|
|
89
91
|
"ua-parser-js": "^1.0.37",
|
|
90
92
|
"uuid": "^9.0.1",
|
|
91
|
-
"@funkit/api-base": "1.5.
|
|
93
|
+
"@funkit/api-base": "1.5.7",
|
|
92
94
|
"@funkit/chains": "0.1.2",
|
|
93
|
-
"@funkit/
|
|
94
|
-
"@funkit/utils": "1.0.
|
|
95
|
-
"@funkit/
|
|
95
|
+
"@funkit/wagmi-tools": "3.0.30",
|
|
96
|
+
"@funkit/utils": "1.0.7",
|
|
97
|
+
"@funkit/core": "2.3.8"
|
|
96
98
|
},
|
|
97
99
|
"repository": {
|
|
98
100
|
"type": "git",
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { Address } from 'viem';
|
|
2
|
-
import type { FunkitActiveCheckoutItem } from '~/providers/FunkitCheckoutContext';
|
|
3
|
-
export declare function useRedirectToCheckoutHistory(checkoutItem: FunkitActiveCheckoutItem | null, onClose: () => void): (depositAddress: Address) => void;
|