@funkit/connect 9.3.2 → 9.4.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 +65 -0
- package/dist/__generated__/default_configs.d.ts +222 -12
- package/dist/__generated__/default_feature_gates.d.ts +1 -0
- package/dist/{chunk-MXNOQTKX.js → chunk-O35RTEEF.js} +17 -1
- package/dist/{chunk-RHUOOPDI.js → chunk-S65TG73G.js} +12 -1
- package/dist/{chunk-AGBRSMZ7.js → chunk-VLAOBEJN.js} +12 -1
- package/dist/clients/fanatics.css +5285 -4388
- package/dist/clients/fanatics.js +2 -2
- package/dist/clients/polymarket.d.ts +5 -1
- package/dist/clients/polymarket.js +11 -15
- package/dist/components/Box/Box.d.ts +40 -40
- package/dist/components/Dropdown/BaseDropdown.css.d.ts +2 -2
- package/dist/components/Dropdown/BaseDropdown.d.ts +50 -6
- package/dist/components/Dropdown/ChainDropdown.d.ts +5 -2
- package/dist/components/Dropdown/TokenAndChainDropdown.d.ts +7 -1
- package/dist/components/Dropdown/TokenDropdown.d.ts +3 -1
- package/dist/components/FunCheckoutBlocked/FunCheckoutBlocked.d.ts +2 -2
- package/dist/components/FunInput/FunInput.css.d.ts +1 -0
- package/dist/components/ModalHeightAnimationLayer/WithdrawalModalHeightAnimationWrapper.d.ts +1 -1
- package/dist/components/NewTokenDepositAlert/NewTokenDepositAlert.d.ts +1 -1
- package/dist/components/Tabs/Tabs.d.ts +1 -0
- package/dist/components/Tabs/tabs.css.d.ts +1 -1
- package/dist/config/getDefaultConfig.d.ts +1 -1
- package/dist/css/sprinkles.css.d.ts +108 -40
- package/dist/hooks/statsig/useFeatureGate.d.ts +3 -6
- package/dist/hooks/useBluvo.d.ts +1215 -5
- package/dist/hooks/useMainnetEnsAvatar.d.ts +1 -1
- package/dist/hooks/useScrollDivider.d.ts +10 -2
- package/dist/hooks/useSupportedAssets.d.ts +9 -0
- package/dist/hooks/{useTokenChain.d.ts → useTokenAndChainDropdown.d.ts} +8 -2
- package/dist/hooks/useTokenTransfer.d.ts +1 -0
- package/dist/hooks/useTokenTransferConfig.d.ts +2 -0
- package/dist/index.css +5390 -4440
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2621 -1490
- package/dist/modals/CheckoutModal/Brokerage/SelectBrokerage.d.ts +1 -1
- package/dist/modals/CheckoutModal/CheckoutBlockedReason.d.ts +1 -0
- package/dist/modals/CheckoutModal/SelectAsset/SelectAsset.d.ts +1 -1
- package/dist/modals/CheckoutModal/SelectAsset/SelectAssetInfoSection.d.ts +1 -1
- package/dist/modals/CheckoutModal/SourceChange/FormOfPaymentsListLoading.d.ts +6 -0
- package/dist/modals/CheckoutModal/SwappedIframe/SwappedErrorMessage.d.ts +6 -0
- package/dist/modals/CheckoutModal/SwappedIframe/SwappedIframeContainer.d.ts +3 -1
- package/dist/modals/CheckoutModal/TransferToken/TransferToken.d.ts +1 -1
- package/dist/modals/CheckoutModal/stepTransition.d.ts +4 -1
- package/dist/modals/CheckoutModal/useCheckoutBlocked.d.ts +18 -0
- package/dist/providers/FunkitCheckoutContext/types.d.ts +5 -0
- package/dist/providers/FunkitThemeProvider.d.ts +102 -0
- package/dist/providers/GeneralWalletProvider.d.ts +5 -5
- package/dist/themes/baseTheme.js +1 -1
- package/dist/themes/darkTheme.js +2 -2
- package/dist/themes/lightTheme.js +2 -2
- package/dist/utils/bluvo.d.ts +99 -1
- package/dist/utils/checkout.d.ts +1 -1
- package/dist/utils/swapped.d.ts +1 -0
- package/dist/utils/tokenTransfer/disabledList.d.ts +14 -0
- package/dist/utils/tokenTransfer/types.d.ts +26 -0
- package/dist/wallets/walletConnectors/index.js +42 -42
- package/package.json +10 -10
- /package/dist/modals/{WithdrwalModal → WithdrawalModal}/WithdrawalCallbackSuccess.d.ts +0 -0
- /package/dist/modals/{WithdrwalModal → WithdrawalModal}/WithdrawalContent.d.ts +0 -0
- /package/dist/modals/{WithdrwalModal → WithdrawalModal}/WithdrawalModal.d.ts +0 -0
- /package/dist/modals/{WithdrwalModal → WithdrawalModal}/WithdrawalSuccess.d.ts +0 -0
- /package/dist/modals/{WithdrwalModal → WithdrawalModal}/types.d.ts +0 -0
- /package/dist/modals/{WithdrwalModal → WithdrawalModal}/useWithdrawal.d.ts +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { BluvoExchangeType } from '../../../consts/bluvo';
|
|
2
|
+
import type { BluvoExchangeType } from '../../../consts/bluvo';
|
|
3
3
|
import { type PaymentMethodBrokerageInfo } from '../../../domains/paymentMethods';
|
|
4
4
|
import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
|
|
5
5
|
export type SelectBrokerageState = CheckoutModalCommonState;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type CheckoutBlockedReason = 'fullGeoblock' | 'semiGeoblock' | 'security' | 'unloggedin';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type PaymentMethodAccountInfo, type PaymentMethodBrokerageInfo } from '../../../domains/paymentMethods';
|
|
3
|
-
import type { TransferTokenDefault } from '../../../hooks/
|
|
3
|
+
import type { TransferTokenDefault } from '../../../hooks/useTokenAndChainDropdown';
|
|
4
4
|
import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
|
|
5
5
|
export type SelectAssetState = CheckoutModalCommonState & {
|
|
6
6
|
paymentMethodInfo: PaymentMethodBrokerageInfo | PaymentMethodAccountInfo;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type FC } from 'react';
|
|
2
2
|
import type { PaymentMethodInfo } from '../../../domains/paymentMethods';
|
|
3
|
-
import type { TransferTokenDefault } from '../../../hooks/
|
|
3
|
+
import type { TransferTokenDefault } from '../../../hooks/useTokenAndChainDropdown';
|
|
4
4
|
interface SelectAssetInfoSectionProps {
|
|
5
5
|
totalBalance: number;
|
|
6
6
|
paymentMethodInfo: PaymentMethodInfo;
|
|
@@ -7,9 +7,11 @@ export type SwappedIframeState = CheckoutModalCommonState & {
|
|
|
7
7
|
selectedPaymentOption: SwappedFormOfPayment;
|
|
8
8
|
/** Payment method type filter to restore when returning to SOURCE_CHANGE */
|
|
9
9
|
paymentMethodTypeFilter?: PaymentMethodType;
|
|
10
|
+
/** Set to true when an error occurs (iframe error or load timeout) */
|
|
11
|
+
error?: boolean;
|
|
10
12
|
};
|
|
11
13
|
export type SwappedIframeNext = {
|
|
12
14
|
success?: boolean;
|
|
13
15
|
};
|
|
14
16
|
export declare const SwappedIframeInfo: ModalStepInfo<FunCheckoutStep.SWAPPED_IFRAME>;
|
|
15
|
-
export declare function SwappedIframeContainer({ modalState, onNext, onBack, onClose, }: ModalStepComponentProps<FunCheckoutStep.SWAPPED_IFRAME>): React.JSX.Element;
|
|
17
|
+
export declare function SwappedIframeContainer({ modalState, onNext, onBack, onClose, setModalState, }: ModalStepComponentProps<FunCheckoutStep.SWAPPED_IFRAME>): React.JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type TransferTokenDefault } from '../../../hooks/
|
|
2
|
+
import { type TransferTokenDefault } from '../../../hooks/useTokenAndChainDropdown';
|
|
3
3
|
import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
|
|
4
4
|
export type TransferTokenState = CheckoutModalCommonState & {
|
|
5
5
|
transferToken?: TransferTokenDefault;
|
|
@@ -58,7 +58,9 @@ export type ModalStepInfo<S extends FunCheckoutStep> = {
|
|
|
58
58
|
/** Hides the close button in the Dialog Title element */
|
|
59
59
|
hideClose?: (startingStep?: FunCheckoutStartingStep) => boolean;
|
|
60
60
|
/** Hides the entire topbar including back button, close button, and title */
|
|
61
|
-
hideTopbar?: () => boolean;
|
|
61
|
+
hideTopbar?: (state: CheckoutModalState<S>) => boolean;
|
|
62
|
+
/** Hides the bottom section (portal target for bottom bar content) */
|
|
63
|
+
hideBottomSection?: (state: CheckoutModalState<S>) => boolean;
|
|
62
64
|
onBack?(state: CheckoutModalState<S>, prevState: CheckoutModalState): CheckoutModalState;
|
|
63
65
|
onNext(state: CheckoutModalState<S>, payload: NextPayload<S>): CheckoutModalState;
|
|
64
66
|
showFullHeight?: boolean;
|
|
@@ -150,6 +152,7 @@ export declare function useTitleConfig<S extends FunCheckoutStep>(checkoutItem:
|
|
|
150
152
|
disableBack: boolean;
|
|
151
153
|
hideClose: boolean;
|
|
152
154
|
hideTopbar: boolean;
|
|
155
|
+
hideBottomSection: boolean;
|
|
153
156
|
showFullHeight: boolean;
|
|
154
157
|
title: string;
|
|
155
158
|
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { CheckoutBlockedReason } from './CheckoutBlockedReason';
|
|
2
|
+
import { FunCheckoutStep } from './FunCheckoutStep';
|
|
3
|
+
interface UseCheckoutBlockedParams {
|
|
4
|
+
isModalBlocked: boolean;
|
|
5
|
+
modalStep: FunCheckoutStep;
|
|
6
|
+
onCheckoutBlocked?: (params: {
|
|
7
|
+
blockedReason: CheckoutBlockedReason;
|
|
8
|
+
}) => void;
|
|
9
|
+
}
|
|
10
|
+
type CheckoutBlockedResult = {
|
|
11
|
+
blockedReason: CheckoutBlockedReason;
|
|
12
|
+
showBlockedUI: boolean;
|
|
13
|
+
} | {
|
|
14
|
+
blockedReason: null;
|
|
15
|
+
showBlockedUI: false;
|
|
16
|
+
};
|
|
17
|
+
export declare function useCheckoutBlocked(params: UseCheckoutBlockedParams): CheckoutBlockedResult;
|
|
18
|
+
export {};
|
|
@@ -2,6 +2,7 @@ import type { FunAddress } from '@funkit/api-base';
|
|
|
2
2
|
import type { ApiCheckoutClientMetadata, ApiFunkitCheckoutActionParams, ApiFunkitCheckoutConfig } from '@funkit/utils';
|
|
3
3
|
import type { Address } from 'viem';
|
|
4
4
|
import type { PaymentMethodInfo } from '../../domains/paymentMethods';
|
|
5
|
+
import type { CheckoutBlockedReason } from '../../modals/CheckoutModal/CheckoutBlockedReason';
|
|
5
6
|
import type { WithdrawalClient } from '../../wallets/Wallet';
|
|
6
7
|
import type { FunkitCheckoutQuoteResult } from '../FunkitHistoryContext';
|
|
7
8
|
export type FunkitCheckoutActionParams = ApiFunkitCheckoutActionParams;
|
|
@@ -172,6 +173,10 @@ export interface UseFunkitCheckoutProps {
|
|
|
172
173
|
}) => void;
|
|
173
174
|
/** @optional fires when a withdrawal is confirmed with the funkit server. Returns the newly created withdrawalId. **/
|
|
174
175
|
onWithdrawalConfirmation?: (withdrawalId: string) => void;
|
|
176
|
+
/** @optional fires when checkout is blocked (e.g. geo-restriction, security hold, or missing wallet connection). **/
|
|
177
|
+
onCheckoutBlocked?: (params: {
|
|
178
|
+
blockedReason: CheckoutBlockedReason;
|
|
179
|
+
}) => void;
|
|
175
180
|
/** @optional fires if the withdrawal fails at any point **/
|
|
176
181
|
onWithdrawalError?: (result: FunkitCheckoutResult) => void;
|
|
177
182
|
}
|
|
@@ -62,6 +62,13 @@ export declare const useActiveTheme: () => {
|
|
|
62
62
|
inputBorderHover: string;
|
|
63
63
|
activeTabBorderColor: string;
|
|
64
64
|
activeTabBackground: string;
|
|
65
|
+
inactiveTabBorderColor: string;
|
|
66
|
+
inactiveTabBackgroundBase: string;
|
|
67
|
+
inactiveTabBackgroundHover: string;
|
|
68
|
+
inactiveTabBackgroundActive: string;
|
|
69
|
+
activeTabText: string;
|
|
70
|
+
inactiveTabTextBase: string;
|
|
71
|
+
inactiveTabHover: string;
|
|
65
72
|
actionColor: string;
|
|
66
73
|
actionColorHover: string;
|
|
67
74
|
actionColorDisabled: string;
|
|
@@ -142,9 +149,12 @@ export declare const useActiveTheme: () => {
|
|
|
142
149
|
dropdownActiveItemBackgroundDisabled: string;
|
|
143
150
|
dropdownActiveItemBorderBase: string;
|
|
144
151
|
dropdownActiveItemBorderHover: string;
|
|
152
|
+
dropdownGroupHeader: string;
|
|
145
153
|
selectedDropdownItemBackground: string;
|
|
146
154
|
alwaysVisibleLabelBackgroundHover: string;
|
|
147
155
|
selectedDropdownItemText: string;
|
|
156
|
+
useConnectedBackgroundBase: string;
|
|
157
|
+
useConnectedBackgroundHover: string;
|
|
148
158
|
copyButtonBackgroundBase: string;
|
|
149
159
|
copyButtonBackgroundHover: string;
|
|
150
160
|
copyButtonBackgroundActive: string;
|
|
@@ -195,6 +205,7 @@ export declare const useActiveTheme: () => {
|
|
|
195
205
|
buttonTextPrimary: string;
|
|
196
206
|
buttonTextSecondary: string;
|
|
197
207
|
buttonTextTertiary: string;
|
|
208
|
+
dropdownGroupHeader: string;
|
|
198
209
|
header: string;
|
|
199
210
|
inputAmount: string;
|
|
200
211
|
txStatusDescription: string;
|
|
@@ -207,6 +218,7 @@ export declare const useActiveTheme: () => {
|
|
|
207
218
|
bold: string;
|
|
208
219
|
heavy: string;
|
|
209
220
|
cryptoCashToggle: string;
|
|
221
|
+
dropdownGroupHeader: string;
|
|
210
222
|
inputAmount: string;
|
|
211
223
|
inputLabel: string;
|
|
212
224
|
inputValue: string;
|
|
@@ -300,6 +312,10 @@ export declare const useActiveTheme: () => {
|
|
|
300
312
|
fontSize: string;
|
|
301
313
|
lineHeight: string;
|
|
302
314
|
};
|
|
315
|
+
dropdownGroupHeader: {
|
|
316
|
+
fontSize: string;
|
|
317
|
+
lineHeight: string;
|
|
318
|
+
};
|
|
303
319
|
inputAmount: {
|
|
304
320
|
fontSize: string;
|
|
305
321
|
lineHeight: string;
|
|
@@ -400,6 +416,14 @@ export declare const useActiveTheme: () => {
|
|
|
400
416
|
fontSize: string;
|
|
401
417
|
lineHeight: string;
|
|
402
418
|
};
|
|
419
|
+
paymentFeeSummaryTooltip: {
|
|
420
|
+
fontSize: string;
|
|
421
|
+
lineHeight: string;
|
|
422
|
+
};
|
|
423
|
+
tooltipContent: {
|
|
424
|
+
fontSize: string;
|
|
425
|
+
lineHeight: string;
|
|
426
|
+
};
|
|
403
427
|
};
|
|
404
428
|
radii: {
|
|
405
429
|
actionButton: string;
|
|
@@ -427,6 +451,8 @@ export declare const useActiveTheme: () => {
|
|
|
427
451
|
activeOptionBorderWidth: string;
|
|
428
452
|
buttonTertiaryBorderWidth: string;
|
|
429
453
|
cryptoCashToggleContainerBorderWidth: string;
|
|
454
|
+
cryptoCashToggleActiveTabBorderWidth: string;
|
|
455
|
+
cryptoCashToggleInactiveTabBorderWidth: string;
|
|
430
456
|
txSummaryBoxBorderWidth: string;
|
|
431
457
|
};
|
|
432
458
|
shadows: {
|
|
@@ -462,6 +488,13 @@ export declare const useActiveTheme: () => {
|
|
|
462
488
|
cryptoCashToggleMarginBottom: string;
|
|
463
489
|
cryptoCashToggleMarginTop: string;
|
|
464
490
|
cryptoCashToggleTabPaddingY: string;
|
|
491
|
+
dropdownItemIconGap: string;
|
|
492
|
+
dropdownItemPaddingX: string;
|
|
493
|
+
dropdownItemPaddingY: string;
|
|
494
|
+
dropdownCompactPaddingX: string;
|
|
495
|
+
dropdownCompactPaddingY: string;
|
|
496
|
+
dropdownPaddingX: string;
|
|
497
|
+
dropdownPaddingY: string;
|
|
465
498
|
modalBaseHorizontalPadding: string;
|
|
466
499
|
modalBottomBarButtonPaddingY: string;
|
|
467
500
|
modalBottomHorizontalPadding: string;
|
|
@@ -490,6 +523,7 @@ export declare const useActiveTheme: () => {
|
|
|
490
523
|
inputPaddingY: string;
|
|
491
524
|
dropdownActiveItemRegularSizePaddingY: string;
|
|
492
525
|
assetListDefaultGap: string;
|
|
526
|
+
dropdownGroupDividerMarginY: string;
|
|
493
527
|
};
|
|
494
528
|
textTransforms: {
|
|
495
529
|
inputAmountQuickOptionButton: string;
|
|
@@ -552,6 +586,13 @@ export declare const useActiveTheme: () => {
|
|
|
552
586
|
inputBorderHover: string;
|
|
553
587
|
activeTabBorderColor: string;
|
|
554
588
|
activeTabBackground: string;
|
|
589
|
+
inactiveTabBorderColor: string;
|
|
590
|
+
inactiveTabBackgroundBase: string;
|
|
591
|
+
inactiveTabBackgroundHover: string;
|
|
592
|
+
inactiveTabBackgroundActive: string;
|
|
593
|
+
activeTabText: string;
|
|
594
|
+
inactiveTabTextBase: string;
|
|
595
|
+
inactiveTabHover: string;
|
|
555
596
|
actionColor: string;
|
|
556
597
|
actionColorHover: string;
|
|
557
598
|
actionColorDisabled: string;
|
|
@@ -632,9 +673,12 @@ export declare const useActiveTheme: () => {
|
|
|
632
673
|
dropdownActiveItemBackgroundDisabled: string;
|
|
633
674
|
dropdownActiveItemBorderBase: string;
|
|
634
675
|
dropdownActiveItemBorderHover: string;
|
|
676
|
+
dropdownGroupHeader: string;
|
|
635
677
|
selectedDropdownItemBackground: string;
|
|
636
678
|
alwaysVisibleLabelBackgroundHover: string;
|
|
637
679
|
selectedDropdownItemText: string;
|
|
680
|
+
useConnectedBackgroundBase: string;
|
|
681
|
+
useConnectedBackgroundHover: string;
|
|
638
682
|
copyButtonBackgroundBase: string;
|
|
639
683
|
copyButtonBackgroundHover: string;
|
|
640
684
|
copyButtonBackgroundActive: string;
|
|
@@ -685,6 +729,7 @@ export declare const useActiveTheme: () => {
|
|
|
685
729
|
buttonTextPrimary: string;
|
|
686
730
|
buttonTextSecondary: string;
|
|
687
731
|
buttonTextTertiary: string;
|
|
732
|
+
dropdownGroupHeader: string;
|
|
688
733
|
header: string;
|
|
689
734
|
inputAmount: string;
|
|
690
735
|
txStatusDescription: string;
|
|
@@ -697,6 +742,7 @@ export declare const useActiveTheme: () => {
|
|
|
697
742
|
bold: string;
|
|
698
743
|
heavy: string;
|
|
699
744
|
cryptoCashToggle: string;
|
|
745
|
+
dropdownGroupHeader: string;
|
|
700
746
|
inputAmount: string;
|
|
701
747
|
inputLabel: string;
|
|
702
748
|
inputValue: string;
|
|
@@ -790,6 +836,10 @@ export declare const useActiveTheme: () => {
|
|
|
790
836
|
fontSize: string;
|
|
791
837
|
lineHeight: string;
|
|
792
838
|
};
|
|
839
|
+
dropdownGroupHeader: {
|
|
840
|
+
fontSize: string;
|
|
841
|
+
lineHeight: string;
|
|
842
|
+
};
|
|
793
843
|
inputAmount: {
|
|
794
844
|
fontSize: string;
|
|
795
845
|
lineHeight: string;
|
|
@@ -890,6 +940,14 @@ export declare const useActiveTheme: () => {
|
|
|
890
940
|
fontSize: string;
|
|
891
941
|
lineHeight: string;
|
|
892
942
|
};
|
|
943
|
+
paymentFeeSummaryTooltip: {
|
|
944
|
+
fontSize: string;
|
|
945
|
+
lineHeight: string;
|
|
946
|
+
};
|
|
947
|
+
tooltipContent: {
|
|
948
|
+
fontSize: string;
|
|
949
|
+
lineHeight: string;
|
|
950
|
+
};
|
|
893
951
|
};
|
|
894
952
|
radii: {
|
|
895
953
|
actionButton: string;
|
|
@@ -917,6 +975,8 @@ export declare const useActiveTheme: () => {
|
|
|
917
975
|
activeOptionBorderWidth: string;
|
|
918
976
|
buttonTertiaryBorderWidth: string;
|
|
919
977
|
cryptoCashToggleContainerBorderWidth: string;
|
|
978
|
+
cryptoCashToggleActiveTabBorderWidth: string;
|
|
979
|
+
cryptoCashToggleInactiveTabBorderWidth: string;
|
|
920
980
|
txSummaryBoxBorderWidth: string;
|
|
921
981
|
};
|
|
922
982
|
shadows: {
|
|
@@ -952,6 +1012,13 @@ export declare const useActiveTheme: () => {
|
|
|
952
1012
|
cryptoCashToggleMarginBottom: string;
|
|
953
1013
|
cryptoCashToggleMarginTop: string;
|
|
954
1014
|
cryptoCashToggleTabPaddingY: string;
|
|
1015
|
+
dropdownItemIconGap: string;
|
|
1016
|
+
dropdownItemPaddingX: string;
|
|
1017
|
+
dropdownItemPaddingY: string;
|
|
1018
|
+
dropdownCompactPaddingX: string;
|
|
1019
|
+
dropdownCompactPaddingY: string;
|
|
1020
|
+
dropdownPaddingX: string;
|
|
1021
|
+
dropdownPaddingY: string;
|
|
955
1022
|
modalBaseHorizontalPadding: string;
|
|
956
1023
|
modalBottomBarButtonPaddingY: string;
|
|
957
1024
|
modalBottomHorizontalPadding: string;
|
|
@@ -980,6 +1047,7 @@ export declare const useActiveTheme: () => {
|
|
|
980
1047
|
inputPaddingY: string;
|
|
981
1048
|
dropdownActiveItemRegularSizePaddingY: string;
|
|
982
1049
|
assetListDefaultGap: string;
|
|
1050
|
+
dropdownGroupDividerMarginY: string;
|
|
983
1051
|
};
|
|
984
1052
|
textTransforms: {
|
|
985
1053
|
inputAmountQuickOptionButton: string;
|
|
@@ -1040,6 +1108,13 @@ export declare const useActiveTheme: () => {
|
|
|
1040
1108
|
inputBorderHover: string;
|
|
1041
1109
|
activeTabBorderColor: string;
|
|
1042
1110
|
activeTabBackground: string;
|
|
1111
|
+
inactiveTabBorderColor: string;
|
|
1112
|
+
inactiveTabBackgroundBase: string;
|
|
1113
|
+
inactiveTabBackgroundHover: string;
|
|
1114
|
+
inactiveTabBackgroundActive: string;
|
|
1115
|
+
activeTabText: string;
|
|
1116
|
+
inactiveTabTextBase: string;
|
|
1117
|
+
inactiveTabHover: string;
|
|
1043
1118
|
actionColor: string;
|
|
1044
1119
|
actionColorHover: string;
|
|
1045
1120
|
actionColorDisabled: string;
|
|
@@ -1120,9 +1195,12 @@ export declare const useActiveTheme: () => {
|
|
|
1120
1195
|
dropdownActiveItemBackgroundDisabled: string;
|
|
1121
1196
|
dropdownActiveItemBorderBase: string;
|
|
1122
1197
|
dropdownActiveItemBorderHover: string;
|
|
1198
|
+
dropdownGroupHeader: string;
|
|
1123
1199
|
selectedDropdownItemBackground: string;
|
|
1124
1200
|
alwaysVisibleLabelBackgroundHover: string;
|
|
1125
1201
|
selectedDropdownItemText: string;
|
|
1202
|
+
useConnectedBackgroundBase: string;
|
|
1203
|
+
useConnectedBackgroundHover: string;
|
|
1126
1204
|
copyButtonBackgroundBase: string;
|
|
1127
1205
|
copyButtonBackgroundHover: string;
|
|
1128
1206
|
copyButtonBackgroundActive: string;
|
|
@@ -1173,6 +1251,7 @@ export declare const useActiveTheme: () => {
|
|
|
1173
1251
|
buttonTextPrimary: string;
|
|
1174
1252
|
buttonTextSecondary: string;
|
|
1175
1253
|
buttonTextTertiary: string;
|
|
1254
|
+
dropdownGroupHeader: string;
|
|
1176
1255
|
header: string;
|
|
1177
1256
|
inputAmount: string;
|
|
1178
1257
|
txStatusDescription: string;
|
|
@@ -1185,6 +1264,7 @@ export declare const useActiveTheme: () => {
|
|
|
1185
1264
|
bold: string;
|
|
1186
1265
|
heavy: string;
|
|
1187
1266
|
cryptoCashToggle: string;
|
|
1267
|
+
dropdownGroupHeader: string;
|
|
1188
1268
|
inputAmount: string;
|
|
1189
1269
|
inputLabel: string;
|
|
1190
1270
|
inputValue: string;
|
|
@@ -1278,6 +1358,10 @@ export declare const useActiveTheme: () => {
|
|
|
1278
1358
|
fontSize: string;
|
|
1279
1359
|
lineHeight: string;
|
|
1280
1360
|
};
|
|
1361
|
+
dropdownGroupHeader: {
|
|
1362
|
+
fontSize: string;
|
|
1363
|
+
lineHeight: string;
|
|
1364
|
+
};
|
|
1281
1365
|
inputAmount: {
|
|
1282
1366
|
fontSize: string;
|
|
1283
1367
|
lineHeight: string;
|
|
@@ -1378,6 +1462,14 @@ export declare const useActiveTheme: () => {
|
|
|
1378
1462
|
fontSize: string;
|
|
1379
1463
|
lineHeight: string;
|
|
1380
1464
|
};
|
|
1465
|
+
paymentFeeSummaryTooltip: {
|
|
1466
|
+
fontSize: string;
|
|
1467
|
+
lineHeight: string;
|
|
1468
|
+
};
|
|
1469
|
+
tooltipContent: {
|
|
1470
|
+
fontSize: string;
|
|
1471
|
+
lineHeight: string;
|
|
1472
|
+
};
|
|
1381
1473
|
};
|
|
1382
1474
|
radii: {
|
|
1383
1475
|
actionButton: string;
|
|
@@ -1405,6 +1497,8 @@ export declare const useActiveTheme: () => {
|
|
|
1405
1497
|
activeOptionBorderWidth: string;
|
|
1406
1498
|
buttonTertiaryBorderWidth: string;
|
|
1407
1499
|
cryptoCashToggleContainerBorderWidth: string;
|
|
1500
|
+
cryptoCashToggleActiveTabBorderWidth: string;
|
|
1501
|
+
cryptoCashToggleInactiveTabBorderWidth: string;
|
|
1408
1502
|
txSummaryBoxBorderWidth: string;
|
|
1409
1503
|
};
|
|
1410
1504
|
shadows: {
|
|
@@ -1440,6 +1534,13 @@ export declare const useActiveTheme: () => {
|
|
|
1440
1534
|
cryptoCashToggleMarginBottom: string;
|
|
1441
1535
|
cryptoCashToggleMarginTop: string;
|
|
1442
1536
|
cryptoCashToggleTabPaddingY: string;
|
|
1537
|
+
dropdownItemIconGap: string;
|
|
1538
|
+
dropdownItemPaddingX: string;
|
|
1539
|
+
dropdownItemPaddingY: string;
|
|
1540
|
+
dropdownCompactPaddingX: string;
|
|
1541
|
+
dropdownCompactPaddingY: string;
|
|
1542
|
+
dropdownPaddingX: string;
|
|
1543
|
+
dropdownPaddingY: string;
|
|
1443
1544
|
modalBaseHorizontalPadding: string;
|
|
1444
1545
|
modalBottomBarButtonPaddingY: string;
|
|
1445
1546
|
modalBottomHorizontalPadding: string;
|
|
@@ -1468,6 +1569,7 @@ export declare const useActiveTheme: () => {
|
|
|
1468
1569
|
inputPaddingY: string;
|
|
1469
1570
|
dropdownActiveItemRegularSizePaddingY: string;
|
|
1470
1571
|
assetListDefaultGap: string;
|
|
1572
|
+
dropdownGroupDividerMarginY: string;
|
|
1471
1573
|
};
|
|
1472
1574
|
textTransforms: {
|
|
1473
1575
|
inputAmountQuickOptionButton: string;
|
|
@@ -48,7 +48,7 @@ export declare const useFunkitAccount: () => {
|
|
|
48
48
|
addresses: readonly [Address, ...Address[]];
|
|
49
49
|
chain: import("viem").Chain | undefined;
|
|
50
50
|
chainId: number;
|
|
51
|
-
connector: import("
|
|
51
|
+
connector: import("wagmi").Connector;
|
|
52
52
|
isConnecting: false;
|
|
53
53
|
isDisconnected: false;
|
|
54
54
|
isReconnecting: false;
|
|
@@ -61,7 +61,7 @@ export declare const useFunkitAccount: () => {
|
|
|
61
61
|
addresses: readonly Address[] | undefined;
|
|
62
62
|
chain: import("viem").Chain | undefined;
|
|
63
63
|
chainId: number | undefined;
|
|
64
|
-
connector: import("
|
|
64
|
+
connector: import("wagmi").Connector | undefined;
|
|
65
65
|
isConnecting: false;
|
|
66
66
|
isDisconnected: false;
|
|
67
67
|
isReconnecting: true;
|
|
@@ -74,7 +74,7 @@ export declare const useFunkitAccount: () => {
|
|
|
74
74
|
addresses: readonly Address[] | undefined;
|
|
75
75
|
chain: import("viem").Chain | undefined;
|
|
76
76
|
chainId: number | undefined;
|
|
77
|
-
connector: import("
|
|
77
|
+
connector: import("wagmi").Connector | undefined;
|
|
78
78
|
isReconnecting: false;
|
|
79
79
|
isConnecting: true;
|
|
80
80
|
isDisconnected: false;
|
|
@@ -99,7 +99,7 @@ export declare const useFunkitReconnect: () => UseReconnectReturnType;
|
|
|
99
99
|
export declare const useFunkitSwitchChains: ({ onSettled, }: {
|
|
100
100
|
onSettled?: () => void;
|
|
101
101
|
}) => {
|
|
102
|
-
switchChain: import("wagmi/query").SwitchChainMutate<import("
|
|
103
|
-
switchChainAsync: import("wagmi/query").SwitchChainMutateAsync<import("
|
|
102
|
+
switchChain: import("wagmi/query").SwitchChainMutate<import("wagmi").Config, undefined>;
|
|
103
|
+
switchChainAsync: import("wagmi/query").SwitchChainMutateAsync<import("wagmi").Config, undefined>;
|
|
104
104
|
pendingChainId: number | null;
|
|
105
105
|
};
|
package/dist/themes/baseTheme.js
CHANGED
package/dist/themes/darkTheme.js
CHANGED
package/dist/utils/bluvo.d.ts
CHANGED
|
@@ -52,6 +52,104 @@ export declare function getBluvoError<OriginalBluvoError extends {
|
|
|
52
52
|
* @throws - {@link BluvoWithdrawalError} if the response is invalid or if the withdrawal fails
|
|
53
53
|
*
|
|
54
54
|
*/
|
|
55
|
-
export declare const normalizeWithdrawalResponse: (response: BluvoExecuteWithdrawalResponse) =>
|
|
55
|
+
export declare const normalizeWithdrawalResponse: (response: BluvoExecuteWithdrawalResponse) => {
|
|
56
|
+
[key: string]: unknown;
|
|
57
|
+
transactionId: string;
|
|
58
|
+
} | {
|
|
59
|
+
[key: string]: unknown;
|
|
60
|
+
bizNo: string;
|
|
61
|
+
steps: Array<{
|
|
62
|
+
type: import("@bluvo/sdk-ts").TypeEnum3;
|
|
63
|
+
status: import("@bluvo/sdk-ts").StatusEnum4;
|
|
64
|
+
required: boolean;
|
|
65
|
+
metadata?: {
|
|
66
|
+
email?: string;
|
|
67
|
+
emailSent?: boolean;
|
|
68
|
+
qrCodeUrl?: string;
|
|
69
|
+
qrCodeValidSeconds?: number;
|
|
70
|
+
[key: string]: unknown | string | boolean | number | undefined;
|
|
71
|
+
};
|
|
72
|
+
[key: string]: unknown | import("@bluvo/sdk-ts").TypeEnum3 | import("@bluvo/sdk-ts").StatusEnum4 | boolean | {
|
|
73
|
+
email?: string;
|
|
74
|
+
emailSent?: boolean;
|
|
75
|
+
qrCodeUrl?: string;
|
|
76
|
+
qrCodeValidSeconds?: number;
|
|
77
|
+
[key: string]: unknown | string | boolean | number | undefined;
|
|
78
|
+
} | undefined;
|
|
79
|
+
}>;
|
|
80
|
+
relation: import("@bluvo/sdk-ts").RelationEnum;
|
|
81
|
+
mfa?: {
|
|
82
|
+
bizNo?: string;
|
|
83
|
+
verified: {
|
|
84
|
+
EMAIL?: boolean;
|
|
85
|
+
SMS?: boolean;
|
|
86
|
+
GOOGLE?: boolean;
|
|
87
|
+
FACE?: boolean;
|
|
88
|
+
};
|
|
89
|
+
attempts?: Array<{
|
|
90
|
+
method: import("@bluvo/sdk-ts").TypeEnum3;
|
|
91
|
+
status: import("@bluvo/sdk-ts").StatusEnum4;
|
|
92
|
+
createdAt: number;
|
|
93
|
+
validatedAt?: number;
|
|
94
|
+
expiresAt?: number;
|
|
95
|
+
success: boolean;
|
|
96
|
+
}>;
|
|
97
|
+
methods?: Array<{
|
|
98
|
+
method: "EMAIL";
|
|
99
|
+
email: string;
|
|
100
|
+
} | {
|
|
101
|
+
method: "SMS";
|
|
102
|
+
phoneNumber: string;
|
|
103
|
+
} | {
|
|
104
|
+
method: "GOOGLE";
|
|
105
|
+
} | {
|
|
106
|
+
method: "FACE";
|
|
107
|
+
viaMobile: boolean;
|
|
108
|
+
}>;
|
|
109
|
+
};
|
|
110
|
+
} | {
|
|
111
|
+
[key: string]: unknown;
|
|
112
|
+
bizNo?: string;
|
|
113
|
+
steps?: Array<{
|
|
114
|
+
type: string;
|
|
115
|
+
status: import("@bluvo/sdk-ts").StatusEnum4;
|
|
116
|
+
error?: string;
|
|
117
|
+
[key: string]: unknown | string | import("@bluvo/sdk-ts").StatusEnum4 | undefined;
|
|
118
|
+
}>;
|
|
119
|
+
mfa?: {
|
|
120
|
+
bizNo?: string;
|
|
121
|
+
verified: {
|
|
122
|
+
EMAIL?: boolean;
|
|
123
|
+
SMS?: boolean;
|
|
124
|
+
GOOGLE?: boolean;
|
|
125
|
+
FACE?: boolean;
|
|
126
|
+
};
|
|
127
|
+
attempts?: Array<{
|
|
128
|
+
method: import("@bluvo/sdk-ts").TypeEnum3;
|
|
129
|
+
status: import("@bluvo/sdk-ts").StatusEnum4;
|
|
130
|
+
createdAt: number;
|
|
131
|
+
validatedAt?: number;
|
|
132
|
+
expiresAt?: number;
|
|
133
|
+
success: boolean;
|
|
134
|
+
}>;
|
|
135
|
+
methods?: Array<{
|
|
136
|
+
method: "EMAIL";
|
|
137
|
+
email: string;
|
|
138
|
+
} | {
|
|
139
|
+
method: "SMS";
|
|
140
|
+
phoneNumber: string;
|
|
141
|
+
} | {
|
|
142
|
+
method: "GOOGLE";
|
|
143
|
+
} | {
|
|
144
|
+
method: "FACE";
|
|
145
|
+
viaMobile: boolean;
|
|
146
|
+
}>;
|
|
147
|
+
};
|
|
148
|
+
} | {
|
|
149
|
+
[key: string]: unknown;
|
|
150
|
+
valid2FAMethods: Array<string>;
|
|
151
|
+
} | {
|
|
152
|
+
[key: string]: unknown;
|
|
153
|
+
} | undefined;
|
|
56
154
|
export declare const isBluvoWithdrawalError: (error: unknown) => error is BluvoWithdrawalError;
|
|
57
155
|
export {};
|
package/dist/utils/checkout.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ type ValidateCheckoutConfigReturn = Promise<{
|
|
|
25
25
|
* @param config - The checkout configuration to validate.
|
|
26
26
|
* @returns An object indicating whether the configuration is valid and a message if it is not.
|
|
27
27
|
*/
|
|
28
|
-
export declare function validateCheckoutConfig(config: Partial<FunkitCheckoutConfig
|
|
28
|
+
export declare function validateCheckoutConfig(config: Partial<FunkitCheckoutConfig>, apiKey: string): ValidateCheckoutConfigReturn;
|
|
29
29
|
export declare const hasSufficientBalance: (wagmiConfig: UseConfigReturnType, walletAddress: string, tokenAddress: string, tokenChainId: string, requiredAssetAmount: number) => Promise<{
|
|
30
30
|
balance: number;
|
|
31
31
|
result: boolean;
|
package/dist/utils/swapped.d.ts
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Keys are chainId strings. Values are arrays of token addresses,
|
|
3
|
+
* or ["*"] to disable the entire chain.
|
|
4
|
+
*/
|
|
5
|
+
export type DisabledChainsAndAssets = Record<string, string[]>;
|
|
6
|
+
/** Returns true if an entire chain is disabled (has ["*"]). */
|
|
7
|
+
export declare function isChainDisabled(disabledConfig: DisabledChainsAndAssets, chainId: number | string): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Returns true if a specific chain + asset combination is disabled.
|
|
10
|
+
* - If the chain has ["*"], the entire chain (and all its assets) is disabled.
|
|
11
|
+
* - If the chain has specific addresses, only those tokens are disabled.
|
|
12
|
+
* - Address comparison is case-insensitive.
|
|
13
|
+
*/
|
|
14
|
+
export declare function isAssetDisabled(disabledConfig: DisabledChainsAndAssets, chainId: number | string, tokenAddress: string): boolean;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { GetSupportedAssetsResponse } from '@funkit/api-base';
|
|
2
|
+
/** Raw asset entry from the Statsig tokentransferconfig */
|
|
3
|
+
export interface TokenTransferAssetConfig {
|
|
4
|
+
address: string;
|
|
5
|
+
}
|
|
6
|
+
/** Raw chain entry from the Statsig tokentransferconfig */
|
|
7
|
+
export interface TokenTransferChainConfig {
|
|
8
|
+
readonly chainId: number;
|
|
9
|
+
readonly isDefault?: boolean;
|
|
10
|
+
readonly assets: readonly TokenTransferAssetConfig[];
|
|
11
|
+
}
|
|
12
|
+
/** The full output of useTokenTransferConfig */
|
|
13
|
+
export interface TokenTransferConfig {
|
|
14
|
+
/** Supported assets filtered by config, keyed by [chainId][address] */
|
|
15
|
+
supportedAssets: GetSupportedAssetsResponse;
|
|
16
|
+
/** Backward-compatible Record<number, string[]> (chainId -> symbol[]) */
|
|
17
|
+
symbolsByChainId: Record<number, string[]>;
|
|
18
|
+
/** Chain IDs in config display order */
|
|
19
|
+
chainIdSortOrder: number[];
|
|
20
|
+
/** Default chain ID (from isDefault on chain entry) */
|
|
21
|
+
defaultChainId: number | undefined;
|
|
22
|
+
/** Token symbols to prioritize at the top of the dropdown */
|
|
23
|
+
priorityTokenSymbols: string[];
|
|
24
|
+
/** True while /assets/supported is still loading */
|
|
25
|
+
isLoading: boolean;
|
|
26
|
+
}
|