@funkit/connect 8.4.0 → 8.6.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 +63 -0
- package/dist/__generated__/default_configs.d.ts +10 -1
- package/dist/{chunk-4WY7FNYP.js → chunk-EPHOZPMR.js} +11 -1
- package/dist/{chunk-Z4QDKBBG.js → chunk-FZZF5FGD.js} +1 -1
- package/dist/{chunk-UUHLEWAL.js → chunk-NAHADAYF.js} +1 -1
- package/dist/clients/fanatics.css +3730 -3724
- package/dist/clients/fanatics.js +2 -2
- package/dist/components/Box/Box.d.ts +2 -2
- package/dist/components/ConnectButton/abbreviateETHBalance.d.ts +0 -1
- package/dist/components/Dialog/Dialog.css.d.ts +0 -1
- package/dist/components/FunNotification/FunNotification.d.ts +2 -2
- package/dist/components/FunPayments/FunPaymentMethods.d.ts +4 -3
- package/dist/components/Icons/{New/BlueCircularWalletIcon.d.ts → FunWarningIcon.d.ts} +1 -1
- package/dist/components/ModalHeightAnimationLayer/ModalHeightAnimationLayer.d.ts +7 -0
- package/dist/components/ModalHeightAnimationLayer/WithdrawalModalHeightAnimationWrapper.d.ts +8 -0
- package/dist/css/sprinkles.css.d.ts +14 -2
- package/dist/domains/swapped.d.ts +7 -0
- package/dist/domains/wallet.d.ts +0 -7
- package/dist/hooks/queries/useFops.d.ts +202 -2
- package/dist/hooks/track/CheckoutModalEvent.d.ts +6 -1
- package/dist/hooks/useCheckoutDirectExecution.d.ts +1 -0
- package/dist/hooks/useCheckoutTransferInit.d.ts +1 -0
- package/dist/hooks/usePaymentSources.d.ts +3 -2
- package/dist/index.css +3732 -3726
- package/dist/index.js +3176 -2840
- package/dist/modals/CheckoutModal/ConfirmationStep/useCheckoutConfirmation.d.ts +7 -3
- package/dist/modals/CheckoutModal/SourceChange/FormOfPaymentsList.d.ts +5 -5
- package/dist/modals/CheckoutModal/SourceChange/SourceChange.d.ts +2 -2
- package/dist/modals/CheckoutModal/SwappedIframe/SwappedIframe.d.ts +2 -2
- package/dist/modals/WithdrwalModal/WithdrawalModal.d.ts +0 -5
- package/dist/modals/WithdrwalModal/types.d.ts +5 -0
- package/dist/providers/AuthenticationContext.d.ts +0 -1
- package/dist/providers/FunkitCheckoutContext/index.d.ts +1 -0
- package/dist/providers/FunkitCheckoutContext/types.d.ts +5 -0
- package/dist/providers/FunkitConfigContext.d.ts +0 -4
- package/dist/providers/FunkitThemeProvider.d.ts +18 -0
- package/dist/themes/baseTheme.d.ts +3 -1
- 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 +0 -6
- package/dist/utils/polygonRpcCheck.d.ts +12 -0
- package/dist/utils/swapped.d.ts +4 -0
- package/dist/wallets/walletConnectors/index.js +42 -42
- package/package.json +16 -16
- package/dist/components/ConnectButton/formatAccountName.d.ts +0 -14
- package/dist/components/FunButton/FunSignInButton.d.ts +0 -8
- package/dist/components/FunCheckoutHistory/FunCheckoutStatus.css.d.ts +0 -1
- package/dist/components/FunInput/FunTextAreaInput.css copy.d.ts +0 -1
- package/dist/components/FunKeyValue/FunKeyValue.d.ts +0 -32
- package/dist/components/FunTransactionSummary/FunTxSummaryComponents.css.d.ts +0 -2
- package/dist/components/Icons/New/HelpIcon.d.ts +0 -2
- package/dist/components/Icons/New/UserIcon.d.ts +0 -4
- package/dist/components/index.d.ts +0 -2
- package/dist/hooks/queries/useClientId.d.ts +0 -3
- package/dist/hooks/useDynamicFont.d.ts +0 -5
- package/dist/modals/CheckoutModal/ConfirmationStep/DirectExecutionBrokerageAndCardAlert.d.ts +0 -2
- package/dist/modals/CheckoutModal/InputAmount/AvailableBalance.d.ts +0 -8
- /package/dist/components/{FunCheckoutModalHeightAnimationWrapper → ModalHeightAnimationLayer}/FunCheckoutModalHeightAnimationWrapper.d.ts +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TFunction } from 'i18next';
|
|
2
2
|
import type { Address } from 'viem';
|
|
3
|
-
import { type Config } from 'wagmi';
|
|
3
|
+
import { type Config, type Connector } from 'wagmi';
|
|
4
4
|
import type { ErrorNotification } from '../../../components/FunNotification/FunNotification';
|
|
5
5
|
export interface CheckoutConfirmationError extends ErrorNotification {
|
|
6
6
|
durationMs?: number;
|
|
@@ -14,7 +14,8 @@ export declare enum ConfirmationErrorCode {
|
|
|
14
14
|
SIGNATURE_DENIED = "SIGNATURE_DENIED",
|
|
15
15
|
SWITCH_CHAIN_ERROR = "SWITCH_CHAIN_ERROR",
|
|
16
16
|
WALLET_CLIENT_UNDEFINED = "WALLET_CLIENT_UNDEFINED",
|
|
17
|
-
INSUFFICIENT_GAS = "INSUFFICIENT_GAS"
|
|
17
|
+
INSUFFICIENT_GAS = "INSUFFICIENT_GAS",
|
|
18
|
+
POLYGON_RPC_ERROR = "POLYGON_RPC_ERROR"
|
|
18
19
|
}
|
|
19
20
|
interface UseCheckoutConfirmationOptions {
|
|
20
21
|
onError(error: CheckoutConfirmationError): void;
|
|
@@ -26,6 +27,9 @@ interface UseCheckoutConfirmationResult {
|
|
|
26
27
|
handleCheckoutConfirmation(): Promise<void>;
|
|
27
28
|
isConfirming: boolean;
|
|
28
29
|
}
|
|
29
|
-
export declare function toCheckoutConfirmationError(t: TFunction, error: unknown, wagmiConfig: Config
|
|
30
|
+
export declare function toCheckoutConfirmationError(t: TFunction, error: unknown, wagmiConfig: Config, options?: {
|
|
31
|
+
fromChainId?: string;
|
|
32
|
+
connector?: Connector;
|
|
33
|
+
}): Promise<CheckoutConfirmationError>;
|
|
30
34
|
export declare function useCheckoutConfirmation({ onError, onSuccess, }: UseCheckoutConfirmationOptions): UseCheckoutConfirmationResult;
|
|
31
35
|
export {};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type GetFopsResponse, type SwappedFormOfPayment } from '@funkit/api-base';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
interface FormOfPaymentsListProps {
|
|
4
|
-
|
|
4
|
+
fopsData?: GetFopsResponse;
|
|
5
5
|
isLoading: boolean;
|
|
6
|
-
selectedFop?:
|
|
7
|
-
onFopSelect: (fop:
|
|
6
|
+
selectedFop?: SwappedFormOfPayment | null;
|
|
7
|
+
onFopSelect: (fop: SwappedFormOfPayment) => void;
|
|
8
8
|
}
|
|
9
|
-
export declare function FormOfPaymentsList({
|
|
9
|
+
export declare function FormOfPaymentsList({ fopsData, isLoading, selectedFop, onFopSelect, }: FormOfPaymentsListProps): React.JSX.Element;
|
|
10
10
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type SwappedFormOfPayment } from '@funkit/api-base';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { type ConnectablePaymentMethodInfo, PaymentMethod, type PaymentMethodCardInfo, type PaymentMethodVirtualBankIncompleteInfo } from '../../../domains/paymentMethods';
|
|
4
4
|
import { type PaymentMethodType } from '../../../hooks/usePaymentSources';
|
|
@@ -32,7 +32,7 @@ export type SourceChangeNext = {
|
|
|
32
32
|
} | {
|
|
33
33
|
/** Navigate to Swapped iframe with a selected payment option */
|
|
34
34
|
swappedIframe: true;
|
|
35
|
-
selectedPaymentOption:
|
|
35
|
+
selectedPaymentOption: SwappedFormOfPayment;
|
|
36
36
|
/** Payment method type filter to restore when returning */
|
|
37
37
|
paymentMethodTypeFilter: PaymentMethodType;
|
|
38
38
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { SwappedFormOfPayment } from '@funkit/api-base';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import type { PaymentMethodType } from '../../../hooks/usePaymentSources';
|
|
4
4
|
import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../../../modals/CheckoutModal/stepTransition';
|
|
5
5
|
export type SwappedIframeState = CheckoutModalCommonState & {
|
|
6
6
|
/** The selected payment option from the fops API */
|
|
7
|
-
selectedPaymentOption:
|
|
7
|
+
selectedPaymentOption: SwappedFormOfPayment;
|
|
8
8
|
/** Payment method type filter to restore when returning to SOURCE_CHANGE */
|
|
9
9
|
paymentMethodTypeFilter?: PaymentMethodType;
|
|
10
10
|
};
|
|
@@ -6,9 +6,4 @@ export interface WithdrawalModalProps {
|
|
|
6
6
|
onClose: () => void;
|
|
7
7
|
config: FunkitWithdrawalConfig;
|
|
8
8
|
}
|
|
9
|
-
export declare enum WithdrawalModalStep {
|
|
10
|
-
ENTER_AMOUNT = "ENTER_AMOUNT",
|
|
11
|
-
SUCCESS = "SUCCESS",
|
|
12
|
-
PENDING_CALLBACK = "PENDING_CALLBACK"
|
|
13
|
-
}
|
|
14
9
|
export declare function WithdrawalModal({ onClose, open, config, }: WithdrawalModalProps): React.JSX.Element;
|
|
@@ -26,5 +26,4 @@ export interface FunkitConnectAuthenticationProviderProps<Message> extends Authe
|
|
|
26
26
|
children: ReactNode;
|
|
27
27
|
}
|
|
28
28
|
export declare function FunkitConnectAuthenticationProvider<Message = unknown>({ adapter, children, enabled, status, }: FunkitConnectAuthenticationProviderProps<Message>): React.JSX.Element;
|
|
29
|
-
export declare function useAuthenticationAdapter(): AuthenticationAdapter<any>;
|
|
30
29
|
export declare function useAuthenticationStatus(): AuthenticationStatus | null;
|
|
@@ -37,6 +37,7 @@ interface FunkitCheckoutContextInterface {
|
|
|
37
37
|
applyDynamicRouting(path: Omit<DynamicRoutePath, 'getCustomRecipient' | 'generateActionsParams'> & {
|
|
38
38
|
customRecipient?: FunkitCheckoutConfig['customRecipient'];
|
|
39
39
|
generateActionsParams?: FunkitCheckoutConfig['generateActionsParams'];
|
|
40
|
+
bridgeOverride?: FunkitCheckoutConfig['bridgeOverride'];
|
|
40
41
|
}): void;
|
|
41
42
|
updateDynamicRoutingId(dynamicRoutingId: string): void;
|
|
42
43
|
}
|
|
@@ -79,6 +79,11 @@ export interface FunkitCheckoutConfig extends Omit<ApiFunkitCheckoutConfig, 'gen
|
|
|
79
79
|
* For dynamic routing, the id of the dynamic route to use
|
|
80
80
|
*/
|
|
81
81
|
dynamicRoutingId?: string;
|
|
82
|
+
/**
|
|
83
|
+
* Force a specific bridge provider for the checkout quote.
|
|
84
|
+
* Set via dynamic routing rules.
|
|
85
|
+
*/
|
|
86
|
+
bridgeOverride?: 'across' | 'relay';
|
|
82
87
|
}
|
|
83
88
|
export interface WithdrawalConfigBase {
|
|
84
89
|
/** Title to show in the checkout modal. Defaults to "Checkout" **/
|
|
@@ -177,8 +177,6 @@ export interface FunkitUiCustomizationsConfig {
|
|
|
177
177
|
/** Translation key for label - defaults to `'common.close'` */
|
|
178
178
|
labelKey?: 'sourceChange.exploreMarketsFirst' | 'common.close';
|
|
179
179
|
};
|
|
180
|
-
/** Whether to show the crypto/cash toggle - defaults to false */
|
|
181
|
-
showCryptoCashToggle?: boolean;
|
|
182
180
|
/** Whether to show target asset selection menu if dynamicTargetAssetCandidates exist - defaults to false */
|
|
183
181
|
showTargetAssetSelection?: boolean;
|
|
184
182
|
/** Whether to show wallet option when balance is insufficient - defaults to false (hides wallet) */
|
|
@@ -228,8 +226,6 @@ export type FunkitUiCustomizationsConfigInternal = Required<FunkitUiCustomizatio
|
|
|
228
226
|
bottomBarCloseButton: Required<Required<FunkitUiCustomizationsConfig['sourceChangeScreen'] & {}>['bottomBarCloseButton']>;
|
|
229
227
|
};
|
|
230
228
|
};
|
|
231
|
-
export declare const DEFAULT_TEXT_CUSTOMIZATIONS: FunkitTextCustomizationsConfig;
|
|
232
|
-
export declare const DEFAULT_UI_CUSTOMIZATIONS: FunkitUiCustomizationsConfigInternal;
|
|
233
229
|
export type FunkitConfig = {
|
|
234
230
|
/** Funkit api key **/
|
|
235
231
|
apiKey: string;
|
|
@@ -194,6 +194,7 @@ export declare const useActiveTheme: () => {
|
|
|
194
194
|
txSummaryLabel: string;
|
|
195
195
|
txSummaryValue: string;
|
|
196
196
|
sourceListSectionLabelFontWeight: string;
|
|
197
|
+
formOfPaymentsListSectionLabelFontWeight: string;
|
|
197
198
|
};
|
|
198
199
|
fontSize: {
|
|
199
200
|
'10': {
|
|
@@ -348,6 +349,10 @@ export declare const useActiveTheme: () => {
|
|
|
348
349
|
fontSize: string;
|
|
349
350
|
lineHeight: string;
|
|
350
351
|
};
|
|
352
|
+
formOfPaymentsListSectionLabelFontSize: {
|
|
353
|
+
fontSize: string;
|
|
354
|
+
lineHeight: string;
|
|
355
|
+
};
|
|
351
356
|
};
|
|
352
357
|
radii: {
|
|
353
358
|
actionButton: string;
|
|
@@ -438,6 +443,7 @@ export declare const useActiveTheme: () => {
|
|
|
438
443
|
modalOverlay: string;
|
|
439
444
|
};
|
|
440
445
|
moonpayTheme: string;
|
|
446
|
+
modalZIndex: string;
|
|
441
447
|
};
|
|
442
448
|
/** Overrides the currently active `theme` with disregard to the `theme` provided to the `FunkitProvider`, ie. `toggleTheme` will switch to the `theme` provided to the `FunkitProvider`, not the theme set by `setTheme` */
|
|
443
449
|
setTheme: (theme: ThemeVars) => void;
|
|
@@ -622,6 +628,7 @@ export declare const useActiveTheme: () => {
|
|
|
622
628
|
txSummaryLabel: string;
|
|
623
629
|
txSummaryValue: string;
|
|
624
630
|
sourceListSectionLabelFontWeight: string;
|
|
631
|
+
formOfPaymentsListSectionLabelFontWeight: string;
|
|
625
632
|
};
|
|
626
633
|
fontSize: {
|
|
627
634
|
'10': {
|
|
@@ -776,6 +783,10 @@ export declare const useActiveTheme: () => {
|
|
|
776
783
|
fontSize: string;
|
|
777
784
|
lineHeight: string;
|
|
778
785
|
};
|
|
786
|
+
formOfPaymentsListSectionLabelFontSize: {
|
|
787
|
+
fontSize: string;
|
|
788
|
+
lineHeight: string;
|
|
789
|
+
};
|
|
779
790
|
};
|
|
780
791
|
radii: {
|
|
781
792
|
actionButton: string;
|
|
@@ -866,6 +877,7 @@ export declare const useActiveTheme: () => {
|
|
|
866
877
|
modalOverlay: string;
|
|
867
878
|
};
|
|
868
879
|
moonpayTheme: string;
|
|
880
|
+
modalZIndex: string;
|
|
869
881
|
} | null | undefined;
|
|
870
882
|
/** Returns the `dark` theme as long as a themeSet was passed to the `FunkitProvider`, if only a single theme object was passed it will be returned as `darkTheme` and `lightTheme` making them the same */
|
|
871
883
|
darkTheme: {
|
|
@@ -1048,6 +1060,7 @@ export declare const useActiveTheme: () => {
|
|
|
1048
1060
|
txSummaryLabel: string;
|
|
1049
1061
|
txSummaryValue: string;
|
|
1050
1062
|
sourceListSectionLabelFontWeight: string;
|
|
1063
|
+
formOfPaymentsListSectionLabelFontWeight: string;
|
|
1051
1064
|
};
|
|
1052
1065
|
fontSize: {
|
|
1053
1066
|
'10': {
|
|
@@ -1202,6 +1215,10 @@ export declare const useActiveTheme: () => {
|
|
|
1202
1215
|
fontSize: string;
|
|
1203
1216
|
lineHeight: string;
|
|
1204
1217
|
};
|
|
1218
|
+
formOfPaymentsListSectionLabelFontSize: {
|
|
1219
|
+
fontSize: string;
|
|
1220
|
+
lineHeight: string;
|
|
1221
|
+
};
|
|
1205
1222
|
};
|
|
1206
1223
|
radii: {
|
|
1207
1224
|
actionButton: string;
|
|
@@ -1292,6 +1309,7 @@ export declare const useActiveTheme: () => {
|
|
|
1292
1309
|
modalOverlay: string;
|
|
1293
1310
|
};
|
|
1294
1311
|
moonpayTheme: string;
|
|
1312
|
+
modalZIndex: string;
|
|
1295
1313
|
} | null | undefined;
|
|
1296
1314
|
/** Toggles between `light` and `dark` themes as long as they were passed to the `FunkitProvider`, if only a single theme object was passed toggling will be disabled */
|
|
1297
1315
|
toggleTheme: (colorScheme?: ThemeColorScheme) => void;
|
|
@@ -23,8 +23,10 @@ interface BaseThemeOptions {
|
|
|
23
23
|
borderRadius?: RadiusScale;
|
|
24
24
|
fontStack?: FontStack;
|
|
25
25
|
overlayBlur?: Blurs;
|
|
26
|
+
/** Custom z-index for the modal overlay */
|
|
27
|
+
modalZIndex?: number;
|
|
26
28
|
}
|
|
27
|
-
export declare const baseTheme: ({ borderRadius, fontStack, fontSizing, customFontFamily, customFontWeights, customFontSizings, customBorderWidths, customBorderRadiuses, customDimensions, customSpacings, customTextTransforms, overlayBlur, }: BaseThemeOptions) => Pick<ThemeVars, "radii" | "dimensions" | "fonts" | "fontWeight" | "fontSize" | "blurs" | "spacing" | "borderWidths" | "textTransforms">;
|
|
29
|
+
export declare const baseTheme: ({ borderRadius, fontStack, fontSizing, customFontFamily, customFontWeights, customFontSizings, customBorderWidths, customBorderRadiuses, customDimensions, customSpacings, customTextTransforms, overlayBlur, modalZIndex, }: BaseThemeOptions) => Pick<ThemeVars, "radii" | "dimensions" | "fonts" | "fontWeight" | "fontSize" | "blurs" | "spacing" | "borderWidths" | "textTransforms" | "modalZIndex">;
|
|
28
30
|
export interface AccentColor {
|
|
29
31
|
accentColor: string;
|
|
30
32
|
accentColorForeground: string;
|
package/dist/themes/baseTheme.js
CHANGED
package/dist/themes/darkTheme.js
CHANGED
package/dist/utils/checkout.d.ts
CHANGED
|
@@ -78,12 +78,6 @@ export declare function getCheckoutItemDisplay({ checkoutConfig, hideAmount, ove
|
|
|
78
78
|
* _These are only the fees from our base quote, **not** including the initial transfer / brokerage / card processing fees._
|
|
79
79
|
*/
|
|
80
80
|
export declare function getBaseQuoteTotalFeesFromAmount(baseQuote: CheckoutQuoteResponse): number;
|
|
81
|
-
/**
|
|
82
|
-
* Given the result of a quote, calculate the effective fees (in source asset).
|
|
83
|
-
*
|
|
84
|
-
* _These also including the initial transfer / brokerage / card processing fees._
|
|
85
|
-
*/
|
|
86
|
-
export declare function getQuoteTotalFeesFromAmount(finalQuote: FunkitCheckoutQuoteResult): number;
|
|
87
81
|
/**
|
|
88
82
|
* Given the result of a quote, calculate the effective exchange rate (target asset / source asset).
|
|
89
83
|
*/
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Connector } from 'wagmi';
|
|
2
|
+
export declare const POLYGON_CHAIN_ID = 137;
|
|
3
|
+
/**
|
|
4
|
+
* Checks if the user's wallet RPC for Polygon is responsive by sending an eth_blockNumber call.
|
|
5
|
+
* We use eth_blockNumber instead of eth_chainId because eth_chainId can be intercepted
|
|
6
|
+
* by the wallet itself and may not actually hit the RPC.
|
|
7
|
+
*
|
|
8
|
+
* The default polygon-rpc.com stopped working in Feb 2026.
|
|
9
|
+
*
|
|
10
|
+
* @returns true if the RPC appears to be down/unreachable
|
|
11
|
+
*/
|
|
12
|
+
export declare function isPolygonRpcDown(fromChainId: string | undefined, connector: Connector | undefined): Promise<boolean>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SavedFormOfPayment, SwappedFormOfPayment } from '@funkit/api-base';
|
|
2
|
+
export declare const isSavedFormOfPaymentType: (fop: SwappedFormOfPayment) => fop is SavedFormOfPayment;
|
|
3
|
+
export declare const getSavedFormOfPaymentDisplayName: (fop: SavedFormOfPayment) => string;
|
|
4
|
+
export declare const getSavedFormOfPaymentIcon: (fop: SavedFormOfPayment) => string;
|
|
@@ -3,14 +3,8 @@ import {
|
|
|
3
3
|
zerionWallet
|
|
4
4
|
} from "./chunk-CZYUE3AR.js";
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import {
|
|
9
|
-
tahoWallet
|
|
10
|
-
} from "./chunk-TNZJRXUQ.js";
|
|
11
|
-
import {
|
|
12
|
-
talismanWallet
|
|
13
|
-
} from "./chunk-JTLLKY2O.js";
|
|
6
|
+
oneKeyWallet
|
|
7
|
+
} from "./chunk-35Q4HKAM.js";
|
|
14
8
|
import {
|
|
15
9
|
tokenPocketWallet
|
|
16
10
|
} from "./chunk-47QF6EET.js";
|
|
@@ -18,23 +12,23 @@ import {
|
|
|
18
12
|
tokenaryWallet
|
|
19
13
|
} from "./chunk-M2HGGTFE.js";
|
|
20
14
|
import {
|
|
21
|
-
|
|
22
|
-
} from "./chunk-
|
|
15
|
+
trustWallet
|
|
16
|
+
} from "./chunk-JFHP4YJG.js";
|
|
23
17
|
import {
|
|
24
18
|
uniswapWallet
|
|
25
19
|
} from "./chunk-LH7BMNFZ.js";
|
|
20
|
+
import {
|
|
21
|
+
phantomWallet
|
|
22
|
+
} from "./chunk-3IYE623P.js";
|
|
23
|
+
import {
|
|
24
|
+
walletConnectWallet
|
|
25
|
+
} from "./chunk-NP5QGWNL.js";
|
|
26
26
|
import {
|
|
27
27
|
xdefiWallet
|
|
28
28
|
} from "./chunk-TMFH6GXS.js";
|
|
29
29
|
import {
|
|
30
30
|
zealWallet
|
|
31
31
|
} from "./chunk-VU2RNIQG.js";
|
|
32
|
-
import {
|
|
33
|
-
phantomWallet
|
|
34
|
-
} from "./chunk-3IYE623P.js";
|
|
35
|
-
import {
|
|
36
|
-
rainbowWallet
|
|
37
|
-
} from "./chunk-77UTBHGP.js";
|
|
38
32
|
import {
|
|
39
33
|
ramperWallet
|
|
40
34
|
} from "./chunk-FCG5Q6JX.js";
|
|
@@ -54,35 +48,41 @@ import {
|
|
|
54
48
|
subWallet
|
|
55
49
|
} from "./chunk-2E4PDCEJ.js";
|
|
56
50
|
import {
|
|
57
|
-
|
|
58
|
-
} from "./chunk-
|
|
51
|
+
tahoWallet
|
|
52
|
+
} from "./chunk-TNZJRXUQ.js";
|
|
53
|
+
import {
|
|
54
|
+
talismanWallet
|
|
55
|
+
} from "./chunk-JTLLKY2O.js";
|
|
59
56
|
import {
|
|
60
57
|
mewWallet
|
|
61
58
|
} from "./chunk-CF5HOLH2.js";
|
|
62
59
|
import {
|
|
63
|
-
|
|
64
|
-
} from "./chunk-
|
|
60
|
+
metaMaskWallet
|
|
61
|
+
} from "./chunk-RA7MCWF4.js";
|
|
65
62
|
import {
|
|
66
63
|
okxWallet
|
|
67
64
|
} from "./chunk-U5QP7MI5.js";
|
|
68
|
-
import {
|
|
69
|
-
omniWallet
|
|
70
|
-
} from "./chunk-7CUY5G6R.js";
|
|
71
65
|
import {
|
|
72
66
|
oneInchWallet
|
|
73
67
|
} from "./chunk-OESTDX6I.js";
|
|
74
68
|
import {
|
|
75
|
-
|
|
76
|
-
} from "./chunk-
|
|
69
|
+
oktoWallet
|
|
70
|
+
} from "./chunk-ADIXAKUL.js";
|
|
71
|
+
import {
|
|
72
|
+
omniWallet
|
|
73
|
+
} from "./chunk-7CUY5G6R.js";
|
|
77
74
|
import {
|
|
78
75
|
rabbyWallet
|
|
79
76
|
} from "./chunk-LW6S43RE.js";
|
|
80
77
|
import {
|
|
81
|
-
|
|
82
|
-
} from "./chunk-
|
|
78
|
+
rainbowWallet
|
|
79
|
+
} from "./chunk-77UTBHGP.js";
|
|
83
80
|
import {
|
|
84
81
|
frameWallet
|
|
85
82
|
} from "./chunk-AI55G5DD.js";
|
|
83
|
+
import {
|
|
84
|
+
dawnWallet
|
|
85
|
+
} from "./chunk-EMBU4RXK.js";
|
|
86
86
|
import {
|
|
87
87
|
frontierWallet
|
|
88
88
|
} from "./chunk-T5KHVUFR.js";
|
|
@@ -92,15 +92,18 @@ import {
|
|
|
92
92
|
import {
|
|
93
93
|
imTokenWallet
|
|
94
94
|
} from "./chunk-COZ7MIQS.js";
|
|
95
|
-
import {
|
|
96
|
-
injectedWallet
|
|
97
|
-
} from "./chunk-MQSCN4BO.js";
|
|
98
95
|
import {
|
|
99
96
|
kresusWallet
|
|
100
97
|
} from "./chunk-MJXPRJZT.js";
|
|
98
|
+
import {
|
|
99
|
+
injectedWallet
|
|
100
|
+
} from "./chunk-MQSCN4BO.js";
|
|
101
101
|
import {
|
|
102
102
|
ledgerWallet
|
|
103
103
|
} from "./chunk-BRBKM4PW.js";
|
|
104
|
+
import {
|
|
105
|
+
bybitWallet
|
|
106
|
+
} from "./chunk-5EAOMOTO.js";
|
|
104
107
|
import {
|
|
105
108
|
clvWallet
|
|
106
109
|
} from "./chunk-HPHADOYD.js";
|
|
@@ -110,15 +113,9 @@ import {
|
|
|
110
113
|
import {
|
|
111
114
|
coinbaseWallet
|
|
112
115
|
} from "./chunk-H4IRCEZN.js";
|
|
113
|
-
import {
|
|
114
|
-
bitskiWallet
|
|
115
|
-
} from "./chunk-YMUSFW44.js";
|
|
116
116
|
import {
|
|
117
117
|
coreWallet
|
|
118
118
|
} from "./chunk-VYNVAGSV.js";
|
|
119
|
-
import {
|
|
120
|
-
dawnWallet
|
|
121
|
-
} from "./chunk-EMBU4RXK.js";
|
|
122
119
|
import {
|
|
123
120
|
desigWallet
|
|
124
121
|
} from "./chunk-QHC4I2FM.js";
|
|
@@ -126,27 +123,30 @@ import {
|
|
|
126
123
|
enkryptWallet
|
|
127
124
|
} from "./chunk-ABQKUIUD.js";
|
|
128
125
|
import {
|
|
129
|
-
|
|
130
|
-
} from "./chunk-
|
|
126
|
+
foxWallet
|
|
127
|
+
} from "./chunk-YLJDPTYF.js";
|
|
131
128
|
import {
|
|
132
129
|
bifrostWallet
|
|
133
130
|
} from "./chunk-R6Y36CMA.js";
|
|
134
131
|
import {
|
|
135
132
|
bitgetWallet
|
|
136
133
|
} from "./chunk-FA5DTT5R.js";
|
|
134
|
+
import {
|
|
135
|
+
argentWallet
|
|
136
|
+
} from "./chunk-WSQ2YJO2.js";
|
|
137
|
+
import {
|
|
138
|
+
bitskiWallet
|
|
139
|
+
} from "./chunk-YMUSFW44.js";
|
|
137
140
|
import {
|
|
138
141
|
bitverseWallet
|
|
139
142
|
} from "./chunk-3HZRRP4Y.js";
|
|
140
143
|
import {
|
|
141
144
|
bloomWallet
|
|
142
145
|
} from "./chunk-S27IADFU.js";
|
|
146
|
+
import "./chunk-23WIEY36.js";
|
|
143
147
|
import {
|
|
144
148
|
braveWallet
|
|
145
149
|
} from "./chunk-4ZXII3UA.js";
|
|
146
|
-
import {
|
|
147
|
-
bybitWallet
|
|
148
|
-
} from "./chunk-5EAOMOTO.js";
|
|
149
|
-
import "./chunk-23WIEY36.js";
|
|
150
150
|
import "./chunk-ARYAYQ7Z.js";
|
|
151
151
|
export {
|
|
152
152
|
argentWallet,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@funkit/connect",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.6.0",
|
|
4
4
|
"description": "Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -45,15 +45,15 @@
|
|
|
45
45
|
"wagmi": "2.x"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@aws-sdk/client-cloudfront": "3.
|
|
49
|
-
"@aws-sdk/client-s3": "3.
|
|
50
|
-
"@chromatic-com/storybook": "^4.1.
|
|
48
|
+
"@aws-sdk/client-cloudfront": "3.1000.0",
|
|
49
|
+
"@aws-sdk/client-s3": "3.998.0",
|
|
50
|
+
"@chromatic-com/storybook": "^4.1.3",
|
|
51
51
|
"@statsig/statsig-node-core": "^0.11.1",
|
|
52
|
-
"@storybook/addon-docs": "^9.1.
|
|
52
|
+
"@storybook/addon-docs": "^9.1.19",
|
|
53
53
|
"@storybook/addon-links": "^10.1.3",
|
|
54
|
-
"@storybook/react-vite": "^9.1.
|
|
54
|
+
"@storybook/react-vite": "^9.1.19",
|
|
55
55
|
"@testing-library/jest-dom": "^6.2.0",
|
|
56
|
-
"@testing-library/react": "^16.3.
|
|
56
|
+
"@testing-library/react": "^16.3.2",
|
|
57
57
|
"@testing-library/user-event": "^14.5.2",
|
|
58
58
|
"@types/qrcode": "^1.5.5",
|
|
59
59
|
"@types/ua-parser-js": "^0.7.39",
|
|
@@ -62,23 +62,22 @@
|
|
|
62
62
|
"@vanilla-extract/private": "^1.0.7",
|
|
63
63
|
"@vanilla-extract/vite-plugin": "^5.0.3",
|
|
64
64
|
"@vitejs/plugin-react": "^5.1.2",
|
|
65
|
-
"autoprefixer": "^10.4.
|
|
65
|
+
"autoprefixer": "^10.4.27",
|
|
66
66
|
"buffer": "^6.0.3",
|
|
67
67
|
"dotenv": "^17.2.3",
|
|
68
68
|
"esbuild-plugin-replace": "^1.4.0",
|
|
69
|
-
"i18next-cli": "1.24.14",
|
|
70
69
|
"jsdom": "^26.1.0",
|
|
71
70
|
"postcss": "^8.4.33",
|
|
72
71
|
"postcss-prefix-selector": "^1.16.0",
|
|
73
72
|
"process": "^0.11.10",
|
|
74
73
|
"react": "^18.3.0",
|
|
75
|
-
"storybook": "^9.1.
|
|
74
|
+
"storybook": "^9.1.19",
|
|
76
75
|
"stream-browserify": "^3.0.0",
|
|
77
|
-
"tsx": "^4.19.2",
|
|
78
76
|
"tsc-alias": "1.8.16",
|
|
77
|
+
"tsx": "^4.19.2",
|
|
79
78
|
"util": "^0.12.5",
|
|
80
79
|
"vite-plugin-node-polyfills": "^0.24.0",
|
|
81
|
-
"vitest": "^
|
|
80
|
+
"vitest": "^4.0.18"
|
|
82
81
|
},
|
|
83
82
|
"dependencies": {
|
|
84
83
|
"@bluvo/react": "2.1.3",
|
|
@@ -103,10 +102,10 @@
|
|
|
103
102
|
"ua-parser-js": "^1.0.37",
|
|
104
103
|
"use-debounce": "^10.0.5",
|
|
105
104
|
"uuid": "^9.0.1",
|
|
106
|
-
"@funkit/api-base": "2.
|
|
105
|
+
"@funkit/api-base": "2.3.1",
|
|
107
106
|
"@funkit/chains": "1.1.0",
|
|
108
|
-
"@funkit/fun-relay": "2.
|
|
109
|
-
"@funkit/utils": "1.2.
|
|
107
|
+
"@funkit/fun-relay": "2.6.1",
|
|
108
|
+
"@funkit/utils": "1.2.3"
|
|
110
109
|
},
|
|
111
110
|
"repository": {
|
|
112
111
|
"type": "git",
|
|
@@ -131,6 +130,7 @@
|
|
|
131
130
|
"storybook:fast": "NODE_OPTIONS='--max-old-space-size=4096' storybook dev -p 6006 --no-open",
|
|
132
131
|
"storybook:clean": "rm -rf node_modules/.vite && npm run storybook",
|
|
133
132
|
"build-storybook": "storybook build",
|
|
134
|
-
"statsig:generate": "tsx scripts/get_default_statsig_config.ts"
|
|
133
|
+
"statsig:generate": "tsx scripts/get_default_statsig_config.ts",
|
|
134
|
+
"i18n:unused": "node scripts/find-unused-i18n-keys.mjs"
|
|
135
135
|
}
|
|
136
136
|
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Formats users' account name for display
|
|
3
|
-
* - If the account name is shorter than 15 characters, it will be displayed as is
|
|
4
|
-
* - If the account name is longer than 15 characters, it will be shortened to 12 characters + 3 ellipsis
|
|
5
|
-
* - Additionally, If it is an email, the suffix will be removed
|
|
6
|
-
*
|
|
7
|
-
* Examples:
|
|
8
|
-
* - `chloe@fun.xyz` -> `chloe@fun.xyz`
|
|
9
|
-
* - `longname@outlook.com` -> `longname`
|
|
10
|
-
* - `supersuperlongname@gmail.com` -> `supersuperlo...`
|
|
11
|
-
* - `@chloefunxyz` -> `@chloefunxyz`
|
|
12
|
-
* - `@chloefunxyzlongtwittername` -> `@chloefunxyz...`
|
|
13
|
-
*/
|
|
14
|
-
export declare function formatAccountName(accountName: string, isEmail: boolean): string;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React, { type ReactNode } from 'react';
|
|
2
|
-
interface FunSignInButtonProps {
|
|
3
|
-
title: string;
|
|
4
|
-
titlePrefix: ReactNode;
|
|
5
|
-
onClick: () => void;
|
|
6
|
-
}
|
|
7
|
-
export declare function FunSignInButton({ title, titlePrefix, onClick, }: FunSignInButtonProps): React.JSX.Element;
|
|
8
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const GradientLoadingBox: string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const baseStyles: string;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import React, { type MouseEventHandler, type ReactNode } from 'react';
|
|
2
|
-
import { type BoxProps } from '../Box/Box';
|
|
3
|
-
import { type TextProps } from '../Text/Text';
|
|
4
|
-
export interface FunKeyValueProps {
|
|
5
|
-
keyIcon?: ReactNode;
|
|
6
|
-
keyText: string;
|
|
7
|
-
valueIcon?: ReactNode;
|
|
8
|
-
valueText: ReactNode;
|
|
9
|
-
disclaimerText?: string;
|
|
10
|
-
onClick?: MouseEventHandler | null;
|
|
11
|
-
hasBorder?: boolean;
|
|
12
|
-
keyTextColor?: BoxProps['color'];
|
|
13
|
-
keyTextSize?: TextProps['size'];
|
|
14
|
-
keyTextWeight?: TextProps['weight'];
|
|
15
|
-
keyGap?: BoxProps['gap'];
|
|
16
|
-
keySectionMaxWidth?: BoxProps['maxWidth'];
|
|
17
|
-
valueTextColor?: BoxProps['color'];
|
|
18
|
-
valueTextSize?: TextProps['size'];
|
|
19
|
-
valueTextWeight?: TextProps['weight'];
|
|
20
|
-
valueGap?: BoxProps['gap'];
|
|
21
|
-
reverseValueItems?: boolean;
|
|
22
|
-
customValueComponent?: ReactNode;
|
|
23
|
-
disclaimerTextColor?: BoxProps['color'];
|
|
24
|
-
backgroundBaseColor?: Extract<BoxProps['background'], string>;
|
|
25
|
-
borderColorBase?: Extract<BoxProps['borderColor'], string>;
|
|
26
|
-
borderColorHover?: Extract<BoxProps['borderColor'], string>;
|
|
27
|
-
paddingY?: BoxProps['paddingY'];
|
|
28
|
-
paddingX?: BoxProps['paddingX'];
|
|
29
|
-
isDisabled?: boolean;
|
|
30
|
-
}
|
|
31
|
-
export declare function FunKeyValue({ keyIcon, keyText, valueIcon, valueText, disclaimerText, onClick, hasBorder, backgroundBaseColor, // 'actionButtonSecondaryBackground'
|
|
32
|
-
borderColorBase, borderColorHover, keyTextColor, keyTextSize, keyTextWeight, keyGap, keySectionMaxWidth, valueTextColor, valueTextSize, valueTextWeight, valueGap, reverseValueItems, customValueComponent, disclaimerTextColor, paddingY, paddingX, isDisabled, }: FunKeyValueProps): React.JSX.Element;
|