@funkit/connect 5.0.2 → 5.0.4
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 +41 -0
- package/dist/{chunk-LEZIQHUN.js → chunk-DRTHDG4D.js} +4 -1
- package/dist/{chunk-3OKZVQR2.js → chunk-ZHSAPALJ.js} +4 -1
- package/dist/components/Box/Box.d.ts +28 -28
- package/dist/components/Dialog/DialogContent.css.d.ts +2 -0
- package/dist/components/FunBottomBar/FunBottomBar.d.ts +1 -1
- package/dist/components/FunButton/FunButton.css.d.ts +0 -2
- package/dist/components/FunButton/FunButton.d.ts +2 -1
- package/dist/{modals/FunCheckoutHistoryModal → components/FunCheckoutHistory}/FunCheckoutHistoryContent.d.ts +4 -2
- package/dist/{modals/FunCheckoutHistoryModal → components/FunCheckoutHistory}/FunCheckoutHistoryDetail.d.ts +4 -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/FunNotificationBanner/FunNotificationBanner.css.d.ts +0 -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/FunTooltip/FunTooltip.css.d.ts +0 -1
- package/dist/components/FunTooltip/FunTooltip.d.ts +1 -2
- package/dist/components/FunTransactionSummary/FunTxSummaryComponents.d.ts +1 -5
- 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 +36 -30
- package/dist/domains/checkoutState.d.ts +1 -0
- package/dist/hooks/queries/useCheckout.d.ts +3 -0
- package/dist/hooks/queries/useRecentCheckouts.d.ts +17 -0
- package/dist/hooks/useCheckoutAccountBalanceTransfer.d.ts +1 -1
- package/dist/hooks/useUpdateActiveFunkitCheckout.d.ts +8 -0
- package/dist/index.css +1253 -1078
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3172 -2152
- 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 +10 -2
- package/dist/providers/FunkitCheckoutContext.d.ts +1 -0
- package/dist/providers/FunkitProvider.d.ts +0 -6
- package/dist/providers/FunkitThemeProvider.d.ts +12 -3
- 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 +5 -1
- package/dist/utils/checkoutHistory.d.ts +0 -8
- package/dist/utils/flags/config.d.ts +4 -0
- package/dist/wallets/walletConnectors/bifrostWallet/bifrostWallet.js +2 -2
- package/dist/wallets/walletConnectors/bitgetWallet/bitgetWallet.js +2 -2
- package/dist/wallets/walletConnectors/bybitWallet/bybitWallet.js +2 -2
- package/dist/wallets/walletConnectors/clvWallet/clvWallet.js +2 -2
- package/dist/wallets/walletConnectors/coin98Wallet/coin98Wallet.js +2 -2
- package/dist/wallets/walletConnectors/coreWallet/coreWallet.js +2 -2
- package/dist/wallets/walletConnectors/foxWallet/foxWallet.js +2 -2
- package/dist/wallets/walletConnectors/frontierWallet/frontierWallet.js +2 -2
- package/dist/wallets/walletConnectors/gateWallet/gateWallet.js +2 -2
- package/dist/wallets/walletConnectors/index.js +75 -75
- package/dist/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.js +2 -2
- package/dist/wallets/walletConnectors/okxWallet/okxWallet.js +2 -2
- package/dist/wallets/walletConnectors/rainbowWallet/rainbowWallet.js +2 -2
- package/dist/wallets/walletConnectors/roninWallet/roninWallet.js +2 -2
- package/dist/wallets/walletConnectors/safepalWallet/safepalWallet.js +2 -2
- package/dist/wallets/walletConnectors/subWallet/subWallet.js +2 -2
- package/dist/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.js +2 -2
- package/dist/wallets/walletConnectors/trustWallet/trustWallet.js +2 -2
- package/dist/wallets/walletConnectors/zerionWallet/zerionWallet.js +2 -2
- package/package.json +5 -5
- package/dist/components/FunConnectOptions/ConnectDetails.d.ts +0 -8
- 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,6 +38,7 @@ 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> = {
|
|
@@ -47,6 +49,8 @@ export type ModalStepInfo<S extends FunCheckoutStep> = {
|
|
|
47
49
|
showFullHeight?: boolean;
|
|
48
50
|
/** Defaults to checkoutItem.initSettings.config.modalTitle (returning undefined uses default) */
|
|
49
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;
|
|
50
54
|
};
|
|
51
55
|
export declare const CheckoutModalSteps: {
|
|
52
56
|
[S in FunCheckoutStep]: ModalStepInfo<S>;
|
|
@@ -54,6 +58,7 @@ export declare const CheckoutModalSteps: {
|
|
|
54
58
|
type CheckoutModalState<S extends FunCheckoutStep = FunCheckoutStep> = {
|
|
55
59
|
[T in S]: {
|
|
56
60
|
[FunCheckoutStep.CHECKOUT_COMPLETE]: CheckoutCompleteState;
|
|
61
|
+
[FunCheckoutStep.CHECKOUT_HELP]: CheckoutHelpState;
|
|
57
62
|
[FunCheckoutStep.CONFIRMATION]: ConfirmationStepState;
|
|
58
63
|
[FunCheckoutStep.CONNECT_EXCHANGE]: ConnectExchangeState;
|
|
59
64
|
[FunCheckoutStep.INPUT_AMOUNT]: InputAmountState;
|
|
@@ -69,7 +74,8 @@ type CheckoutModalState<S extends FunCheckoutStep = FunCheckoutStep> = {
|
|
|
69
74
|
};
|
|
70
75
|
}[S];
|
|
71
76
|
type NextPayload<S extends FunCheckoutStep = FunCheckoutStep> = {
|
|
72
|
-
[FunCheckoutStep.
|
|
77
|
+
[FunCheckoutStep.CHECKOUT_HELP]: null;
|
|
78
|
+
[FunCheckoutStep.CHECKOUT_COMPLETE]: CheckoutCompleteNext;
|
|
73
79
|
[FunCheckoutStep.CONFIRMATION]: ConfirmationStepNext;
|
|
74
80
|
[FunCheckoutStep.CONNECT_EXCHANGE]: ConnectExchangeNext;
|
|
75
81
|
[FunCheckoutStep.INPUT_AMOUNT]: InputAmountNext;
|
|
@@ -90,6 +96,8 @@ export declare function useCheckoutModalTransition(checkoutItem: FunkitActiveChe
|
|
|
90
96
|
onBack: () => void;
|
|
91
97
|
onCloseWrapper: () => void;
|
|
92
98
|
onNext: (payload: NextPayload) => void;
|
|
99
|
+
/** Only use as a last resort. Prefer next/back for proper navigation */
|
|
100
|
+
onStepChange: (nextState: CheckoutModalState) => void;
|
|
93
101
|
setModalState: import("react").Dispatch<SetStateAction<CheckoutModalState<FunCheckoutStep>>>;
|
|
94
102
|
hasHistoryEntry: boolean;
|
|
95
103
|
};
|
|
@@ -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;
|
|
@@ -45,12 +45,12 @@ 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;
|
|
52
51
|
lightStroke: string;
|
|
53
52
|
mediumStroke: string;
|
|
53
|
+
heavyStroke: string;
|
|
54
54
|
strokeColor: string;
|
|
55
55
|
dydxSwitchActiveBackground: string;
|
|
56
56
|
primaryText: string;
|
|
@@ -87,6 +87,8 @@ export declare const useActiveTheme: () => {
|
|
|
87
87
|
badgeBackgroundSuccess: string;
|
|
88
88
|
badgeBorderSuccess: string;
|
|
89
89
|
badgeTextSuccess: string;
|
|
90
|
+
announceGradientFrom: string;
|
|
91
|
+
announceGradientTo: string;
|
|
90
92
|
};
|
|
91
93
|
fonts: {
|
|
92
94
|
body: string;
|
|
@@ -155,6 +157,7 @@ export declare const useActiveTheme: () => {
|
|
|
155
157
|
selectedOption: string;
|
|
156
158
|
selectedWallet: string;
|
|
157
159
|
dropdown: string;
|
|
160
|
+
notification: string;
|
|
158
161
|
vertexDropdown: string;
|
|
159
162
|
};
|
|
160
163
|
blurs: {
|
|
@@ -189,12 +192,12 @@ export declare const useActiveTheme: () => {
|
|
|
189
192
|
modalBackdrop: string;
|
|
190
193
|
modalBackground: string;
|
|
191
194
|
modalBorder: string;
|
|
192
|
-
notificationPrimary: string;
|
|
193
195
|
offBackground: string;
|
|
194
196
|
offBackgroundComplimentary: string;
|
|
195
197
|
hoverState: string;
|
|
196
198
|
lightStroke: string;
|
|
197
199
|
mediumStroke: string;
|
|
200
|
+
heavyStroke: string;
|
|
198
201
|
strokeColor: string;
|
|
199
202
|
dydxSwitchActiveBackground: string;
|
|
200
203
|
primaryText: string;
|
|
@@ -231,6 +234,8 @@ export declare const useActiveTheme: () => {
|
|
|
231
234
|
badgeBackgroundSuccess: string;
|
|
232
235
|
badgeBorderSuccess: string;
|
|
233
236
|
badgeTextSuccess: string;
|
|
237
|
+
announceGradientFrom: string;
|
|
238
|
+
announceGradientTo: string;
|
|
234
239
|
};
|
|
235
240
|
fonts: {
|
|
236
241
|
body: string;
|
|
@@ -299,6 +304,7 @@ export declare const useActiveTheme: () => {
|
|
|
299
304
|
selectedOption: string;
|
|
300
305
|
selectedWallet: string;
|
|
301
306
|
dropdown: string;
|
|
307
|
+
notification: string;
|
|
302
308
|
vertexDropdown: string;
|
|
303
309
|
};
|
|
304
310
|
blurs: {
|
|
@@ -331,12 +337,12 @@ export declare const useActiveTheme: () => {
|
|
|
331
337
|
modalBackdrop: string;
|
|
332
338
|
modalBackground: string;
|
|
333
339
|
modalBorder: string;
|
|
334
|
-
notificationPrimary: string;
|
|
335
340
|
offBackground: string;
|
|
336
341
|
offBackgroundComplimentary: string;
|
|
337
342
|
hoverState: string;
|
|
338
343
|
lightStroke: string;
|
|
339
344
|
mediumStroke: string;
|
|
345
|
+
heavyStroke: string;
|
|
340
346
|
strokeColor: string;
|
|
341
347
|
dydxSwitchActiveBackground: string;
|
|
342
348
|
primaryText: string;
|
|
@@ -373,6 +379,8 @@ export declare const useActiveTheme: () => {
|
|
|
373
379
|
badgeBackgroundSuccess: string;
|
|
374
380
|
badgeBorderSuccess: string;
|
|
375
381
|
badgeTextSuccess: string;
|
|
382
|
+
announceGradientFrom: string;
|
|
383
|
+
announceGradientTo: string;
|
|
376
384
|
};
|
|
377
385
|
fonts: {
|
|
378
386
|
body: string;
|
|
@@ -441,6 +449,7 @@ export declare const useActiveTheme: () => {
|
|
|
441
449
|
selectedOption: string;
|
|
442
450
|
selectedWallet: string;
|
|
443
451
|
dropdown: string;
|
|
452
|
+
notification: string;
|
|
444
453
|
vertexDropdown: string;
|
|
445
454
|
};
|
|
446
455
|
blurs: {
|
|
@@ -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
|
@@ -51,6 +51,7 @@ 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;
|
|
54
55
|
fee?: {
|
|
55
56
|
token?: string;
|
|
56
57
|
amount?: number;
|
|
@@ -58,7 +59,6 @@ export declare function getFunkitEnvForCheckoutEstimation({ chainId, bypassWalle
|
|
|
58
59
|
recipient: Address;
|
|
59
60
|
} | undefined;
|
|
60
61
|
skipDBAction?: boolean | undefined;
|
|
61
|
-
logger?: import("@funkit/api-base").Logger | undefined;
|
|
62
62
|
};
|
|
63
63
|
export type TokenInfo = {
|
|
64
64
|
symbol: string;
|
|
@@ -118,3 +118,7 @@ export declare function isCheckoutCrFlow(checkoutItem: FunkitActiveCheckoutItem)
|
|
|
118
118
|
* @param config can be either be a config from live checkoutItem OR from checkout history's clientMetadata
|
|
119
119
|
*/
|
|
120
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;
|