@funkit/connect 12.0.0 → 12.1.0
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 +17 -0
- package/dist/clients/{chunk-3DHSLLCU.js → chunk-DNVDK7JQ.js} +18 -14
- package/dist/clients/fanatics.css +1 -1
- package/dist/clients/fanatics.js +1 -1
- package/dist/clients/internal/nado/withdrawalCallback.js +2 -2
- package/dist/clients/internal/nado/withdrawalForm.css +11 -14
- package/dist/clients/internal/nado/withdrawalForm.js +1 -0
- package/dist/clients/lighter.css +11 -14
- package/dist/clients/lighter.js +1 -1
- package/dist/clients/nado.js +2 -2
- package/dist/components/FunTransactionSummary/PaymentFeesSummary.d.ts +3 -2
- package/dist/components/FunTransactionSummary/PaymentFeesSummary.track.d.ts +4 -2
- package/dist/hooks/queries/useWithdrawalQuote.d.ts +7 -0
- package/dist/hooks/statsig/index.d.ts +1 -0
- package/dist/hooks/statsig/useExperimentV2.d.ts +8 -0
- package/dist/hooks/track/analytics/events.d.ts +51 -2
- package/dist/hooks/track/analytics/mappers.d.ts +4 -1
- package/dist/hooks/track/analytics/useWithdrawalAnalytics.d.ts +16 -3
- package/dist/hooks/track/useTrack.d.ts +1 -1
- package/dist/hooks/track/user.d.ts +8 -0
- package/dist/index.css +11 -14
- package/dist/index.js +3276 -2952
- package/dist/modals/CheckoutModal/InputAmount/InputAmount.d.ts +1 -1
- package/dist/modals/CheckoutModal/InputAmount/state.d.ts +10 -0
- package/dist/modals/WithdrawalModal/useTrackWithdrawalEvents.d.ts +8 -1
- package/dist/modals/WithdrawalModal/useTrackWithdrawalQuoteEvents.d.ts +16 -0
- package/dist/providers/FunkitConfigContext.d.ts +1 -1
- package/dist/providers/FunkitStatsigProvider.d.ts +2 -7
- package/dist/providers/FunkitStatsigWhnProvider.d.ts +17 -0
- package/dist/providers/GeneralWalletProvider.d.ts +1 -0
- package/dist/shadow-css.js +1 -1
- package/dist/utils/statsig/client.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 +59 -59
- 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 +4 -4
- package/dist/clients/chunk-37Q6DUR7.js +0 -296
- package/dist/clients/chunk-3J2GOB5X.js +0 -190
- package/dist/clients/chunk-BCNE3ZKM.js +0 -190
- package/dist/clients/chunk-BWJC2WD7.js +0 -4899
- package/dist/clients/chunk-EQA5U4V6.js +0 -98
- package/dist/clients/chunk-EYMFEWQL.js +0 -30
- package/dist/clients/chunk-FPOGADLJ.js +0 -4899
- package/dist/clients/chunk-HB7S3NDI.js +0 -15
- package/dist/clients/chunk-HDFCM5UL.js +0 -15
- package/dist/clients/chunk-NEKHTWTT.js +0 -331
- package/dist/clients/chunk-PA7WW6VC.js +0 -296
- package/dist/clients/chunk-SKDFSMAO.js +0 -30
- package/dist/clients/chunk-TI2NG2Z6.js +0 -30
- package/dist/clients/chunk-TZFXFVDW.js +0 -296
- package/dist/clients/chunk-VXX2XK5J.js +0 -190
- package/dist/clients/chunk-WXSFLUPZ.js +0 -4891
- package/dist/clients/chunk-XSRAZSYG.js +0 -15
- package/dist/wallets/walletConnectors/chunk-4NV5BYRP.js +0 -95
- package/dist/wallets/walletConnectors/chunk-AVDUNQUW.js +0 -96
- package/dist/wallets/walletConnectors/chunk-GUQM4QSL.js +0 -66
- package/dist/wallets/walletConnectors/chunk-IULPZP2Q.js +0 -69
- package/dist/wallets/walletConnectors/chunk-JPN6TWIT.js +0 -92
- package/dist/wallets/walletConnectors/chunk-KCRO2AGO.js +0 -106
- package/dist/wallets/walletConnectors/chunk-KI5Y2BBF.js +0 -94
- package/dist/wallets/walletConnectors/chunk-NR2OGDHQ.js +0 -103
- package/dist/wallets/walletConnectors/chunk-OEEGYENV.js +0 -87
- package/dist/wallets/walletConnectors/chunk-OX37G4YT.js +0 -98
- package/dist/wallets/walletConnectors/chunk-SWFF3TWJ.js +0 -100
- package/dist/wallets/walletConnectors/chunk-TKB2OY6G.js +0 -99
- package/dist/wallets/walletConnectors/chunk-W2LCLDPX.js +0 -70
- package/dist/wallets/walletConnectors/chunk-WAHGI5L7.js +0 -96
- package/dist/wallets/walletConnectors/chunk-WKNQMP4A.js +0 -93
- package/dist/wallets/walletConnectors/chunk-XCNHV3HS.js +0 -110
- package/dist/wallets/walletConnectors/chunk-YO2K4MBH.js +0 -218
- package/dist/wallets/walletConnectors/chunk-YQFGVZGR.js +0 -92
- package/dist/clients/{chunk-JVR4CX6N.js → chunk-ECGTOMZQ.js} +3 -3
- /package/dist/clients/{chunk-RHOSJED2.js → chunk-RQALGV5U.js} +0 -0
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import type { Hex } from 'viem';
|
|
4
4
|
import { type PaymentMethodInfo } from '../../../domains/paymentMethods';
|
|
5
5
|
import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
|
|
6
|
-
import type
|
|
6
|
+
import { type AmountSelection } from './state';
|
|
7
7
|
export type InputAmountState = CheckoutModalCommonState & {
|
|
8
8
|
paymentMethodInfo: PaymentMethodInfo;
|
|
9
9
|
fiatAmount?: number;
|
|
@@ -144,6 +144,16 @@ export type AmountInputError = {
|
|
|
144
144
|
/** Input is empty */
|
|
145
145
|
type: 'noInput';
|
|
146
146
|
};
|
|
147
|
+
/**
|
|
148
|
+
* Whether to fetch a gas price for the Max-button gas buffer.
|
|
149
|
+
*
|
|
150
|
+
* Only for a native EVM token: `useGasPrice` never resolves for a chain outside
|
|
151
|
+
* the wagmi config, which would leave the amount screen stuck loading.
|
|
152
|
+
*/
|
|
153
|
+
export declare function shouldFetchGasBuffer({ isNativeToken, sourceChainId, }: {
|
|
154
|
+
isNativeToken: boolean;
|
|
155
|
+
sourceChainId: number | undefined;
|
|
156
|
+
}): boolean;
|
|
147
157
|
/**
|
|
148
158
|
* Calculate initial input amount for account balance deposits.
|
|
149
159
|
* Return half the balance and round up to nearest 10, 100, 1000 etc
|
|
@@ -1 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import type { WithdrawalModalStep } from './types';
|
|
2
|
+
interface UseTrackWithdrawalEventsArgs {
|
|
3
|
+
isBackNavigation: boolean;
|
|
4
|
+
open: boolean;
|
|
5
|
+
step: WithdrawalModalStep;
|
|
6
|
+
}
|
|
7
|
+
export declare function useTrackWithdrawalEvents({ isBackNavigation, open, step, }: UseTrackWithdrawalEventsArgs): void;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type AssetDescriptorArgs, type TrackWithdrawalQuoteSnapshotArgs } from '../../hooks/track/analytics/useWithdrawalAnalytics';
|
|
2
|
+
import type { FunkitCheckoutQuoteResult } from '../../providers/FunkitHistoryContext';
|
|
3
|
+
type UseTrackWithdrawalQuoteEventsArgs = Omit<TrackWithdrawalQuoteSnapshotArgs, 'numQuoteRefreshes' | 'quote' | 'target'> & {
|
|
4
|
+
isQuoteLoading: boolean;
|
|
5
|
+
quote: FunkitCheckoutQuoteResult | null;
|
|
6
|
+
target: AssetDescriptorArgs | null;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Fires `fc_withdrawal_quote_displayed` once per distinct quote id.
|
|
10
|
+
* `trackQuoteConfirmed` fires `fc_withdrawal_quote_confirmed` for the CTA path
|
|
11
|
+
* that calls it.
|
|
12
|
+
*/
|
|
13
|
+
export declare function useTrackWithdrawalQuoteEvents({ isQuoteLoading, quote, target, ...args }: UseTrackWithdrawalQuoteEventsArgs): {
|
|
14
|
+
trackQuoteConfirmed: () => void;
|
|
15
|
+
};
|
|
16
|
+
export {};
|
|
@@ -267,7 +267,7 @@ export type FunkitConfig = {
|
|
|
267
267
|
textCustomizations?: Partial<FunkitTextCustomizationsConfig>;
|
|
268
268
|
/** UI customizations across all widgets **/
|
|
269
269
|
uiCustomizations?: FunkitUiCustomizationsConfig;
|
|
270
|
-
/**
|
|
270
|
+
/** Links Funkit users to your own user system. Not required when a wagmi wallet connection is present — the connected address is used as the identifier instead. Only needed for guest/no-wallet flows. */
|
|
271
271
|
externalUserId?: string;
|
|
272
272
|
/** Email prefilled into the Swapped fiat onramp/offramp iframe. Set once at provider init. */
|
|
273
273
|
prefillFiatEmail?: string;
|
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type StatsigOptions } from '@statsig/react-bindings';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import type { ReactNode } from 'react';
|
|
4
4
|
export declare const STATSIG_CLIENT_KEY: "client-UmFd8WIJljA7cLmZuDqs3X25M8sKd5WIQP4BSC2bRbM";
|
|
5
|
-
export declare
|
|
6
|
-
/**
|
|
7
|
-
* THIS IS THE TEMPORARY CLIENT FOR V2 ANALYTICS. IT DOES NOT CONTAIN ANY CONFIGS.
|
|
8
|
-
* DO NOT USE THIS CONTEXT DIRECTLY. USE useTrackV2 INSTEAD.
|
|
9
|
-
*/
|
|
10
|
-
export declare function useFunWhnStatsigClient(): StatsigClient | null;
|
|
5
|
+
export declare function getStatsigOptions(isDevelopment: boolean): StatsigOptions;
|
|
11
6
|
interface FunkitStatsigProviderProps {
|
|
12
7
|
children: ReactNode;
|
|
13
8
|
isDevelopment?: boolean;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type StatsigClient } from '@statsig/react-bindings';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { ReactNode } from 'react';
|
|
4
|
+
type FunWhnStatsigContextValue = {
|
|
5
|
+
client: StatsigClient | null;
|
|
6
|
+
/** Client is ready and has correct userId and apiKey vs current connected user */
|
|
7
|
+
isFullyReady: boolean;
|
|
8
|
+
isLoading: boolean;
|
|
9
|
+
/** Forces re-rendering when updated configs are available so components can pick them up */
|
|
10
|
+
renderVersion: number;
|
|
11
|
+
};
|
|
12
|
+
export declare function useFunWhnStatsigContext(): FunWhnStatsigContextValue;
|
|
13
|
+
export declare function FunkitStatsigWhnProvider({ children, isDevelopment, }: {
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
isDevelopment?: boolean;
|
|
16
|
+
}): React.JSX.Element;
|
|
17
|
+
export {};
|