@funkit/connect 3.0.0-next.1 → 3.0.0-next.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 +21 -0
- package/dist/{chunk-SCKVYTAC.js → chunk-76VEFMWE.js} +5 -2
- package/dist/{chunk-LKYHSF23.js → chunk-Z3QREJ3Q.js} +6 -3
- package/dist/components/AsyncImage/AsyncImage.d.ts +3 -2
- package/dist/components/Box/Box.d.ts +28 -24
- package/dist/components/ChainModal/Chain.d.ts +1 -5
- package/dist/components/Dialog/Dialog.css.d.ts +1 -0
- package/dist/components/Dialog/Dialog.d.ts +3 -1
- package/dist/components/Dialog/DialogContent.css.d.ts +2 -0
- package/dist/components/DydxSwitchModalTab/DydxSwitchModalTab.d.ts +10 -0
- package/dist/components/DydxSwitchModalTab/Icons.d.ts +3 -0
- package/dist/components/FunAsset/FunAssetItem.d.ts +1 -1
- package/dist/components/FunBadge/FunBadge.d.ts +2 -1
- package/dist/components/FunButton/FunButton.css.d.ts +3 -2
- package/dist/components/FunButton/FunIconButton.d.ts +24 -15
- package/dist/components/FunButton/FunRedirectButton.d.ts +8 -0
- package/dist/components/FunCheckoutModal/FunCheckoutPrimaryInfo.d.ts +4 -2
- package/dist/components/FunCheckoutModal/FunCheckoutVerifyDetailsStep.d.ts +1 -1
- package/dist/components/FunConnectOptions/FunSignInStep.d.ts +2 -0
- package/dist/components/FunContainer/FunContainer.d.ts +1 -3
- package/dist/components/FunInput/FunTwoFaInput.d.ts +5 -4
- package/dist/components/FunNoResults/FunNoResults.d.ts +2 -2
- package/dist/components/FunPayments/FunPaymentMethods.d.ts +4 -18
- package/dist/components/FunPayments/FunPaymentMoonpayType.css.d.ts +1 -0
- package/dist/components/FunPayments/FunPaymentMoonpayType.d.ts +1 -3
- package/dist/components/FunPayments/FunPaymentSetup.d.ts +2 -3
- package/dist/components/FunSkeletonLoader/FunSkeletonBlock.d.ts +9 -6
- package/dist/components/FunSkeletonLoader/FunSkeletonCircle.d.ts +14 -5
- package/dist/components/FunToast/FunShortToast.d.ts +1 -1
- package/dist/components/FunkitProvider/FunkitCheckoutContext.d.ts +4 -1
- package/dist/components/FunkitProvider/FunkitConfigContext.d.ts +3 -43
- package/dist/components/FunkitProvider/FunkitMoonpayProvider.d.ts +4 -1
- package/dist/components/FunkitProvider/FunkitThemeProvider.d.ts +16 -4
- package/dist/components/FunkitProvider/GeneralWalletProvider.d.ts +7 -3
- package/dist/components/Icons/AcornsIcon.d.ts +3 -1
- package/dist/components/Icons/BitFlyerIcon.d.ts +3 -1
- package/dist/components/Icons/BitfinexIcon.d.ts +4 -0
- package/dist/components/Icons/BitstampIcon.d.ts +3 -1
- package/dist/components/Icons/BybitIcon.d.ts +3 -1
- package/dist/components/Icons/CoinlistIcon.d.ts +3 -1
- package/dist/components/Icons/CryptoComIcon.d.ts +3 -1
- package/dist/components/Icons/DeviceConfirmationIcon.d.ts +2 -0
- package/dist/components/Icons/EmailConfirmationIcon.d.ts +2 -0
- package/dist/components/Icons/EtradeIcon.d.ts +3 -1
- package/dist/components/Icons/EvmWallet.d.ts +2 -0
- package/dist/components/Icons/GateIo.d.ts +3 -1
- package/dist/components/Icons/HuobiIcon.d.ts +3 -1
- package/dist/components/Icons/KrakenIcon.d.ts +3 -1
- package/dist/components/Icons/KucoinIcon.d.ts +3 -1
- package/dist/components/Icons/MailIcon.d.ts +5 -1
- package/dist/components/Icons/OkxIcon.d.ts +3 -1
- package/dist/components/Icons/PaymentMethodIcons.d.ts +23 -0
- package/dist/components/Icons/Spinner.d.ts +1 -3
- package/dist/components/Icons/StashIcon.d.ts +3 -1
- package/dist/components/Icons/WalletIcon.d.ts +0 -2
- package/dist/components/Icons/WhitelistIcon.d.ts +2 -0
- package/dist/components/ProfileDetails/ActivityTraversalContext.d.ts +17 -26
- package/dist/components/ProfileDetails/FunProfileViews/ActivityHistory/ActivityHistory.d.ts +2 -8
- package/dist/components/ProfileDetails/FunProfileViews/Home/Home.css.d.ts +0 -7
- package/dist/components/ProfileDetails/FunProfileViews/Home/HomeCheckoutDisplayRow.d.ts +1 -0
- package/dist/components/ProfileDetails/FunProfileViews/Home/HomeTokenDisplayRow.d.ts +1 -0
- package/dist/components/ProfileDetails/FunProfileViews/Home/index.d.ts +4 -9
- package/dist/components/ProfileDetails/FunProfileViews/Settings/Settings.d.ts +5 -0
- package/dist/components/ProfileDetails/ProfileDetails.d.ts +1 -1
- package/dist/components/Text/Text.d.ts +1 -1
- package/dist/consts/payment.d.ts +1 -8
- package/dist/css/sprinkles.css.d.ts +37 -27
- package/dist/hooks/useDynamicFont.d.ts +1 -0
- package/dist/hooks/useMesh.d.ts +3 -2
- package/dist/hooks/useScrollDivider.d.ts +4 -3
- package/dist/index.css +1987 -1267
- package/dist/index.js +10839 -10467
- package/dist/themes/darkTheme.d.ts +4 -1
- package/dist/themes/darkTheme.js +1 -1
- package/dist/themes/lightTheme.d.ts +4 -1
- package/dist/themes/lightTheme.js +1 -1
- package/dist/utils/assets.d.ts +0 -4
- package/dist/utils/checkout.d.ts +1 -5
- package/dist/utils/combineChainSymbolOrAddress.d.ts +4 -0
- package/dist/utils/deposit.d.ts +2 -3
- package/dist/utils/flags/config.d.ts +7 -2
- package/dist/utils/flags/index.d.ts +2 -1
- package/dist/utils/isMainnetUsdt.d.ts +2 -0
- package/dist/utils/noop.d.ts +1 -0
- package/dist/wallets/groupedWallets.d.ts +1 -1
- package/dist/wallets/walletConnectors/chunk-25VW5TZP.js +92 -0
- package/dist/wallets/walletConnectors/chunk-2EMZOYQI.js +101 -0
- package/dist/wallets/walletConnectors/chunk-57UUMOOZ.js +95 -0
- package/dist/wallets/walletConnectors/chunk-5K4DIMYR.js +95 -0
- package/dist/wallets/walletConnectors/chunk-AUVBWDIK.js +102 -0
- package/dist/wallets/walletConnectors/chunk-AXPQHNUI.js +71 -0
- package/dist/wallets/walletConnectors/chunk-B7FHT3CB.js +94 -0
- package/dist/wallets/walletConnectors/chunk-EFIENLEE.js +98 -0
- package/dist/wallets/walletConnectors/chunk-FLTQRYFS.js +27 -0
- package/dist/wallets/walletConnectors/chunk-HCKLWBE5.js +98 -0
- package/dist/wallets/walletConnectors/chunk-IR3YKU2N.js +103 -0
- package/dist/wallets/walletConnectors/chunk-J2BF4L2V.js +87 -0
- package/dist/wallets/walletConnectors/chunk-L7QI6PBN.js +108 -0
- package/dist/wallets/walletConnectors/chunk-OKUX4BC4.js +66 -0
- package/dist/wallets/walletConnectors/chunk-QP2BIVXD.js +73 -0
- package/dist/wallets/walletConnectors/chunk-UWZQZY4S.js +149 -0
- package/dist/wallets/walletConnectors/chunk-UZEMNN3Q.js +96 -0
- package/dist/wallets/walletConnectors/chunk-WAMHUVNP.js +96 -0
- package/dist/wallets/walletConnectors/chunk-ZCKNEKQQ.js +110 -0
- package/dist/wallets/walletConnectors/index.js +47 -47
- package/package.json +5 -5
- package/dist/components/FunPayments/FunPaymentOtcType.d.ts +0 -2
- package/dist/components/FunTransactionSummary/FunTxSummaryHistory.d.ts +0 -1
- package/dist/components/SkeletalLoader/SkeletalLoader.css.d.ts +0 -1
- package/dist/components/SkeletalLoader/SkeletalLoader.d.ts +0 -2
- package/dist/css/presets.d.ts +0 -2
- package/dist/utils/flatten.d.ts +0 -1
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Address } from 'viem';
|
|
3
|
-
|
|
4
|
-
export declare function FunPaymentMoonpayType({ paymentFlow, paymentAddress, depositToken, depositTokenChainId, depositTokenAmount, onBackToHome, redirectToCheckoutHistory, }: {
|
|
5
|
-
paymentFlow: PaymentFlow;
|
|
3
|
+
export declare function FunPaymentMoonpayType({ paymentAddress, depositToken, depositTokenChainId, depositTokenAmount, redirectToCheckoutHistory, }: {
|
|
6
4
|
paymentAddress: Address;
|
|
7
5
|
depositToken: string;
|
|
8
6
|
depositTokenChainId: string;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Address } from 'viem';
|
|
3
|
-
import {
|
|
3
|
+
import { PaymentMethod } from '../../consts/payment';
|
|
4
4
|
import { MeshExchanges } from '../../utils/mesh';
|
|
5
5
|
interface FunPaymentSetupProps {
|
|
6
|
-
paymentFlow: PaymentFlow;
|
|
7
6
|
paymentMethod: undefined | null | PaymentMethod;
|
|
8
7
|
onBackToHome: () => void;
|
|
9
8
|
onExchangeConfirm: (exchange: MeshExchanges) => void;
|
|
@@ -14,5 +13,5 @@ interface FunPaymentSetupProps {
|
|
|
14
13
|
redirectToCheckoutHistory?: (depositAddress: string) => void;
|
|
15
14
|
isParentLoading: boolean;
|
|
16
15
|
}
|
|
17
|
-
export declare function FunPaymentSetup({
|
|
16
|
+
export declare function FunPaymentSetup({ paymentAddress, paymentMethod, onBackToHome, onExchangeConfirm, token, tokenChainId, tokenAmountUsd, redirectToCheckoutHistory, isParentLoading, }: FunPaymentSetupProps): React.JSX.Element;
|
|
18
17
|
export {};
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
type FunSkeletonBlockProps = {
|
|
3
|
-
/** Block height (default: 14px
|
|
4
|
-
height?:
|
|
5
|
-
/**
|
|
6
|
-
|
|
2
|
+
export type FunSkeletonBlockProps = {
|
|
3
|
+
/** Block height (default: 14px) */
|
|
4
|
+
height?: number | `${number}%` | `${number}px`;
|
|
5
|
+
/** Margin bottom (px) */
|
|
6
|
+
marginBottom?: number;
|
|
7
|
+
/** Margin top (px) */
|
|
8
|
+
marginTop?: number;
|
|
9
|
+
/** Block width (default: 100%) */
|
|
10
|
+
width?: number | `${number}%` | `${number}px`;
|
|
7
11
|
};
|
|
8
12
|
export declare function FunSkeletonBlock(props: FunSkeletonBlockProps): React.JSX.Element;
|
|
9
|
-
export {};
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
type FunSkeletonCircleProps = {
|
|
3
|
-
/**
|
|
4
|
-
|
|
2
|
+
export type FunSkeletonCircleProps = {
|
|
3
|
+
/** Margin (px) */
|
|
4
|
+
margin?: number;
|
|
5
|
+
/** Margin bottom (px) */
|
|
6
|
+
marginBottom?: number;
|
|
7
|
+
/** Margin left (px) */
|
|
8
|
+
marginLeft?: number;
|
|
9
|
+
/** Margin right (px) */
|
|
10
|
+
marginRight?: number;
|
|
11
|
+
/** Margin top (px) */
|
|
12
|
+
marginTop?: number;
|
|
13
|
+
/** Circle size (default: 20px) */
|
|
14
|
+
size?: number | `${number}%` | `${number}px`;
|
|
5
15
|
};
|
|
6
|
-
export declare function FunSkeletonCircle(props: FunSkeletonCircleProps): React.JSX.Element;
|
|
7
|
-
export {};
|
|
16
|
+
export declare function FunSkeletonCircle({ size, ...props }: FunSkeletonCircleProps): React.JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { FunToastProps } from './FunToast';
|
|
3
|
-
export declare const ShortFunToast: ({ type, title,
|
|
3
|
+
export declare const ShortFunToast: ({ type, title, closing, }: FunToastProps) => React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CheckoutHistoryItem, CheckoutQuoteResponse } from '@funkit/api-base';
|
|
2
2
|
import React, { ReactNode } from 'react';
|
|
3
3
|
import { Abi, Address } from 'viem';
|
|
4
|
-
import { PaymentMethodInfo } from '../../consts/payment';
|
|
4
|
+
import { PaymentMethod, PaymentMethodInfo } from '../../consts/payment';
|
|
5
5
|
import { CheckoutHistoryStateMap } from '../../utils/checkout';
|
|
6
6
|
import { CheckoutFeesBreakdownItem } from '../../utils/checkoutFees';
|
|
7
7
|
export interface FunkitCheckoutActionParams {
|
|
@@ -30,6 +30,8 @@ export interface FunkitCheckoutConfig {
|
|
|
30
30
|
expirationTimestampMs: number;
|
|
31
31
|
/** Custom recipient address of the checkout. If specified, a different checkout flow will be executed. It is not recommended to set this unless the Fun.xyz team advises it. **/
|
|
32
32
|
customRecipient?: Address | DydxAddress;
|
|
33
|
+
/** If available, the specified payment method will be selected by default during checkout or deposits **/
|
|
34
|
+
defaultPaymentMethod?: PaymentMethod | undefined;
|
|
33
35
|
/** ****************************************
|
|
34
36
|
* Checkout ModalUI-related configurations *
|
|
35
37
|
*******************************************/
|
|
@@ -135,6 +137,7 @@ interface useFunkitPreCheckoutInternalReturn {
|
|
|
135
137
|
updateTargetAssetAmount: (newTargetAssetAmount: number) => void;
|
|
136
138
|
updateSelectedPaymentMethodInfo: (newPaymentMethodInfo: PaymentMethodInfo) => void;
|
|
137
139
|
confirmCheckout: (shouldBatchOpBypassInit: boolean, stepMessageSetter: (m: string) => void) => Promise<Address>;
|
|
140
|
+
cancelCheckout: (depositAddress: Address) => Promise<boolean>;
|
|
138
141
|
getCheckoutDraftDollarValue: () => Promise<void>;
|
|
139
142
|
clearCheckoutQuoteMessages: () => void;
|
|
140
143
|
getCheckoutQuote: (sponsorInitialTransferGasLimit: number, newPaymentMethodInfo: PaymentMethodInfo) => Promise<boolean>;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import React, { ReactNode } from 'react';
|
|
2
1
|
import { FunkitPrioritizedLoginType, FunkitSocialLoginMethod } from '../../consts/funkit';
|
|
3
|
-
import { PaymentMethod } from '../../consts/payment';
|
|
4
|
-
import { BoxProps } from '../Box/Box';
|
|
5
2
|
export interface FunkitTextCustomizationsConfig {
|
|
3
|
+
/** @deprecated */
|
|
6
4
|
selectPaymentMethod: string;
|
|
7
5
|
brokerageOrExchange: string;
|
|
8
6
|
debitOrCredit: string;
|
|
9
7
|
accountBalance: string;
|
|
10
8
|
transferCrypto: string;
|
|
11
9
|
selectAccount: string;
|
|
10
|
+
/** @deprecated */
|
|
12
11
|
enterPaymentInfo: string;
|
|
13
12
|
payWith: string;
|
|
14
13
|
otc: string;
|
|
@@ -26,42 +25,6 @@ interface FunkitLoginOptionsConfig {
|
|
|
26
25
|
[FunkitSocialLoginMethod.FARCASTER]?: boolean;
|
|
27
26
|
};
|
|
28
27
|
}
|
|
29
|
-
interface FunkitPaymentsConfig {
|
|
30
|
-
/** If available, the specified payment method will be selected by default during checkout or deposits **/
|
|
31
|
-
defaultPaymentMethod?: PaymentMethod | undefined;
|
|
32
|
-
/** Max width of the title of each payment method **/
|
|
33
|
-
paymentTitleMaxWidth?: BoxProps['maxWidth'];
|
|
34
|
-
/** Payment method options styling **/
|
|
35
|
-
optionsConfig: {
|
|
36
|
-
/** Spacing between payment method and OTC options **/
|
|
37
|
-
optionsPrimaryGap: BoxProps['gap'];
|
|
38
|
-
/** Spacing between asset and exchange options **/
|
|
39
|
-
optionsSecondaryGap: BoxProps['gap'];
|
|
40
|
-
/** Padding of each payment method option **/
|
|
41
|
-
optionsPadding: BoxProps['paddingY'];
|
|
42
|
-
/** Vertical padding of all primary & secondary buttons **/
|
|
43
|
-
buttonPaddingY: BoxProps['paddingY'];
|
|
44
|
-
};
|
|
45
|
-
methodsConfig: {
|
|
46
|
-
[paymentMethod: string]: {
|
|
47
|
-
icon: ReactNode;
|
|
48
|
-
speedIconColorBase: string;
|
|
49
|
-
speedIconColorActive: string;
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
|
-
/** Custom OTC option with redirect links **/
|
|
53
|
-
otcConfig: {
|
|
54
|
-
isEnabled: boolean;
|
|
55
|
-
title: string;
|
|
56
|
-
optionsList: {
|
|
57
|
-
label: string;
|
|
58
|
-
labelIcon: ReactNode;
|
|
59
|
-
url: string;
|
|
60
|
-
isDisabled: boolean;
|
|
61
|
-
tagLabel: string;
|
|
62
|
-
}[];
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
28
|
export type FunkitConfig = {
|
|
66
29
|
/** Funkit api key **/
|
|
67
30
|
apiKey: string;
|
|
@@ -77,8 +40,6 @@ export type FunkitConfig = {
|
|
|
77
40
|
textCustomizations?: Partial<FunkitTextCustomizationsConfig>;
|
|
78
41
|
/** Login modal configuration **/
|
|
79
42
|
loginConfig: Partial<FunkitLoginOptionsConfig>;
|
|
80
|
-
/** Payments configuration **/
|
|
81
|
-
paymentsConfig?: Partial<FunkitPaymentsConfig>;
|
|
82
43
|
};
|
|
83
44
|
interface FinalFunkitConfigInternal extends FunkitConfig {
|
|
84
45
|
appLogoSrc: string;
|
|
@@ -86,8 +47,7 @@ interface FinalFunkitConfigInternal extends FunkitConfig {
|
|
|
86
47
|
allowBackgroundScroll: boolean;
|
|
87
48
|
textCustomizations: FunkitTextCustomizationsConfig;
|
|
88
49
|
loginConfig: FunkitLoginOptionsConfig;
|
|
89
|
-
paymentsConfig: FunkitPaymentsConfig;
|
|
90
50
|
}
|
|
91
|
-
export declare const FunkitConfigContext:
|
|
51
|
+
export declare const FunkitConfigContext: import("react").Context<FunkitConfig>;
|
|
92
52
|
export declare function useFunkitConfig(): FinalFunkitConfigInternal;
|
|
93
53
|
export {};
|
|
@@ -16,5 +16,8 @@ interface UserIpInfoFromMoonpay {
|
|
|
16
16
|
isLowLimitEnabled: boolean;
|
|
17
17
|
state: string;
|
|
18
18
|
}
|
|
19
|
-
export declare function
|
|
19
|
+
export declare function useFunkitUserIp(): {
|
|
20
|
+
userIpInfo: UserIpInfoFromMoonpay | null;
|
|
21
|
+
isUserBlockedForCheckout: boolean;
|
|
22
|
+
};
|
|
20
23
|
export {};
|
|
@@ -28,6 +28,7 @@ export declare const defaultTheme: {
|
|
|
28
28
|
offBackground: string;
|
|
29
29
|
hoverState: string;
|
|
30
30
|
offBackgroundInverse: string;
|
|
31
|
+
dydxSwitchActiveBackground: string;
|
|
31
32
|
primaryText: string;
|
|
32
33
|
secondaryText: string;
|
|
33
34
|
tertiaryText: string;
|
|
@@ -59,6 +60,9 @@ export declare const defaultTheme: {
|
|
|
59
60
|
buttonStroke: string;
|
|
60
61
|
buttonTextSecondaryDisabled: string;
|
|
61
62
|
buttonTextSecondary: string;
|
|
63
|
+
buttonIconBackgroundHover: string;
|
|
64
|
+
buttonIconBackgroundPressed: string;
|
|
65
|
+
buttonIconStroke: string;
|
|
62
66
|
};
|
|
63
67
|
shadows: {
|
|
64
68
|
connectButton: string;
|
|
@@ -66,7 +70,6 @@ export declare const defaultTheme: {
|
|
|
66
70
|
selectedOption: string;
|
|
67
71
|
selectedWallet: string;
|
|
68
72
|
button: string;
|
|
69
|
-
callToAction: string;
|
|
70
73
|
};
|
|
71
74
|
moonpayTheme: string;
|
|
72
75
|
fontSize: {
|
|
@@ -177,6 +180,7 @@ export declare const useActiveTheme: () => {
|
|
|
177
180
|
offBackground: string;
|
|
178
181
|
hoverState: string;
|
|
179
182
|
offBackgroundInverse: string;
|
|
183
|
+
dydxSwitchActiveBackground: string;
|
|
180
184
|
primaryText: string;
|
|
181
185
|
secondaryText: string;
|
|
182
186
|
tertiaryText: string;
|
|
@@ -208,6 +212,9 @@ export declare const useActiveTheme: () => {
|
|
|
208
212
|
buttonStroke: string;
|
|
209
213
|
buttonTextSecondaryDisabled: string;
|
|
210
214
|
buttonTextSecondary: string;
|
|
215
|
+
buttonIconBackgroundHover: string;
|
|
216
|
+
buttonIconBackgroundPressed: string;
|
|
217
|
+
buttonIconStroke: string;
|
|
211
218
|
};
|
|
212
219
|
fonts: {
|
|
213
220
|
body: string;
|
|
@@ -278,7 +285,6 @@ export declare const useActiveTheme: () => {
|
|
|
278
285
|
selectedOption: string;
|
|
279
286
|
selectedWallet: string;
|
|
280
287
|
button: string;
|
|
281
|
-
callToAction: string;
|
|
282
288
|
};
|
|
283
289
|
blurs: {
|
|
284
290
|
modalOverlay: string;
|
|
@@ -314,6 +320,7 @@ export declare const useActiveTheme: () => {
|
|
|
314
320
|
offBackground: string;
|
|
315
321
|
hoverState: string;
|
|
316
322
|
offBackgroundInverse: string;
|
|
323
|
+
dydxSwitchActiveBackground: string;
|
|
317
324
|
primaryText: string;
|
|
318
325
|
secondaryText: string;
|
|
319
326
|
tertiaryText: string;
|
|
@@ -345,6 +352,9 @@ export declare const useActiveTheme: () => {
|
|
|
345
352
|
buttonStroke: string;
|
|
346
353
|
buttonTextSecondaryDisabled: string;
|
|
347
354
|
buttonTextSecondary: string;
|
|
355
|
+
buttonIconBackgroundHover: string;
|
|
356
|
+
buttonIconBackgroundPressed: string;
|
|
357
|
+
buttonIconStroke: string;
|
|
348
358
|
};
|
|
349
359
|
fonts: {
|
|
350
360
|
body: string;
|
|
@@ -415,7 +425,6 @@ export declare const useActiveTheme: () => {
|
|
|
415
425
|
selectedOption: string;
|
|
416
426
|
selectedWallet: string;
|
|
417
427
|
button: string;
|
|
418
|
-
callToAction: string;
|
|
419
428
|
};
|
|
420
429
|
blurs: {
|
|
421
430
|
modalOverlay: string;
|
|
@@ -450,6 +459,7 @@ export declare const useActiveTheme: () => {
|
|
|
450
459
|
offBackground: string;
|
|
451
460
|
hoverState: string;
|
|
452
461
|
offBackgroundInverse: string;
|
|
462
|
+
dydxSwitchActiveBackground: string;
|
|
453
463
|
primaryText: string;
|
|
454
464
|
secondaryText: string;
|
|
455
465
|
tertiaryText: string;
|
|
@@ -481,6 +491,9 @@ export declare const useActiveTheme: () => {
|
|
|
481
491
|
buttonStroke: string;
|
|
482
492
|
buttonTextSecondaryDisabled: string;
|
|
483
493
|
buttonTextSecondary: string;
|
|
494
|
+
buttonIconBackgroundHover: string;
|
|
495
|
+
buttonIconBackgroundPressed: string;
|
|
496
|
+
buttonIconStroke: string;
|
|
484
497
|
};
|
|
485
498
|
fonts: {
|
|
486
499
|
body: string;
|
|
@@ -551,7 +564,6 @@ export declare const useActiveTheme: () => {
|
|
|
551
564
|
selectedOption: string;
|
|
552
565
|
selectedWallet: string;
|
|
553
566
|
button: string;
|
|
554
|
-
callToAction: string;
|
|
555
567
|
};
|
|
556
568
|
blurs: {
|
|
557
569
|
modalOverlay: string;
|
|
@@ -1,9 +1,14 @@
|
|
|
1
|
+
import { AssetBalanceInfo } from '@funkit/api-base';
|
|
1
2
|
import { Auth, FunWallet } from '@funkit/core';
|
|
2
3
|
import React from 'react';
|
|
3
4
|
import { FunkitUserInfo } from '../../consts/funkit';
|
|
4
5
|
import { PaymentMethodInfo } from '../../consts/payment';
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
export interface KnownAssetBalanceInfo extends AssetBalanceInfo {
|
|
7
|
+
price: number;
|
|
8
|
+
totalUsdValue: number;
|
|
9
|
+
}
|
|
10
|
+
export type GeneralWalletAssets = null | {
|
|
11
|
+
[x: string]: KnownAssetBalanceInfo;
|
|
7
12
|
};
|
|
8
13
|
interface GeneralWalletContextProps {
|
|
9
14
|
walletAddress: string;
|
|
@@ -15,7 +20,6 @@ interface GeneralWalletContextProps {
|
|
|
15
20
|
isFetchingAssets: boolean;
|
|
16
21
|
walletAssets: GeneralWalletAssets;
|
|
17
22
|
totalWalletAssetsUsd: number;
|
|
18
|
-
maxUsdWalletAssetKey: string;
|
|
19
23
|
startAssetsListener: () => void;
|
|
20
24
|
stopAssetsListener: () => void;
|
|
21
25
|
funWallet: FunWallet | null;
|
|
@@ -1,7 +1,30 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { FunkitUserInfoBase } from '../../consts/funkit';
|
|
3
|
+
import { PaymentMethod } from '../../consts/payment';
|
|
2
4
|
export declare const CreditCardIcon: () => React.JSX.Element;
|
|
3
5
|
export declare const AchBankIcon: () => React.JSX.Element;
|
|
4
6
|
export declare const TransferCryptoIcon: ({ color, }: {
|
|
5
7
|
color?: string;
|
|
6
8
|
}) => React.JSX.Element;
|
|
7
9
|
export declare const BrokerageIcon: () => React.JSX.Element;
|
|
10
|
+
export declare const PAYMENT_METHOD_ICONS: {
|
|
11
|
+
brokerage: React.JSX.Element;
|
|
12
|
+
card: React.JSX.Element;
|
|
13
|
+
transfer: React.JSX.Element;
|
|
14
|
+
};
|
|
15
|
+
type AccountInfo = {
|
|
16
|
+
loginType: 'web2' | 'web3';
|
|
17
|
+
userInfo: FunkitUserInfoBase;
|
|
18
|
+
} | {
|
|
19
|
+
loginType: 'unlogin';
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
Reference ENG-716
|
|
23
|
+
* web2 users -> social icon
|
|
24
|
+
* EOA wallet users
|
|
25
|
+
* detect connectors and show builtin icon in SDK
|
|
26
|
+
* if no SDK icons available, show icon from wagmi
|
|
27
|
+
* otherwise show fallback icon EVM
|
|
28
|
+
*/
|
|
29
|
+
export declare function useAccountBalanceIcon(paymentMethod: PaymentMethod, accountInfo: AccountInfo): string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | null | undefined;
|
|
30
|
+
export {};
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare const SpinnerIcon: ({ height, width,
|
|
2
|
+
export declare const SpinnerIcon: ({ height, width, }: {
|
|
3
3
|
width?: string | number;
|
|
4
4
|
height?: string | number;
|
|
5
|
-
strokeWidth?: number;
|
|
6
|
-
strokeColor?: "black" | "currentColor";
|
|
7
5
|
}) => React.JSX.Element;
|
|
@@ -1,40 +1,31 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { HistoryContentPages } from '../../utils/checkoutHistory';
|
|
3
3
|
import { FunProfileView } from './ProfileDetails';
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
returnView: FunProfileView | undefined;
|
|
4
|
+
export interface BaseActivitySelection {
|
|
5
|
+
depositAddress: `0x${string}`;
|
|
6
|
+
initialPage: HistoryContentPages;
|
|
8
7
|
returnViewPresets: {
|
|
9
8
|
[x: string]: any;
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
10
|
+
}
|
|
11
|
+
export interface ActivitySelection extends BaseActivitySelection {
|
|
12
|
+
onRedirect: () => void;
|
|
13
|
+
returnView: FunProfileView;
|
|
14
|
+
}
|
|
15
|
+
export declare const ActivityTraversalContext: React.Context<{
|
|
16
|
+
selectedPurchaseId: `0x${string}` | undefined;
|
|
17
|
+
selectedPurchaseInitView: HistoryContentPages | undefined;
|
|
18
|
+
returnView: ActivitySelection["returnView"] | undefined;
|
|
19
|
+
returnViewPresets: ActivitySelection["returnViewPresets"];
|
|
20
|
+
onSelectActivity: ({ depositAddress, initialPage, returnView, returnViewPresets, onRedirect, }: ActivitySelection) => void;
|
|
20
21
|
resetActivityTraversal: () => void;
|
|
21
22
|
}>;
|
|
22
23
|
export declare const ActivityTraversalProvider: ({ children }: any) => React.JSX.Element;
|
|
23
24
|
export declare const useActivityTraversal: () => {
|
|
24
25
|
selectedPurchaseId: `0x${string}` | undefined;
|
|
25
26
|
selectedPurchaseInitView: HistoryContentPages | undefined;
|
|
26
|
-
returnView:
|
|
27
|
-
returnViewPresets:
|
|
28
|
-
|
|
29
|
-
};
|
|
30
|
-
onSelectActivity: ({ depositAddress, initialPage, returnView, returnViewPresets, onRedirect, }: {
|
|
31
|
-
depositAddress: `0x${string}`;
|
|
32
|
-
initialPage: HistoryContentPages;
|
|
33
|
-
returnView: FunProfileView;
|
|
34
|
-
returnViewPresets: {
|
|
35
|
-
[x: string]: any;
|
|
36
|
-
};
|
|
37
|
-
onRedirect: () => void;
|
|
38
|
-
}) => void;
|
|
27
|
+
returnView: ActivitySelection["returnView"] | undefined;
|
|
28
|
+
returnViewPresets: ActivitySelection["returnViewPresets"];
|
|
29
|
+
onSelectActivity: ({ depositAddress, initialPage, returnView, returnViewPresets, onRedirect, }: ActivitySelection) => void;
|
|
39
30
|
resetActivityTraversal: () => void;
|
|
40
31
|
};
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { BaseActivitySelection } from '../../ActivityTraversalContext';
|
|
3
3
|
export declare function ActivityHistory({ onSelectActivity, }: {
|
|
4
|
-
onSelectActivity: (
|
|
5
|
-
depositAddress: `0x${string}`;
|
|
6
|
-
initialPage: HistoryContentPages;
|
|
7
|
-
returnViewPresets: {
|
|
8
|
-
[x: string]: any;
|
|
9
|
-
};
|
|
10
|
-
}) => void;
|
|
4
|
+
onSelectActivity: (activity: BaseActivitySelection) => void;
|
|
11
5
|
}): React.JSX.Element;
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
export declare const titleSection: {
|
|
2
|
-
animationDuration: string;
|
|
3
|
-
animationTimingFunction: string;
|
|
4
|
-
animationFillMode: string;
|
|
5
|
-
};
|
|
6
1
|
export declare const contentSection: {
|
|
7
2
|
animationDuration: string;
|
|
8
3
|
animationTimingFunction: string;
|
|
@@ -10,7 +5,5 @@ export declare const contentSection: {
|
|
|
10
5
|
};
|
|
11
6
|
export declare const animateTitleInClass: string;
|
|
12
7
|
export declare const animateTitleOutClass: string;
|
|
13
|
-
export declare const animateAvatarInClass: string;
|
|
14
|
-
export declare const animateAvatarOutClass: string;
|
|
15
8
|
export declare const animateContentInClass: string;
|
|
16
9
|
export declare const animateContentOutClass: string;
|
|
@@ -5,3 +5,4 @@ export declare const HomeCheckoutDisplayRow: ({ checkoutHistoryItem, onSelect, }
|
|
|
5
5
|
checkoutHistoryItem: CheckoutHistoryItem;
|
|
6
6
|
onSelect: (depositAddress: `0x${string}`, initialPage: HistoryContentPages) => void;
|
|
7
7
|
}) => React.JSX.Element;
|
|
8
|
+
export declare const HomeCheckoutDisplayRowSkeleton: () => React.JSX.Element;
|
|
@@ -1,19 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { BaseActivitySelection } from '../../ActivityTraversalContext';
|
|
3
3
|
import { FunProfileView } from '../../ProfileDetails';
|
|
4
4
|
export declare enum SelectedHomeTab {
|
|
5
5
|
ASSETS = "assets",
|
|
6
6
|
CHECKOUTS = "checkouts"
|
|
7
7
|
}
|
|
8
|
-
export declare function Home({ onClose, onChangeView, onSelectActivity, defaultHomeTab, }: {
|
|
8
|
+
export declare function Home({ onClose, onChangeView, onSelectActivity, defaultHomeTab, animateOut, }: {
|
|
9
9
|
onClose: () => void;
|
|
10
10
|
onChangeView: (newView: FunProfileView) => void;
|
|
11
|
-
onSelectActivity: (
|
|
12
|
-
depositAddress: `0x${string}`;
|
|
13
|
-
initialPage: HistoryContentPages;
|
|
14
|
-
returnViewPresets: {
|
|
15
|
-
[x: string]: any;
|
|
16
|
-
};
|
|
17
|
-
}) => void;
|
|
11
|
+
onSelectActivity: (activity: BaseActivitySelection) => void;
|
|
18
12
|
defaultHomeTab?: SelectedHomeTab;
|
|
13
|
+
animateOut?: boolean;
|
|
19
14
|
}): React.JSX.Element;
|