@funkit/connect 5.5.21 → 6.0.2
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 +49 -0
- package/dist/{chunk-ES634CAR.js → chunk-IOMUPAAW.js} +1 -1
- package/dist/{chunk-OV3P5HQK.js → chunk-IVQ57535.js} +5 -3
- package/dist/{chunk-K4APSFTL.js → chunk-N6UWLAUQ.js} +1 -1
- package/dist/components/Box/Box.d.ts +17 -17
- package/dist/components/Dialog/Dialog.css.d.ts +2 -1
- package/dist/components/Dialog/hooks.d.ts +11 -0
- package/dist/components/FunBottomBar/FunBottomBar.css.d.ts +0 -1
- package/dist/components/FunButton/FunButton.d.ts +2 -1
- package/dist/components/FunCheckoutHistory/FunCheckoutStatus.css.d.ts +0 -2
- package/dist/components/FunCheckoutHistory/FunCheckoutStatus.d.ts +1 -12
- package/dist/components/FunCheckoutHistory/FunDirectExecutionStatus.d.ts +1 -1
- package/dist/components/FunCountdown/FunCountdown.d.ts +1 -4
- package/dist/components/FunInfoBanner/InfoBanner.d.ts +2 -2
- package/dist/components/FunPayments/FunPaymentMethods.d.ts +2 -11
- package/dist/components/Icons/SpinnerIcon.d.ts +4 -2
- package/dist/components/Icons/StatusIcons.css.d.ts +16 -0
- package/dist/components/Icons/StatusIcons.d.ts +8 -8
- package/dist/components/ReceiveAmount/ReceiveAmount.d.ts +5 -3
- package/dist/components/TransactionStatus/TransactionStatus.d.ts +10 -0
- package/dist/consts/customers.d.ts +1 -1
- package/dist/css/sprinkles.css.d.ts +23 -19
- package/dist/domains/fees.d.ts +2 -3
- package/dist/domains/meld.d.ts +4 -3
- package/dist/domains/paymentMethods.d.ts +1 -8
- package/dist/domains/quote.d.ts +2 -3
- package/dist/hooks/useCheckoutDirectExecution.d.ts +1 -0
- package/dist/hooks/usePaymentSources.d.ts +0 -1
- package/dist/index.css +2792 -2767
- package/dist/index.js +4228 -5886
- package/dist/modals/CheckoutModal/InputAmount/InputAmount.d.ts +0 -1
- package/dist/modals/CheckoutModal/InputAmount/InputAmountLoading.d.ts +1 -1
- package/dist/modals/CheckoutModal/LoadingAccount.d.ts +0 -1
- package/dist/modals/CheckoutModal/SelectAsset.d.ts +0 -1
- package/dist/modals/CheckoutModal/SourceChange/SourceChange.d.ts +2 -7
- package/dist/modals/CheckoutModal/TransferToken/TransferToken.d.ts +0 -1
- package/dist/modals/CheckoutModal/VirtualFiatAccount/FiatAccountDetail.d.ts +0 -1
- package/dist/modals/CheckoutModal/stepTransition.d.ts +0 -12
- package/dist/modals/CheckoutModal/useSourceAssetConfirm.d.ts +1 -3
- package/dist/providers/FunkitCheckoutContext.d.ts +6 -0
- package/dist/providers/FunkitConfigContext.d.ts +2 -0
- package/dist/providers/FunkitMeshProvider.d.ts +1 -19
- package/dist/providers/FunkitThemeProvider.d.ts +9 -3
- package/dist/themes/baseTheme.js +1 -1
- package/dist/themes/darkTheme.js +2 -2
- package/dist/themes/lightTheme.js +2 -2
- package/dist/utils/checkout.d.ts +9 -1
- package/dist/utils/flags/impl.d.ts +1 -0
- package/dist/utils/flags/types.d.ts +3 -2
- 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 +53 -53
- 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 +6 -6
- package/dist/components/Icons/EtherFiIcon.d.ts +0 -4
- package/dist/hooks/useMesh.d.ts +0 -19
- package/dist/modals/CheckoutModal/ConnectExchange.d.ts +0 -12
- package/dist/modals/CheckoutModal/MeshVerification.d.ts +0 -17
- package/dist/modals/CheckoutModal/SelectBrokerage.d.ts +0 -14
|
@@ -4,5 +4,5 @@ interface InputAmountLoadingProps extends ModalStepComponentProps<FunCheckoutSte
|
|
|
4
4
|
sourceHoldingError: Error | null;
|
|
5
5
|
unitPriceError: Error | null;
|
|
6
6
|
}
|
|
7
|
-
export declare function InputAmountLoading({ modalState,
|
|
7
|
+
export declare function InputAmountLoading({ modalState, sourceHoldingError, unitPriceError, }: InputAmountLoadingProps): React.JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -4,7 +4,6 @@ import { type ConnectablePaymentMethodInfo, PaymentMethod, type PaymentMethodAcc
|
|
|
4
4
|
import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from './stepTransition';
|
|
5
5
|
export type LoadingAccountState = CheckoutModalCommonState;
|
|
6
6
|
type UserEntryContext<T> = T & {
|
|
7
|
-
newUser?: boolean;
|
|
8
7
|
startingStep?: FunCheckoutStartingStep;
|
|
9
8
|
};
|
|
10
9
|
export type LoadingAccountNext = UserEntryContext<{
|
|
@@ -4,7 +4,6 @@ import { type PaymentMethodAccountInfo, type PaymentMethodBrokerageInfo } from '
|
|
|
4
4
|
import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from './stepTransition';
|
|
5
5
|
export type SelectAssetState = CheckoutModalCommonState & {
|
|
6
6
|
paymentMethodInfo: PaymentMethodBrokerageInfo | PaymentMethodAccountInfo;
|
|
7
|
-
newUser?: boolean;
|
|
8
7
|
};
|
|
9
8
|
export type SelectAssetNext = {
|
|
10
9
|
paymentMethodInfo?: PaymentMethodBrokerageInfo | PaymentMethodAccountInfo;
|
|
@@ -3,12 +3,8 @@ import { type ConnectablePaymentMethodInfo, PaymentMethod, type PaymentMethodCar
|
|
|
3
3
|
import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
|
|
4
4
|
export type SourceChangeState = CheckoutModalCommonState & {
|
|
5
5
|
paymentMethodInfo: ConnectablePaymentMethodInfo | null;
|
|
6
|
-
newUser?: boolean;
|
|
7
6
|
};
|
|
8
|
-
type
|
|
9
|
-
newUser?: boolean;
|
|
10
|
-
};
|
|
11
|
-
export type SourceChangeNext = WithNewUser<{
|
|
7
|
+
export type SourceChangeNext = {
|
|
12
8
|
connectNew: false;
|
|
13
9
|
paymentMethodInfo: ConnectablePaymentMethodInfo;
|
|
14
10
|
brokerageFailed: false;
|
|
@@ -29,7 +25,6 @@ export type SourceChangeNext = WithNewUser<{
|
|
|
29
25
|
} | {
|
|
30
26
|
brokerageFailed: true;
|
|
31
27
|
paymentMethodInfo: ConnectablePaymentMethodInfo;
|
|
32
|
-
}
|
|
28
|
+
};
|
|
33
29
|
export declare const SourceChangeInfo: ModalStepInfo<FunCheckoutStep.SOURCE_CHANGE>;
|
|
34
30
|
export declare function SourceChange({ modalState, onNext, onClose, setModalState, }: ModalStepComponentProps<FunCheckoutStep.SOURCE_CHANGE>): React.JSX.Element;
|
|
35
|
-
export {};
|
|
@@ -3,7 +3,6 @@ import { type TransferTokenDefault } from '~/hooks/useTokenChain';
|
|
|
3
3
|
import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
|
|
4
4
|
export type TransferTokenState = CheckoutModalCommonState & {
|
|
5
5
|
transferToken?: TransferTokenDefault;
|
|
6
|
-
newUser?: boolean;
|
|
7
6
|
};
|
|
8
7
|
export type TransferTokenNext = Record<string, never>;
|
|
9
8
|
export interface TokenTransferSourceChainsAndAssets {
|
|
@@ -3,7 +3,6 @@ import { type PaymentMethodVirtualBankInfo } from '~/domains/paymentMethods';
|
|
|
3
3
|
import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
|
|
4
4
|
export type FiatAccountDetailState = CheckoutModalCommonState & {
|
|
5
5
|
paymentMethodInfo: PaymentMethodVirtualBankInfo;
|
|
6
|
-
newUser?: boolean;
|
|
7
6
|
};
|
|
8
7
|
export type FiatAccountDetailNext = Record<string, never>;
|
|
9
8
|
export declare const AccountDetailsScreen: ({ modalState, onNext, }: ModalStepComponentProps<FunCheckoutStep.FIAT_ACCOUNT_DETAIL>) => React.JSX.Element;
|
|
@@ -8,16 +8,13 @@ import { type FunkitTextCustomizationsConfig } from '../../providers/FunkitConfi
|
|
|
8
8
|
import { type CheckoutCompleteNext, type CheckoutCompleteState } from './CheckoutComplete/CheckoutComplete';
|
|
9
9
|
import { type CheckoutHelpState } from './CheckoutHelp/CheckoutHelp';
|
|
10
10
|
import { type ConfirmationStepNext, type ConfirmationStepState } from './ConfirmationStep/ConfirmationStep';
|
|
11
|
-
import { type ConnectExchangeNext, type ConnectExchangeState } from './ConnectExchange';
|
|
12
11
|
import { type DirectExecutionNotifCenterState } from './DirectExecutionNotifCenter/DirectExecutionNotifCenter';
|
|
13
12
|
import { type InputAmountNext, type InputAmountState } from './InputAmount/InputAmount';
|
|
14
13
|
import { type LoadingAccountNext, type LoadingAccountState } from './LoadingAccount';
|
|
15
14
|
import { type MeldCurrencySelectNext, type MeldCurrencySelectState } from './MeldCurrencySelect/MeldCurrencySelect';
|
|
16
15
|
import { type MeldQuotesNext, type MeldQuotesState } from './MeldQuotes/MeldQuotes';
|
|
17
|
-
import { type MeshVerificationNext, type MeshVerificationState } from './MeshVerification';
|
|
18
16
|
import { type MoonpaySetupNext, type MoonpaySetupState } from './MoonpaySetup';
|
|
19
17
|
import { type SelectAssetNext, type SelectAssetState } from './SelectAsset';
|
|
20
|
-
import { type SelectBrokerageNext, type SelectBrokerageState } from './SelectBrokerage';
|
|
21
18
|
import { type SourceChangeNext, type SourceChangeState } from './SourceChange/SourceChange';
|
|
22
19
|
import { type TransferTokenNext, type TransferTokenState } from './TransferToken/TransferToken';
|
|
23
20
|
import { type FiatAccountDetailNext, type FiatAccountDetailState } from './VirtualFiatAccount/FiatAccountDetail';
|
|
@@ -47,10 +44,7 @@ export declare enum FunCheckoutStep {
|
|
|
47
44
|
SOURCE_CHANGE = "source_change",
|
|
48
45
|
CONFIRMATION = "confirmation",
|
|
49
46
|
MOONPAY_SETUP = "payment_setup",
|
|
50
|
-
SELECT_BROKERAGE = "select_brokerage",
|
|
51
|
-
CONNECT_EXCHANGE = "connect_exchange",
|
|
52
47
|
SELECT_ASSET = "select_asset",
|
|
53
|
-
MESH_VERIFICATION = "mesh_verification",
|
|
54
48
|
CHECKOUT_COMPLETE = "checkout_complete",
|
|
55
49
|
CHECKOUT_HELP = "checkout_help",
|
|
56
50
|
TRANSFER_TOKEN = "transfer_token",
|
|
@@ -91,13 +85,10 @@ type CheckoutModalState<S extends FunCheckoutStep = FunCheckoutStep> = {
|
|
|
91
85
|
[FunCheckoutStep.CHECKOUT_COMPLETE]: CheckoutCompleteState;
|
|
92
86
|
[FunCheckoutStep.CHECKOUT_HELP]: CheckoutHelpState;
|
|
93
87
|
[FunCheckoutStep.CONFIRMATION]: ConfirmationStepState;
|
|
94
|
-
[FunCheckoutStep.CONNECT_EXCHANGE]: ConnectExchangeState;
|
|
95
88
|
[FunCheckoutStep.INPUT_AMOUNT]: InputAmountState;
|
|
96
89
|
[FunCheckoutStep.LOADING_ACCOUNT]: LoadingAccountState;
|
|
97
|
-
[FunCheckoutStep.MESH_VERIFICATION]: MeshVerificationState;
|
|
98
90
|
[FunCheckoutStep.MOONPAY_SETUP]: MoonpaySetupState;
|
|
99
91
|
[FunCheckoutStep.SELECT_ASSET]: SelectAssetState;
|
|
100
|
-
[FunCheckoutStep.SELECT_BROKERAGE]: SelectBrokerageState;
|
|
101
92
|
[FunCheckoutStep.SOURCE_CHANGE]: SourceChangeState;
|
|
102
93
|
[FunCheckoutStep.TRANSFER_TOKEN]: TransferTokenState;
|
|
103
94
|
[FunCheckoutStep.CREATE_FIAT_ACCOUNT]: VirtualFiatAccountState;
|
|
@@ -117,13 +108,10 @@ type NextPayload<S extends FunCheckoutStep = FunCheckoutStep> = {
|
|
|
117
108
|
[FunCheckoutStep.CHECKOUT_HELP]: null;
|
|
118
109
|
[FunCheckoutStep.CHECKOUT_COMPLETE]: CheckoutCompleteNext;
|
|
119
110
|
[FunCheckoutStep.CONFIRMATION]: ConfirmationStepNext;
|
|
120
|
-
[FunCheckoutStep.CONNECT_EXCHANGE]: ConnectExchangeNext;
|
|
121
111
|
[FunCheckoutStep.INPUT_AMOUNT]: InputAmountNext;
|
|
122
112
|
[FunCheckoutStep.LOADING_ACCOUNT]: LoadingAccountNext;
|
|
123
|
-
[FunCheckoutStep.MESH_VERIFICATION]: MeshVerificationNext;
|
|
124
113
|
[FunCheckoutStep.MOONPAY_SETUP]: MoonpaySetupNext;
|
|
125
114
|
[FunCheckoutStep.SELECT_ASSET]: SelectAssetNext;
|
|
126
|
-
[FunCheckoutStep.SELECT_BROKERAGE]: SelectBrokerageNext;
|
|
127
115
|
[FunCheckoutStep.SOURCE_CHANGE]: SourceChangeNext;
|
|
128
116
|
[FunCheckoutStep.TRANSFER_TOKEN]: TransferTokenNext;
|
|
129
117
|
[FunCheckoutStep.CREATE_FIAT_ACCOUNT]: VirtualFiatAccountNext;
|
|
@@ -7,9 +7,7 @@ export interface SourceAssetConfirmed {
|
|
|
7
7
|
isQuoteSuccess: boolean;
|
|
8
8
|
maxTargetAssetAmount: number | undefined;
|
|
9
9
|
}
|
|
10
|
-
export declare function preparePaymentMethodInfo(selectedPaymentMethodInfo: PaymentMethodInfo | null
|
|
11
|
-
meshNetworkId: string | undefined;
|
|
12
|
-
} | null): PaymentMethodInfo;
|
|
10
|
+
export declare function preparePaymentMethodInfo(selectedPaymentMethodInfo: PaymentMethodInfo | null): PaymentMethodInfo;
|
|
13
11
|
export declare function fetchSponsorInitialTransferGasLimit(selectedPaymentMethodInfo: PaymentMethodInfo | null, loginType: LoginType, generateCheckoutTransferOpItems: (toAddress: string, tokenAmount: number | string) => Promise<{
|
|
14
12
|
transferOp: Operation | null;
|
|
15
13
|
}>): Promise<number>;
|
|
@@ -160,6 +160,8 @@ export interface FunkitActiveWithdrawalItem {
|
|
|
160
160
|
}
|
|
161
161
|
interface FunkitCheckoutContextInterface {
|
|
162
162
|
checkoutItem: FunkitActiveCheckoutItem | null;
|
|
163
|
+
getCheckoutProgress(checkoutId: string): CheckoutProgress | undefined;
|
|
164
|
+
setCheckoutProgress(checkoutId: string, progress: CheckoutProgress): void;
|
|
163
165
|
initNewCheckout(initSettings: UseFunkitCheckoutPropsWithFullConfig): string;
|
|
164
166
|
updateModalTitleMeta(newMeta: string): void;
|
|
165
167
|
updateSourceAsset(selectedSource: Omit<AssetHoldingsItem, 'amount' | 'usdAmount' | 'chainSymbolKey'>): void;
|
|
@@ -182,6 +184,10 @@ interface FunkitCheckoutContextInterface {
|
|
|
182
184
|
initNewWithdrawal(initSettings: Partial<UseFunkitCheckoutPropsWithFullConfig>): string;
|
|
183
185
|
updateWithdrawalSourceAssetAmount(newSourceAmount: number): void;
|
|
184
186
|
}
|
|
187
|
+
export type CheckoutProgressStep = 1 | 2;
|
|
188
|
+
export type CheckoutProgress = {
|
|
189
|
+
step: CheckoutProgressStep;
|
|
190
|
+
};
|
|
185
191
|
export declare function FunkitCheckoutProvider({ children }: {
|
|
186
192
|
children: ReactNode;
|
|
187
193
|
}): React.JSX.Element;
|
|
@@ -35,6 +35,8 @@ export interface FunkitUiCustomizationsConfig {
|
|
|
35
35
|
showReceiveAmountUsd?: boolean;
|
|
36
36
|
/** Custom destination icon and text used in checkout summary */
|
|
37
37
|
destinationConfig?: FunkitUiDestinationConfig;
|
|
38
|
+
/** when source and destination are the same address, show destination as payment method instead of source */
|
|
39
|
+
preferDestinationWhenSame?: boolean;
|
|
38
40
|
};
|
|
39
41
|
inputAmountScreen?: {
|
|
40
42
|
/** Whether to allow entering an amount of tokens, rather than only USD - defaults to true */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { type ReactNode } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import type { MeshExchangeType } from '~/consts/mesh';
|
|
3
3
|
export interface MeshConnectionInfo {
|
|
4
4
|
accessToken: string;
|
|
5
5
|
accountId: string;
|
|
@@ -8,22 +8,4 @@ export interface MeshConnectionInfo {
|
|
|
8
8
|
export declare function FunkitMeshProvider({ children }: {
|
|
9
9
|
children: ReactNode;
|
|
10
10
|
}): React.JSX.Element;
|
|
11
|
-
export declare function useFunkitMesh(): {
|
|
12
|
-
getActiveConnection: (brokerType: MeshExchangeType) => MeshConnectionInfo | null;
|
|
13
|
-
getFirstActiveConnection: () => MeshConnectionInfo | null;
|
|
14
|
-
unlinkBrokerage: (brokerType: MeshExchangeType) => Promise<void>;
|
|
15
|
-
};
|
|
16
|
-
interface FunkitMeshHook {
|
|
17
|
-
onBeforeConnect(): void;
|
|
18
|
-
onConnected(connection: MeshConnectionInfo | null): void;
|
|
19
|
-
onMeshModalClose(): void;
|
|
20
|
-
}
|
|
21
11
|
export declare function getMeshDeviceIdFromLocalStorage(): string | null;
|
|
22
|
-
export declare function postTokensToProxyServer(apiKey: string, brokerType: string, accessToken: string, refreshToken: string | null, accessTokenExpiresIn: number, refreshTokenExpiresIn?: number): Promise<void>;
|
|
23
|
-
/**
|
|
24
|
-
* all hooks SHOULD be in object method style
|
|
25
|
-
* capturing the latest value in render.
|
|
26
|
-
* useMeshConnect will return a stable function.
|
|
27
|
-
* */
|
|
28
|
-
export declare function useMeshConnect(hooks: FunkitMeshHook): (brokerType: MeshExchangeType) => Promise<void>;
|
|
29
|
-
export {};
|
|
@@ -136,6 +136,7 @@ export declare const useActiveTheme: () => {
|
|
|
136
136
|
bold: string;
|
|
137
137
|
heavy: string;
|
|
138
138
|
modalTopbarTitle: string;
|
|
139
|
+
modalBottomBarButtonText: string;
|
|
139
140
|
};
|
|
140
141
|
fontSize: {
|
|
141
142
|
'10': {
|
|
@@ -222,7 +223,8 @@ export declare const useActiveTheme: () => {
|
|
|
222
223
|
spacing: {
|
|
223
224
|
modalBaseHorizontalPadding: string;
|
|
224
225
|
modalBottomHorizontalPadding: string;
|
|
225
|
-
|
|
226
|
+
modalPaddingBottomUpper: string;
|
|
227
|
+
modalPaddingBottomLower: string;
|
|
226
228
|
modalTopBarVerticalTextSpacing: string;
|
|
227
229
|
};
|
|
228
230
|
blurs: {
|
|
@@ -348,6 +350,7 @@ export declare const useActiveTheme: () => {
|
|
|
348
350
|
bold: string;
|
|
349
351
|
heavy: string;
|
|
350
352
|
modalTopbarTitle: string;
|
|
353
|
+
modalBottomBarButtonText: string;
|
|
351
354
|
};
|
|
352
355
|
fontSize: {
|
|
353
356
|
'10': {
|
|
@@ -434,7 +437,8 @@ export declare const useActiveTheme: () => {
|
|
|
434
437
|
spacing: {
|
|
435
438
|
modalBaseHorizontalPadding: string;
|
|
436
439
|
modalBottomHorizontalPadding: string;
|
|
437
|
-
|
|
440
|
+
modalPaddingBottomUpper: string;
|
|
441
|
+
modalPaddingBottomLower: string;
|
|
438
442
|
modalTopBarVerticalTextSpacing: string;
|
|
439
443
|
};
|
|
440
444
|
blurs: {
|
|
@@ -558,6 +562,7 @@ export declare const useActiveTheme: () => {
|
|
|
558
562
|
bold: string;
|
|
559
563
|
heavy: string;
|
|
560
564
|
modalTopbarTitle: string;
|
|
565
|
+
modalBottomBarButtonText: string;
|
|
561
566
|
};
|
|
562
567
|
fontSize: {
|
|
563
568
|
'10': {
|
|
@@ -644,7 +649,8 @@ export declare const useActiveTheme: () => {
|
|
|
644
649
|
spacing: {
|
|
645
650
|
modalBaseHorizontalPadding: string;
|
|
646
651
|
modalBottomHorizontalPadding: string;
|
|
647
|
-
|
|
652
|
+
modalPaddingBottomUpper: string;
|
|
653
|
+
modalPaddingBottomLower: string;
|
|
648
654
|
modalTopBarVerticalTextSpacing: string;
|
|
649
655
|
};
|
|
650
656
|
blurs: {
|
package/dist/themes/baseTheme.js
CHANGED
package/dist/themes/darkTheme.js
CHANGED
package/dist/utils/checkout.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type CheckoutHistoryItem, type CheckoutRefundState, CheckoutState, type DirectExecution } from '@funkit/api-base';
|
|
2
|
-
import { type CheckoutQuoteResponse } from '@funkit/utils';
|
|
2
|
+
import { type ApiFunkitCheckoutQuoteResult, type CheckoutQuoteResponse } from '@funkit/utils';
|
|
3
3
|
import { type Config } from '@wagmi/core';
|
|
4
4
|
import { type Address, type Hex } from 'viem';
|
|
5
5
|
import type { UseConfigReturnType } from 'wagmi';
|
|
@@ -78,6 +78,14 @@ export type TokenInfo = {
|
|
|
78
78
|
export declare function decorateTokenList(tokensChainMap: Record<string, Set<string>>, targetChainId: string, apiKey: string): Promise<TokenInfo[]>;
|
|
79
79
|
export declare function formatTokenAmountForMoonpay(amount: number, mpCurrencyCode: string): string;
|
|
80
80
|
export declare function getTimeFromNowSeconds(startTimeMs: number, durationMs: number): number;
|
|
81
|
+
export declare function getCheckoutReceivedAmount({ config, quote, }: {
|
|
82
|
+
config: FunkitCheckoutConfig | ServerCheckoutConfig;
|
|
83
|
+
quote: ApiFunkitCheckoutQuoteResult | null;
|
|
84
|
+
}): number;
|
|
85
|
+
export declare function getCheckoutReceivedAmountFormatted({ config, quote, }: {
|
|
86
|
+
config: FunkitCheckoutConfig | ServerCheckoutConfig;
|
|
87
|
+
quote: ApiFunkitCheckoutQuoteResult | null;
|
|
88
|
+
}): string;
|
|
81
89
|
/**
|
|
82
90
|
* Given a checkout config, returns the display string for the checkout item.
|
|
83
91
|
* Arbitrary action checkouts: Display the targetAssetAmount
|
|
@@ -2,6 +2,7 @@ import type { AbstractFlags, InferFlagType } from './types';
|
|
|
2
2
|
export interface UserContext {
|
|
3
3
|
apiKey: string;
|
|
4
4
|
userId?: string;
|
|
5
|
+
ipCountry: string | undefined;
|
|
5
6
|
}
|
|
6
7
|
export declare function fetchConfigFromServer<F extends AbstractFlags>(): Promise<F>;
|
|
7
8
|
export declare function deriveAllFlags<T extends AbstractFlags>(config: T, userContext: UserContext): {
|
|
@@ -26,14 +26,15 @@ type Override<T> = {
|
|
|
26
26
|
if_all?: Condition[];
|
|
27
27
|
value: T;
|
|
28
28
|
};
|
|
29
|
+
type ConditionKey = 'userId' | 'apiKey' | 'ipCountry';
|
|
29
30
|
export type Condition = {
|
|
30
31
|
type: 'pctRollout';
|
|
31
|
-
key:
|
|
32
|
+
key: ConditionKey;
|
|
32
33
|
/** whole number from 0 - 100 inclusive */
|
|
33
34
|
pct: number;
|
|
34
35
|
} | {
|
|
35
36
|
type: 'isAnyOf';
|
|
36
|
-
key:
|
|
37
|
+
key: ConditionKey;
|
|
37
38
|
/** non-empty list of API keys */
|
|
38
39
|
values: string[];
|
|
39
40
|
};
|
|
@@ -1,49 +1,49 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
} from "./chunk-
|
|
3
|
+
xdefiWallet
|
|
4
|
+
} from "./chunk-BOU4WKRZ.js";
|
|
5
5
|
import {
|
|
6
6
|
zealWallet
|
|
7
7
|
} from "./chunk-RNBEDQHF.js";
|
|
8
8
|
import {
|
|
9
9
|
zerionWallet
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import {
|
|
12
|
-
safepalWallet
|
|
13
|
-
} from "./chunk-EC6CHBSZ.js";
|
|
10
|
+
} from "./chunk-SULRQO27.js";
|
|
14
11
|
import {
|
|
15
12
|
tahoWallet
|
|
16
13
|
} from "./chunk-ZZZRUXZE.js";
|
|
14
|
+
import {
|
|
15
|
+
subWallet
|
|
16
|
+
} from "./chunk-JWFF4AAL.js";
|
|
17
17
|
import {
|
|
18
18
|
talismanWallet
|
|
19
19
|
} from "./chunk-DRO6WYMM.js";
|
|
20
20
|
import {
|
|
21
21
|
tokenPocketWallet
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-2L43XSW3.js";
|
|
23
23
|
import {
|
|
24
24
|
tokenaryWallet
|
|
25
25
|
} from "./chunk-D6AOOO5F.js";
|
|
26
|
-
import {
|
|
27
|
-
uniswapWallet
|
|
28
|
-
} from "./chunk-LH7BMNFZ.js";
|
|
29
26
|
import {
|
|
30
27
|
trustWallet
|
|
31
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-VYBAYMP3.js";
|
|
32
29
|
import {
|
|
33
|
-
|
|
34
|
-
} from "./chunk-
|
|
30
|
+
walletConnectWallet
|
|
31
|
+
} from "./chunk-NP5QGWNL.js";
|
|
35
32
|
import {
|
|
36
|
-
|
|
37
|
-
} from "./chunk-
|
|
33
|
+
uniswapWallet
|
|
34
|
+
} from "./chunk-LH7BMNFZ.js";
|
|
38
35
|
import {
|
|
39
36
|
phantomWallet
|
|
40
37
|
} from "./chunk-362NXNTM.js";
|
|
41
38
|
import {
|
|
42
|
-
|
|
43
|
-
} from "./chunk-
|
|
39
|
+
rabbyWallet
|
|
40
|
+
} from "./chunk-BBOM42DL.js";
|
|
44
41
|
import {
|
|
45
42
|
rainbowWallet
|
|
46
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-2KUBG3S6.js";
|
|
44
|
+
import {
|
|
45
|
+
roninWallet
|
|
46
|
+
} from "./chunk-NWIQNBJU.js";
|
|
47
47
|
import {
|
|
48
48
|
ramperWallet
|
|
49
49
|
} from "./chunk-BYXPFMI7.js";
|
|
@@ -54,23 +54,23 @@ import {
|
|
|
54
54
|
safeheronWallet
|
|
55
55
|
} from "./chunk-RZIO5TFF.js";
|
|
56
56
|
import {
|
|
57
|
-
|
|
58
|
-
} from "./chunk-
|
|
57
|
+
safepalWallet
|
|
58
|
+
} from "./chunk-NT2HYJKW.js";
|
|
59
|
+
import {
|
|
60
|
+
mewWallet
|
|
61
|
+
} from "./chunk-OL5ZO7E4.js";
|
|
59
62
|
import {
|
|
60
63
|
ledgerWallet
|
|
61
64
|
} from "./chunk-BRBKM4PW.js";
|
|
62
65
|
import {
|
|
63
|
-
|
|
64
|
-
} from "./chunk-
|
|
65
|
-
import {
|
|
66
|
-
mewWallet
|
|
67
|
-
} from "./chunk-OL5ZO7E4.js";
|
|
66
|
+
kresusWallet
|
|
67
|
+
} from "./chunk-MJXPRJZT.js";
|
|
68
68
|
import {
|
|
69
69
|
oktoWallet
|
|
70
70
|
} from "./chunk-ADIXAKUL.js";
|
|
71
71
|
import {
|
|
72
72
|
okxWallet
|
|
73
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-TDIEHTMB.js";
|
|
74
74
|
import {
|
|
75
75
|
omniWallet
|
|
76
76
|
} from "./chunk-7CUY5G6R.js";
|
|
@@ -82,72 +82,72 @@ import {
|
|
|
82
82
|
} from "./chunk-SHBUZ7U7.js";
|
|
83
83
|
import {
|
|
84
84
|
foxWallet
|
|
85
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-7QONTUXT.js";
|
|
86
86
|
import {
|
|
87
87
|
frameWallet
|
|
88
88
|
} from "./chunk-IFON7E6U.js";
|
|
89
89
|
import {
|
|
90
90
|
frontierWallet
|
|
91
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-TCAGNB4B.js";
|
|
92
|
+
import {
|
|
93
|
+
gateWallet
|
|
94
|
+
} from "./chunk-FKJJQNKX.js";
|
|
92
95
|
import {
|
|
93
96
|
imTokenWallet
|
|
94
97
|
} from "./chunk-COZ7MIQS.js";
|
|
95
|
-
import {
|
|
96
|
-
gateWallet
|
|
97
|
-
} from "./chunk-CJGUM55H.js";
|
|
98
98
|
import {
|
|
99
99
|
injectedWallet
|
|
100
100
|
} from "./chunk-XWUJE7MW.js";
|
|
101
101
|
import {
|
|
102
|
-
|
|
103
|
-
} from "./chunk-
|
|
102
|
+
metaMaskWallet
|
|
103
|
+
} from "./chunk-2HYNUNAS.js";
|
|
104
104
|
import {
|
|
105
|
-
|
|
106
|
-
} from "./chunk-
|
|
105
|
+
bybitWallet
|
|
106
|
+
} from "./chunk-2STUC6QL.js";
|
|
107
107
|
import {
|
|
108
108
|
clvWallet
|
|
109
|
-
} from "./chunk-
|
|
110
|
-
import {
|
|
111
|
-
coin98Wallet
|
|
112
|
-
} from "./chunk-KIDC67XJ.js";
|
|
109
|
+
} from "./chunk-M3NZ6R2E.js";
|
|
113
110
|
import {
|
|
114
111
|
coinbaseWallet
|
|
115
112
|
} from "./chunk-H4IRCEZN.js";
|
|
116
113
|
import {
|
|
117
|
-
|
|
118
|
-
} from "./chunk-
|
|
114
|
+
coin98Wallet
|
|
115
|
+
} from "./chunk-OBOVHCEI.js";
|
|
119
116
|
import {
|
|
120
117
|
dawnWallet
|
|
121
118
|
} from "./chunk-HWPKCIBE.js";
|
|
122
119
|
import {
|
|
123
|
-
|
|
124
|
-
} from "./chunk-
|
|
120
|
+
coreWallet
|
|
121
|
+
} from "./chunk-VR4TBQ6S.js";
|
|
125
122
|
import {
|
|
126
123
|
enkryptWallet
|
|
127
124
|
} from "./chunk-OLOIXTYS.js";
|
|
125
|
+
import {
|
|
126
|
+
desigWallet
|
|
127
|
+
} from "./chunk-OPAZMNA7.js";
|
|
128
128
|
import {
|
|
129
129
|
argentWallet
|
|
130
130
|
} from "./chunk-WSQ2YJO2.js";
|
|
131
|
-
import {
|
|
132
|
-
bitgetWallet
|
|
133
|
-
} from "./chunk-5W7VDOCL.js";
|
|
134
|
-
import {
|
|
135
|
-
bitverseWallet
|
|
136
|
-
} from "./chunk-3HZRRP4Y.js";
|
|
137
131
|
import {
|
|
138
132
|
bifrostWallet
|
|
139
|
-
} from "./chunk-
|
|
133
|
+
} from "./chunk-A5N6B5UW.js";
|
|
140
134
|
import {
|
|
141
135
|
bitskiWallet
|
|
142
136
|
} from "./chunk-HS3C7OQV.js";
|
|
137
|
+
import {
|
|
138
|
+
bitgetWallet
|
|
139
|
+
} from "./chunk-TDAVGY5F.js";
|
|
140
|
+
import {
|
|
141
|
+
bitverseWallet
|
|
142
|
+
} from "./chunk-3HZRRP4Y.js";
|
|
143
143
|
import {
|
|
144
144
|
bloomWallet
|
|
145
145
|
} from "./chunk-S27IADFU.js";
|
|
146
|
+
import "./chunk-23WIEY36.js";
|
|
146
147
|
import {
|
|
147
|
-
|
|
148
|
-
} from "./chunk-
|
|
148
|
+
braveWallet
|
|
149
|
+
} from "./chunk-BPZ2XJO2.js";
|
|
149
150
|
import "./chunk-DNSG5Q7V.js";
|
|
150
|
-
import "./chunk-23WIEY36.js";
|
|
151
151
|
export {
|
|
152
152
|
argentWallet,
|
|
153
153
|
bifrostWallet,
|