@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
package/dist/domains/aave.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* would run SDK init for every consumer of this module.
|
|
7
7
|
*/
|
|
8
8
|
import type { Address } from 'viem';
|
|
9
|
-
import type { FunkitCheckoutConfig } from '
|
|
9
|
+
import type { FunkitCheckoutConfig } from '~/providers/FunkitCheckoutContext';
|
|
10
10
|
export declare const AAVE_MARKET_ADDRESS_BY_CHAIN: Record<string, Address>;
|
|
11
11
|
interface AaveNativeSupplyContextArgs {
|
|
12
12
|
apiKey: string;
|
package/dist/domains/asset.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { TFunction } from 'i18next';
|
|
2
2
|
import type { Address } from 'viem';
|
|
3
|
-
import type { FunkitCheckoutConfig } from '
|
|
4
|
-
import type { AssetHoldingsItem } from '
|
|
3
|
+
import type { FunkitCheckoutConfig } from '~/providers/FunkitCheckoutContext';
|
|
4
|
+
import type { AssetHoldingsItem } from '~/utils/assets';
|
|
5
5
|
import { PaymentMethod } from '../domains/paymentMethods';
|
|
6
6
|
/**
|
|
7
7
|
* Calculates the minimum USD value an asset must have to be considered usable for checkout.
|
|
@@ -23,10 +23,10 @@ interface AssetUsableToPayParms {
|
|
|
23
23
|
assetUsdAmount: number | null;
|
|
24
24
|
isAllowedForCheckout: boolean;
|
|
25
25
|
minValueThreshold: number;
|
|
26
|
-
|
|
26
|
+
isLighterDynamicRoutingEnabled: boolean;
|
|
27
27
|
t: TFunction;
|
|
28
28
|
}
|
|
29
|
-
export declare const isAssetUsableToPayForCheckout: ({ config, payerAddress, paymentMethod, targetChainId, targetTokenAddress, assetChainId, assetTokenAddress, assetUsdAmount, isAllowedForCheckout, minValueThreshold,
|
|
29
|
+
export declare const isAssetUsableToPayForCheckout: ({ config, payerAddress, paymentMethod, targetChainId, targetTokenAddress, assetChainId, assetTokenAddress, assetUsdAmount, isAllowedForCheckout, minValueThreshold, isLighterDynamicRoutingEnabled, t, }: AssetUsableToPayParms) => {
|
|
30
30
|
isUsable: boolean;
|
|
31
31
|
reason: string;
|
|
32
32
|
minUsdWithFees?: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type FunAddress } from '@funkit/api-base';
|
|
2
2
|
import { CheckoutRefundState, CheckoutState } from '@funkit/api-base';
|
|
3
|
-
import type { GeneralWalletContextProps } from '
|
|
3
|
+
import type { GeneralWalletContextProps } from '~/providers/GeneralWalletProvider';
|
|
4
4
|
export declare const hasRisk: (apiKey: string, walletAddress: GeneralWalletContextProps["walletAddress"], customRecipient?: FunAddress) => Promise<boolean>;
|
|
5
5
|
export type CheckoutStatus = 'failed' | 'expired' | 'processing' | 'completed';
|
|
6
6
|
type CheckoutStateBooleans = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TFunction } from 'i18next';
|
|
2
|
-
import type { ErrorNotification } from '
|
|
3
|
-
import type { Config, Connector } from '
|
|
2
|
+
import type { ErrorNotification } from '~/components/FunNotification/FunNotification';
|
|
3
|
+
import type { Config, Connector } from '~/wagmi/hooks';
|
|
4
4
|
export interface CheckoutConfirmationError extends ErrorNotification {
|
|
5
5
|
durationMs?: number;
|
|
6
6
|
code: ConfirmationErrorCode;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Address } from 'viem';
|
|
2
|
-
import type { FunkitCheckoutConfig } from '
|
|
2
|
+
import type { FunkitCheckoutConfig } from '~/providers/FunkitCheckoutContext';
|
|
3
3
|
export declare function getCheckoutRecipient({ walletAddress, config, }: {
|
|
4
4
|
walletAddress: string;
|
|
5
5
|
config: FunkitCheckoutConfig;
|
|
@@ -4,18 +4,23 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Make sure it is SERIALIZABLE and BACKWARD COMPATIBLE!!
|
|
6
6
|
*/
|
|
7
|
+
import type { DynamicTargetAssetCandidate } from '@funkit/connect-core';
|
|
7
8
|
import type { ApiCheckoutClientMetadata } from '@funkit/utils';
|
|
8
|
-
import type { FunkitActiveCheckoutItem, FunkitCheckoutActionParams, FunkitCheckoutConfig } from '
|
|
9
|
+
import type { FunkitActiveCheckoutItem, FunkitCheckoutActionParams, FunkitCheckoutConfig } from '~/providers/FunkitCheckoutContext';
|
|
9
10
|
import type { FunkitCheckoutQuoteResult } from './quote';
|
|
10
11
|
type Serialize<T> = T extends (...args: never[]) => unknown ? DeepSerialize<ReturnType<T>> : T extends object ? DeepSerialize<T> : T;
|
|
11
12
|
type DeepSerialize<T> = {
|
|
12
13
|
[K in keyof T]: Serialize<T[K]>;
|
|
13
14
|
};
|
|
15
|
+
type SerializedCandidate = Omit<DynamicTargetAssetCandidate, 'generateActionsParams'>;
|
|
14
16
|
/**
|
|
15
17
|
* Historical Checkout Configuration stored in the server
|
|
16
18
|
* This is similar to FunkitCheckoutConfig but with some fields changed to serializable types
|
|
17
19
|
* */
|
|
18
|
-
export type ServerCheckoutConfig = DeepSerialize<FunkitCheckoutConfig
|
|
20
|
+
export type ServerCheckoutConfig = Omit<DeepSerialize<FunkitCheckoutConfig>, 'dynamicTargetAssetCandidates' | 'finalizedToken'> & {
|
|
21
|
+
dynamicTargetAssetCandidates?: SerializedCandidate[];
|
|
22
|
+
finalizedToken?: SerializedCandidate;
|
|
23
|
+
};
|
|
19
24
|
type HistoricalCheckoutItemKey = 'id' | 'startTimestampMs' | 'finalDollarValue' | 'latestQuote' | 'depositAddress' | 'selectedSourceAssetInfo' | 'selectedPaymentMethodInfo';
|
|
20
25
|
/**
|
|
21
26
|
* HistoricalCheckoutItem stored in the server
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DynamicRoutePath } from '@funkit/fun-relay';
|
|
2
|
-
import type { DynamicTargetAssetCandidate, FunkitCheckoutConfig } from '
|
|
2
|
+
import type { DynamicTargetAssetCandidate, FunkitCheckoutConfig } from '~/providers/FunkitCheckoutContext';
|
|
3
3
|
/**
|
|
4
4
|
* The path shape accepted by {@link mergeDynamicRoutingIntoConfig} /
|
|
5
5
|
* `applyDynamicRouting`. It is a {@link DynamicRoutePath} with the
|
package/dist/domains/fees.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { CheckoutQuoteResponse } from '@funkit/utils';
|
|
2
|
-
import type { BluvoBrokerageQuote } from '
|
|
3
|
-
import { LoginType } from '
|
|
4
|
-
import type { Config } from '
|
|
2
|
+
import type { BluvoBrokerageQuote } from '~/hooks/useBluvo';
|
|
3
|
+
import { LoginType } from '~/providers/GeneralWalletProvider';
|
|
4
|
+
import type { Config } from '~/wagmi/hooks';
|
|
5
5
|
import type { FunkitActiveCheckoutItem } from '../providers/FunkitCheckoutContext';
|
|
6
6
|
import { PaymentMethod, type PaymentMethodInfo } from './paymentMethods';
|
|
7
7
|
export interface BrokerageDetails {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { BridgeCustomer, BridgeVirtualBankAccount } from '@funkit/api-base';
|
|
2
2
|
import { PaymentMethod } from '@funkit/connect-core';
|
|
3
|
-
import { type BluvoExchangeType } from '
|
|
3
|
+
import { type BluvoExchangeType } from '~/consts/bluvo';
|
|
4
4
|
export { PaymentMethod };
|
|
5
5
|
/** Full payment method information used in frontend during payment flows. **/
|
|
6
6
|
interface PaymentMethodInfoBase {
|
package/dist/domains/quote.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { ApiFunkitCheckoutQuoteResult, CheckoutQuoteResponse } from '@funkit/utils';
|
|
2
2
|
import type { Dnum } from 'dnum';
|
|
3
3
|
import { type Address } from 'viem';
|
|
4
|
-
import type { Config } from '
|
|
5
|
-
import type { BluvoBrokerageQuote } from '
|
|
6
|
-
import type { FunkitDirectExecutionInfo } from '
|
|
7
|
-
import type { FunkitActiveCheckoutItem } from '
|
|
8
|
-
import type { LoginType } from '
|
|
4
|
+
import type { Config } from '~/wagmi/hooks';
|
|
5
|
+
import type { BluvoBrokerageQuote } from '~/hooks/useBluvo';
|
|
6
|
+
import type { FunkitDirectExecutionInfo } from '~/hooks/useCheckoutDirectExecution';
|
|
7
|
+
import type { FunkitActiveCheckoutItem } from '~/providers/FunkitCheckoutContext';
|
|
8
|
+
import type { LoginType } from '~/providers/GeneralWalletProvider';
|
|
9
9
|
import { type BrokerageDetails, type CheckoutFees } from './fees';
|
|
10
10
|
import { type PaymentMethodInfo } from './paymentMethods';
|
|
11
11
|
import type { QuoteBuilder } from './quoteMode';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Dnum } from 'dnum';
|
|
2
|
-
import type { PaymentMethod } from '
|
|
3
|
-
import type { FunkitCheckoutQuoteResult } from '
|
|
2
|
+
import type { PaymentMethod } from '~/domains/paymentMethods';
|
|
3
|
+
import type { FunkitCheckoutQuoteResult } from '~/domains/quote';
|
|
4
4
|
export declare enum QuoteMode {
|
|
5
5
|
EXACT_IN = "EXACT_IN",
|
|
6
6
|
EXACT_OUT = "EXACT_OUT",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type LightningQuoteResponse } from '@funkit/api-base';
|
|
2
2
|
import { type Address } from 'viem';
|
|
3
|
-
import type { GeneralWalletContextProps } from '
|
|
3
|
+
import type { GeneralWalletContextProps } from '~/providers/GeneralWalletProvider';
|
|
4
4
|
export declare function usdToSats(usd: number | undefined, btcPrice: number | undefined): bigint | undefined;
|
|
5
5
|
type UseLightningQuoteParams = {
|
|
6
6
|
depositAddr: Address | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { DirectExecution } from '@funkit/api-base';
|
|
2
2
|
import { type RecentDepositsApiQueryParams } from '@funkit/connect-core';
|
|
3
3
|
import type { UseQueryResult } from '@tanstack/react-query';
|
|
4
|
-
import { type PurifiedCheckoutHistoryItem } from '
|
|
4
|
+
import { type PurifiedCheckoutHistoryItem } from '~/utils/purifyCheckoutHistoryItem';
|
|
5
5
|
type RecentDepositsApiQuery = Omit<RecentDepositsApiQueryParams, 'isFasterNotificationsEnabled' | 'logger'>;
|
|
6
6
|
type DefaultDEQueryKey = 'apiKey' | 'userId' | 'refreshIntervalMs';
|
|
7
7
|
export type RecentDEQuerySimplified = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type FunkitWithdrawalConfig } from '
|
|
1
|
+
import { type FunkitWithdrawalConfig } from '~/providers/FunkitCheckoutContext';
|
|
2
2
|
interface CheckoutQuoteParams {
|
|
3
3
|
recipientAddress: string;
|
|
4
4
|
selectedChainId: string | undefined;
|
|
@@ -15,8 +15,8 @@ export declare function useWithdrawalQuote({ recipientAddress, selectedChainId,
|
|
|
15
15
|
quoteEnabled: boolean;
|
|
16
16
|
data: {
|
|
17
17
|
baseQuote: import("@funkit/utils").CheckoutQuoteResponse;
|
|
18
|
-
checkedAssetAmount: import("
|
|
19
|
-
finalEstimation: import("
|
|
18
|
+
checkedAssetAmount: import("~/domains/quote").CheckedAssetAmount;
|
|
19
|
+
finalEstimation: import("~/domains/quote").FunkitCheckoutQuoteResult;
|
|
20
20
|
} | null;
|
|
21
21
|
error: Error;
|
|
22
22
|
isError: true;
|
|
@@ -41,21 +41,21 @@ export declare function useWithdrawalQuote({ recipientAddress, selectedChainId,
|
|
|
41
41
|
isStale: boolean;
|
|
42
42
|
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<{
|
|
43
43
|
baseQuote: import("@funkit/utils").CheckoutQuoteResponse;
|
|
44
|
-
checkedAssetAmount: import("
|
|
45
|
-
finalEstimation: import("
|
|
44
|
+
checkedAssetAmount: import("~/domains/quote").CheckedAssetAmount;
|
|
45
|
+
finalEstimation: import("~/domains/quote").FunkitCheckoutQuoteResult;
|
|
46
46
|
} | null, Error>>;
|
|
47
47
|
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
48
48
|
promise: Promise<{
|
|
49
49
|
baseQuote: import("@funkit/utils").CheckoutQuoteResponse;
|
|
50
|
-
checkedAssetAmount: import("
|
|
51
|
-
finalEstimation: import("
|
|
50
|
+
checkedAssetAmount: import("~/domains/quote").CheckedAssetAmount;
|
|
51
|
+
finalEstimation: import("~/domains/quote").FunkitCheckoutQuoteResult;
|
|
52
52
|
} | null>;
|
|
53
53
|
} | {
|
|
54
54
|
quoteEnabled: boolean;
|
|
55
55
|
data: {
|
|
56
56
|
baseQuote: import("@funkit/utils").CheckoutQuoteResponse;
|
|
57
|
-
checkedAssetAmount: import("
|
|
58
|
-
finalEstimation: import("
|
|
57
|
+
checkedAssetAmount: import("~/domains/quote").CheckedAssetAmount;
|
|
58
|
+
finalEstimation: import("~/domains/quote").FunkitCheckoutQuoteResult;
|
|
59
59
|
} | null;
|
|
60
60
|
error: null;
|
|
61
61
|
isError: false;
|
|
@@ -80,14 +80,14 @@ export declare function useWithdrawalQuote({ recipientAddress, selectedChainId,
|
|
|
80
80
|
isStale: boolean;
|
|
81
81
|
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<{
|
|
82
82
|
baseQuote: import("@funkit/utils").CheckoutQuoteResponse;
|
|
83
|
-
checkedAssetAmount: import("
|
|
84
|
-
finalEstimation: import("
|
|
83
|
+
checkedAssetAmount: import("~/domains/quote").CheckedAssetAmount;
|
|
84
|
+
finalEstimation: import("~/domains/quote").FunkitCheckoutQuoteResult;
|
|
85
85
|
} | null, Error>>;
|
|
86
86
|
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
87
87
|
promise: Promise<{
|
|
88
88
|
baseQuote: import("@funkit/utils").CheckoutQuoteResponse;
|
|
89
|
-
checkedAssetAmount: import("
|
|
90
|
-
finalEstimation: import("
|
|
89
|
+
checkedAssetAmount: import("~/domains/quote").CheckedAssetAmount;
|
|
90
|
+
finalEstimation: import("~/domains/quote").FunkitCheckoutQuoteResult;
|
|
91
91
|
} | null>;
|
|
92
92
|
} | {
|
|
93
93
|
quoteEnabled: boolean;
|
|
@@ -115,14 +115,14 @@ export declare function useWithdrawalQuote({ recipientAddress, selectedChainId,
|
|
|
115
115
|
isStale: boolean;
|
|
116
116
|
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<{
|
|
117
117
|
baseQuote: import("@funkit/utils").CheckoutQuoteResponse;
|
|
118
|
-
checkedAssetAmount: import("
|
|
119
|
-
finalEstimation: import("
|
|
118
|
+
checkedAssetAmount: import("~/domains/quote").CheckedAssetAmount;
|
|
119
|
+
finalEstimation: import("~/domains/quote").FunkitCheckoutQuoteResult;
|
|
120
120
|
} | null, Error>>;
|
|
121
121
|
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
122
122
|
promise: Promise<{
|
|
123
123
|
baseQuote: import("@funkit/utils").CheckoutQuoteResponse;
|
|
124
|
-
checkedAssetAmount: import("
|
|
125
|
-
finalEstimation: import("
|
|
124
|
+
checkedAssetAmount: import("~/domains/quote").CheckedAssetAmount;
|
|
125
|
+
finalEstimation: import("~/domains/quote").FunkitCheckoutQuoteResult;
|
|
126
126
|
} | null>;
|
|
127
127
|
} | {
|
|
128
128
|
quoteEnabled: boolean;
|
|
@@ -150,14 +150,14 @@ export declare function useWithdrawalQuote({ recipientAddress, selectedChainId,
|
|
|
150
150
|
isStale: boolean;
|
|
151
151
|
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<{
|
|
152
152
|
baseQuote: import("@funkit/utils").CheckoutQuoteResponse;
|
|
153
|
-
checkedAssetAmount: import("
|
|
154
|
-
finalEstimation: import("
|
|
153
|
+
checkedAssetAmount: import("~/domains/quote").CheckedAssetAmount;
|
|
154
|
+
finalEstimation: import("~/domains/quote").FunkitCheckoutQuoteResult;
|
|
155
155
|
} | null, Error>>;
|
|
156
156
|
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
157
157
|
promise: Promise<{
|
|
158
158
|
baseQuote: import("@funkit/utils").CheckoutQuoteResponse;
|
|
159
|
-
checkedAssetAmount: import("
|
|
160
|
-
finalEstimation: import("
|
|
159
|
+
checkedAssetAmount: import("~/domains/quote").CheckedAssetAmount;
|
|
160
|
+
finalEstimation: import("~/domains/quote").FunkitCheckoutQuoteResult;
|
|
161
161
|
} | null>;
|
|
162
162
|
} | {
|
|
163
163
|
quoteEnabled: boolean;
|
|
@@ -185,21 +185,21 @@ export declare function useWithdrawalQuote({ recipientAddress, selectedChainId,
|
|
|
185
185
|
isStale: boolean;
|
|
186
186
|
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<{
|
|
187
187
|
baseQuote: import("@funkit/utils").CheckoutQuoteResponse;
|
|
188
|
-
checkedAssetAmount: import("
|
|
189
|
-
finalEstimation: import("
|
|
188
|
+
checkedAssetAmount: import("~/domains/quote").CheckedAssetAmount;
|
|
189
|
+
finalEstimation: import("~/domains/quote").FunkitCheckoutQuoteResult;
|
|
190
190
|
} | null, Error>>;
|
|
191
191
|
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
192
192
|
promise: Promise<{
|
|
193
193
|
baseQuote: import("@funkit/utils").CheckoutQuoteResponse;
|
|
194
|
-
checkedAssetAmount: import("
|
|
195
|
-
finalEstimation: import("
|
|
194
|
+
checkedAssetAmount: import("~/domains/quote").CheckedAssetAmount;
|
|
195
|
+
finalEstimation: import("~/domains/quote").FunkitCheckoutQuoteResult;
|
|
196
196
|
} | null>;
|
|
197
197
|
} | {
|
|
198
198
|
quoteEnabled: boolean;
|
|
199
199
|
data: {
|
|
200
200
|
baseQuote: import("@funkit/utils").CheckoutQuoteResponse;
|
|
201
|
-
checkedAssetAmount: import("
|
|
202
|
-
finalEstimation: import("
|
|
201
|
+
checkedAssetAmount: import("~/domains/quote").CheckedAssetAmount;
|
|
202
|
+
finalEstimation: import("~/domains/quote").FunkitCheckoutQuoteResult;
|
|
203
203
|
} | null;
|
|
204
204
|
isError: false;
|
|
205
205
|
error: null;
|
|
@@ -224,14 +224,14 @@ export declare function useWithdrawalQuote({ recipientAddress, selectedChainId,
|
|
|
224
224
|
isStale: boolean;
|
|
225
225
|
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<{
|
|
226
226
|
baseQuote: import("@funkit/utils").CheckoutQuoteResponse;
|
|
227
|
-
checkedAssetAmount: import("
|
|
228
|
-
finalEstimation: import("
|
|
227
|
+
checkedAssetAmount: import("~/domains/quote").CheckedAssetAmount;
|
|
228
|
+
finalEstimation: import("~/domains/quote").FunkitCheckoutQuoteResult;
|
|
229
229
|
} | null, Error>>;
|
|
230
230
|
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
231
231
|
promise: Promise<{
|
|
232
232
|
baseQuote: import("@funkit/utils").CheckoutQuoteResponse;
|
|
233
|
-
checkedAssetAmount: import("
|
|
234
|
-
finalEstimation: import("
|
|
233
|
+
checkedAssetAmount: import("~/domains/quote").CheckedAssetAmount;
|
|
234
|
+
finalEstimation: import("~/domains/quote").FunkitCheckoutQuoteResult;
|
|
235
235
|
} | null>;
|
|
236
236
|
};
|
|
237
237
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FunkitUserInfo } from '
|
|
1
|
+
import type { FunkitUserInfo } from '~/consts/funkit';
|
|
2
2
|
import type { CheckoutModalEvent } from './CheckoutModalEvent';
|
|
3
3
|
import type { WithdrawModalEvent } from './WithdrawModalEvent';
|
|
4
4
|
export interface TrackEventData {
|
package/dist/hooks/useBluvo.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { WalletwithdrawquotequotationResponse as WithdrawalQuotation } from '@bluvo/sdk-ts';
|
|
2
|
-
import { BluvoExchangeStatus, type BluvoExchangeType } from '
|
|
3
|
-
import { type FunkitActiveCheckoutItem } from '
|
|
2
|
+
import { BluvoExchangeStatus, type BluvoExchangeType } from '~/consts/bluvo';
|
|
3
|
+
import { type FunkitActiveCheckoutItem } from '~/providers/FunkitCheckoutContext';
|
|
4
4
|
import type { FunBrokerageItemProps } from '../components/FunSelectBrokerage/FunBrokerageItem';
|
|
5
5
|
type SupportedExchangeOption = FunBrokerageItemProps & {
|
|
6
6
|
exchange: BluvoExchangeType;
|
|
@@ -18,7 +18,7 @@ export declare const useBluvoExchangeBalance: ({ exchange, refetchOnMount, }: {
|
|
|
18
18
|
exchange: BluvoExchangeType | undefined;
|
|
19
19
|
refetchOnMount?: boolean;
|
|
20
20
|
}) => {
|
|
21
|
-
data: import("
|
|
21
|
+
data: import("~/domains/wallet").AssetHoldingsMap<import("~/domains/wallet").BrokerageAssetHoldingsItem> | undefined;
|
|
22
22
|
totalBalance: number;
|
|
23
23
|
isLoading: boolean;
|
|
24
24
|
isError: boolean;
|
|
@@ -2,9 +2,9 @@ import { DirectExecutionType } from '@funkit/api-base';
|
|
|
2
2
|
import type { RelayTxHash, RelayVmType } from '@funkit/fun-relay';
|
|
3
3
|
import type { CheckoutQuoteResponse } from '@funkit/utils';
|
|
4
4
|
import type { Address, Hex } from 'viem';
|
|
5
|
-
import type { FunkitCheckoutQuoteResult } from '
|
|
6
|
-
import type { FunkitActiveCheckoutItem, FunkitCheckoutActionParams } from '
|
|
7
|
-
import { type WithdrawalClient, type WithdrawalTransaction } from '
|
|
5
|
+
import type { FunkitCheckoutQuoteResult } from '~/domains/quote';
|
|
6
|
+
import type { FunkitActiveCheckoutItem, FunkitCheckoutActionParams } from '~/providers/FunkitCheckoutContext';
|
|
7
|
+
import { type WithdrawalClient, type WithdrawalTransaction } from '~/wallets/Wallet';
|
|
8
8
|
interface DirectExecutionQuoteRequestParamsBase {
|
|
9
9
|
actionParams: FunkitCheckoutActionParams[];
|
|
10
10
|
bridgeOverride?: 'across' | 'relay';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CheckoutRefundState, CheckoutState, type DirectExecution, RelayExecutionStatus } from '@funkit/api-base';
|
|
2
|
-
import type { MergedMultiStepDirectExecution } from '
|
|
2
|
+
import type { MergedMultiStepDirectExecution } from '~/domains/checkoutNotifications';
|
|
3
3
|
export declare function mapRelayExecutionStatusToCheckoutState(status: RelayExecutionStatus): CheckoutState;
|
|
4
4
|
export declare function mapRelayExecutionStatusToRefundState(status: RelayExecutionStatus): CheckoutRefundState | undefined;
|
|
5
5
|
export declare function useCheckoutDirectExecutionHistory({ initDirectExecution, disabled, }: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ServerCheckoutConfig } from '
|
|
2
|
-
import type { FunkitCheckoutConfig } from '
|
|
1
|
+
import type { ServerCheckoutConfig } from '~/domains/clientMetadata';
|
|
2
|
+
import type { FunkitCheckoutConfig } from '~/providers/FunkitCheckoutContext';
|
|
3
3
|
interface UseCheckoutItemDisplay {
|
|
4
4
|
checkoutConfig: FunkitCheckoutConfig | ServerCheckoutConfig | undefined;
|
|
5
5
|
hideAmount?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PaymentMethod } from '
|
|
2
|
-
import type { FunkitCheckoutQuoteResult } from '
|
|
1
|
+
import { PaymentMethod } from '~/domains/paymentMethods';
|
|
2
|
+
import type { FunkitCheckoutQuoteResult } from '~/domains/quote';
|
|
3
3
|
export declare const LAYERZEO_OFT_TIME_ESTIMATE_SECONDS = 180;
|
|
4
4
|
/**
|
|
5
5
|
* https://linear.app/funxyz/issue/PE-775/sdkconnectwith-next-pm-requests
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
-
import { type FunCountdownProps } from '
|
|
2
|
+
import { type FunCountdownProps } from '~/components/FunCountdown/FunCountdown';
|
|
3
3
|
export interface UseCountdownResult {
|
|
4
4
|
countdown: ReactNode;
|
|
5
5
|
isLastSecond: boolean;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { CheckoutInitTokenTransferResponse } from '@funkit/api-base';
|
|
2
|
-
import type { TokenTransferSourceChainsAndAssets } from '
|
|
2
|
+
import type { TokenTransferSourceChainsAndAssets } from '~/modals/CheckoutModal/TransferToken/TransferToken';
|
|
3
3
|
export declare function useEnabledTokenTransferChainTokens(transferInit?: CheckoutInitTokenTransferResponse | null, isWithdrawal?: boolean): TokenTransferSourceChainsAndAssets;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type BridgeVirtualBankAccount, type Guid } from '@funkit/api-base';
|
|
2
|
-
import { type AllFiatAccounts } from '
|
|
2
|
+
import { type AllFiatAccounts } from '~/domains/bridge';
|
|
3
3
|
export declare function useIsSepaUser(): boolean;
|
|
4
4
|
export declare function useFiatEnabled(): boolean;
|
|
5
5
|
export declare function useFrogAccounts(): import("@tanstack/react-query").UseQueryResult<import("@funkit/api-base").SubAccount[] | null, Error>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { FunAddress } from '@funkit/api-base';
|
|
2
|
-
import type { GeneralWalletContextProps } from '
|
|
2
|
+
import type { GeneralWalletContextProps } from '~/providers/GeneralWalletProvider';
|
|
3
3
|
export declare const useIsBlacklisted: (walletAddress: GeneralWalletContextProps["walletAddress"], customRecipient?: FunAddress) => {
|
|
4
4
|
isWalletBlacklisted: boolean;
|
|
5
5
|
isCustomRecipientBlacklisted: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type FunkitCheckoutConfig } from '
|
|
1
|
+
import { type FunkitCheckoutConfig } from '~/providers/FunkitCheckoutContext';
|
|
2
2
|
export declare const useIsDynamicRoutingEnabled: ({ checkoutConfig: _checkoutConfig, }?: {
|
|
3
3
|
checkoutConfig?: FunkitCheckoutConfig;
|
|
4
4
|
}) => boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { AssetSelectionBannerConfig } from '
|
|
1
|
+
import type { AssetSelectionBannerConfig } from '~/utils/flags/types';
|
|
2
2
|
export declare function useNewTokenBanner(): AssetSelectionBannerConfig | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { NotificationItem } from '
|
|
1
|
+
import type { NotificationItem } from '~/modals/CheckoutModal/TransferToken/types';
|
|
2
2
|
/**
|
|
3
3
|
* This might not work if multiple instances of this hook are used in the same page
|
|
4
4
|
* since it uses sessionStorage to store the processed notifications
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ConnectablePaymentMethodInfo, PaymentMethod } from '
|
|
1
|
+
import { type ConnectablePaymentMethodInfo, PaymentMethod } from '~/domains/paymentMethods';
|
|
2
2
|
export declare function usePaymentMethodEnablement(): {
|
|
3
3
|
isSwappedEnabled: boolean;
|
|
4
4
|
isFiatEnabled: boolean;
|
|
@@ -14,7 +14,7 @@ export type UnavailablePaymentSource = {
|
|
|
14
14
|
};
|
|
15
15
|
export declare const usePaymentSources: (currentPaymentMethodInfo: ConnectablePaymentMethodInfo | null, targetChainId: string) => {
|
|
16
16
|
isFallback: boolean;
|
|
17
|
-
preferred: PaymentMethod[] | (import("
|
|
17
|
+
preferred: PaymentMethod[] | (import("~/domains/paymentMethods").PaymentMethodBrokerageInfo | import("~/domains/paymentMethods").PaymentMethodAccountInfo | import("~/domains/paymentMethods").PaymentMethodVirtualBankInfo)[];
|
|
18
18
|
moreSources: PaymentMethod[];
|
|
19
19
|
unavailable: UnavailablePaymentSource[];
|
|
20
20
|
hasUsableBalance: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { CheckoutModalEvent } from '
|
|
2
|
-
import type { useTrack } from '
|
|
3
|
-
import type { FunCheckoutStep } from '
|
|
1
|
+
import type { CheckoutModalEvent } from '~/hooks/track/CheckoutModalEvent';
|
|
2
|
+
import type { useTrack } from '~/hooks/track/useTrack';
|
|
3
|
+
import type { FunCheckoutStep } from '~/modals/CheckoutModal/FunCheckoutStep';
|
|
4
4
|
export interface StepQueryMeta extends Record<string, unknown> {
|
|
5
5
|
/** Checkout steps that depend on this query being loaded */
|
|
6
6
|
dependentSteps: FunCheckoutStep[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CheckoutInitTokenTransferResponse } from '@funkit/api-base';
|
|
2
|
-
import type { TokenTransferSourceChainsAndAssets } from '
|
|
2
|
+
import type { TokenTransferSourceChainsAndAssets } from '~/modals/CheckoutModal/TransferToken/TransferToken';
|
|
3
3
|
export type TransferTokenDefault = {
|
|
4
4
|
token: string;
|
|
5
5
|
chainId: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { FunAddress } from '@funkit/api-base';
|
|
2
2
|
import { type MinTransferConfig, getMinTransferValueForChain } from '@funkit/connect-core';
|
|
3
|
-
import { type QRCodeUri } from '
|
|
3
|
+
import { type QRCodeUri } from '~/utils/transfer';
|
|
4
4
|
export type FeeValue = {
|
|
5
5
|
label: string;
|
|
6
6
|
value: number;
|
|
@@ -1,2 +1,9 @@
|
|
|
1
|
-
import type { TokenTransferConfig } from '
|
|
1
|
+
import type { TokenTransferConfig } from '~/utils/tokenTransfer/types';
|
|
2
|
+
/**
|
|
3
|
+
* Resolve the token-transfer (UDA deposit) token list: the curated Statsig
|
|
4
|
+
* `tokentransferconfig` chains/assets, filtered by the disabled list and merged
|
|
5
|
+
* with `/assets/supported` metadata. The pure resolution lives in
|
|
6
|
+
* `@funkit/connect-core` (shared with React Native); this hook supplies the
|
|
7
|
+
* platform reads (Statsig + react-query) and the loading state.
|
|
8
|
+
*/
|
|
2
9
|
export declare function useTokenTransferConfig(isWithdrawal?: boolean): TokenTransferConfig;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FunkitUserIpInfo } from '
|
|
1
|
+
import type { FunkitUserIpInfo } from '~/providers/FunkitMoonpayProvider';
|
|
2
2
|
export interface UserIpInfoFromMoonpay {
|
|
3
3
|
/** https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 */
|
|
4
4
|
alpha2: 'AU' | 'CA' | 'US' | string;
|