@funkit/connect 3.5.0 → 4.0.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 +35 -0
- package/dist/{chunk-77C753LI.js → chunk-3F3EYDDR.js} +2 -1
- package/dist/{chunk-XWW5QOD4.js → chunk-LTOE4GIY.js} +2 -1
- package/dist/{chunk-BY224HGT.js → chunk-OMAXDH7G.js} +2 -1
- package/dist/components/AsyncImage/AsyncImage.d.ts +3 -3
- package/dist/components/AsyncImage/useAsyncImage.d.ts +1 -1
- package/dist/components/Avatar/EmojiAvatar.d.ts +1 -1
- package/dist/components/Box/Box.d.ts +8 -8
- package/dist/components/CloseButton/CloseButton.d.ts +1 -1
- package/dist/components/ConnectButton/ConnectButton.d.ts +1 -1
- package/dist/components/ConnectButton/ConnectButtonRenderer.d.ts +2 -2
- package/dist/components/ConnectButton/formatENS.d.ts +1 -1
- package/dist/components/CopyAddress/CopyAddress.d.ts +1 -1
- package/dist/components/Dialog/Dialog.d.ts +4 -4
- package/dist/components/Dropdown/BaseDropdown.d.ts +1 -1
- package/dist/components/Dropdown/ChainDropdown.d.ts +1 -1
- package/dist/components/Dropdown/TokenDropdown.d.ts +1 -1
- package/dist/components/DydxSwitchModalTab/DydxSwitchModalTab.d.ts +1 -1
- package/dist/components/ErrorBoundary/ErrorBoundary.d.ts +1 -1
- package/dist/components/FunAlert/FunAlert.d.ts +2 -2
- package/dist/components/FunAsset/FunAssetBadge.d.ts +1 -1
- package/dist/components/FunAsset/FunAssetItem.d.ts +1 -1
- package/dist/components/FunAssetAvatar/FunAssetAvatar.d.ts +1 -1
- package/dist/components/FunBadge/FunBadge.d.ts +1 -1
- package/dist/components/FunBottomBar/FunBottomBar.d.ts +1 -1
- package/dist/components/FunButton/FunBackButton.d.ts +1 -1
- package/dist/components/FunButton/FunButton.d.ts +1 -1
- package/dist/components/FunButton/FunIconButton.d.ts +1 -1
- package/dist/components/FunButton/FunLinkButton.d.ts +1 -1
- package/dist/components/FunButton/FunRedirectButton.d.ts +1 -1
- package/dist/components/FunButton/FunSignInButton.d.ts +1 -1
- package/dist/components/FunConnectOptions/ConnectDetails.d.ts +1 -1
- package/dist/components/FunConnectOptions/FunConnectResultStep.d.ts +1 -1
- package/dist/components/FunConnectOptions/FunSignInStep.d.ts +2 -2
- package/dist/components/FunConnectOptions/FunWeb3ConnectingStep.d.ts +1 -1
- package/dist/components/FunCountdown/FunCountdown.d.ts +1 -1
- package/dist/components/FunDivider/FunDivider.d.ts +1 -1
- package/dist/components/FunGuarantees/FunGuarantees.d.ts +3 -3
- package/dist/components/FunInput/FunInput.d.ts +2 -2
- package/dist/components/FunInput/FunTextAreaInput.d.ts +1 -1
- package/dist/components/FunKeyValue/FunKeyValue.d.ts +3 -3
- package/dist/components/FunMessage/FunMessage.d.ts +1 -1
- package/dist/components/FunNoResults/FunNoResults.d.ts +1 -1
- package/dist/components/FunNotification/FunCheckoutNotification.d.ts +1 -1
- package/dist/components/FunNotification/FunNotification.d.ts +2 -2
- package/dist/components/FunOptionBox/FunOptionBox.d.ts +2 -2
- package/dist/components/FunPaymentMethodItem/FunPaymentMethodItem.d.ts +1 -1
- package/dist/components/FunPayments/FunPaymentMethods.d.ts +2 -2
- package/dist/components/FunPayments/FunPaymentMoonpayType.d.ts +1 -1
- package/dist/components/FunSelect/FunClickOutside.d.ts +1 -1
- package/dist/components/FunSelect/FunSelect.d.ts +1 -1
- package/dist/components/FunSelectBrokerage/FunBrokerageItem.d.ts +2 -2
- package/dist/components/FunSelectBrokerage/FunSelectBrokerage.d.ts +4 -4
- package/dist/components/FunSkeletonLoader/FunSkeletonBlock.d.ts +1 -1
- package/dist/components/FunSkeletonLoader/FunSkeletonCircle.d.ts +1 -1
- package/dist/components/FunSocials/FunSocials.d.ts +2 -2
- package/dist/components/FunTooltip/FunTooltip.css.d.ts +3 -0
- package/dist/components/FunTooltip/FunTooltip.d.ts +7 -0
- package/dist/components/FunTransactionSummary/FunTxSummaryComponents.d.ts +2 -2
- package/dist/components/FunTransactionSummary/PaymentFeesSummary.d.ts +1 -1
- package/dist/components/FunTransactionSummary/PaymentMethodSummary.d.ts +3 -3
- package/dist/components/Icons/FunkitPaymentsIconLine.d.ts +1 -1
- package/dist/components/QRCode/QRCode.d.ts +1 -1
- package/dist/components/Text/Text.d.ts +1 -1
- package/dist/config/getDefaultConfig.d.ts +3 -3
- package/dist/consts/funkit.d.ts +3 -3
- package/dist/consts/mesh.d.ts +45 -4
- package/dist/css/atoms.d.ts +1 -1
- package/dist/css/cssObjectFromTheme.d.ts +1 -1
- package/dist/css/cssStringFromTheme.d.ts +1 -1
- package/dist/css/sprinkles.css.d.ts +10 -8
- package/dist/domains/asset.d.ts +2 -2
- package/dist/domains/checkoutFees.d.ts +3 -3
- package/dist/domains/clientMetadata.d.ts +3 -2
- package/dist/domains/paymentMethods.d.ts +9 -6
- package/dist/domains/quote.d.ts +9 -14
- package/dist/hooks/useCheckoutModalTitle.d.ts +1 -1
- package/dist/hooks/useCheckoutTransferDepositAddress.d.ts +2 -2
- package/dist/hooks/useCheckoutType.d.ts +1 -1
- package/dist/hooks/useCountdown.d.ts +2 -2
- package/dist/hooks/useEnabledTokenTransferChainTokens.d.ts +1 -1
- package/dist/hooks/useFunListeners.d.ts +1 -1
- package/dist/hooks/useIsCheckoutRisky.d.ts +1 -1
- package/dist/hooks/useMainnetEnsAvatar.d.ts +1 -1
- package/dist/hooks/useMainnetEnsName.d.ts +1 -1
- package/dist/hooks/useMesh.d.ts +4 -8
- package/dist/hooks/usePaymentMethodIcon.d.ts +2 -2
- package/dist/hooks/useUsableWalletAssetsForCheckout.d.ts +1 -4
- package/dist/hooks/useWalletAssets.d.ts +1 -1
- package/dist/index.css +484 -463
- package/dist/index.d.ts +4 -1
- package/dist/index.js +9121 -9272
- package/dist/modals/AccountModal/AccountModal.d.ts +1 -1
- package/dist/modals/ChainModal/Chain.d.ts +2 -2
- package/dist/modals/CheckoutModal/{CheckoutComplete.d.ts → CheckoutComplete/CheckoutComplete.d.ts} +2 -2
- package/dist/modals/CheckoutModal/{useRedirectToCheckoutHistory.d.ts → CheckoutComplete/useRedirectToCheckoutHistory.d.ts} +2 -2
- package/dist/modals/CheckoutModal/{ConfirmationStep.d.ts → ConfirmationStep/ConfirmationStep.d.ts} +3 -3
- package/dist/modals/CheckoutModal/{useAccountBalancePostCheckout.d.ts → ConfirmationStep/useAccountBalanceTransfer.d.ts} +1 -1
- package/dist/modals/CheckoutModal/ConfirmationStep/useCheckoutConfirmation.d.ts +2 -2
- package/dist/modals/CheckoutModal/ConfirmationStep/usePostCheckout.d.ts +3 -3
- package/dist/modals/CheckoutModal/ConfirmationStep/useQuoteRefresh.d.ts +1 -1
- package/dist/modals/CheckoutModal/ConnectExchange.d.ts +4 -4
- package/dist/modals/CheckoutModal/InputAmount/AvailableBalance.d.ts +1 -1
- package/dist/modals/CheckoutModal/{InputAmount.d.ts → InputAmount/InputAmount.d.ts} +3 -3
- package/dist/modals/CheckoutModal/InputAmount/InputAmountLayout.d.ts +3 -3
- package/dist/modals/CheckoutModal/InputAmount/InputAmountLoaded.d.ts +5 -5
- package/dist/modals/CheckoutModal/InputAmount/state.d.ts +4 -4
- package/dist/modals/CheckoutModal/InputAmount/useAmountInput.d.ts +1 -1
- package/dist/modals/CheckoutModal/{useAssetPrice.d.ts → InputAmount/useAssetPrice.d.ts} +1 -1
- package/dist/modals/CheckoutModal/{useAvailableBalanceForCheckout.d.ts → InputAmount/useAvailableBalanceForCheckout.d.ts} +3 -3
- package/dist/modals/CheckoutModal/InputAmount/utils.d.ts +0 -9
- package/dist/modals/CheckoutModal/LoadingAccount.d.ts +2 -2
- package/dist/modals/CheckoutModal/MeshVerification.d.ts +4 -4
- package/dist/modals/CheckoutModal/MoonpaySetup.d.ts +2 -2
- package/dist/modals/CheckoutModal/SelectAsset.d.ts +2 -2
- package/dist/modals/CheckoutModal/SelectBrokerage.d.ts +4 -4
- package/dist/modals/CheckoutModal/{SourceChange.d.ts → SourceChange/SourceChange.d.ts} +2 -2
- package/dist/modals/CheckoutModal/TransferToken.d.ts +2 -2
- package/dist/modals/CheckoutModal/stepTransition.d.ts +14 -14
- package/dist/modals/CheckoutModal/useCheckoutQuote.d.ts +2 -2
- package/dist/modals/CheckoutModal/useSourceAssetConfirm.d.ts +3 -3
- package/dist/modals/CheckoutModal/useWalletAssetHoldings.d.ts +1 -1
- package/dist/modals/FunCheckoutHistoryModal/FunCheckoutHistoryContent.d.ts +1 -1
- package/dist/modals/FunCheckoutHistoryModal/FunCheckoutHistoryDetail.d.ts +1 -1
- package/dist/modals/FunCheckoutHistoryModal/FunCheckoutHistoryHelp.d.ts +1 -1
- package/dist/modals/FunCheckoutHistoryModal/FunCheckoutHistoryTransaction.d.ts +1 -1
- package/dist/modals/FunCheckoutHistoryModal/FunCheckoutStatus.d.ts +1 -1
- package/dist/modals/ProfileDetails/ActivityTraversalContext.d.ts +2 -2
- package/dist/modals/ProfileDetails/FunProfileViews/ActivityHistory/ActivityHistory.d.ts +1 -1
- package/dist/modals/ProfileDetails/FunProfileViews/Home/HomeCheckoutDisplayRow.d.ts +1 -1
- package/dist/modals/ProfileDetails/FunProfileViews/Home/index.d.ts +1 -1
- package/dist/providers/AppContext.d.ts +1 -1
- package/dist/providers/AuthenticationContext.d.ts +1 -1
- package/dist/providers/FunkitCheckoutContext.d.ts +25 -35
- package/dist/providers/FunkitConfigContext.d.ts +3 -2
- package/dist/providers/FunkitConnectChainContext.d.ts +1 -1
- package/dist/providers/FunkitFlagsProvider.d.ts +3 -3
- package/dist/providers/FunkitHistoryContext.d.ts +5 -5
- package/dist/providers/FunkitMeshProvider.d.ts +9 -9
- package/dist/providers/FunkitMoonpayProvider.d.ts +2 -2
- package/dist/providers/FunkitProvider.d.ts +9 -13
- package/dist/providers/FunkitThemeProvider.d.ts +27 -156
- package/dist/providers/FunkitWeb2Provider.d.ts +3 -3
- package/dist/providers/GeneralWalletProvider.d.ts +3 -3
- package/dist/providers/I18nContext.d.ts +2 -2
- package/dist/providers/ModalContext.d.ts +2 -2
- package/dist/providers/ModalSizeContext.d.ts +1 -1
- package/dist/providers/ShowBalanceContext.d.ts +2 -2
- package/dist/providers/provideFunkitConnectChains.d.ts +1 -1
- package/dist/themes/baseTheme.d.ts +3 -1
- package/dist/themes/baseTheme.js +5 -3
- package/dist/themes/darkTheme.d.ts +3 -144
- package/dist/themes/darkTheme.js +2 -2
- package/dist/themes/lightTheme.d.ts +3 -144
- package/dist/themes/lightTheme.js +2 -2
- package/dist/types/utils.d.ts +1 -1
- package/dist/utils/address.d.ts +1 -3
- package/dist/utils/assets.d.ts +5 -4
- package/dist/utils/checkout.d.ts +10 -6
- package/dist/utils/flags/config.d.ts +7 -1
- package/dist/utils/funkitProvider.d.ts +1 -1
- package/dist/utils/isMainnetUsdt.d.ts +1 -1
- package/dist/utils/mesh.d.ts +8 -8
- package/dist/utils/payment.d.ts +1 -1
- package/dist/utils/purifyCheckoutHistoryItem.d.ts +1 -1
- package/dist/wallets/Wallet.d.ts +4 -4
- package/dist/wallets/computeWalletConnectMetaData.d.ts +1 -1
- package/dist/wallets/downloadUrls.d.ts +1 -1
- package/dist/wallets/getDefaultWallets.d.ts +1 -1
- package/dist/wallets/getInjectedConnector.d.ts +2 -2
- package/dist/wallets/groupedWallets.d.ts +1 -1
- package/dist/wallets/useWalletConnectors.d.ts +3 -3
- package/dist/wallets/walletConnectors/argentWallet/argentWallet.d.ts +1 -1
- package/dist/wallets/walletConnectors/argentWallet/argentWallet.js +1 -2
- package/dist/wallets/walletConnectors/bifrostWallet/bifrostWallet.d.ts +1 -2
- package/dist/wallets/walletConnectors/bifrostWallet/bifrostWallet.js +2 -3
- package/dist/wallets/walletConnectors/bitgetWallet/bitgetWallet.d.ts +1 -1
- package/dist/wallets/walletConnectors/bitgetWallet/bitgetWallet.js +2 -3
- package/dist/wallets/walletConnectors/bitskiWallet/bitskiWallet.d.ts +1 -1
- package/dist/wallets/walletConnectors/bitverseWallet/bitverseWallet.d.ts +1 -1
- package/dist/wallets/walletConnectors/bloomWallet/bloomWallet.d.ts +1 -1
- package/dist/wallets/walletConnectors/bloomWallet/bloomWallet.js +1 -2
- package/dist/wallets/walletConnectors/braveWallet/braveWallet.d.ts +1 -1
- package/dist/wallets/walletConnectors/bybitWallet/bybitWallet.d.ts +1 -1
- package/dist/wallets/walletConnectors/bybitWallet/bybitWallet.js +2 -2
- package/dist/wallets/walletConnectors/{chunk-DWOWRRNZ.js → chunk-2UCNRD7H.js} +3 -6
- package/dist/wallets/walletConnectors/{chunk-E2VPHAWU.js → chunk-3S2U24BJ.js} +1 -3
- package/dist/wallets/walletConnectors/{chunk-5HXH52SO.js → chunk-4WEHDI4Y.js} +1 -3
- package/dist/wallets/walletConnectors/{chunk-24OBTKSN.js → chunk-7CUY5G6R.js} +1 -3
- package/dist/wallets/walletConnectors/{chunk-PFRM52PK.js → chunk-A5APNTGL.js} +1 -3
- package/dist/wallets/walletConnectors/{chunk-UJVBNAKM.js → chunk-ADIXAKUL.js} +1 -3
- package/dist/wallets/walletConnectors/{chunk-KN5BJYWQ.js → chunk-AXWP3GD4.js} +1 -3
- package/dist/wallets/walletConnectors/{chunk-GDXRZB7A.js → chunk-BRBKM4PW.js} +1 -3
- package/dist/wallets/walletConnectors/{chunk-FGLYJDAL.js → chunk-G73C6P5P.js} +1 -4
- package/dist/wallets/walletConnectors/{chunk-C7PUODSS.js → chunk-GSOYKKIS.js} +3 -5
- package/dist/wallets/walletConnectors/{chunk-BDI5G6GA.js → chunk-H4IRCEZN.js} +1 -3
- package/dist/wallets/walletConnectors/{chunk-EHDKQOCG.js → chunk-IDKVN5CF.js} +1 -3
- package/dist/wallets/walletConnectors/{chunk-NMB62FCH.js → chunk-ISIBREBO.js} +3 -5
- package/dist/wallets/walletConnectors/{chunk-IKPUD375.js → chunk-LN7OD5EC.js} +1 -3
- package/dist/wallets/walletConnectors/{chunk-CV5FY7VL.js → chunk-S27IADFU.js} +1 -3
- package/dist/wallets/walletConnectors/{chunk-7GGVFQBD.js → chunk-SLOIIJGP.js} +1 -5
- package/dist/wallets/walletConnectors/{chunk-HA5KAB4M.js → chunk-W6N74MS3.js} +3 -5
- package/dist/wallets/walletConnectors/{chunk-HRDRUWYF.js → chunk-WSQ2YJO2.js} +1 -3
- package/dist/wallets/walletConnectors/clvWallet/clvWallet.d.ts +1 -1
- package/dist/wallets/walletConnectors/clvWallet/clvWallet.js +2 -2
- package/dist/wallets/walletConnectors/coin98Wallet/coin98Wallet.d.ts +1 -1
- package/dist/wallets/walletConnectors/coin98Wallet/coin98Wallet.js +2 -2
- package/dist/wallets/walletConnectors/coinbaseWallet/coinbaseWallet.d.ts +2 -2
- package/dist/wallets/walletConnectors/coinbaseWallet/coinbaseWallet.js +1 -2
- package/dist/wallets/walletConnectors/coreWallet/coreWallet.d.ts +1 -1
- package/dist/wallets/walletConnectors/coreWallet/coreWallet.js +2 -2
- package/dist/wallets/walletConnectors/dawnWallet/dawnWallet.d.ts +1 -1
- package/dist/wallets/walletConnectors/dawnWallet/dawnWallet.js +1 -2
- package/dist/wallets/walletConnectors/desigWallet/desigWallet.d.ts +1 -1
- package/dist/wallets/walletConnectors/foxWallet/foxWallet.d.ts +1 -1
- package/dist/wallets/walletConnectors/foxWallet/foxWallet.js +2 -2
- package/dist/wallets/walletConnectors/frameWallet/frameWallet.d.ts +1 -1
- package/dist/wallets/walletConnectors/frontierWallet/frontierWallet.d.ts +1 -2
- package/dist/wallets/walletConnectors/frontierWallet/frontierWallet.js +2 -3
- package/dist/wallets/walletConnectors/funkitConnectWallet/funkitConnectWallet.d.ts +1 -1
- package/dist/wallets/walletConnectors/gateWallet/gateWallet.d.ts +1 -1
- package/dist/wallets/walletConnectors/gateWallet/gateWallet.js +2 -3
- package/dist/wallets/walletConnectors/imTokenWallet/imTokenWallet.d.ts +1 -1
- package/dist/wallets/walletConnectors/index.d.ts +2 -2
- package/dist/wallets/walletConnectors/index.js +79 -80
- package/dist/wallets/walletConnectors/injectedWallet/injectedWallet.d.ts +1 -1
- package/dist/wallets/walletConnectors/kresusWallet/kresusWallet.d.ts +1 -1
- package/dist/wallets/walletConnectors/ledgerWallet/ledgerWallet.d.ts +1 -1
- package/dist/wallets/walletConnectors/ledgerWallet/ledgerWallet.js +1 -2
- package/dist/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.d.ts +1 -1
- package/dist/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.js +2 -3
- package/dist/wallets/walletConnectors/mewWallet/mewWallet.d.ts +1 -1
- package/dist/wallets/walletConnectors/oktoWallet/oktoWallet.d.ts +1 -1
- package/dist/wallets/walletConnectors/oktoWallet/oktoWallet.js +1 -2
- package/dist/wallets/walletConnectors/okxWallet/okxWallet.d.ts +1 -1
- package/dist/wallets/walletConnectors/okxWallet/okxWallet.js +2 -3
- package/dist/wallets/walletConnectors/omniWallet/omniWallet.d.ts +1 -1
- package/dist/wallets/walletConnectors/omniWallet/omniWallet.js +1 -2
- package/dist/wallets/walletConnectors/oneInchWallet/oneInchWallet.d.ts +1 -1
- package/dist/wallets/walletConnectors/oneKeyWallet/oneKeyWallet.d.ts +1 -1
- package/dist/wallets/walletConnectors/phantomWallet/phantomWallet.d.ts +1 -1
- package/dist/wallets/walletConnectors/rabbyWallet/rabbyWallet.d.ts +1 -1
- package/dist/wallets/walletConnectors/rainbowWallet/rainbowWallet.d.ts +1 -1
- package/dist/wallets/walletConnectors/rainbowWallet/rainbowWallet.js +2 -3
- package/dist/wallets/walletConnectors/ramperWallet/ramperWallet.d.ts +1 -1
- package/dist/wallets/walletConnectors/roninWallet/roninWallet.d.ts +1 -1
- package/dist/wallets/walletConnectors/roninWallet/roninWallet.js +2 -2
- package/dist/wallets/walletConnectors/safeWallet/safeWallet.d.ts +1 -1
- package/dist/wallets/walletConnectors/safeheronWallet/safeheronWallet.d.ts +1 -1
- package/dist/wallets/walletConnectors/safepalWallet/safepalWallet.d.ts +1 -1
- package/dist/wallets/walletConnectors/safepalWallet/safepalWallet.js +2 -2
- package/dist/wallets/walletConnectors/subWallet/subWallet.d.ts +1 -1
- package/dist/wallets/walletConnectors/subWallet/subWallet.js +2 -2
- package/dist/wallets/walletConnectors/tahoWallet/tahoWallet.d.ts +1 -1
- package/dist/wallets/walletConnectors/talismanWallet/talismanWallet.d.ts +1 -1
- package/dist/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.js +2 -3
- package/dist/wallets/walletConnectors/tokenaryWallet/tokenaryWallet.d.ts +1 -1
- package/dist/wallets/walletConnectors/tokenaryWallet/tokenaryWallet.js +1 -1
- package/dist/wallets/walletConnectors/trustWallet/trustWallet.d.ts +1 -1
- package/dist/wallets/walletConnectors/trustWallet/trustWallet.js +2 -3
- package/dist/wallets/walletConnectors/uniswapWallet/uniswapWallet.d.ts +2 -2
- package/dist/wallets/walletConnectors/walletConnectWallet/walletConnectWallet.d.ts +1 -1
- package/dist/wallets/walletConnectors/xdefiWallet/xdefiWallet.d.ts +1 -1
- package/dist/wallets/walletConnectors/zealWallet/zealWallet.d.ts +1 -1
- package/dist/wallets/walletConnectors/zerionWallet/zerionWallet.d.ts +1 -2
- package/dist/wallets/walletConnectors/zerionWallet/zerionWallet.js +2 -3
- package/package.json +17 -17
- package/dist/assets-36PRD6ZI.js +0 -7
- package/dist/components/FunPayments/FunPaymentTransferType.d.ts +0 -5
- package/dist/components/Icons/Assets.d.ts +0 -3
- package/dist/components/Icons/BridgeIcon.d.ts +0 -2
- package/dist/components/Icons/Cancel.d.ts +0 -2
- package/dist/components/Icons/ClockIcon.d.ts +0 -4
- package/dist/components/Icons/CoinIcon.d.ts +0 -4
- package/dist/components/Icons/Connect.d.ts +0 -3
- package/dist/components/Icons/Copy.d.ts +0 -2
- package/dist/components/Icons/Create.d.ts +0 -3
- package/dist/components/Icons/CreditCardDots.d.ts +0 -2
- package/dist/components/Icons/Disconnect.d.ts +0 -2
- package/dist/components/Icons/Dropdown.d.ts +0 -2
- package/dist/components/Icons/EditIcon.d.ts +0 -4
- package/dist/components/Icons/EthereumIcon.d.ts +0 -4
- package/dist/components/Icons/Explore.d.ts +0 -2
- package/dist/components/Icons/ExternalLink.d.ts +0 -2
- package/dist/components/Icons/FunArrows.d.ts +0 -3
- package/dist/components/Icons/LightningIcon.d.ts +0 -4
- package/dist/components/Icons/LinkIcon.d.ts +0 -2
- package/dist/components/Icons/Login.d.ts +0 -3
- package/dist/components/Icons/MmFox.d.ts +0 -2
- package/dist/components/Icons/MoonPayLogoIcon.d.ts +0 -2
- package/dist/components/Icons/PasskeyIcon.d.ts +0 -2
- package/dist/components/Icons/PhoneIcon.d.ts +0 -2
- package/dist/components/Icons/PlusIcon.d.ts +0 -2
- package/dist/components/Icons/ProfileIcon.d.ts +0 -2
- package/dist/components/Icons/ReceiptIcon.d.ts +0 -4
- package/dist/components/Icons/Refresh.d.ts +0 -3
- package/dist/components/Icons/Scan.d.ts +0 -3
- package/dist/components/Icons/StEthIcon.d.ts +0 -2
- package/dist/components/Icons/SuccessNoBorder.d.ts +0 -2
- package/dist/components/Icons/SwapIcon.d.ts +0 -2
- package/dist/components/Icons/SwitchAccount.d.ts +0 -2
- package/dist/components/Icons/TransferIcon.d.ts +0 -2
- package/dist/components/Icons/USDCIcon.d.ts +0 -2
- package/dist/components/Icons/WhiteDotIcon.d.ts +0 -2
- package/dist/login-XDVWJKUQ.js +0 -7
- package/dist/utils/browsers.d.ts +0 -13
- package/dist/utils/colors.d.ts +0 -3
- package/dist/utils/debounce.d.ts +0 -1
- package/dist/utils/deepMerge.d.ts +0 -5
- package/dist/utils/exhaustiveCheck.d.ts +0 -1
- package/dist/utils/formatFees.d.ts +0 -12
- package/dist/utils/formatNumber.d.ts +0 -57
- package/dist/utils/formatTimestamp.d.ts +0 -28
- package/dist/utils/groupBy.d.ts +0 -1
- package/dist/utils/indexBy.d.ts +0 -1
- package/dist/utils/isMobile.d.ts +0 -5
- package/dist/utils/isNotNullish.d.ts +0 -1
- package/dist/utils/locale.d.ts +0 -1
- package/dist/utils/mobile.d.ts +0 -1
- package/dist/utils/noop.d.ts +0 -1
- package/dist/utils/omitUndefinedValues.d.ts +0 -1
- package/dist/wallets/walletConnectors/chunk-25VW5TZP.js +0 -92
- package/dist/wallets/walletConnectors/chunk-4UM4GTKZ.js +0 -103
- package/dist/wallets/walletConnectors/chunk-6LPM6LUQ.js +0 -110
- package/dist/wallets/walletConnectors/chunk-CTBFNNME.js +0 -94
- package/dist/wallets/walletConnectors/chunk-JXP2QPW7.js +0 -95
- package/dist/wallets/walletConnectors/chunk-KFFJPS5R.js +0 -96
- package/dist/wallets/walletConnectors/chunk-LEXSM5KI.js +0 -87
- package/dist/wallets/walletConnectors/chunk-LVBXKMWP.js +0 -71
- package/dist/wallets/walletConnectors/chunk-MATWQVQM.js +0 -73
- package/dist/wallets/walletConnectors/chunk-N2UFM6FI.js +0 -95
- package/dist/wallets/walletConnectors/chunk-QQEO4YQS.js +0 -149
- package/dist/wallets/walletConnectors/chunk-R6TLOQL3.js +0 -98
- package/dist/wallets/walletConnectors/chunk-RETKWSKD.js +0 -24
- package/dist/wallets/walletConnectors/chunk-RMNN2RIV.js +0 -102
- package/dist/wallets/walletConnectors/chunk-SIPHIY4F.js +0 -101
- package/dist/wallets/walletConnectors/chunk-UQAC373E.js +0 -108
- package/dist/wallets/walletConnectors/chunk-VU6B3HMD.js +0 -96
- package/dist/wallets/walletConnectors/chunk-W5O4YSZN.js +0 -98
- package/dist/wallets/walletConnectors/chunk-XYBEMO3C.js +0 -66
- /package/dist/components/Icons/{Coinbase.d.ts → CoinbaseIcon.d.ts} +0 -0
- /package/dist/components/Icons/{DisconnectSq.d.ts → DisconnectSqIcon.d.ts} +0 -0
- /package/dist/components/Icons/{Info.d.ts → FunInfoIcon.d.ts} +0 -0
- /package/dist/components/Icons/{Gas.d.ts → GasIcon.d.ts} +0 -0
- /package/dist/components/Icons/{GateIo.d.ts → GateIoIcon.d.ts} +0 -0
- /package/dist/components/Icons/{Spinner.d.ts → SpinnerIcon.d.ts} +0 -0
- /package/dist/components/Icons/{TwoFactor.d.ts → TwoFactorIcon.d.ts} +0 -0
- /package/dist/modals/CheckoutModal/{CheckoutPrimaryInfo.d.ts → ConfirmationStep/CheckoutPrimaryInfo.d.ts} +0 -0
- /package/dist/modals/CheckoutModal/{useUpdateSourceAssetForCard.d.ts → SourceChange/useUpdateSourceAssetForCard.d.ts} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { useSwitchChain } from 'wagmi';
|
|
3
|
-
import { BoxProps } from '../../components/Box/Box';
|
|
2
|
+
import type { useSwitchChain } from 'wagmi';
|
|
3
|
+
import { type BoxProps } from '../../components/Box/Box';
|
|
4
4
|
interface ChainProps {
|
|
5
5
|
chainId: number;
|
|
6
6
|
currentChainId: number;
|
package/dist/modals/CheckoutModal/{CheckoutComplete.d.ts → CheckoutComplete/CheckoutComplete.d.ts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Address } from 'viem';
|
|
2
|
-
import { CheckoutModalCommonState, FunCheckoutStep, ModalStepComponentProps, ModalStepInfo } from '
|
|
1
|
+
import type { Address } from 'viem';
|
|
2
|
+
import type { CheckoutModalCommonState, FunCheckoutStep, ModalStepComponentProps, ModalStepInfo } from '../stepTransition';
|
|
3
3
|
export type CheckoutCompleteState = CheckoutModalCommonState & {
|
|
4
4
|
depositAddress: Address;
|
|
5
5
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Address } from 'viem';
|
|
2
|
-
import { FunkitActiveCheckoutItem } from '
|
|
1
|
+
import type { Address } from 'viem';
|
|
2
|
+
import type { FunkitActiveCheckoutItem } from '~/providers/FunkitCheckoutContext';
|
|
3
3
|
export declare function useRedirectToCheckoutHistory(checkoutItem: FunkitActiveCheckoutItem | null, onClose: () => void): (depositAddress: Address) => void;
|
package/dist/modals/CheckoutModal/{ConfirmationStep.d.ts → ConfirmationStep/ConfirmationStep.d.ts}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Address } from 'viem';
|
|
3
|
-
import { PaymentMethodInfo } from '
|
|
4
|
-
import { CheckoutModalCommonState, FunCheckoutStep, ModalStepComponentProps, ModalStepInfo } from '
|
|
2
|
+
import type { Address } from 'viem';
|
|
3
|
+
import { type PaymentMethodInfo } from '~/domains/paymentMethods';
|
|
4
|
+
import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
|
|
5
5
|
interface MoonpayDepositData {
|
|
6
6
|
depositToken: string;
|
|
7
7
|
depositTokenAmount: number;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Address } from 'viem';
|
|
1
|
+
import type { Address } from 'viem';
|
|
2
2
|
export declare function useAccountBalancePostCheckout(setPostCheckoutStepMessage: (s: string) => void, apiKey: string): (depositAddress: Address) => Promise<void>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Address } from 'viem';
|
|
2
|
-
import { ErrorNotification } from '~/components/FunNotification/FunNotification';
|
|
1
|
+
import type { Address } from 'viem';
|
|
2
|
+
import type { ErrorNotification } from '~/components/FunNotification/FunNotification';
|
|
3
3
|
export interface CheckoutConfirmationError extends ErrorNotification {
|
|
4
4
|
durationMs?: number;
|
|
5
5
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Address } from 'viem';
|
|
2
|
-
import { ErrorNotification } from '~/components/FunNotification/FunNotification';
|
|
3
|
-
import { PaymentMethodInfo } from '~/domains/paymentMethods';
|
|
1
|
+
import type { Address } from 'viem';
|
|
2
|
+
import type { ErrorNotification } from '~/components/FunNotification/FunNotification';
|
|
3
|
+
import { type PaymentMethodInfo } from '~/domains/paymentMethods';
|
|
4
4
|
export interface MoonpayDepositData {
|
|
5
5
|
depositToken: string;
|
|
6
6
|
depositTokenAmount: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ErrorNotification } from '~/components/FunNotification/FunNotification';
|
|
1
|
+
import type { ErrorNotification } from '~/components/FunNotification/FunNotification';
|
|
2
2
|
interface UseQuoteRefreshOptions {
|
|
3
3
|
/**
|
|
4
4
|
* Freeze the latest quote state, e.g. so we do not change the quote mid-confirmation
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { CheckoutModalCommonState, FunCheckoutStep, ModalStepComponentProps, ModalStepInfo } from './stepTransition';
|
|
2
|
+
import { MeshExchangeType } from '~/consts/mesh';
|
|
3
|
+
import { type PaymentMethodBrokerageInfo } from '../../domains/paymentMethods';
|
|
4
|
+
import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from './stepTransition';
|
|
5
5
|
export type ConnectExchangeState = CheckoutModalCommonState & {
|
|
6
|
-
|
|
6
|
+
brokerType: MeshExchangeType;
|
|
7
7
|
};
|
|
8
8
|
export type ConnectExchangeNext = {
|
|
9
9
|
paymentMethodInfo: PaymentMethodBrokerageInfo;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { PaymentMethodInfo } from '
|
|
3
|
-
import { CheckoutModalCommonState, FunCheckoutStep, ModalStepComponentProps, ModalStepInfo } from '
|
|
2
|
+
import { type PaymentMethodInfo } from '~/domains/paymentMethods';
|
|
3
|
+
import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
|
|
4
4
|
export type InputAmountState = CheckoutModalCommonState & {
|
|
5
5
|
paymentMethodInfo: PaymentMethodInfo;
|
|
6
6
|
};
|
|
7
|
-
export type InputAmountNext =
|
|
7
|
+
export type InputAmountNext = Record<string, never>;
|
|
8
8
|
export declare const InputAmountInfo: ModalStepInfo<FunCheckoutStep.INPUT_AMOUNT>;
|
|
9
9
|
export declare function InputAmount(props: ModalStepComponentProps<FunCheckoutStep.INPUT_AMOUNT>): React.JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React, { ReactNode } from 'react';
|
|
2
|
-
import { FunButtonProps } from '../../../components/FunButton/FunButton';
|
|
3
|
-
import { ErrorNotification } from '../../../components/FunNotification/FunNotification';
|
|
1
|
+
import React, { type ReactNode } from 'react';
|
|
2
|
+
import type { FunButtonProps } from '../../../components/FunButton/FunButton';
|
|
3
|
+
import { type ErrorNotification } from '../../../components/FunNotification/FunNotification';
|
|
4
4
|
interface InputAmountLayoutProps {
|
|
5
5
|
actionButtonProps: FunButtonProps;
|
|
6
6
|
availableBalance?: ReactNode;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { FunCheckoutStep, ModalStepComponentProps } from '../stepTransition';
|
|
2
|
+
import type { AssetHoldingsItem } from '~/utils/assets';
|
|
3
|
+
import type { FunkitCheckoutConfig } from '../../../providers/FunkitCheckoutContext';
|
|
4
|
+
import type { FunCheckoutStep, ModalStepComponentProps } from '../stepTransition';
|
|
5
5
|
interface InputAmountLoadedProps extends ModalStepComponentProps<FunCheckoutStep.INPUT_AMOUNT> {
|
|
6
6
|
sourceHolding: AssetHoldingsItem | null;
|
|
7
|
-
|
|
7
|
+
checkoutConfig: FunkitCheckoutConfig;
|
|
8
8
|
unitPrice: number;
|
|
9
9
|
isCardCheckout: boolean;
|
|
10
10
|
}
|
|
11
|
-
export declare function InputAmountLoaded({
|
|
11
|
+
export declare function InputAmountLoaded({ checkoutConfig, isCardCheckout, modalState, onNext, sourceHolding, unitPrice, }: InputAmountLoadedProps): React.JSX.Element;
|
|
12
12
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { PaymentMethod } from '~/domains/paymentMethods';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import type { PaymentMethod } from '~/domains/paymentMethods';
|
|
2
|
+
import { type AssetHoldingsItem } from '~/utils/assets';
|
|
3
|
+
import type { FunkitCheckoutConfig } from '../../../providers/FunkitCheckoutContext';
|
|
4
4
|
export interface AmountInputInitOptions {
|
|
5
|
-
|
|
5
|
+
checkoutConfig: FunkitCheckoutConfig;
|
|
6
6
|
paymentMethod: PaymentMethod;
|
|
7
7
|
sourceHolding: AssetHoldingsItem | null;
|
|
8
8
|
/** Target asset unit price, in USD */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AmountInputDerivedState, AmountInputInitOptions } from './state';
|
|
1
|
+
import { type AmountInputDerivedState, type AmountInputInitOptions } from './state';
|
|
2
2
|
interface UseAmountInputResult extends AmountInputDerivedState {
|
|
3
3
|
onChange(event: React.ChangeEvent<HTMLInputElement>): void;
|
|
4
4
|
setInputInUsd(isInputInUsd: boolean): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import type { AssetHoldingsItem } from '~/utils/assets';
|
|
2
|
+
import { type PaymentMethodInfo } from '~/domains/paymentMethods';
|
|
3
|
+
import type { QueryResult } from '~/types/utils';
|
|
4
4
|
export declare function useAvailableBalanceForCheckout(paymentMethodInfo: PaymentMethodInfo, targetChainId: string, assetChainId: string, assetSymbol: string | null): QueryResult<AssetHoldingsItem>;
|
|
@@ -1,16 +1,7 @@
|
|
|
1
1
|
import { PaymentMethod } from '~/domains/paymentMethods';
|
|
2
|
-
import { FunkitActiveCheckoutItem } from '../../../providers/FunkitCheckoutContext';
|
|
3
2
|
export declare const ASSET_DECIMALS = 5;
|
|
4
3
|
export declare const USD_DECIMALS = 2;
|
|
5
4
|
export declare const USD_INITIAL_AMOUNT = 100;
|
|
6
5
|
export declare const USD_PREFIX = "$";
|
|
7
|
-
export declare function round(value: number, decimals: number,
|
|
8
|
-
/**
|
|
9
|
-
* Whether to round up ('ceil'), down ('floor'), or nearest ('round')
|
|
10
|
-
*
|
|
11
|
-
* Defauls to 'round'
|
|
12
|
-
**/
|
|
13
|
-
method?: 'ceil' | 'floor' | 'round'): number;
|
|
14
|
-
export declare function getUsdAvailableAmount(checkoutItem: FunkitActiveCheckoutItem, assetChainId: string, assetUsdAmount: number | null): number | null;
|
|
15
6
|
export declare function getUsdMaxAmount(paymentMethod: PaymentMethod, maxUsd: number): number | null;
|
|
16
7
|
export declare function getUsdMinAmount(paymentMethod: PaymentMethod): number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { PaymentMethod, PaymentMethodAccountInfo, PaymentMethodBrokerageInfo } from '../../domains/paymentMethods';
|
|
3
|
-
import { CheckoutModalCommonState, FunCheckoutStep, ModalStepComponentProps, ModalStepInfo } from './stepTransition';
|
|
2
|
+
import { PaymentMethod, type PaymentMethodAccountInfo, type PaymentMethodBrokerageInfo } from '../../domains/paymentMethods';
|
|
3
|
+
import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from './stepTransition';
|
|
4
4
|
export type LoadingAccountState = CheckoutModalCommonState;
|
|
5
5
|
export type LoadingAccountNext = {
|
|
6
6
|
usablePaymentMethod: PaymentMethod.ACCOUNT_BALANCE;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Address } from 'viem';
|
|
3
|
-
import {
|
|
4
|
-
import { CheckoutModalCommonState, FunCheckoutStep, ModalStepComponentProps, ModalStepInfo } from './stepTransition';
|
|
2
|
+
import type { Address } from 'viem';
|
|
3
|
+
import { PaymentMethodBrokerageInfo } from '../../domains/paymentMethods';
|
|
4
|
+
import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from './stepTransition';
|
|
5
5
|
export type MeshVerificationState = CheckoutModalCommonState & {
|
|
6
|
-
paymentMethodInfo:
|
|
6
|
+
paymentMethodInfo: PaymentMethodBrokerageInfo;
|
|
7
7
|
};
|
|
8
8
|
export type MeshVerificationNext = {
|
|
9
9
|
depositAddress: Address;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Address } from 'viem';
|
|
3
|
-
import { CheckoutModalCommonState, FunCheckoutStep, ModalStepComponentProps, ModalStepInfo } from './stepTransition';
|
|
2
|
+
import type { Address } from 'viem';
|
|
3
|
+
import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from './stepTransition';
|
|
4
4
|
export type MoonpaySetupState = CheckoutModalCommonState & {
|
|
5
5
|
paymentAddress: Address;
|
|
6
6
|
token: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { PaymentMethodAccountInfo, PaymentMethodBrokerageInfo } from '../../domains/paymentMethods';
|
|
3
|
-
import { CheckoutModalCommonState, FunCheckoutStep, ModalStepComponentProps, ModalStepInfo } from './stepTransition';
|
|
2
|
+
import { type PaymentMethodAccountInfo, type PaymentMethodBrokerageInfo } from '../../domains/paymentMethods';
|
|
3
|
+
import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from './stepTransition';
|
|
4
4
|
export type SelectAssetState = CheckoutModalCommonState & {
|
|
5
5
|
paymentMethodInfo: PaymentMethodBrokerageInfo | PaymentMethodAccountInfo;
|
|
6
6
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { CheckoutModalCommonState, FunCheckoutStep, ModalStepComponentProps, ModalStepInfo } from './stepTransition';
|
|
2
|
+
import { MeshExchangeType } from '~/consts/mesh';
|
|
3
|
+
import { type PaymentMethodBrokerageInfo } from '../../domains/paymentMethods';
|
|
4
|
+
import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from './stepTransition';
|
|
5
5
|
export type SelectBrokerageState = CheckoutModalCommonState;
|
|
6
6
|
export type SelectBrokerageNext = {
|
|
7
7
|
hasActiveConnection: true;
|
|
8
8
|
paymentInfo: PaymentMethodBrokerageInfo;
|
|
9
9
|
} | {
|
|
10
10
|
hasActiveConnection: false;
|
|
11
|
-
|
|
11
|
+
brokerType: MeshExchangeType;
|
|
12
12
|
};
|
|
13
13
|
export declare const SelectBrokerageInfo: ModalStepInfo<FunCheckoutStep.SELECT_BROKERAGE>;
|
|
14
14
|
export declare function SelectBrokerage({ onNext, }: ModalStepComponentProps<FunCheckoutStep.SELECT_BROKERAGE>): React.JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { PaymentMethod, PaymentMethodAccountInfo, PaymentMethodBrokerageInfo, PaymentMethodCardInfo } from '
|
|
3
|
-
import { CheckoutModalCommonState, FunCheckoutStep, ModalStepComponentProps, ModalStepInfo } from '
|
|
2
|
+
import { PaymentMethod, type PaymentMethodAccountInfo, type PaymentMethodBrokerageInfo, type PaymentMethodCardInfo } from '~/domains/paymentMethods';
|
|
3
|
+
import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
|
|
4
4
|
type ConnectablePaymentMethodInfo = PaymentMethodAccountInfo | PaymentMethodBrokerageInfo;
|
|
5
5
|
export type SourceChangeState = CheckoutModalCommonState & {
|
|
6
6
|
paymentMethodInfo: ConnectablePaymentMethodInfo | null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { CheckoutModalCommonState, FunCheckoutStep, ModalStepComponentProps, ModalStepInfo } from './stepTransition';
|
|
2
|
+
import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from './stepTransition';
|
|
3
3
|
export type TransferTokenState = CheckoutModalCommonState;
|
|
4
|
-
export type TransferTokenNext =
|
|
4
|
+
export type TransferTokenNext = Record<string, never>;
|
|
5
5
|
export interface TokenTransferSourceChainsAndAssets {
|
|
6
6
|
[chainId: number]: string[];
|
|
7
7
|
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { ComponentType, SetStateAction } from 'react';
|
|
2
|
-
import { FunkitActiveCheckoutItem } from '../../providers/FunkitCheckoutContext';
|
|
3
|
-
import { FunkitTextCustomizationsConfig } from '../../providers/FunkitConfigContext';
|
|
4
|
-
import { CheckoutCompleteState } from './CheckoutComplete';
|
|
5
|
-
import { ConfirmationStepNext, ConfirmationStepState } from './ConfirmationStep';
|
|
6
|
-
import { ConnectExchangeNext, ConnectExchangeState } from './ConnectExchange';
|
|
7
|
-
import { InputAmountNext, InputAmountState } from './InputAmount';
|
|
8
|
-
import { LoadingAccountNext, LoadingAccountState } from './LoadingAccount';
|
|
9
|
-
import { MeshVerificationNext, MeshVerificationState } from './MeshVerification';
|
|
10
|
-
import { MoonpaySetupNext, MoonpaySetupState } from './MoonpaySetup';
|
|
11
|
-
import { SelectAssetNext, SelectAssetState } from './SelectAsset';
|
|
12
|
-
import { SelectBrokerageNext, SelectBrokerageState } from './SelectBrokerage';
|
|
13
|
-
import { SourceChangeNext, SourceChangeState } from './SourceChange';
|
|
14
|
-
import { TransferTokenNext, TransferTokenState } from './TransferToken';
|
|
1
|
+
import { type ComponentType, type SetStateAction } from 'react';
|
|
2
|
+
import type { FunkitActiveCheckoutItem } from '../../providers/FunkitCheckoutContext';
|
|
3
|
+
import { type FunkitTextCustomizationsConfig } from '../../providers/FunkitConfigContext';
|
|
4
|
+
import { type CheckoutCompleteState } from './CheckoutComplete/CheckoutComplete';
|
|
5
|
+
import { type ConfirmationStepNext, type ConfirmationStepState } from './ConfirmationStep/ConfirmationStep';
|
|
6
|
+
import { type ConnectExchangeNext, type ConnectExchangeState } from './ConnectExchange';
|
|
7
|
+
import { type InputAmountNext, type InputAmountState } from './InputAmount/InputAmount';
|
|
8
|
+
import { type LoadingAccountNext, type LoadingAccountState } from './LoadingAccount';
|
|
9
|
+
import { type MeshVerificationNext, type MeshVerificationState } from './MeshVerification';
|
|
10
|
+
import { type MoonpaySetupNext, type MoonpaySetupState } from './MoonpaySetup';
|
|
11
|
+
import { type SelectAssetNext, type SelectAssetState } from './SelectAsset';
|
|
12
|
+
import { type SelectBrokerageNext, type SelectBrokerageState } from './SelectBrokerage';
|
|
13
|
+
import { type SourceChangeNext, type SourceChangeState } from './SourceChange/SourceChange';
|
|
14
|
+
import { type TransferTokenNext, type TransferTokenState } from './TransferToken';
|
|
15
15
|
export interface CheckoutModalCommonState {
|
|
16
16
|
checkoutId: string;
|
|
17
17
|
isSoftHidden: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { type DeepPartial } from '@funkit/utils';
|
|
2
|
+
import { type FunkitActiveCheckoutItem } from '~/providers/FunkitCheckoutContext';
|
|
3
3
|
export declare function useCheckoutQuote(): (overridingCheckoutItem?: DeepPartial<FunkitActiveCheckoutItem>) => Promise<{
|
|
4
4
|
baseQuote: import("@funkit/api-base").CheckoutQuoteResponse;
|
|
5
5
|
finalEstimation: import("~/domains/quote").FunkitCheckoutQuoteResult;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Operation } from '@funkit/core';
|
|
2
|
-
import { PaymentMethodInfo } from '../../domains/paymentMethods';
|
|
3
|
-
import { FunkitActiveCheckoutItem } from '../../providers/FunkitCheckoutContext';
|
|
1
|
+
import type { Operation } from '@funkit/core';
|
|
2
|
+
import { type PaymentMethodInfo } from '../../domains/paymentMethods';
|
|
3
|
+
import { type FunkitActiveCheckoutItem } from '../../providers/FunkitCheckoutContext';
|
|
4
4
|
import { LoginType } from '../../providers/GeneralWalletProvider';
|
|
5
5
|
export interface SourceAssetConfirmed {
|
|
6
6
|
isQuoteSuccess: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { Dispatch, SetStateAction } from 'react';
|
|
1
|
+
import React, { type Dispatch, type SetStateAction } from 'react';
|
|
2
2
|
import { HistoryContentPages } from '../../utils/checkoutHistory';
|
|
3
3
|
interface FunCheckoutHistoryContentProps {
|
|
4
4
|
depositAddress: `0x${string}`;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CheckoutHistoryItem } from '@funkit/api-base';
|
|
1
|
+
import { type CheckoutHistoryItem } from '@funkit/api-base';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
export declare function FunCheckoutHistoryHelp({ checkoutHistoryInfo, onBackFromHelpPage, }: {
|
|
4
4
|
checkoutHistoryInfo: CheckoutHistoryItem | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { HistoryContentPages } from '../../utils/checkoutHistory';
|
|
3
|
-
import { FunProfileView } from './ProfileDetails';
|
|
2
|
+
import type { HistoryContentPages } from '../../utils/checkoutHistory';
|
|
3
|
+
import type { FunProfileView } from './ProfileDetails';
|
|
4
4
|
export interface BaseActivitySelection {
|
|
5
5
|
depositAddress: `0x${string}`;
|
|
6
6
|
initialPage: HistoryContentPages;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { BaseActivitySelection } from '../../ActivityTraversalContext';
|
|
2
|
+
import { type BaseActivitySelection } from '../../ActivityTraversalContext';
|
|
3
3
|
export declare function ActivityHistory({ onSelectActivity, }: {
|
|
4
4
|
onSelectActivity: (activity: BaseActivitySelection) => void;
|
|
5
5
|
}): React.JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CheckoutHistoryItem } from '@funkit/api-base';
|
|
1
|
+
import type { CheckoutHistoryItem } from '@funkit/api-base';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { HistoryContentPages } from '../../../../utils/checkoutHistory';
|
|
4
4
|
export declare const HOME_CHECKOUT_DISPLAY_ROW_HEIGHT = 52;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { BaseActivitySelection } from '../../ActivityTraversalContext';
|
|
2
|
+
import { type BaseActivitySelection } from '../../ActivityTraversalContext';
|
|
3
3
|
import { FunProfileView } from '../../ProfileDetails';
|
|
4
4
|
export declare enum SelectedHomeTab {
|
|
5
5
|
ASSETS = "assets",
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { ApiCheckoutClientMetadata, ApiFunkitCheckoutConfig } from '@funkit/api-base';
|
|
2
|
+
import { type Operation } from '@funkit/core';
|
|
3
|
+
import React, { type ReactNode } from 'react';
|
|
4
|
+
import { type Abi, type Address } from 'viem';
|
|
5
|
+
import type { AssetHoldingsItem } from '~/utils/assets';
|
|
6
|
+
import { type PaymentMethodInfo } from '../domains/paymentMethods';
|
|
6
7
|
import type { FunkitCheckoutQuoteResult } from '../domains/quote';
|
|
7
8
|
export type { HistoricalCheckoutItem, ServerCheckoutConfig, } from '~/domains/clientMetadata';
|
|
8
9
|
export type { FunkitCheckoutQuoteResult } from '~/domains/quote';
|
|
@@ -14,24 +15,11 @@ export interface FunkitCheckoutActionParams {
|
|
|
14
15
|
value?: bigint;
|
|
15
16
|
}
|
|
16
17
|
export type DydxAddress = `dydx${string}`;
|
|
17
|
-
export interface FunkitCheckoutConfig {
|
|
18
|
-
/** ****************************
|
|
19
|
-
* Api-related configurations *
|
|
20
|
-
******************************/
|
|
21
|
-
/** The ID of the chain where the checkout operation is to be performed. **/
|
|
22
|
-
targetChain: string;
|
|
23
|
-
/** The wanted asset for the checkout operation. This can be either a chain native token (by specifying NATIVE_TOKEN) or an ERC-20 token (by specifying actual token address) on the target chain. **/
|
|
24
|
-
targetAsset: Address;
|
|
25
|
-
/** The amount of wanted asset for the checkout operation (defaults to $100 equivalent). **/
|
|
26
|
-
targetAssetAmount?: number;
|
|
27
|
-
/** The ticker information of the wanted asset for the checkout operation. e.g. USDC. **/
|
|
28
|
-
targetAssetTicker: string;
|
|
29
|
-
/** Timestamp (in milliseconds) after which the checkout should not be performed, and the funds will become rescuable. Min: 300000 (5 mins), Max: 3600000 (1 hour). **/
|
|
30
|
-
expirationTimestampMs: number;
|
|
31
|
-
/** Custom recipient address of the checkout. If specified, a different checkout flow will be executed. It is not recommended to set this unless the Fun.xyz team advises it. **/
|
|
32
|
-
customRecipient?: Address | DydxAddress;
|
|
18
|
+
export interface FunkitCheckoutConfig extends Omit<ApiFunkitCheckoutConfig, 'generateActionsParams' | 'customRecipient' | 'modalTitle' | 'iconSrc' | 'modalTitleMeta' | 'checkoutItemAmount' | 'externalCheckoutUserId'> {
|
|
33
19
|
/** List of contract action params **/
|
|
34
20
|
generateActionsParams?: (targetAssetAmount: number) => FunkitCheckoutActionParams[];
|
|
21
|
+
/** Custom recipient address of the checkout. If specified, a different checkout flow will be executed. It is not recommended to set this unless the Fun.xyz team advises it. **/
|
|
22
|
+
customRecipient?: Address | DydxAddress;
|
|
35
23
|
/** ****************************************
|
|
36
24
|
* Checkout ModalUI-related configurations *
|
|
37
25
|
*******************************************/
|
|
@@ -51,6 +39,11 @@ export interface FunkitCheckoutConfig {
|
|
|
51
39
|
/** User identification within customer's app for logging and customer dashboard purposes (future). **/
|
|
52
40
|
externalCheckoutUserId?: string;
|
|
53
41
|
}
|
|
42
|
+
export interface CheckoutClientMetadata extends Omit<ApiCheckoutClientMetadata, 'initSettings'> {
|
|
43
|
+
initSettings: {
|
|
44
|
+
config: FunkitCheckoutConfig;
|
|
45
|
+
};
|
|
46
|
+
}
|
|
54
47
|
interface FunkitCheckoutValidationResult {
|
|
55
48
|
isValid: boolean;
|
|
56
49
|
message: string;
|
|
@@ -60,7 +53,7 @@ export type FunkitCheckoutResult = {
|
|
|
60
53
|
message: string;
|
|
61
54
|
metadata: object | Error;
|
|
62
55
|
};
|
|
63
|
-
interface
|
|
56
|
+
interface UseFunkitCheckoutProps {
|
|
64
57
|
/** @optional the checkout config object **/
|
|
65
58
|
config?: FunkitCheckoutConfig;
|
|
66
59
|
/** @optional fires when the checkout modal is opened **/
|
|
@@ -80,19 +73,13 @@ interface useFunkitCheckoutProps {
|
|
|
80
73
|
/** @optional fires if the checkout requires an active wallet connection. If not specified, defaults to funkit wallet connection. */
|
|
81
74
|
onLoginRequired?: () => void;
|
|
82
75
|
}
|
|
83
|
-
|
|
76
|
+
interface UseFunkitCheckoutPropsWithFullConfig extends UseFunkitCheckoutProps {
|
|
84
77
|
config: FunkitCheckoutConfig;
|
|
85
|
-
}
|
|
78
|
+
}
|
|
86
79
|
/**
|
|
87
80
|
* Checkout Item for frontend use
|
|
88
81
|
*/
|
|
89
|
-
export interface FunkitActiveCheckoutItem {
|
|
90
|
-
/** Unique identifier for frontend use only. */
|
|
91
|
-
id: string;
|
|
92
|
-
/** Time of creation of the active checkout item. For frontend use only. **/
|
|
93
|
-
startTimestampMs: number;
|
|
94
|
-
/** The final dollar value of the checkout. Derived from latestQuote. **/
|
|
95
|
-
finalDollarValue: null | number;
|
|
82
|
+
export interface FunkitActiveCheckoutItem extends Omit<CheckoutClientMetadata, 'selectedPaymentMethodInfo' | 'initSettings'> {
|
|
96
83
|
/** Whether the checkout quote is being fetched **/
|
|
97
84
|
isQuoting: boolean;
|
|
98
85
|
/** Latest checkout estimated fees and time **/
|
|
@@ -104,7 +91,7 @@ export interface FunkitActiveCheckoutItem {
|
|
|
104
91
|
/** The deposit address provided by server after the checkout is confirmed. If `null`, it is not confirmed yet. **/
|
|
105
92
|
depositAddress: null | Address;
|
|
106
93
|
/** Final settings the checkout was init-ed with **/
|
|
107
|
-
initSettings:
|
|
94
|
+
initSettings: UseFunkitCheckoutPropsWithFullConfig;
|
|
108
95
|
/** User's selected payment method information */
|
|
109
96
|
selectedPaymentMethodInfo: PaymentMethodInfo | null;
|
|
110
97
|
/** User's choice of source asset to fund the checkout operation **/
|
|
@@ -119,7 +106,7 @@ export interface FunkitActiveCheckoutItem {
|
|
|
119
106
|
}
|
|
120
107
|
interface FunkitCheckoutContextInterface {
|
|
121
108
|
checkoutItem: FunkitActiveCheckoutItem | null;
|
|
122
|
-
initNewCheckout(initSettings:
|
|
109
|
+
initNewCheckout(initSettings: UseFunkitCheckoutPropsWithFullConfig): string;
|
|
123
110
|
updateSourceAsset(selectedSource: Omit<AssetHoldingsItem, 'amount' | 'usdAmount' | 'chainSymbolKey'>): void;
|
|
124
111
|
updateTargetAssetAmount(newTargetAssetAmount: number): void;
|
|
125
112
|
updateSelectedPaymentMethodInfo(newPaymentMethodInfo: PaymentMethodInfo): void;
|
|
@@ -143,6 +130,9 @@ export declare function useCheckoutContext(): FunkitCheckoutContextInterface;
|
|
|
143
130
|
/**
|
|
144
131
|
* External hook for user to kickstart a checkout in their app
|
|
145
132
|
*/
|
|
146
|
-
export declare
|
|
147
|
-
beginCheckout: (
|
|
133
|
+
export declare function useFunkitCheckout(props: UseFunkitCheckoutPropsWithFullConfig): {
|
|
134
|
+
beginCheckout: (config?: Partial<FunkitCheckoutConfig>) => Promise<void>;
|
|
135
|
+
};
|
|
136
|
+
export declare function useFunkitCheckout(props: UseFunkitCheckoutProps): {
|
|
137
|
+
beginCheckout: (config: FunkitCheckoutConfig) => Promise<void>;
|
|
148
138
|
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { FunkitPrioritizedLoginType, FunkitSocialLoginMethod } from '../consts/funkit';
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type FunkitPrioritizedLoginType, FunkitSocialLoginMethod } from '../consts/funkit';
|
|
3
3
|
export interface FunkitTextCustomizationsConfig {
|
|
4
4
|
brokerageOrExchange: string;
|
|
5
5
|
debitOrCredit: string;
|
|
6
6
|
accountBalance: string;
|
|
7
7
|
transferCrypto: string;
|
|
8
8
|
selectAccount: string;
|
|
9
|
+
sourceMethodTitle: string;
|
|
9
10
|
transferTokens: string;
|
|
10
11
|
confirmationScreen: {
|
|
11
12
|
receiveAmountLabel: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React, { ReactNode } from 'react';
|
|
2
|
-
import { flagConfig as offlineConfig
|
|
3
|
-
import { InferFlagType } from '../utils/flags/types';
|
|
1
|
+
import React, { type ReactNode } from 'react';
|
|
2
|
+
import { type FlagKey, flagConfig as offlineConfig } from '../utils/flags/config';
|
|
3
|
+
import type { InferFlagType } from '../utils/flags/types';
|
|
4
4
|
export { FlagKey } from '../utils/flags/config';
|
|
5
5
|
export type FlagValue<K extends FlagKey> = InferFlagType<(typeof offlineConfig)[K]>;
|
|
6
6
|
export type FlagValues = {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { CheckoutHistoryItem } from '@funkit/api-base';
|
|
2
|
-
import React, { ReactNode } from 'react';
|
|
3
|
-
import { Address } from 'viem';
|
|
4
|
-
import { CheckoutHistoryDepositAddrMap, CheckoutHistoryStateMap } from '../utils/checkout';
|
|
5
|
-
import { PurifiedCheckoutHistoryItem } from '../utils/purifyCheckoutHistoryItem';
|
|
1
|
+
import { type CheckoutHistoryItem } from '@funkit/api-base';
|
|
2
|
+
import React, { type ReactNode } from 'react';
|
|
3
|
+
import type { Address } from 'viem';
|
|
4
|
+
import { type CheckoutHistoryDepositAddrMap, type CheckoutHistoryStateMap } from '../utils/checkout';
|
|
5
|
+
import { type PurifiedCheckoutHistoryItem } from '../utils/purifyCheckoutHistoryItem';
|
|
6
6
|
export type { HistoricalCheckoutItem, ServerCheckoutConfig, } from '~/domains/clientMetadata';
|
|
7
7
|
export type { FunkitCheckoutQuoteResult } from '~/domains/quote';
|
|
8
8
|
interface FunkitCheckoutHistoryContextInterface {
|