@funkit/connect 9.23.0 → 9.23.2-next.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 +38 -0
- package/dist/__generated__/default_configs.d.ts +901 -0
- package/dist/__generated__/default_feature_gates.d.ts +20 -0
- package/dist/clients/aave.d.ts +1 -1
- package/dist/clients/chunk-25ICASD7.js +2371 -0
- package/dist/clients/chunk-3GO74QTP.js +2382 -0
- package/dist/clients/{chunk-NCCAYPLO.js → chunk-4HCOSF4M.js} +1 -1
- package/dist/clients/chunk-7GWX2ZS4.js +69 -0
- package/dist/clients/{chunk-KSSSSWR6.js → chunk-7HNGV6JU.js} +1 -1
- package/dist/clients/chunk-CEBG7XQ5.js +2382 -0
- package/dist/clients/{chunk-ZMVXBMON.js → chunk-ELLXM7RO.js} +1 -1
- package/dist/clients/chunk-GGXTLJ7J.js +290 -0
- package/dist/clients/chunk-HRWCNZJA.js +230 -0
- package/dist/clients/chunk-JD3FIVZ7.js +69 -0
- package/dist/clients/chunk-JTGKAPID.js +2382 -0
- package/dist/clients/{chunk-4752IYY6.js → chunk-KWIR3HO4.js} +1 -1
- package/dist/clients/chunk-L7PABCF2.js +54 -0
- package/dist/clients/chunk-LII3SVUH.js +230 -0
- package/dist/clients/{chunk-OWXKWC7I.js → chunk-NCUPPJ2Z.js} +8 -8
- package/dist/clients/chunk-NUJ6ZM5F.js +186 -0
- package/dist/clients/chunk-UVWNEQMD.js +186 -0
- package/dist/clients/chunk-VVTNR7YH.js +2382 -0
- package/dist/clients/chunk-ZNVFASTH.js +54 -0
- package/dist/clients/fanatics.css +2 -2
- package/dist/clients/fanatics.js +3 -3
- package/dist/clients/lighter.css +2 -2
- package/dist/clients/lighter.d.ts +1 -1
- package/dist/clients/lighter.js +5 -3
- package/dist/clients/mallard.d.ts +49 -0
- package/dist/clients/mallard.js +86 -0
- package/dist/clients/polymarket/PolymarketDepositAccountDropdown.css +97 -87
- package/dist/clients/polymarket/PolymarketDepositAccountDropdown.d.ts +1 -1
- package/dist/clients/polymarket/PolymarketDepositAccountDropdown.js +6 -6
- package/dist/clients/polymarket/createPolymarketDepositConfig.d.ts +1 -1
- package/dist/clients/polymarket/createPolymarketDepositConfig.js +2 -2
- package/dist/clients/polymarket/index.css +97 -87
- package/dist/clients/polymarket/index.js +6 -6
- package/dist/clients/polymarket/polymarket.d.ts +2 -2
- package/dist/clients/polymarket/polymarket.js +1 -1
- package/dist/clients/polymarket.d.ts +161 -0
- package/dist/clients/polymarket.js +688 -0
- package/dist/clients/rolly.d.ts +1 -1
- package/dist/clients/rolly.js +1 -14
- package/dist/components/ApprovalMethodToggle/ApprovalMethodToggle.d.ts +1 -1
- package/dist/components/BottomLinks/BottomLinks.css.d.ts +6 -0
- package/dist/components/BottomLinks/BottomLinks.d.ts +14 -0
- package/dist/components/Box/Box.d.ts +21 -21
- package/dist/components/Dropdown/ChainDropdown.d.ts +1 -1
- package/dist/components/Dropdown/TokenAndChainDropdown.d.ts +1 -1
- package/dist/components/Dropdown/TokenDropdown.d.ts +1 -1
- package/dist/components/FunAsset/FunAssetItem.d.ts +1 -1
- package/dist/components/FunCheckoutHistory/AddTokenToWalletButton.d.ts +1 -1
- package/dist/components/FunCheckoutHistory/FunDirectExecutionHistoryBottomBar.d.ts +1 -1
- package/dist/components/FunCheckoutHistory/FunDirectExecutionHistoryDetail.d.ts +1 -1
- package/dist/components/FunCheckoutHistory/PendingSuccessScreen.d.ts +2 -2
- package/dist/components/FunCheckoutHistory/YouSendItem.d.ts +1 -1
- package/dist/components/FunNotificationBanner/FunNotificationBannerIcon.d.ts +1 -1
- package/dist/components/FunPayments/FunPaymentMethods.d.ts +1 -1
- package/dist/components/FunSelectBrokerage/FunSelectBrokerage.d.ts +1 -1
- package/dist/components/FunTransactionSummary/DestinationYieldRows.d.ts +1 -1
- package/dist/components/FunTransactionSummary/PaymentAmountSummary.d.ts +3 -3
- package/dist/components/FunTransactionSummary/PaymentFeesSummary.d.ts +2 -2
- package/dist/components/FunTransactionSummary/PaymentFeesSummary.track.d.ts +2 -2
- package/dist/components/FunTransactionSummary/PaymentMethodSummary.d.ts +2 -2
- package/dist/components/FunTransactionSummary/PaymentRouteSummary.d.ts +1 -1
- package/dist/components/ModalHeightAnimationLayer/FunCheckoutModalHeightAnimationWrapper.d.ts +2 -2
- package/dist/components/NewTokenDepositAlert/NewTokenDepositAlert.d.ts +1 -1
- package/dist/components/ReceiveAmount/ReceiveAmount.d.ts +2 -2
- package/dist/components/SourcePaymentMethodItem/SourcePaymentMethodItem.d.ts +1 -1
- package/dist/components/TransactionStatus/AnimatedSpinner/AnimatedSpinner.d.ts +1 -1
- package/dist/components/TransactionStatus/StepSpinner.d.ts +1 -1
- package/dist/components/TransactionStatus/TransactionStatus.d.ts +2 -2
- package/dist/components/TransferTokenDetails/TransferTokenDetails.d.ts +1 -1
- package/dist/consts/customers.d.ts +3 -1
- package/dist/consts/funkit.d.ts +1 -0
- package/dist/css/sprinkles.css.d.ts +21 -21
- package/dist/domains/aave.d.ts +1 -1
- package/dist/domains/asset.d.ts +4 -4
- package/dist/domains/checkout.d.ts +1 -1
- package/dist/domains/checkoutErrors.d.ts +2 -2
- package/dist/domains/checkoutRecipient.d.ts +1 -1
- package/dist/domains/clientMetadata.d.ts +7 -2
- package/dist/domains/dynamicRouting.d.ts +1 -1
- package/dist/domains/fees.d.ts +3 -3
- package/dist/domains/paymentMethods.d.ts +1 -1
- package/dist/domains/quote.d.ts +5 -5
- package/dist/domains/quoteMode/exactOut.d.ts +1 -1
- package/dist/domains/quoteMode/resolveQuoteMode.d.ts +1 -1
- package/dist/domains/quoteMode/types.d.ts +2 -2
- package/dist/hooks/queries/useLightningQuote.d.ts +1 -1
- package/dist/hooks/queries/useMeldDefaultCurrency.d.ts +1 -1
- package/dist/hooks/queries/useRecentCheckouts.d.ts +1 -1
- package/dist/hooks/queries/useRecentDeposits.d.ts +1 -1
- package/dist/hooks/queries/useWithdrawalQuote.d.ts +31 -31
- package/dist/hooks/track/useTrack.d.ts +1 -1
- package/dist/hooks/useBluvo.d.ts +3 -3
- package/dist/hooks/useCheckoutDirectExecution.d.ts +3 -3
- package/dist/hooks/useCheckoutDirectExecutionHistory.d.ts +1 -1
- package/dist/hooks/useCheckoutItemDisplay.d.ts +2 -2
- package/dist/hooks/useCheckoutTimeEstimate.d.ts +2 -2
- package/dist/hooks/useCountdown.d.ts +1 -1
- package/dist/hooks/useEnabledTokenTransferChainTokens.d.ts +1 -1
- package/dist/hooks/useExchangeOptions.d.ts +1 -1
- package/dist/hooks/useFrogAccount.d.ts +1 -1
- package/dist/hooks/useIsBlacklisted.d.ts +1 -1
- package/dist/hooks/useIsDynamicRoutingEnabled.d.ts +1 -1
- package/dist/hooks/useMinDeposit.d.ts +1 -1
- package/dist/hooks/useNewTokenBanner.d.ts +1 -1
- package/dist/hooks/useOnNewNotification.d.ts +1 -1
- package/dist/hooks/usePaymentMethodTabs.d.ts +1 -1
- package/dist/hooks/usePaymentSources.d.ts +2 -2
- package/dist/hooks/useRelayBypass.d.ts +1 -1
- package/dist/hooks/useStepQueryReadiness.d.ts +3 -3
- package/dist/hooks/useTokenAndChainDropdown.d.ts +1 -1
- package/dist/hooks/useTokenTransfer.d.ts +1 -1
- package/dist/hooks/useTokenTransferConfig.d.ts +8 -1
- package/dist/hooks/useUserIpInfo.d.ts +1 -1
- package/dist/index.css +42 -32
- package/dist/index.js +751 -763
- package/dist/interfaces/identity.d.ts +1 -1
- package/dist/interfaces/logTransport.d.ts +51 -0
- package/dist/interfaces/swapped-transport.d.ts +78 -0
- package/dist/modals/ChainModal/Chain.d.ts +1 -1
- package/dist/modals/CheckoutModal/Brokerage/BrokerageSuccessModal.d.ts +1 -1
- package/dist/modals/CheckoutModal/Brokerage/BrokerageTwoFA.d.ts +2 -2
- package/dist/modals/CheckoutModal/Brokerage/ConnectExchange.d.ts +2 -2
- package/dist/modals/CheckoutModal/Brokerage/SelectBrokerage.d.ts +2 -2
- package/dist/modals/CheckoutModal/ConfirmationStep/CheckoutPrimaryInfo.d.ts +2 -2
- package/dist/modals/CheckoutModal/ConfirmationStep/ConfirmationStep.d.ts +1 -1
- package/dist/modals/CheckoutModal/ConfirmationStep/DisclaimerText.d.ts +1 -1
- package/dist/modals/CheckoutModal/ConfirmationStep/mapRetryAction.d.ts +1 -1
- package/dist/modals/CheckoutModal/ConfirmationStep/useCheckoutConfirmation.d.ts +1 -1
- package/dist/modals/CheckoutModal/ConfirmationStep/useCheckoutQuote.d.ts +2 -2
- package/dist/modals/CheckoutModal/ConfirmationStep/usePostCheckout.d.ts +2 -2
- package/dist/modals/CheckoutModal/ConfirmationStep/useQuoteRefresh.d.ts +1 -1
- package/dist/modals/CheckoutModal/ConfirmationStep/useSourceAssetConfirm.d.ts +2 -2
- package/dist/modals/CheckoutModal/FunCheckoutStep.d.ts +3 -1
- package/dist/modals/CheckoutModal/InputAmount/InputAmount.d.ts +1 -1
- package/dist/modals/CheckoutModal/InputAmount/InputAmountLoaded.d.ts +2 -2
- package/dist/modals/CheckoutModal/InputAmount/state.d.ts +3 -3
- package/dist/modals/CheckoutModal/InputAmount/useAaveNativeSupply.d.ts +3 -3
- package/dist/modals/CheckoutModal/InputAmount/useAmountInput.d.ts +1 -1
- package/dist/modals/CheckoutModal/InputAmount/useAvailableBalanceForCheckout.d.ts +3 -3
- package/dist/modals/CheckoutModal/InputAmount/useCheckoutAmountLimits.d.ts +2 -2
- package/dist/modals/CheckoutModal/InputAmount/useMeld.d.ts +1 -1
- package/dist/modals/CheckoutModal/InputAmount/utils.d.ts +2 -2
- package/dist/modals/CheckoutModal/LightningInvoice/LightningInvoice.d.ts +1 -1
- package/dist/modals/CheckoutModal/LightningInvoice/LightningInvoiceQrCode.d.ts +1 -1
- package/dist/modals/CheckoutModal/MeldCurrencySelect/MeldCurrencySelect.d.ts +1 -1
- package/dist/modals/CheckoutModal/MeldQuotes/MeldQuotes.d.ts +1 -1
- package/dist/modals/CheckoutModal/MeldRedirect/MeldRedirect.d.ts +1 -1
- package/dist/modals/CheckoutModal/SelectAsset/SelectAsset.d.ts +5 -5
- package/dist/modals/CheckoutModal/SelectAsset/SelectAssetInfoSection.d.ts +2 -2
- package/dist/modals/CheckoutModal/SelectAsset/SelectAssetList.d.ts +2 -2
- package/dist/modals/CheckoutModal/SourceChange/ConnectedSource.d.ts +1 -1
- package/dist/modals/CheckoutModal/SourceChange/CryptoCashToggle.d.ts +2 -2
- package/dist/modals/CheckoutModal/SourceChange/EmptyFormOfPaymentsMessage.d.ts +4 -0
- package/dist/modals/CheckoutModal/SourceChange/SourceChange.d.ts +2 -2
- package/dist/modals/CheckoutModal/SourceChange/useSourceChangeLayout.d.ts +1 -1
- package/dist/modals/CheckoutModal/SourceChange/useUpdateSourceAssetForCard.d.ts +4 -0
- package/dist/modals/CheckoutModal/SwappedIframe/SwappedErrorMessage.d.ts +6 -0
- package/dist/modals/CheckoutModal/SwappedIframe/SwappedIframeController.d.ts +2 -2
- package/dist/modals/CheckoutModal/TransferToken/CheckoutNotification.d.ts +1 -1
- package/dist/modals/CheckoutModal/TransferToken/CheckoutNotifications.track.d.ts +1 -1
- package/dist/modals/CheckoutModal/TransferToken/DirectExecutionNotification.d.ts +1 -1
- package/dist/modals/CheckoutModal/TransferToken/TransferToken.d.ts +1 -1
- package/dist/modals/CheckoutModal/TransferToken/types.d.ts +1 -1
- package/dist/modals/CheckoutModal/VirtualFiatAccount/BridgeCustomer.d.ts +2 -2
- package/dist/modals/CheckoutModal/VirtualFiatAccount/BridgeKyc.d.ts +1 -1
- package/dist/modals/CheckoutModal/VirtualFiatAccount/ErrorScreen.d.ts +1 -1
- package/dist/modals/CheckoutModal/VirtualFiatAccount/FiatAccountDetail.d.ts +1 -1
- package/dist/modals/CheckoutModal/VirtualFiatAccount/KycIframe.d.ts +2 -2
- package/dist/modals/CheckoutModal/VirtualFiatAccount/VirtualFiatAccount.d.ts +2 -2
- package/dist/modals/CheckoutModal/Withdrawal/WithdrawalComplete.d.ts +14 -0
- package/dist/modals/CheckoutModal/Withdrawal/WithdrawalEnterAmount.d.ts +15 -0
- package/dist/modals/CheckoutModal/stepTransition.d.ts +11 -5
- package/dist/modals/CheckoutModal/stepTransition.track.d.ts +3 -3
- package/dist/modals/ProfileDetails/FunProfileViews/Home/HomeCheckoutDisplayRow.d.ts +2 -2
- package/dist/modals/ProfileDetails/FunProfileViews/Home/HomeTokenDisplayRow.d.ts +1 -1
- package/dist/modals/ProfileDetails/FunProfileViews/Home/ProfileTitleSection.d.ts +2 -2
- package/dist/modals/ProfileDetails/FunProfileViews/Home/index.d.ts +1 -1
- package/dist/modals/WithdrawalModal/ErrorMessage.d.ts +2 -2
- package/dist/modals/WithdrawalModal/LighterWithdrawal.d.ts +4 -4
- package/dist/modals/WithdrawalModal/RecipientAddress.d.ts +1 -1
- package/dist/modals/WithdrawalModal/WithdrawAmountInput.d.ts +1 -1
- package/dist/modals/WithdrawalModal/WithdrawalCallbackSuccess.d.ts +1 -1
- package/dist/modals/WithdrawalModal/WithdrawalContent.d.ts +1 -1
- package/dist/modals/WithdrawalModal/WithdrawalModal.d.ts +1 -1
- package/dist/modals/WithdrawalModal/WithdrawalTypeSelect.d.ts +1 -1
- package/dist/modals/WithdrawalModal/useWithdrawal.d.ts +3 -3
- package/dist/providers/FunkitBrokerageProvider.d.ts +2 -2
- package/dist/providers/FunkitCheckoutContext/index.d.ts +1 -1
- package/dist/providers/FunkitCheckoutContext/track.d.ts +4 -4
- package/dist/providers/FunkitCheckoutContext/types.d.ts +2 -28
- package/dist/providers/FunkitConfigContext.d.ts +3 -3
- package/dist/providers/FunkitHistoryContext.d.ts +2 -2
- package/dist/providers/FunkitProvider.d.ts +2 -2
- package/dist/providers/FunkitQuoteContext.track.d.ts +4 -4
- package/dist/providers/GeneralWalletProvider.d.ts +2 -2
- package/dist/providers/QuoteModeContext.d.ts +1 -1
- package/dist/providers/SwappedProvider.d.ts +1 -1
- package/dist/utils/assets.d.ts +1 -1
- package/dist/utils/bluvo.d.ts +3 -3
- package/dist/utils/checkout.d.ts +3 -3
- package/dist/utils/depositCutoff.d.ts +1 -1
- package/dist/utils/flags/resolver.d.ts +34 -0
- package/dist/utils/funkitProvider.d.ts +1 -1
- package/dist/utils/payment.d.ts +1 -1
- package/dist/utils/polygonRpcCheck.d.ts +1 -1
- package/dist/utils/purifyCheckoutHistoryItem.d.ts +1 -1
- package/dist/utils/swapped.d.ts +1 -1
- package/dist/utils/tokenTransfer/disabledList.d.ts +1 -14
- package/dist/utils/tokenTransfer/types.d.ts +5 -30
- package/dist/utils/withdrawal.d.ts +1 -1
- 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/chunk-2VP2F6EK.js +70 -0
- package/dist/wallets/walletConnectors/chunk-4T6ZSRJF.js +69 -0
- package/dist/wallets/walletConnectors/chunk-6BW3HLBG.js +96 -0
- package/dist/wallets/walletConnectors/chunk-CCQV2ZET.js +218 -0
- package/dist/wallets/walletConnectors/chunk-CPI4TD43.js +99 -0
- package/dist/wallets/walletConnectors/chunk-F5XEEVG6.js +98 -0
- package/dist/wallets/walletConnectors/chunk-HNRB7KJU.js +92 -0
- package/dist/wallets/walletConnectors/chunk-HTHAK6XB.js +93 -0
- package/dist/wallets/walletConnectors/chunk-MIQTHJ6X.js +66 -0
- package/dist/wallets/walletConnectors/chunk-RB3HR4R2.js +95 -0
- package/dist/wallets/walletConnectors/chunk-RVOY537T.js +100 -0
- package/dist/wallets/walletConnectors/chunk-STVVP43G.js +94 -0
- package/dist/wallets/walletConnectors/chunk-UK7C2JXW.js +87 -0
- package/dist/wallets/walletConnectors/chunk-VAPGUPHO.js +92 -0
- package/dist/wallets/walletConnectors/chunk-VTM6EECM.js +110 -0
- package/dist/wallets/walletConnectors/chunk-X6CGV36L.js +103 -0
- package/dist/wallets/walletConnectors/chunk-YEZM4CK4.js +96 -0
- package/dist/wallets/walletConnectors/chunk-ZNX4EMPB.js +106 -0
- 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 +63 -63
- 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 +5 -5
- /package/dist/clients/{chunk-52NKHZS2.js → chunk-7FIVHWNC.js} +0 -0
- /package/dist/clients/{chunk-MOUTRRN3.js → chunk-S7FRYR55.js} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type KycLinkLoad } from '
|
|
2
|
-
import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepInfo } from '
|
|
1
|
+
import { type KycLinkLoad } from '~/hooks/useFrogAccount';
|
|
2
|
+
import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepInfo } from '~/modals/CheckoutModal/stepTransition';
|
|
3
3
|
export type KycIframeState = CheckoutModalCommonState & KycLinkLoad;
|
|
4
4
|
export type KycIframeNext = Record<string, never>;
|
|
5
5
|
export declare const KycIframeInfo: ModalStepInfo<FunCheckoutStep.KYC_IFRAME>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { PaymentMethodVirtualBankIncompleteInfo } from '
|
|
3
|
-
import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '
|
|
2
|
+
import type { PaymentMethodVirtualBankIncompleteInfo } from '~/domains/paymentMethods';
|
|
3
|
+
import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '~/modals/CheckoutModal/stepTransition';
|
|
4
4
|
export type VirtualFiatAccountNext = Record<string, never>;
|
|
5
5
|
export type VirtualFiatAccountState = CheckoutModalCommonState & {
|
|
6
6
|
paymentMethodInfo: PaymentMethodVirtualBankIncompleteInfo;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Hex } from 'viem';
|
|
2
|
+
import type { FunkitCheckoutQuoteResult } from '~/domains/quote';
|
|
3
|
+
import type { CustomWithdrawalConfig, WalletWithdrawalConfig } from '~/providers/FunkitCheckoutContext';
|
|
4
|
+
import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
|
|
5
|
+
export type WithdrawalCompleteState = CheckoutModalCommonState & {
|
|
6
|
+
withdrawalConfig: WalletWithdrawalConfig | CustomWithdrawalConfig;
|
|
7
|
+
hash: Hex;
|
|
8
|
+
withdrawnAmount: string;
|
|
9
|
+
tokenSymbol: string;
|
|
10
|
+
quote?: FunkitCheckoutQuoteResult;
|
|
11
|
+
};
|
|
12
|
+
export type WithdrawalCompleteNext = Record<never, never>;
|
|
13
|
+
export declare const WithdrawalCompleteInfo: ModalStepInfo<FunCheckoutStep.WITHDRAWAL_COMPLETE>;
|
|
14
|
+
export declare function WithdrawalComplete(_props: ModalStepComponentProps<FunCheckoutStep.WITHDRAWAL_COMPLETE>): null;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Hex } from 'viem';
|
|
2
|
+
import type { FunkitCheckoutQuoteResult } from '~/domains/quote';
|
|
3
|
+
import type { CustomWithdrawalConfig, WalletWithdrawalConfig } from '~/providers/FunkitCheckoutContext';
|
|
4
|
+
import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
|
|
5
|
+
export type WithdrawalEnterAmountState = CheckoutModalCommonState & {
|
|
6
|
+
withdrawalConfig: WalletWithdrawalConfig | CustomWithdrawalConfig;
|
|
7
|
+
};
|
|
8
|
+
export type WithdrawalEnterAmountNext = {
|
|
9
|
+
hash: Hex;
|
|
10
|
+
withdrawnAmount: string;
|
|
11
|
+
tokenSymbol: string;
|
|
12
|
+
quote?: FunkitCheckoutQuoteResult;
|
|
13
|
+
};
|
|
14
|
+
export declare const WithdrawalEnterAmountInfo: ModalStepInfo<FunCheckoutStep.WITHDRAWAL_ENTER_AMOUNT>;
|
|
15
|
+
export declare function WithdrawalEnterAmount(_props: ModalStepComponentProps<FunCheckoutStep.WITHDRAWAL_ENTER_AMOUNT>): null;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type ComponentType, type SetStateAction } from 'react';
|
|
2
|
-
import { type BridgeCustomerNext, type BridgeCustomerState } from '
|
|
3
|
-
import { type BridgeKycNext, type BridgeKycState } from '
|
|
4
|
-
import { type ErrorScreenState } from '
|
|
5
|
-
import { type VirtualFiatAccountNext, type VirtualFiatAccountState } from '
|
|
2
|
+
import { type BridgeCustomerNext, type BridgeCustomerState } from '~/modals/CheckoutModal/VirtualFiatAccount/BridgeCustomer';
|
|
3
|
+
import { type BridgeKycNext, type BridgeKycState } from '~/modals/CheckoutModal/VirtualFiatAccount/BridgeKyc';
|
|
4
|
+
import { type ErrorScreenState } from '~/modals/CheckoutModal/VirtualFiatAccount/ErrorScreen';
|
|
5
|
+
import { type VirtualFiatAccountNext, type VirtualFiatAccountState } from '~/modals/CheckoutModal/VirtualFiatAccount/VirtualFiatAccount';
|
|
6
6
|
import { type DynamicTargetAssetCandidate, FunCheckoutStartingStep, type FunkitActiveCheckoutItem } from '../../providers/FunkitCheckoutContext';
|
|
7
7
|
import { type FunkitTextCustomizationsConfig } from '../../providers/FunkitConfigContext';
|
|
8
8
|
import { type PerpsTransferNext, type PerpsTransferState } from '../PolymarketPerpsTransfer/PerpsTransferStep';
|
|
@@ -26,6 +26,8 @@ import { type SwappedIframeNext, type SwappedIframeState } from './SwappedIframe
|
|
|
26
26
|
import { type TransferTokenNext, type TransferTokenState } from './TransferToken/TransferToken';
|
|
27
27
|
import { type FiatAccountDetailNext, type FiatAccountDetailState } from './VirtualFiatAccount/FiatAccountDetail';
|
|
28
28
|
import { type KycIframeNext, type KycIframeState } from './VirtualFiatAccount/KycIframe';
|
|
29
|
+
import { type WithdrawalCompleteNext, type WithdrawalCompleteState } from './Withdrawal/WithdrawalComplete';
|
|
30
|
+
import { type WithdrawalEnterAmountNext, type WithdrawalEnterAmountState } from './Withdrawal/WithdrawalEnterAmount';
|
|
29
31
|
export { FunCheckoutStep };
|
|
30
32
|
export interface CheckoutModalCommonState {
|
|
31
33
|
checkoutId: string;
|
|
@@ -123,6 +125,8 @@ export type CheckoutModalState<S extends FunCheckoutStep = FunCheckoutStep> = {
|
|
|
123
125
|
[FunCheckoutStep.BROKERAGE_SUCCESS]: BrokerageSuccessState;
|
|
124
126
|
[FunCheckoutStep.SWAPPED_IFRAME]: SwappedIframeState;
|
|
125
127
|
[FunCheckoutStep.PERPS_TRANSFER]: PerpsTransferState;
|
|
128
|
+
[FunCheckoutStep.WITHDRAWAL_ENTER_AMOUNT]: WithdrawalEnterAmountState;
|
|
129
|
+
[FunCheckoutStep.WITHDRAWAL_COMPLETE]: WithdrawalCompleteState;
|
|
126
130
|
}[T] & {
|
|
127
131
|
step: T;
|
|
128
132
|
previousStep?: FunCheckoutStep | null;
|
|
@@ -153,6 +157,8 @@ export type NextPayload<S extends FunCheckoutStep = FunCheckoutStep> = {
|
|
|
153
157
|
[FunCheckoutStep.BROKERAGE_SUCCESS]: null;
|
|
154
158
|
[FunCheckoutStep.SWAPPED_IFRAME]: SwappedIframeNext;
|
|
155
159
|
[FunCheckoutStep.PERPS_TRANSFER]: PerpsTransferNext;
|
|
160
|
+
[FunCheckoutStep.WITHDRAWAL_ENTER_AMOUNT]: WithdrawalEnterAmountNext;
|
|
161
|
+
[FunCheckoutStep.WITHDRAWAL_COMPLETE]: WithdrawalCompleteNext;
|
|
156
162
|
}[S] & {
|
|
157
163
|
/** Whether screen transition should change direction to simulate back transition. Only applies if there is a history entry in the stack*/
|
|
158
164
|
reverseAnimation?: boolean;
|
|
@@ -164,7 +170,7 @@ export type NextPayload<S extends FunCheckoutStep = FunCheckoutStep> = {
|
|
|
164
170
|
popCurrentStep?: boolean;
|
|
165
171
|
};
|
|
166
172
|
export declare function useCheckoutModalTransition(checkoutItem: FunkitActiveCheckoutItem, onClose: () => void): {
|
|
167
|
-
animation: import("
|
|
173
|
+
animation: import("~/hooks/useAnimatedNavigation").AnimationState;
|
|
168
174
|
modalState: CheckoutModalState<FunCheckoutStep>;
|
|
169
175
|
onBack: () => void;
|
|
170
176
|
onCloseWrapper: (options?: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CheckoutModalEvent } from '
|
|
2
|
-
import type { TrackEventData } from '
|
|
1
|
+
import { CheckoutModalEvent } from '~/hooks/track/CheckoutModalEvent';
|
|
2
|
+
import type { TrackEventData } from '~/hooks/track/useTrack';
|
|
3
3
|
import { FunCheckoutStep } from './FunCheckoutStep';
|
|
4
4
|
import type { CheckoutModalState } from './stepTransition';
|
|
5
5
|
export declare const CHECKOUT_STEP_TO_READY_EVENT: Partial<Record<FunCheckoutStep, CheckoutModalEvent>>;
|
|
6
|
-
export declare const trackEventFromNextState: (nextState: CheckoutModalState<FunCheckoutStep>) => TrackEventData;
|
|
6
|
+
export declare const trackEventFromNextState: (nextState: CheckoutModalState<FunCheckoutStep>) => TrackEventData | null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { Hex } from 'viem';
|
|
3
|
-
import type { MergedCheckoutHistoryItem } from '
|
|
4
|
-
import { HistoryContentPages } from '
|
|
3
|
+
import type { MergedCheckoutHistoryItem } from '~/utils/checkout';
|
|
4
|
+
import { HistoryContentPages } from '~/utils/checkoutHistory';
|
|
5
5
|
export declare const HomeCheckoutDisplayRow: ({ checkoutHistoryItem, onSelect, }: {
|
|
6
6
|
checkoutHistoryItem: MergedCheckoutHistoryItem;
|
|
7
7
|
onSelect: (checkoutId: Hex, initialPage: HistoryContentPages) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { KnownAssetBalanceInfo } from '
|
|
2
|
+
import type { KnownAssetBalanceInfo } from '~/providers/GeneralWalletProvider';
|
|
3
3
|
export declare const HomeTokenBalanceDisplayRow: ({ asset, }: {
|
|
4
4
|
asset: KnownAssetBalanceInfo;
|
|
5
5
|
}) => React.JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { FunkitUserInfo } from '
|
|
3
|
-
import type { Config, UseAccountReturnType } from '
|
|
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,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type AnimationState } from '
|
|
2
|
+
import { type AnimationState } from '~/hooks/useAnimatedNavigation';
|
|
3
3
|
import { type BaseActivitySelection } from '../../ActivityTraversalContext';
|
|
4
4
|
import type { FunProfileView } from '../../ProfileDetails';
|
|
5
5
|
export declare enum SelectedHomeTab {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TFunction } from 'i18next';
|
|
2
|
-
import type { ErrorNotification } from '
|
|
3
|
-
import type { CheckoutConfirmationError } from '
|
|
2
|
+
import type { ErrorNotification } from '~/components/FunNotification/FunNotification';
|
|
3
|
+
import type { CheckoutConfirmationError } from '~/domains/checkoutErrors';
|
|
4
4
|
export declare function getErrorNotification({ quoteErrorObject, withdrawalError, targetAssetFetchError, riskCheckError, t, }: {
|
|
5
5
|
quoteErrorObject: Error | null;
|
|
6
6
|
withdrawalError: CheckoutConfirmationError | null;
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import type { LighterAccountIndex } from '@funkit/api-base';
|
|
7
7
|
import React from 'react';
|
|
8
|
-
import type { CustomWithdrawalConfig, WalletWithdrawalConfig } from '
|
|
9
|
-
import type { LighterShare } from '
|
|
8
|
+
import type { CustomWithdrawalConfig, WalletWithdrawalConfig } from '~/providers/FunkitCheckoutContext';
|
|
9
|
+
import type { LighterShare } from '~/utils/customer';
|
|
10
10
|
import type { SourceTokenOption } from './WithdrawAmountInput';
|
|
11
11
|
/** Free (withdrawable) balance for a single Lighter asset: balance - locked. */
|
|
12
12
|
export declare function freeBalance(balance: string, lockedBalance: string): string;
|
|
@@ -47,7 +47,7 @@ export declare function useLighterWithdrawalBalances({ accountIndex, }: {
|
|
|
47
47
|
accountIndex: LighterAccountIndex | undefined;
|
|
48
48
|
}): {
|
|
49
49
|
balances: Record<string, string>;
|
|
50
|
-
assets: import("
|
|
50
|
+
assets: import("~/utils/customer").LighterAsset[];
|
|
51
51
|
shares: LighterShare[];
|
|
52
52
|
isLoading: boolean;
|
|
53
53
|
};
|
|
@@ -82,7 +82,7 @@ export declare function useLighterWithdrawal(config: FunkitWithdrawalConfig, set
|
|
|
82
82
|
isLighterFast: boolean;
|
|
83
83
|
connectedAddress: `0x${string}` | undefined;
|
|
84
84
|
lighterBalances: Record<string, string>;
|
|
85
|
-
lighterAssets: import("
|
|
85
|
+
lighterAssets: import("~/utils/customer").LighterAsset[];
|
|
86
86
|
lighterFastUnstakedFee: number;
|
|
87
87
|
};
|
|
88
88
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { FunkitWithdrawalConfig } from '
|
|
2
|
+
import type { FunkitWithdrawalConfig } from '~/providers/FunkitCheckoutContext';
|
|
3
3
|
export declare function WithdrawRecipientAddress({ config, recipientAddress, setRecipientAddress, selectedChainId, selectedToken, isValidAddress, isRiskyAddress, }: {
|
|
4
4
|
config: FunkitWithdrawalConfig;
|
|
5
5
|
recipientAddress: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { FunkitWithdrawalConfig, MultiMethodWithdrawalConfig } from '
|
|
2
|
+
import type { FunkitWithdrawalConfig, MultiMethodWithdrawalConfig } from '~/providers/FunkitCheckoutContext';
|
|
3
3
|
export interface SourceTokenOption {
|
|
4
4
|
symbol: string;
|
|
5
5
|
/** Display label (may differ from symbol, e.g. "USDC (Perps)") */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { Hex } from 'viem';
|
|
3
|
-
import type { CustomWithdrawalConfig, FunkitActiveWithdrawalItem, FunkitCheckoutConfig, WalletWithdrawalConfig } from '
|
|
3
|
+
import type { CustomWithdrawalConfig, FunkitActiveWithdrawalItem, FunkitCheckoutConfig, WalletWithdrawalConfig } from '~/providers/FunkitCheckoutContext';
|
|
4
4
|
import { type WithdrawalFormData } from './useWithdrawal';
|
|
5
5
|
/**
|
|
6
6
|
* WithdrawalContent only operates on concrete single-method withdrawal configs.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { FunkitWithdrawalConfig } from '
|
|
2
|
+
import type { FunkitWithdrawalConfig } from '~/providers/FunkitCheckoutContext';
|
|
3
3
|
export declare const WITHDRAWAL_MODAL_CONTENT_ID = "withdrawal-modal-content";
|
|
4
4
|
export interface WithdrawalModalProps {
|
|
5
5
|
open: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { WithdrawalMethodOption } from '
|
|
2
|
+
import type { WithdrawalMethodOption } from '~/providers/FunkitCheckoutContext/types';
|
|
3
3
|
interface WithdrawalTypeSelectProps {
|
|
4
4
|
/** Section label shown above the list (e.g. "Crypto"). */
|
|
5
5
|
sectionTitle?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Address, Hex } from 'viem';
|
|
2
|
-
import { type CheckoutConfirmationError } from '
|
|
3
|
-
import type { FunkitCheckoutQuoteResult } from '
|
|
4
|
-
import { type FunkitActiveWithdrawalItem, type FunkitWithdrawalConfig } from '
|
|
2
|
+
import { type CheckoutConfirmationError } from '~/domains/checkoutErrors';
|
|
3
|
+
import type { FunkitCheckoutQuoteResult } from '~/domains/quote';
|
|
4
|
+
import { type FunkitActiveWithdrawalItem, type FunkitWithdrawalConfig } from '~/providers/FunkitCheckoutContext';
|
|
5
5
|
interface UseWithdrawalResult {
|
|
6
6
|
handleWithdrawal: (withdrawal: WithdrawalFormData) => Promise<void>;
|
|
7
7
|
isWithdrawing: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type UseBluvoFlowHook } from '@bluvo/react';
|
|
2
2
|
import React, { type ReactNode } from 'react';
|
|
3
|
-
import { type BluvoBrokerageMinMax, type BluvoExchangeType } from '
|
|
4
|
-
import type { BrokerageAssetHoldingsItem } from '
|
|
3
|
+
import { type BluvoBrokerageMinMax, type BluvoExchangeType } from '~/consts/bluvo';
|
|
4
|
+
import type { BrokerageAssetHoldingsItem } from '~/domains/wallet';
|
|
5
5
|
type BluvoLocalStorageData = Partial<Record<BluvoExchangeType, string>>;
|
|
6
6
|
interface FunkitBrokerageContextProps {
|
|
7
7
|
bluvoClient: UseBluvoFlowHook;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { type ReactNode } from 'react';
|
|
2
2
|
import type { Address } from 'viem';
|
|
3
|
-
import { type ApplyDynamicRoutingPath } from '
|
|
3
|
+
import { type ApplyDynamicRoutingPath } from '~/domains/dynamicRouting';
|
|
4
4
|
import { type PaymentMethodInfo } from '../../domains/paymentMethods';
|
|
5
5
|
import type { AssetHoldingsItem } from '../../utils/assets';
|
|
6
6
|
import type { WithdrawalClient, WithdrawalTransaction } from '../../wallets/Wallet';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { RelayTxHash, RelayVmType } from '@funkit/fun-relay';
|
|
2
|
-
import type { FunkitCheckoutQuoteResult } from '
|
|
3
|
-
import { CheckoutModalEvent } from '
|
|
4
|
-
import type { WithdrawModalEvent } from '
|
|
5
|
-
import type { TrackEventData } from '
|
|
2
|
+
import type { FunkitCheckoutQuoteResult } from '~/domains/quote';
|
|
3
|
+
import { CheckoutModalEvent } from '~/hooks/track/CheckoutModalEvent';
|
|
4
|
+
import type { WithdrawModalEvent } from '~/hooks/track/WithdrawModalEvent';
|
|
5
|
+
import type { TrackEventData } from '~/hooks/track/useTrack';
|
|
6
6
|
import type { FunkitActiveCheckoutItem, FunkitActiveWithdrawalItem } from './index';
|
|
7
7
|
export declare const trackEventFromActiveItem: (activeItem: FunkitActiveCheckoutItem | FunkitActiveWithdrawalItem, eventName: CheckoutModalEvent | WithdrawModalEvent) => TrackEventData;
|
|
8
8
|
export declare const trackEventFromDirectExecutionConfirmed: ({ txHash, checkoutItem, latestQuote, }: {
|
|
@@ -7,10 +7,8 @@ import type { CheckoutBlockedReason } from '../../modals/CheckoutModal/CheckoutB
|
|
|
7
7
|
import type { WithdrawalClient, WithdrawalTransaction } from '../../wallets/Wallet';
|
|
8
8
|
import type { FunkitCheckoutQuoteResult } from '../FunkitHistoryContext';
|
|
9
9
|
export type FunkitCheckoutActionParams = ApiFunkitCheckoutActionParams;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
tokenChainId: string;
|
|
13
|
-
}
|
|
10
|
+
import type { DynamicTargetAssetCandidate, TokenInfo } from '@funkit/connect-core';
|
|
11
|
+
export type { DynamicTargetAssetCandidate, TokenInfo, } from '@funkit/connect-core';
|
|
14
12
|
/**
|
|
15
13
|
* Argument passed to a dynamic {@link FunkitCheckoutConfig.modalTitle} resolver.
|
|
16
14
|
* Extends {@link TokenInfo} with the active dynamic routing id so titles can be
|
|
@@ -21,30 +19,6 @@ export interface TokenInfo {
|
|
|
21
19
|
export interface ModalTitleContext extends TokenInfo {
|
|
22
20
|
dynamicRoutingId?: string;
|
|
23
21
|
}
|
|
24
|
-
export interface DynamicTargetAssetCandidate extends TokenInfo {
|
|
25
|
-
iconSrc: string;
|
|
26
|
-
tokenSymbol: string;
|
|
27
|
-
isDefault?: boolean;
|
|
28
|
-
badgeText?: string;
|
|
29
|
-
targetAssetMinAmount?: number;
|
|
30
|
-
/**
|
|
31
|
-
* Exchange rate of the target asset in terms of the finalized token.
|
|
32
|
-
* Represents how many finalized tokens one unit of the target asset can be exchanged for.
|
|
33
|
-
*
|
|
34
|
-
* Example: If `targetAsset`/`finalizedToken` is USDT/hbUSDT and the rate is 1.01,
|
|
35
|
-
* 1 USDT can be exchanged for 1.01 hbUSDT.
|
|
36
|
-
*/
|
|
37
|
-
finalizedTokenRate?: number;
|
|
38
|
-
dynamicRoutingId?: string;
|
|
39
|
-
/**
|
|
40
|
-
* Recipient to point the checkout at when this candidate is selected. Set when
|
|
41
|
-
* candidates represent destination *accounts* that share a target token but
|
|
42
|
-
* differ by recipient (e.g. Polymarket Predictions vs Perps); selecting one
|
|
43
|
-
* routes funds to its address. Omit for plain token candidates (the recipient
|
|
44
|
-
* is unchanged).
|
|
45
|
-
*/
|
|
46
|
-
customRecipient?: Address;
|
|
47
|
-
}
|
|
48
22
|
/**
|
|
49
23
|
* A token to offer adding to the user's wallet (EIP-747 `wallet_watchAsset`) on
|
|
50
24
|
* the post-checkout success screen.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ComponentType, type JSX, type ReactNode } from 'react';
|
|
2
|
-
import type { BluvoExchangeType } from '
|
|
3
|
-
import type { PaymentMethod } from '
|
|
4
|
-
import type { SourceChangeTopComponentProps } from '
|
|
2
|
+
import type { BluvoExchangeType } from '~/consts/bluvo';
|
|
3
|
+
import type { PaymentMethod } from '~/domains/paymentMethods';
|
|
4
|
+
import type { SourceChangeTopComponentProps } from '~/modals/CheckoutModal/stepTransition';
|
|
5
5
|
export interface FunkitTextCustomizationsConfig {
|
|
6
6
|
virtualFiat: string;
|
|
7
7
|
brokerageOrExchange: string;
|
|
@@ -3,8 +3,8 @@ import React, { type ReactNode } from 'react';
|
|
|
3
3
|
import type { Address, Hex } from 'viem';
|
|
4
4
|
import { type MergedCheckoutHistoryItem } from '../utils/checkout';
|
|
5
5
|
import { type PurifiedCheckoutHistoryItem } from '../utils/purifyCheckoutHistoryItem';
|
|
6
|
-
export type { HistoricalCheckoutItem, ServerCheckoutConfig, } from '
|
|
7
|
-
export type { FunkitCheckoutQuoteResult } from '
|
|
6
|
+
export type { HistoricalCheckoutItem, ServerCheckoutConfig, } from '~/domains/clientMetadata';
|
|
7
|
+
export type { FunkitCheckoutQuoteResult } from '~/domains/quote';
|
|
8
8
|
interface FunkitCheckoutHistoryContextInterface {
|
|
9
9
|
checkoutHistoryList: MergedCheckoutHistoryItem[];
|
|
10
10
|
isCheckoutHistoryInited: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type QueryClient } from '@tanstack/react-query';
|
|
2
2
|
import React, { type ReactNode } from 'react';
|
|
3
|
-
import type { Chain } from '
|
|
4
|
-
import type { Locale } from '
|
|
3
|
+
import type { Chain } from '~/wagmi/chains';
|
|
4
|
+
import type { Locale } from '~/locales';
|
|
5
5
|
import { type CreateFunkitWagmiConfigParameters } from '../config/getDefaultConfig';
|
|
6
6
|
import { type AvatarComponent } from './AvatarContext';
|
|
7
7
|
import { type FunkitConfig } from './FunkitConfigContext';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { QuoteMode } from '
|
|
2
|
-
import type { CheckoutModalEvent } from '
|
|
3
|
-
import type { WithdrawModalEvent } from '
|
|
4
|
-
import type { TrackEventData } from '
|
|
1
|
+
import type { QuoteMode } from '~/domains/quoteMode';
|
|
2
|
+
import type { CheckoutModalEvent } from '~/hooks/track/CheckoutModalEvent';
|
|
3
|
+
import type { WithdrawModalEvent } from '~/hooks/track/WithdrawModalEvent';
|
|
4
|
+
import type { TrackEventData } from '~/hooks/track/useTrack';
|
|
5
5
|
import type { FunkitActiveCheckoutItem } from './FunkitCheckoutContext';
|
|
6
6
|
import type { FunkitCheckoutQuoteResult } from './FunkitHistoryContext';
|
|
7
7
|
export declare const trackEventFromBaseQuote: (checkoutItem: FunkitActiveCheckoutItem, eventName: CheckoutModalEvent | WithdrawModalEvent, quoteMode?: QuoteMode) => TrackEventData;
|
|
@@ -1,8 +1,8 @@
|
|
|
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 { IdentityProvider } from '
|
|
5
|
-
import { type UseDisconnectReturnType, type UseReconnectReturnType } from '
|
|
4
|
+
import type { IdentityProvider } from '~/interfaces/identity';
|
|
5
|
+
import { type UseDisconnectReturnType, type UseReconnectReturnType } from '~/wagmi/hooks';
|
|
6
6
|
import { type FunkitUserInfo } from '../consts/funkit';
|
|
7
7
|
import { LoginType } from '../utils/userInfo';
|
|
8
8
|
/** AssetBalanceInfo with known price and totalUsdValue */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { type ReactNode } from 'react';
|
|
2
|
-
import { type QuoteBuilder } from '
|
|
2
|
+
import { type QuoteBuilder } from '~/domains/quoteMode';
|
|
3
3
|
export declare function QuoteModeProvider({ children }: {
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
}): React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { FormOfPaymentType } from '@funkit/api-base';
|
|
2
2
|
import { type SwappedTransport } from '@funkit/connect-core';
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import { type SwappedTheme } from '
|
|
4
|
+
import { type SwappedTheme } from '~/utils/swapped';
|
|
5
5
|
interface SwappedContextValue {
|
|
6
6
|
iframeUrl: string | null;
|
|
7
7
|
isSwappedReady: boolean;
|
package/dist/utils/assets.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { DynamicTargetAssetCandidate, FunkitCheckoutConfig } from '../providers/FunkitCheckoutContext';
|
|
2
|
-
export type { AssetHoldingsItem, AssetHoldingsMap, KnownAssetHoldingsItem, } from '
|
|
2
|
+
export type { AssetHoldingsItem, AssetHoldingsMap, KnownAssetHoldingsItem, } from '~/domains/wallet';
|
|
3
3
|
export declare const getNormalizedTokenBalance: (tokenBalance: bigint | number | string, decimals: number) => number;
|
|
4
4
|
export declare const getDefaultDynamicTargetAsset: (checkoutConfig: FunkitCheckoutConfig | undefined) => DynamicTargetAssetCandidate;
|
package/dist/utils/bluvo.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { WalletwithdrawbalancebalanceResponse } from '@bluvo/sdk-ts';
|
|
2
2
|
type WithdrawableBalance = WalletwithdrawbalancebalanceResponse['balances'][number];
|
|
3
3
|
import { type BluvoExecuteWithdrawalResponse, BluvoWithdrawalError } from '@funkit/api-base';
|
|
4
|
-
import type { BluvoExchangeType } from '
|
|
5
|
-
import type { AssetHoldingsItem, AssetHoldingsMap, BrokerageAssetHoldingsItem } from '
|
|
6
|
-
import { type MinTransferConfig } from '
|
|
4
|
+
import type { BluvoExchangeType } from '~/consts/bluvo';
|
|
5
|
+
import type { AssetHoldingsItem, AssetHoldingsMap, BrokerageAssetHoldingsItem } from '~/domains/wallet';
|
|
6
|
+
import { type MinTransferConfig } from '~/hooks/useTokenTransfer';
|
|
7
7
|
export declare const isBrokerageAsset: (asset: AssetHoldingsItem) => asset is BrokerageAssetHoldingsItem & {
|
|
8
8
|
usdAmount: number;
|
|
9
9
|
};
|
package/dist/utils/checkout.d.ts
CHANGED
|
@@ -2,9 +2,9 @@ export { isCheckoutHistoryDirectExecution, isCheckoutValid, type MergedCheckoutH
|
|
|
2
2
|
import { type ApiFunkitCheckoutQuoteResult, type CheckoutQuoteResponse } from '@funkit/utils';
|
|
3
3
|
import type { Dnum } from 'dnum';
|
|
4
4
|
import { type Address } from 'viem';
|
|
5
|
-
import type { ServerCheckoutConfig } from '
|
|
6
|
-
import type { FunkitCheckoutQuoteResult } from '
|
|
7
|
-
import type { Config, UseConfigReturnType } from '
|
|
5
|
+
import type { ServerCheckoutConfig } from '~/domains/clientMetadata';
|
|
6
|
+
import type { FunkitCheckoutQuoteResult } from '~/domains/quote';
|
|
7
|
+
import type { Config, UseConfigReturnType } from '~/wagmi/hooks';
|
|
8
8
|
import { type FunkitCheckoutActionParams, type FunkitCheckoutConfig } from '../providers/FunkitCheckoutContext';
|
|
9
9
|
export declare const MOONPAY_TIME_ESTIMATE_MS = 120000;
|
|
10
10
|
export declare const BROKERAGE_TIME_ESTIMATE_MS = 0;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CheckoutQuoteResponse } from '@funkit/utils';
|
|
2
|
-
import type { FunkitCheckoutConfig } from '
|
|
2
|
+
import type { FunkitCheckoutConfig } from '~/providers/FunkitCheckoutContext';
|
|
3
3
|
export declare const DEFAULT_TX_DELAYED_CUTOFF = 60;
|
|
4
4
|
/**
|
|
5
5
|
* Returns the delayed auto trigger cutoff (in seconds) for slow deposits.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
type BaseCondition = {
|
|
2
|
+
type: 'country';
|
|
3
|
+
countryCodes: string[];
|
|
4
|
+
};
|
|
5
|
+
type Condition = BaseCondition | {
|
|
6
|
+
type: 'all';
|
|
7
|
+
conditions: Condition[];
|
|
8
|
+
} | {
|
|
9
|
+
type: 'any';
|
|
10
|
+
conditions: Condition[];
|
|
11
|
+
};
|
|
12
|
+
interface Variant<T> {
|
|
13
|
+
condition?: Condition;
|
|
14
|
+
value: T;
|
|
15
|
+
}
|
|
16
|
+
interface VariantConfig<T> {
|
|
17
|
+
variants: Variant<T>[];
|
|
18
|
+
value: T;
|
|
19
|
+
}
|
|
20
|
+
interface EvaluationContext {
|
|
21
|
+
countryCode?: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Type guard to check if a value is a VariantConfig
|
|
25
|
+
* (used to distinguish from simple static configs)
|
|
26
|
+
*/
|
|
27
|
+
export declare function isVariantConfig<T>(value: unknown): value is VariantConfig<T>;
|
|
28
|
+
/**
|
|
29
|
+
* Resolves the appropriate value from a VariantConfig based on runtime context.
|
|
30
|
+
* Evaluates variants in order and returns the first matching variant's value.
|
|
31
|
+
* Falls back to default value if no variants match.
|
|
32
|
+
*/
|
|
33
|
+
export declare function resolveValue<T>(config: VariantConfig<T>, ctx: EvaluationContext): T;
|
|
34
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FunkitCheckoutConfig } from '
|
|
1
|
+
import type { FunkitCheckoutConfig } from '~/providers/FunkitCheckoutContext';
|
|
2
2
|
import type { FunkitProviderProps } from '../providers/FunkitProvider';
|
|
3
3
|
export declare function getInitialChainIdFromFunkitProviderProps(props: FunkitProviderProps): number | undefined;
|
|
4
4
|
export declare function generateSyntheticUserId(apiKey: string, externalUserId: string): string;
|
package/dist/utils/payment.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LoginType } from '
|
|
1
|
+
import { LoginType } from '~/providers/GeneralWalletProvider';
|
|
2
2
|
import { type PaymentMethodInfo } from '../domains/paymentMethods';
|
|
3
3
|
/**
|
|
4
4
|
* Generate a string for backend to indicate the source of a checkout funds
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type CheckoutHistoryItem, type CheckoutState } from '@funkit/api-base';
|
|
2
2
|
import type { ApiFunkitCheckoutActionParams } from '@funkit/utils';
|
|
3
3
|
import type { Address, Hex } from 'viem';
|
|
4
|
-
import type { MergedMultiStepDirectExecution } from '
|
|
4
|
+
import type { MergedMultiStepDirectExecution } from '~/domains/checkoutNotifications';
|
|
5
5
|
export type PurifiedCheckoutHistoryItem = {
|
|
6
6
|
depositAddr?: Address;
|
|
7
7
|
directExecution: boolean;
|
package/dist/utils/swapped.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SwappedTheme } from '@funkit/connect-core';
|
|
2
|
-
import type { ThemeVars } from '
|
|
2
|
+
import type { ThemeVars } from '~/css/sprinkles.css';
|
|
3
3
|
export { getSavedFormOfPaymentDisplayName, getSavedFormOfPaymentIcon, getSwappedIcon, getSwappedOrigin, isSavedFormOfPaymentType, isSwappedOrigin, SWAPPED_CARD_BRANDS, } from '@funkit/connect-core';
|
|
4
4
|
export type { SwappedTheme };
|
|
5
5
|
export declare function resolveCssValue(value: string): string;
|
|
@@ -1,14 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Keys are chainId strings. Values are arrays of token addresses,
|
|
3
|
-
* or ["*"] to disable the entire chain.
|
|
4
|
-
*/
|
|
5
|
-
export type DisabledChainsAndAssets = Record<string, string[]>;
|
|
6
|
-
/** Returns true if an entire chain is disabled (has ["*"]). */
|
|
7
|
-
export declare function isChainDisabled(disabledConfig: DisabledChainsAndAssets, chainId: number | string): boolean;
|
|
8
|
-
/**
|
|
9
|
-
* Returns true if a specific chain + asset combination is disabled.
|
|
10
|
-
* - If the chain has ["*"], the entire chain (and all its assets) is disabled.
|
|
11
|
-
* - If the chain has specific addresses, only those tokens are disabled.
|
|
12
|
-
* - Address comparison is case-insensitive.
|
|
13
|
-
*/
|
|
14
|
-
export declare function isAssetDisabled(disabledConfig: DisabledChainsAndAssets, chainId: number | string, tokenAddress: string): boolean;
|
|
1
|
+
export { type DisabledChainsAndAssets, isAssetDisabled, isChainDisabled, } from '@funkit/connect-core';
|
|
@@ -1,32 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
showNewBadge?: 'primary' | true;
|
|
7
|
-
}
|
|
8
|
-
/** Resolved asset: API metadata merged with config-driven fields */
|
|
9
|
-
export type ResolvedAssetInfo = SupportedAssetInfo & TokenTransferAssetConfig;
|
|
10
|
-
/** Raw chain entry from the Statsig tokentransferconfig */
|
|
11
|
-
export interface TokenTransferChainConfig {
|
|
12
|
-
readonly chainId: number;
|
|
13
|
-
readonly isDefault?: boolean;
|
|
14
|
-
readonly assets: readonly TokenTransferAssetConfig[];
|
|
15
|
-
}
|
|
16
|
-
/** The full output of useTokenTransferConfig */
|
|
17
|
-
export interface TokenTransferConfig {
|
|
18
|
-
/** Supported assets filtered by config, keyed by [chainId][address] */
|
|
19
|
-
supportedAssets: GetSupportedAssetsResponse;
|
|
20
|
-
/** Backward-compatible Record<number, string[]> (chainId -> symbol[]) */
|
|
21
|
-
symbolsByChainId: Record<number, string[]>;
|
|
22
|
-
/** Chain IDs in config display order */
|
|
23
|
-
chainIdSortOrder: number[];
|
|
24
|
-
/** Default chain ID (from isDefault on chain entry) */
|
|
25
|
-
defaultChainId: number | undefined;
|
|
26
|
-
/** Token symbols to prioritize at the top of the dropdown */
|
|
27
|
-
priorityTokenSymbols: string[];
|
|
28
|
-
/** Token symbols that have a "New" badge. The 'primary' symbol is first. */
|
|
29
|
-
newBadgeSymbols: Set<string>;
|
|
30
|
-
/** True while /assets/supported is still loading */
|
|
1
|
+
import type { TokenTransferConfigResult } from '@funkit/connect-core';
|
|
2
|
+
export type { ResolvedAssetInfo, TokenTransferAssetConfig, TokenTransferChainConfig, TokenTransferConfigResult, } from '@funkit/connect-core';
|
|
3
|
+
/** The full output of useTokenTransferConfig: the resolved config + load state. */
|
|
4
|
+
export interface TokenTransferConfig extends TokenTransferConfigResult {
|
|
5
|
+
/** True while /assets/supported is still loading. */
|
|
31
6
|
isLoading: boolean;
|
|
32
7
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CustomWithdrawalConfig, FunkitWithdrawalConfig, MultiMethodWithdrawalConfig, WalletWithdrawalConfig } from '
|
|
1
|
+
import type { CustomWithdrawalConfig, FunkitWithdrawalConfig, MultiMethodWithdrawalConfig, WalletWithdrawalConfig } from '~/providers/FunkitCheckoutContext';
|
|
2
2
|
/**
|
|
3
3
|
* Type guard to check if withdrawal config uses wallet-based flow
|
|
4
4
|
*/
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
bifrostWallet
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-N4IJLYFY.js";
|
|
4
|
+
} from "../chunk-4T6ZSRJF.js";
|
|
6
5
|
import "../chunk-OLZ7626J.js";
|
|
6
|
+
import "../chunk-N4IJLYFY.js";
|
|
7
7
|
import "../chunk-IGKXZBTA.js";
|
|
8
8
|
export {
|
|
9
9
|
bifrostWallet
|