@funkit/connect 8.6.0 → 9.0.1
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 +48 -0
- package/dist/{chunk-EPHOZPMR.js → chunk-SC53AFEE.js} +2 -0
- package/dist/{chunk-FZZF5FGD.js → chunk-WSCXOKCX.js} +1 -1
- package/dist/{chunk-NAHADAYF.js → chunk-XCM74QX2.js} +1 -1
- package/dist/clients/fanatics.css +3750 -3687
- package/dist/clients/fanatics.js +3 -3
- package/dist/components/Box/Box.d.ts +22 -22
- package/dist/components/Dialog/Dialog.d.ts +3 -1
- package/dist/components/Dialog/DialogContent.css.d.ts +2 -0
- package/dist/components/Dialog/FocusTrap.d.ts +1 -1
- package/dist/components/ErrorBoundary/ErrorBoundary.d.ts +1 -1
- package/dist/components/FunTooltip/FunTooltip.d.ts +2 -2
- package/dist/components/Tabs/tabs.css.d.ts +4 -0
- package/dist/config/getDefaultConfig.d.ts +2 -2
- package/dist/consts/bluvo.d.ts +3 -2
- package/dist/css/atoms.d.ts +1 -0
- package/dist/css/sprinkles.css.d.ts +25 -21
- package/dist/domains/fees.d.ts +1 -1
- package/dist/domains/quote.d.ts +1 -1
- package/dist/domains/swapped.d.ts +10 -1
- package/dist/hooks/queries/useFops.d.ts +1 -12
- package/dist/hooks/track/CheckoutModalEvent.d.ts +8 -0
- package/dist/hooks/useIframePool.d.ts +38 -0
- package/dist/hooks/usePaymentMethodIcon.d.ts +1 -1
- package/dist/hooks/useScrollDivider.d.ts +1 -1
- package/dist/hooks/useSwappedPreload.d.ts +7 -0
- package/dist/hooks/useTextMeasurer.d.ts +1 -1
- package/dist/index.css +3817 -3690
- package/dist/index.js +2092 -1511
- package/dist/modals/ChainModal/Chain.d.ts +1 -1
- package/dist/modals/CheckoutModal/Brokerage/BrokerageTwoFA.d.ts +0 -28
- package/dist/modals/CheckoutModal/ConfirmationStep/useCheckoutConfirmation.d.ts +1 -1
- package/dist/modals/CheckoutModal/InputAmount/useAmountInput.d.ts +1 -1
- package/dist/modals/CheckoutModal/SwappedIframe/SwappedIframe.d.ts +1 -1
- package/dist/modals/CheckoutModal/SwappedIframe/SwappedIframePool.d.ts +14 -0
- package/dist/modals/ProfileDetails/FunProfileViews/Home/ProfileTitleSection.d.ts +1 -1
- package/dist/providers/FunkitConfigContext.d.ts +1 -1
- package/dist/providers/FunkitConnectChainContext.d.ts +1 -1
- package/dist/providers/FunkitProvider.d.ts +1 -1
- package/dist/providers/FunkitThemeProvider.d.ts +6 -0
- package/dist/providers/GeneralWalletProvider.d.ts +6 -6
- package/dist/providers/SwappedProvider.d.ts +28 -0
- package/dist/themes/baseTheme.js +1 -1
- package/dist/themes/darkTheme.js +2 -2
- package/dist/themes/lightTheme.js +2 -2
- package/dist/types/utils.d.ts +1 -1
- package/dist/utils/checkout.d.ts +1 -2
- package/dist/utils/flags/config.d.ts +15 -0
- package/dist/utils/polygonRpcCheck.d.ts +1 -1
- package/dist/utils/swapped.d.ts +38 -0
- package/dist/wagmi/actions.d.ts +10 -0
- package/dist/wagmi/chains.d.ts +2 -0
- package/dist/wagmi/connectors.d.ts +2 -0
- package/dist/wagmi/hooks.d.ts +4 -0
- package/dist/wagmi/query.d.ts +1 -0
- package/dist/wallets/Wallet.d.ts +2 -2
- package/dist/wallets/connectorsForWallets.d.ts +1 -1
- package/dist/wallets/getDefaultWallets.d.ts +1 -1
- package/dist/wallets/walletConnectors/argentWallet/argentWallet.js +3 -2
- package/dist/wallets/walletConnectors/bifrostWallet/bifrostWallet.js +4 -3
- package/dist/wallets/walletConnectors/bitgetWallet/bitgetWallet.js +4 -3
- package/dist/wallets/walletConnectors/bitskiWallet/bitskiWallet.js +3 -2
- package/dist/wallets/walletConnectors/bitverseWallet/bitverseWallet.js +3 -2
- package/dist/wallets/walletConnectors/bloomWallet/bloomWallet.js +3 -2
- package/dist/wallets/walletConnectors/braveWallet/braveWallet.js +3 -2
- package/dist/wallets/walletConnectors/bybitWallet/bybitWallet.js +4 -3
- package/dist/wallets/walletConnectors/{chunk-M2HGGTFE.js → chunk-34LO6Q7A.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-TNZJRXUQ.js → chunk-4BMUFNMT.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-47QF6EET.js → chunk-4C7ER452.js} +2 -2
- package/dist/wallets/walletConnectors/{chunk-QS2XIZEH.js → chunk-4R4AARTG.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-YLJDPTYF.js → chunk-53VYSPXK.js} +2 -2
- package/dist/wallets/walletConnectors/{chunk-JTLLKY2O.js → chunk-6MFOL6EB.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-5EAOMOTO.js → chunk-6UCI7GM6.js} +2 -2
- package/dist/wallets/walletConnectors/{chunk-RLRQYUYC.js → chunk-6YO27XOM.js} +2 -2
- package/dist/wallets/walletConnectors/{chunk-MRRZOQGZ.js → chunk-7OARWILZ.js} +2 -2
- package/dist/wallets/walletConnectors/{chunk-YMUSFW44.js → chunk-A7FNGC4A.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-ARYAYQ7Z.js → chunk-BAVE62IL.js} +4 -2
- package/dist/wallets/walletConnectors/{chunk-ADIXAKUL.js → chunk-BVX22N7L.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-T5KHVUFR.js → chunk-CJJT7LMT.js} +2 -2
- package/dist/wallets/walletConnectors/{chunk-R6Y36CMA.js → chunk-EKJHJFRN.js} +2 -2
- package/dist/wallets/walletConnectors/{chunk-MJXPRJZT.js → chunk-G4V5B6YC.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-VYNVAGSV.js → chunk-GH4M6FTK.js} +2 -2
- package/dist/wallets/walletConnectors/{chunk-3HZRRP4Y.js → chunk-GROWFRGP.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-77UTBHGP.js → chunk-GSHSWVEG.js} +2 -2
- package/dist/wallets/walletConnectors/{chunk-HPHADOYD.js → chunk-GVOQTORD.js} +2 -2
- package/dist/wallets/walletConnectors/{chunk-VU2RNIQG.js → chunk-HE2LMIPD.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-35Q4HKAM.js → chunk-HE5J5T7X.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-RA7MCWF4.js → chunk-HETS3KKI.js} +2 -2
- package/dist/wallets/walletConnectors/{chunk-CF5HOLH2.js → chunk-HKVDCVCG.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-FA5DTT5R.js → chunk-HOPH3TQ3.js} +2 -2
- package/dist/wallets/walletConnectors/{chunk-W7Y6I22Y.js → chunk-IICWJWGZ.js} +2 -2
- package/dist/wallets/walletConnectors/{chunk-7CUY5G6R.js → chunk-INNF7G5X.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-COZ7MIQS.js → chunk-IUVO4IN3.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-NP5QGWNL.js → chunk-J34FG3W4.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-QHC4I2FM.js → chunk-JYVLYSH3.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-JFHP4YJG.js → chunk-KO56HCTI.js} +2 -2
- package/dist/wallets/walletConnectors/chunk-KV4HGYM3.js +37 -0
- package/dist/wallets/walletConnectors/{chunk-U5QP7MI5.js → chunk-LI6QY2B5.js} +2 -2
- package/dist/wallets/walletConnectors/{chunk-23WIEY36.js → chunk-MAPXJUOO.js} +4 -2
- package/dist/wallets/walletConnectors/{chunk-LH7BMNFZ.js → chunk-NHLG5PVD.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-TMFH6GXS.js → chunk-O7RSASRH.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-UOTQQJJD.js → chunk-PKMAPNN6.js} +2 -2
- package/dist/wallets/walletConnectors/{chunk-FCG5Q6JX.js → chunk-R4S234FL.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-OESTDX6I.js → chunk-RVWLP4IM.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-H4IRCEZN.js → chunk-RZXMOPIV.js} +8 -8
- package/dist/wallets/walletConnectors/{chunk-EMBU4RXK.js → chunk-TFVCCI2D.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-CZYUE3AR.js → chunk-TTHM3WUR.js} +2 -2
- package/dist/wallets/walletConnectors/{chunk-S27IADFU.js → chunk-UB2SSFH7.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-WSQ2YJO2.js → chunk-VUOAIUZE.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-MQSCN4BO.js → chunk-W6MXINYY.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-ABQKUIUD.js → chunk-W6TXXLCO.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-AI55G5DD.js → chunk-WDTNOIMF.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-LW6S43RE.js → chunk-WFNPWKU3.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-BRBKM4PW.js → chunk-WKCCLGHJ.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-2E4PDCEJ.js → chunk-XBLHZICW.js} +2 -2
- package/dist/wallets/walletConnectors/{chunk-3IYE623P.js → chunk-XMNVOYSJ.js} +1 -1
- package/dist/wallets/walletConnectors/{chunk-BQQQL6UD.js → chunk-YKVWTGU7.js} +4 -2
- package/dist/wallets/walletConnectors/{chunk-4ZXII3UA.js → chunk-ZRNBHLUU.js} +1 -1
- package/dist/wallets/walletConnectors/clvWallet/clvWallet.js +4 -3
- package/dist/wallets/walletConnectors/coin98Wallet/coin98Wallet.js +4 -3
- package/dist/wallets/walletConnectors/coinbaseWallet/coinbaseWallet.d.ts +1 -1
- package/dist/wallets/walletConnectors/coinbaseWallet/coinbaseWallet.js +2 -1
- package/dist/wallets/walletConnectors/coreWallet/coreWallet.js +4 -3
- package/dist/wallets/walletConnectors/dawnWallet/dawnWallet.js +3 -2
- package/dist/wallets/walletConnectors/desigWallet/desigWallet.js +3 -2
- package/dist/wallets/walletConnectors/enkryptWallet/enkryptWallet.js +3 -2
- package/dist/wallets/walletConnectors/foxWallet/foxWallet.js +4 -3
- package/dist/wallets/walletConnectors/frameWallet/frameWallet.js +3 -2
- package/dist/wallets/walletConnectors/frontierWallet/frontierWallet.js +4 -3
- package/dist/wallets/walletConnectors/gateWallet/gateWallet.js +4 -3
- package/dist/wallets/walletConnectors/imTokenWallet/imTokenWallet.js +3 -2
- package/dist/wallets/walletConnectors/index.js +73 -72
- package/dist/wallets/walletConnectors/injectedWallet/injectedWallet.js +3 -2
- package/dist/wallets/walletConnectors/kresusWallet/kresusWallet.js +3 -2
- package/dist/wallets/walletConnectors/ledgerWallet/ledgerWallet.js +3 -2
- package/dist/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.js +4 -3
- package/dist/wallets/walletConnectors/mewWallet/mewWallet.js +3 -2
- package/dist/wallets/walletConnectors/oktoWallet/oktoWallet.js +3 -2
- package/dist/wallets/walletConnectors/okxWallet/okxWallet.js +4 -3
- package/dist/wallets/walletConnectors/omniWallet/omniWallet.js +3 -2
- package/dist/wallets/walletConnectors/oneInchWallet/oneInchWallet.js +3 -2
- package/dist/wallets/walletConnectors/oneKeyWallet/oneKeyWallet.js +3 -2
- package/dist/wallets/walletConnectors/phantomWallet/phantomWallet.js +3 -2
- package/dist/wallets/walletConnectors/rabbyWallet/rabbyWallet.js +3 -2
- package/dist/wallets/walletConnectors/rainbowWallet/rainbowWallet.js +4 -3
- package/dist/wallets/walletConnectors/ramperWallet/ramperWallet.js +3 -2
- package/dist/wallets/walletConnectors/roninWallet/roninWallet.js +4 -3
- package/dist/wallets/walletConnectors/safeWallet/safeWallet.js +2 -1
- package/dist/wallets/walletConnectors/safeheronWallet/safeheronWallet.js +3 -2
- package/dist/wallets/walletConnectors/safepalWallet/safepalWallet.js +4 -3
- package/dist/wallets/walletConnectors/subWallet/subWallet.js +4 -3
- package/dist/wallets/walletConnectors/tahoWallet/tahoWallet.js +3 -2
- package/dist/wallets/walletConnectors/talismanWallet/talismanWallet.js +3 -2
- package/dist/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.js +4 -3
- package/dist/wallets/walletConnectors/tokenaryWallet/tokenaryWallet.js +3 -2
- package/dist/wallets/walletConnectors/trustWallet/trustWallet.js +4 -3
- package/dist/wallets/walletConnectors/uniswapWallet/uniswapWallet.js +3 -2
- package/dist/wallets/walletConnectors/walletConnectWallet/walletConnectWallet.js +3 -2
- package/dist/wallets/walletConnectors/xdefiWallet/xdefiWallet.js +3 -2
- package/dist/wallets/walletConnectors/zealWallet/zealWallet.js +3 -2
- package/dist/wallets/walletConnectors/zerionWallet/zerionWallet.js +4 -3
- package/package.json +9 -9
|
@@ -1,25 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { Address } from 'viem';
|
|
3
|
-
declare enum BrokerageTwoFAType {
|
|
4
|
-
unspecified = "unspecified",
|
|
5
|
-
phone = "phone",
|
|
6
|
-
email = "email",
|
|
7
|
-
totp = "totp",
|
|
8
|
-
face = "face",
|
|
9
|
-
tradingPin = "tradingPin",
|
|
10
|
-
mobile = "mobile"
|
|
11
|
-
}
|
|
12
|
-
declare enum BrokerageTwoFAStatus {
|
|
13
|
-
succeeded = "succeeded",
|
|
14
|
-
failed = "failed",
|
|
15
|
-
mfaRequired = "mfaRequired",
|
|
16
|
-
emailConfirmationRequired = "emailConfirmationRequired",
|
|
17
|
-
emailConfirmationApprovalRequired = "emailConfirmationApprovalRequired",
|
|
18
|
-
deviceConfirmationRequired = "deviceConfirmationRequired",
|
|
19
|
-
mfaFailed = "mfaFailed",
|
|
20
|
-
addressWhitelistRequired = "addressWhitelistRequired",
|
|
21
|
-
secondMfaRequired = "secondMfaRequired"
|
|
22
|
-
}
|
|
23
3
|
import type { BluvoExchangeInfo } from '../../../consts/bluvo';
|
|
24
4
|
import type { PaymentMethodBrokerageInfo } from '../../../domains/paymentMethods';
|
|
25
5
|
import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
|
|
@@ -32,13 +12,5 @@ export type BrokerageTwoFANext = {
|
|
|
32
12
|
depositAddress: null;
|
|
33
13
|
brokerType: BluvoExchangeInfo;
|
|
34
14
|
};
|
|
35
|
-
export interface BrokerageTwoFAExecuteTransferResponse {
|
|
36
|
-
status: BrokerageTwoFAStatus;
|
|
37
|
-
mfaType?: BrokerageTwoFAType;
|
|
38
|
-
verificationSteps?: BrokerageTwoFAType[];
|
|
39
|
-
errorMessage: string | null;
|
|
40
|
-
executeTransferResult: object | null;
|
|
41
|
-
}
|
|
42
15
|
export declare const BrokerageTwoFAInfo: ModalStepInfo<FunCheckoutStep.BROKERAGE_TWO_FA>;
|
|
43
16
|
export declare function BrokerageTwoFA({ onNext, onBack, setModalState, }: ModalStepComponentProps<FunCheckoutStep.BROKERAGE_TWO_FA>): React.JSX.Element;
|
|
44
|
-
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TFunction } from 'i18next';
|
|
2
2
|
import type { Address } from 'viem';
|
|
3
|
-
import { type Config, type Connector } from 'wagmi';
|
|
3
|
+
import { type Config, type Connector } from '../../../wagmi/hooks';
|
|
4
4
|
import type { ErrorNotification } from '../../../components/FunNotification/FunNotification';
|
|
5
5
|
export interface CheckoutConfirmationError extends ErrorNotification {
|
|
6
6
|
durationMs?: number;
|
|
@@ -7,7 +7,7 @@ export interface UseAmountInputResult extends AmountInputDerivedState {
|
|
|
7
7
|
inputHeight: number;
|
|
8
8
|
inputWidth: number | undefined;
|
|
9
9
|
onChange(event: FunInputChangeEvent): void;
|
|
10
|
-
ref: RefObject<HTMLInputElement>;
|
|
10
|
+
ref: RefObject<HTMLInputElement | null>;
|
|
11
11
|
setFiatAmount(usdAmount: number): AmountInputDerivedState;
|
|
12
12
|
/** Possible user action to recover from the current error */
|
|
13
13
|
suggestion: InputAmountSuggestion | undefined;
|
|
@@ -12,5 +12,5 @@ export type SwappedIframeNext = {
|
|
|
12
12
|
success?: boolean;
|
|
13
13
|
};
|
|
14
14
|
export declare const SwappedIframeInfo: ModalStepInfo<FunCheckoutStep.SWAPPED_IFRAME>;
|
|
15
|
-
declare function SwappedIframe({ modalState, onNext, onBack, }: ModalStepComponentProps<FunCheckoutStep.SWAPPED_IFRAME>): React.JSX.Element;
|
|
15
|
+
declare function SwappedIframe({ modalState, onNext, onBack, onClose, }: ModalStepComponentProps<FunCheckoutStep.SWAPPED_IFRAME>): React.JSX.Element | null;
|
|
16
16
|
export default SwappedIframe;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Pooled iframes that live outside the HeightAnimationWrapper.
|
|
4
|
+
* Renders both preloaded and on-demand iframes from the provider's pool.
|
|
5
|
+
* Uses absolute positioning so it never affects layout measurements.
|
|
6
|
+
* When an iframe is active, it overlays the dialog content area.
|
|
7
|
+
*
|
|
8
|
+
* Wrapped in React.memo to prevent re-renders from parent state changes
|
|
9
|
+
* (e.g., modal step transitions, tab toggles). Only re-renders when the
|
|
10
|
+
* SwappedContext value changes (poolUrls, activeUrl, or loadedIframeUrls).
|
|
11
|
+
*/
|
|
12
|
+
declare function SwappedIframePool(): React.JSX.Element | null;
|
|
13
|
+
declare const _default: React.MemoExoticComponent<typeof SwappedIframePool>;
|
|
14
|
+
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { Config, UseAccountReturnType } from 'wagmi';
|
|
3
2
|
import type { FunkitUserInfo } from '../../../../consts/funkit';
|
|
3
|
+
import type { Config, UseAccountReturnType } from '../../../../wagmi/hooks';
|
|
4
4
|
import { FunProfileView } from '../../ProfileDetails';
|
|
5
5
|
export declare const ProfileTitleSection: ({ animateOut, account, userInfo, onChangeView, onLogout, onClose, }: {
|
|
6
6
|
animateOut?: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ComponentType, type ReactNode } from 'react';
|
|
1
|
+
import { type ComponentType, type JSX, type ReactNode } from 'react';
|
|
2
2
|
import type { BluvoExchangeType } from '../consts/bluvo';
|
|
3
3
|
import type { PaymentMethod } from '../domains/paymentMethods';
|
|
4
4
|
export interface FunkitTextCustomizationsConfig {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { type ReactNode } from 'react';
|
|
2
|
-
import type { Chain } from 'wagmi/chains';
|
|
2
|
+
import type { Chain } from '../wagmi/chains';
|
|
3
3
|
export interface FunkitConnectChain extends Chain {
|
|
4
4
|
iconUrl?: string | (() => Promise<string>) | null;
|
|
5
5
|
iconBackground?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type QueryClient } from '@tanstack/react-query';
|
|
2
2
|
import React, { type ReactNode } from 'react';
|
|
3
|
-
import type { Chain } from 'wagmi/chains';
|
|
3
|
+
import type { Chain } from '../wagmi/chains';
|
|
4
4
|
import type { Locale } from '../locales';
|
|
5
5
|
import { type CreateFunkitWagmiConfigParameters } from '../config/getDefaultConfig';
|
|
6
6
|
import { type AvatarComponent } from './AvatarContext';
|
|
@@ -153,6 +153,8 @@ export declare const useActiveTheme: () => {
|
|
|
153
153
|
modalBottomBarButtonHeight: string;
|
|
154
154
|
modalBottomBarCloseButtonHeight: string;
|
|
155
155
|
modalTopBarHeight: string;
|
|
156
|
+
modalTopbarIconSize: string;
|
|
157
|
+
modalTopbarIconWrapperSize: string;
|
|
156
158
|
paymentAmountSkeletonBlockHeight: string;
|
|
157
159
|
paymentAmountSkeletonBlockWidth: string;
|
|
158
160
|
paymentAmountSkeletonCircleSize: string;
|
|
@@ -587,6 +589,8 @@ export declare const useActiveTheme: () => {
|
|
|
587
589
|
modalBottomBarButtonHeight: string;
|
|
588
590
|
modalBottomBarCloseButtonHeight: string;
|
|
589
591
|
modalTopBarHeight: string;
|
|
592
|
+
modalTopbarIconSize: string;
|
|
593
|
+
modalTopbarIconWrapperSize: string;
|
|
590
594
|
paymentAmountSkeletonBlockHeight: string;
|
|
591
595
|
paymentAmountSkeletonBlockWidth: string;
|
|
592
596
|
paymentAmountSkeletonCircleSize: string;
|
|
@@ -1019,6 +1023,8 @@ export declare const useActiveTheme: () => {
|
|
|
1019
1023
|
modalBottomBarButtonHeight: string;
|
|
1020
1024
|
modalBottomBarCloseButtonHeight: string;
|
|
1021
1025
|
modalTopBarHeight: string;
|
|
1026
|
+
modalTopbarIconSize: string;
|
|
1027
|
+
modalTopbarIconWrapperSize: string;
|
|
1022
1028
|
paymentAmountSkeletonBlockHeight: string;
|
|
1023
1029
|
paymentAmountSkeletonBlockWidth: string;
|
|
1024
1030
|
paymentAmountSkeletonCircleSize: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { AssetBalanceInfo } from '@funkit/api-base';
|
|
2
2
|
import React, { type ReactNode } from 'react';
|
|
3
3
|
import type { Address } from 'viem';
|
|
4
|
-
import { type UseDisconnectReturnType, type UseReconnectReturnType } from 'wagmi';
|
|
4
|
+
import { type UseDisconnectReturnType, type UseReconnectReturnType } from '../wagmi/hooks';
|
|
5
5
|
import { type FunkitUserInfo } from '../consts/funkit';
|
|
6
6
|
/** AssetBalanceInfo with known price and totalUsdValue */
|
|
7
7
|
export interface KnownAssetBalanceInfo extends AssetBalanceInfo {
|
|
@@ -48,7 +48,7 @@ export declare const useFunkitAccount: () => {
|
|
|
48
48
|
addresses: readonly [Address, ...Address[]];
|
|
49
49
|
chain: import("viem").Chain | undefined;
|
|
50
50
|
chainId: number;
|
|
51
|
-
connector: import("wagmi").Connector;
|
|
51
|
+
connector: import("../wagmi/hooks").Connector;
|
|
52
52
|
isConnecting: false;
|
|
53
53
|
isDisconnected: false;
|
|
54
54
|
isReconnecting: false;
|
|
@@ -61,7 +61,7 @@ export declare const useFunkitAccount: () => {
|
|
|
61
61
|
addresses: readonly Address[] | undefined;
|
|
62
62
|
chain: import("viem").Chain | undefined;
|
|
63
63
|
chainId: number | undefined;
|
|
64
|
-
connector: import("wagmi").Connector | undefined;
|
|
64
|
+
connector: import("../wagmi/hooks").Connector | undefined;
|
|
65
65
|
isConnecting: false;
|
|
66
66
|
isDisconnected: false;
|
|
67
67
|
isReconnecting: true;
|
|
@@ -74,7 +74,7 @@ export declare const useFunkitAccount: () => {
|
|
|
74
74
|
addresses: readonly Address[] | undefined;
|
|
75
75
|
chain: import("viem").Chain | undefined;
|
|
76
76
|
chainId: number | undefined;
|
|
77
|
-
connector: import("wagmi").Connector | undefined;
|
|
77
|
+
connector: import("../wagmi/hooks").Connector | undefined;
|
|
78
78
|
isReconnecting: false;
|
|
79
79
|
isConnecting: true;
|
|
80
80
|
isDisconnected: false;
|
|
@@ -99,7 +99,7 @@ export declare const useFunkitReconnect: () => UseReconnectReturnType;
|
|
|
99
99
|
export declare const useFunkitSwitchChains: ({ onSettled, }: {
|
|
100
100
|
onSettled?: () => void;
|
|
101
101
|
}) => {
|
|
102
|
-
switchChain: import("wagmi/query").SwitchChainMutate<import("wagmi").Config, void>;
|
|
103
|
-
switchChainAsync: import("wagmi/query").SwitchChainMutateAsync<import("wagmi").Config, void>;
|
|
102
|
+
switchChain: import("wagmi/query").SwitchChainMutate<import("../wagmi/hooks").Config, void>;
|
|
103
|
+
switchChainAsync: import("wagmi/query").SwitchChainMutateAsync<import("../wagmi/hooks").Config, void>;
|
|
104
104
|
pendingChainId: number | null;
|
|
105
105
|
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type SwappedTheme } from '../utils/swapped';
|
|
3
|
+
export interface SwappedIframeCallbacks {
|
|
4
|
+
onComplete: () => void;
|
|
5
|
+
onBack: () => void;
|
|
6
|
+
onExit: () => void;
|
|
7
|
+
onNewDeposit: () => void;
|
|
8
|
+
onError: (message: string) => void;
|
|
9
|
+
onNavigation: (step: string) => void;
|
|
10
|
+
}
|
|
11
|
+
interface SwappedContextValue {
|
|
12
|
+
poolUrls: string[];
|
|
13
|
+
loadedIframeUrls: string[];
|
|
14
|
+
setPreloadUrls: (urls: string[]) => void;
|
|
15
|
+
activeUrl: string | null;
|
|
16
|
+
activateIframe: (url: string) => void;
|
|
17
|
+
deactivateIframe: () => void;
|
|
18
|
+
onIframeElementLoaded: (url: string) => void;
|
|
19
|
+
clearIframePool: () => void;
|
|
20
|
+
setIframeRef: (url: string, el: HTMLIFrameElement | null) => void;
|
|
21
|
+
setActiveCallbacks: (cb: SwappedIframeCallbacks | null) => void;
|
|
22
|
+
swappedTheme: SwappedTheme;
|
|
23
|
+
}
|
|
24
|
+
export declare function SwappedProvider({ children }: {
|
|
25
|
+
children: React.ReactNode;
|
|
26
|
+
}): React.JSX.Element;
|
|
27
|
+
export declare function useSwappedContext(): SwappedContextValue;
|
|
28
|
+
export {};
|
package/dist/themes/baseTheme.js
CHANGED
package/dist/themes/darkTheme.js
CHANGED
package/dist/types/utils.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export type Evaluate<type> = {
|
|
|
4
4
|
[key in keyof type]: type[key];
|
|
5
5
|
} & unknown;
|
|
6
6
|
export type WalletProviderFlags = 'isApexWallet' | 'isAvalanche' | 'isBackpack' | 'isBifrost' | 'isBitKeep' | 'isBitski' | 'isBlockWallet' | 'isBraveWallet' | 'isCoinbaseWallet' | 'isDawn' | 'isEnkrypt' | 'isExodus' | 'isFrame' | 'isFrontier' | 'isGamestop' | 'isHyperPay' | 'isImToken' | 'isKuCoinWallet' | 'isMathWallet' | 'isMetaMask' | 'isNestWallet' | 'isOkxWallet' | 'isOKExWallet' | 'isOneInchAndroidWallet' | 'isOneInchIOSWallet' | 'isOpera' | 'isPhantom' | 'isPortal' | 'isRabby' | 'isRainbow' | 'isStatus' | 'isTally' | 'isTokenPocket' | 'isTokenary' | 'isTrust' | 'isTrustWallet' | 'isXDEFI' | 'isZerion' | 'isTalisman' | 'isZeal' | 'isCoin98' | 'isMEWwallet' | 'isSafeheron' | 'isSafePal';
|
|
7
|
-
export type WalletProvider = Evaluate<EIP1193Provider & {
|
|
7
|
+
export type WalletProvider = Evaluate<Partial<EIP1193Provider> & {
|
|
8
8
|
[key in WalletProviderFlags]?: true | undefined;
|
|
9
9
|
} & {
|
|
10
10
|
providers?: any[] | undefined;
|
package/dist/utils/checkout.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { type CheckoutHistoryItem, type CheckoutRefundState, CheckoutState, type DirectExecution } from '@funkit/api-base';
|
|
2
2
|
import { type ApiFunkitCheckoutQuoteResult, type CheckoutQuoteResponse } from '@funkit/utils';
|
|
3
|
-
import { type Config } from '@wagmi/core';
|
|
4
3
|
import { type Address, type Hex } from 'viem';
|
|
5
|
-
import type { UseConfigReturnType } from 'wagmi';
|
|
6
4
|
import type { ServerCheckoutConfig } from '../domains/clientMetadata';
|
|
7
5
|
import type { FunkitCheckoutQuoteResult } from '../domains/quote';
|
|
6
|
+
import type { Config, UseConfigReturnType } from '../wagmi/hooks';
|
|
8
7
|
import { type FunkitCheckoutActionParams, type FunkitCheckoutConfig } from '../providers/FunkitCheckoutContext';
|
|
9
8
|
export declare const MOONPAY_TIME_ESTIMATE_MS = 120000;
|
|
10
9
|
export declare const BROKERAGE_TIME_ESTIMATE_MS = 0;
|
|
@@ -90,6 +90,13 @@ export declare const flagConfig: {
|
|
|
90
90
|
readonly values: ["clDebbfo9edXq1GydZ0CahSAfSimPj616lFa9p8e"];
|
|
91
91
|
}];
|
|
92
92
|
readonly value: string;
|
|
93
|
+
}, {
|
|
94
|
+
readonly if_any: [{
|
|
95
|
+
readonly key: "apiKey";
|
|
96
|
+
readonly type: "isAnyOf";
|
|
97
|
+
readonly values: ["5UzOrcAE2F3rcuMX2EeIlaYv5VUcDe6Lyh0PeZX2"];
|
|
98
|
+
}];
|
|
99
|
+
readonly value: string;
|
|
93
100
|
}];
|
|
94
101
|
};
|
|
95
102
|
readonly withdrawal_chains_and_assets: {
|
|
@@ -243,6 +250,14 @@ export declare const flagConfig: {
|
|
|
243
250
|
readonly min_token_transfer_value: {
|
|
244
251
|
readonly type: "string";
|
|
245
252
|
readonly default_value: string;
|
|
253
|
+
readonly overrides: [{
|
|
254
|
+
readonly if_any: [{
|
|
255
|
+
readonly key: "apiKey";
|
|
256
|
+
readonly type: "isAnyOf";
|
|
257
|
+
readonly values: ["i6e1I8cfX625TTwRJlD2DshKyAoaUtO8aeoaR4i2"];
|
|
258
|
+
}];
|
|
259
|
+
readonly value: string;
|
|
260
|
+
}];
|
|
246
261
|
};
|
|
247
262
|
readonly withdrawal_exclude_tokens: {
|
|
248
263
|
readonly type: "string";
|
package/dist/utils/swapped.d.ts
CHANGED
|
@@ -1,4 +1,42 @@
|
|
|
1
1
|
import type { SavedFormOfPayment, SwappedFormOfPayment } from '@funkit/api-base';
|
|
2
|
+
import type { ThemeVars } from '../css/sprinkles.css';
|
|
3
|
+
/**
|
|
4
|
+
* Ref: https://www.notion.so/Fun-Parameter-Styling-Guide-312966ea6e398011bbc6c14e976e281d#63dcdd77ea2d488084a980cda4c63d08
|
|
5
|
+
*/
|
|
6
|
+
export interface SwappedTheme {
|
|
7
|
+
colors: Record<string, string>;
|
|
8
|
+
radii: Record<string, string>;
|
|
9
|
+
headerHeight: string;
|
|
10
|
+
headerFontWeight: string;
|
|
11
|
+
buttonFontWeight: string;
|
|
12
|
+
modalBottomBarButtonHeight: string;
|
|
13
|
+
iframeBackground: string;
|
|
14
|
+
paddingPrimary?: string;
|
|
15
|
+
paddingPrimaryX?: string;
|
|
16
|
+
paddingPrimaryY?: string;
|
|
17
|
+
paddingSecondary: string;
|
|
18
|
+
paddingTertiary: string;
|
|
19
|
+
baseFont?: string;
|
|
20
|
+
secondaryFont?: string;
|
|
21
|
+
topbarIconColor?: string;
|
|
22
|
+
headerIconWrapperSize?: string;
|
|
23
|
+
headerIconSize?: string;
|
|
24
|
+
topbarTextFontSize?: string;
|
|
25
|
+
contentPadding?: string;
|
|
26
|
+
boxPaddingY?: string;
|
|
27
|
+
boxPaddingX?: string;
|
|
28
|
+
}
|
|
2
29
|
export declare const isSavedFormOfPaymentType: (fop: SwappedFormOfPayment) => fop is SavedFormOfPayment;
|
|
3
30
|
export declare const getSavedFormOfPaymentDisplayName: (fop: SavedFormOfPayment) => string;
|
|
4
31
|
export declare const getSavedFormOfPaymentIcon: (fop: SavedFormOfPayment) => string;
|
|
32
|
+
export declare function getSwappedOrigin(url: string): string | null;
|
|
33
|
+
export declare function isSwappedOrigin(origin: string): boolean;
|
|
34
|
+
export declare function resolveCssValue(value: string): string;
|
|
35
|
+
export declare function resolveObjectCssVars<T extends object>(obj: T): T;
|
|
36
|
+
export declare function buildSwappedTheme(theme: ThemeVars & {
|
|
37
|
+
customFontFamily?: {
|
|
38
|
+
primary?: string;
|
|
39
|
+
secondary?: string;
|
|
40
|
+
};
|
|
41
|
+
}): SwappedTheme;
|
|
42
|
+
export declare function buildSwappedThemeQueryParams(activeTheme: ThemeVars): Record<string, string>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Config } from 'wagmi';
|
|
2
|
+
import { type GetBalanceParameters, type GetBalanceReturnType } from 'wagmi/actions';
|
|
3
|
+
export { estimateGas, getGasPrice, getTransaction, multicall, readContract, } from 'wagmi/actions';
|
|
4
|
+
export type GetBalanceReturnTypeCompat = GetBalanceReturnType & {
|
|
5
|
+
formatted: string;
|
|
6
|
+
};
|
|
7
|
+
type GetBalanceParametersCompat = GetBalanceParameters & {
|
|
8
|
+
token?: `0x${string}`;
|
|
9
|
+
};
|
|
10
|
+
export declare function getBalance(config: Config, params: GetBalanceParametersCompat): Promise<GetBalanceReturnTypeCompat>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { useAccount, useAccountEffect, useBalance, useConfig, useConnect, useDisconnect, useEnsAvatar, useEnsName, useReconnect, useSendTransaction, useSwitchChain, useWalletClient, useWriteContract, } from 'wagmi';
|
|
2
|
+
export { WagmiProvider } from 'wagmi';
|
|
3
|
+
export { createConfig, createConnector, http } from 'wagmi';
|
|
4
|
+
export type { Config, Connector, CreateConfigParameters, CreateConnectorFn, UseAccountReturnType, UseConfigReturnType, UseDisconnectReturnType, UseReconnectReturnType, WagmiProviderProps, } from 'wagmi';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { SwitchChainVariables } from 'wagmi/query';
|
package/dist/wallets/Wallet.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { WalletConnectParameters } from '../wagmi/connectors';
|
|
2
|
+
import type { Connector, CreateConnectorFn } from '../wagmi/hooks';
|
|
3
3
|
import type { TransactionReceipt } from 'viem';
|
|
4
4
|
import type { CoinbaseWalletOptions } from './walletConnectors/coinbaseWallet/coinbaseWallet';
|
|
5
5
|
import type { WalletConnectWalletOptions } from './walletConnectors/walletConnectWallet/walletConnectWallet';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CreateConnectorFn } from 'wagmi';
|
|
1
|
+
import type { CreateConnectorFn } from '../wagmi/hooks';
|
|
2
2
|
import type { WalletList } from './Wallet';
|
|
3
3
|
import { type ConnectorsForWalletsParameters } from './connectorsForWallets';
|
|
4
4
|
export declare function getDefaultWallets(parameters: ConnectorsForWalletsParameters): {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
bifrostWallet
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-EKJHJFRN.js";
|
|
5
|
+
import "../chunk-MAPXJUOO.js";
|
|
6
|
+
import "../chunk-BAVE62IL.js";
|
|
7
|
+
import "../chunk-KV4HGYM3.js";
|
|
7
8
|
export {
|
|
8
9
|
bifrostWallet
|
|
9
10
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
bitgetWallet
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-HOPH3TQ3.js";
|
|
5
|
+
import "../chunk-MAPXJUOO.js";
|
|
6
|
+
import "../chunk-BAVE62IL.js";
|
|
7
|
+
import "../chunk-KV4HGYM3.js";
|
|
7
8
|
export {
|
|
8
9
|
bitgetWallet
|
|
9
10
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
bybitWallet
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-6UCI7GM6.js";
|
|
5
|
+
import "../chunk-MAPXJUOO.js";
|
|
6
|
+
import "../chunk-BAVE62IL.js";
|
|
7
|
+
import "../chunk-KV4HGYM3.js";
|
|
7
8
|
export {
|
|
8
9
|
bybitWallet
|
|
9
10
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
getWalletConnectConnector
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-MAPXJUOO.js";
|
|
5
5
|
import {
|
|
6
6
|
getInjectedConnector,
|
|
7
7
|
hasInjectedProvider
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-BAVE62IL.js";
|
|
9
9
|
|
|
10
10
|
// src/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.ts
|
|
11
11
|
import { isMobile } from "@funkit/utils";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
getWalletConnectConnector
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-MAPXJUOO.js";
|
|
5
5
|
import {
|
|
6
6
|
getInjectedConnector,
|
|
7
7
|
hasInjectedProvider
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-BAVE62IL.js";
|
|
9
9
|
|
|
10
10
|
// src/wallets/walletConnectors/foxWallet/foxWallet.ts
|
|
11
11
|
var foxWallet = ({
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
getWalletConnectConnector
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-MAPXJUOO.js";
|
|
5
5
|
import {
|
|
6
6
|
getInjectedConnector,
|
|
7
7
|
hasInjectedProvider
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-BAVE62IL.js";
|
|
9
9
|
|
|
10
10
|
// src/wallets/walletConnectors/bybitWallet/bybitWallet.ts
|
|
11
11
|
var bybitWallet = ({
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
getWalletConnectConnector
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-MAPXJUOO.js";
|
|
5
5
|
import {
|
|
6
6
|
getInjectedConnector,
|
|
7
7
|
hasInjectedProvider
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-BAVE62IL.js";
|
|
9
9
|
|
|
10
10
|
// src/wallets/walletConnectors/coin98Wallet/coin98Wallet.ts
|
|
11
11
|
var coin98Wallet = ({
|