@lifi/widget 4.6.0 → 4.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -3
- package/dist/esm/App.d.ts +1 -2
- package/dist/esm/App.d.ts.map +1 -1
- package/dist/esm/AppDrawer.d.ts +1 -2
- package/dist/esm/AppDrawer.d.ts.map +1 -1
- package/dist/esm/components/ActionRow/ActionRow.d.ts +1 -2
- package/dist/esm/components/ActionRow/ActionRow.d.ts.map +1 -1
- package/dist/esm/components/AmountInput/AmountInput.style.d.ts +2 -2
- package/dist/esm/components/AmountInput/AmountInput.style.d.ts.map +1 -1
- package/dist/esm/components/AmountInput/AmountInputEndAdornment.d.ts +1 -2
- package/dist/esm/components/AmountInput/AmountInputEndAdornment.d.ts.map +1 -1
- package/dist/esm/components/AmountInput/PriceFormHelperText.style.d.ts +1 -2
- package/dist/esm/components/AmountInput/PriceFormHelperText.style.d.ts.map +1 -1
- package/dist/esm/components/AmountInputCard/ReceiveAmountCard.js +6 -2
- package/dist/esm/components/AmountInputCard/ReceiveAmountCard.js.map +1 -1
- package/dist/esm/components/Avatar/Avatar.d.ts +1 -2
- package/dist/esm/components/Avatar/Avatar.d.ts.map +1 -1
- package/dist/esm/components/Avatar/TokenAvatar.d.ts +1 -2
- package/dist/esm/components/Avatar/TokenAvatar.d.ts.map +1 -1
- package/dist/esm/components/BaseTransactionButton/BaseTransactionButton.d.ts +1 -2
- package/dist/esm/components/BaseTransactionButton/BaseTransactionButton.d.ts.map +1 -1
- package/dist/esm/components/BaseTransactionButton/types.d.ts +1 -2
- package/dist/esm/components/BaseTransactionButton/types.d.ts.map +1 -1
- package/dist/esm/components/BottomSheet/BottomSheet.js +1 -0
- package/dist/esm/components/BottomSheet/BottomSheet.js.map +1 -1
- package/dist/esm/components/BottomSheet/types.d.ts +1 -2
- package/dist/esm/components/BottomSheet/types.d.ts.map +1 -1
- package/dist/esm/components/ButtonTertiary.d.ts +1 -2
- package/dist/esm/components/ButtonTertiary.d.ts.map +1 -1
- package/dist/esm/components/Card/CardIconButton.d.ts +1 -2
- package/dist/esm/components/Card/CardIconButton.d.ts.map +1 -1
- package/dist/esm/components/Card/CardTitle.d.ts +1 -2
- package/dist/esm/components/Card/CardTitle.d.ts.map +1 -1
- package/dist/esm/components/Card/InputCard.d.ts +1 -2
- package/dist/esm/components/Card/InputCard.d.ts.map +1 -1
- package/dist/esm/components/ChainSelect/ChainSelect.d.ts +1 -2
- package/dist/esm/components/ChainSelect/ChainSelect.d.ts.map +1 -1
- package/dist/esm/components/ChainSelect/ChainSelect.style.d.ts +1 -2
- package/dist/esm/components/ChainSelect/ChainSelect.style.d.ts.map +1 -1
- package/dist/esm/components/ContractComponent/ContractComponent.d.ts +1 -2
- package/dist/esm/components/ContractComponent/ContractComponent.d.ts.map +1 -1
- package/dist/esm/components/ContractComponent/ItemPrice.d.ts +2 -3
- package/dist/esm/components/ContractComponent/ItemPrice.d.ts.map +1 -1
- package/dist/esm/components/ContractComponent/NFT/NFT.d.ts +1 -2
- package/dist/esm/components/ContractComponent/NFT/NFT.d.ts.map +1 -1
- package/dist/esm/components/ContractComponent/NFT/NFTBase.d.ts +1 -2
- package/dist/esm/components/ContractComponent/NFT/NFTBase.d.ts.map +1 -1
- package/dist/esm/components/ContractComponent/NFT/types.d.ts +3 -4
- package/dist/esm/components/ContractComponent/NFT/types.d.ts.map +1 -1
- package/dist/esm/components/ExecutionStatusCard/ExecutionStatusCard.d.ts +1 -2
- package/dist/esm/components/ExecutionStatusCard/ExecutionStatusCard.d.ts.map +1 -1
- package/dist/esm/components/ExecutionStatusCard/StatusIcon.d.ts +1 -2
- package/dist/esm/components/ExecutionStatusCard/StatusIcon.d.ts.map +1 -1
- package/dist/esm/components/FeeBreakdownTooltip.d.ts +1 -2
- package/dist/esm/components/FeeBreakdownTooltip.d.ts.map +1 -1
- package/dist/esm/components/IconCircle/IconCircle.d.ts +1 -2
- package/dist/esm/components/IconCircle/IconCircle.d.ts.map +1 -1
- package/dist/esm/components/IconCircle/statusIcons.d.ts +1 -2
- package/dist/esm/components/IconCircle/statusIcons.d.ts.map +1 -1
- package/dist/esm/components/IconTypography.d.ts +1 -2
- package/dist/esm/components/IconTypography.d.ts.map +1 -1
- package/dist/esm/components/ListItem/ListItemButton.d.ts +1 -2
- package/dist/esm/components/ListItem/ListItemButton.d.ts.map +1 -1
- package/dist/esm/components/Messages/WarningMessages.d.ts +1 -2
- package/dist/esm/components/Messages/WarningMessages.d.ts.map +1 -1
- package/dist/esm/components/PageContainer.d.ts +2 -3
- package/dist/esm/components/PageContainer.d.ts.map +1 -1
- package/dist/esm/components/PoweredBy/PoweredBy.d.ts +1 -2
- package/dist/esm/components/PoweredBy/PoweredBy.d.ts.map +1 -1
- package/dist/esm/components/ProgressToNextUpdate.d.ts +1 -2
- package/dist/esm/components/ProgressToNextUpdate.d.ts.map +1 -1
- package/dist/esm/components/RouteCard/RouteCard.d.ts +1 -2
- package/dist/esm/components/RouteCard/RouteCard.d.ts.map +1 -1
- package/dist/esm/components/RouteCard/RouteCardSkeleton.d.ts +1 -2
- package/dist/esm/components/RouteCard/RouteCardSkeleton.d.ts.map +1 -1
- package/dist/esm/components/RouteCard/RouteDetails.d.ts +1 -2
- package/dist/esm/components/RouteCard/RouteDetails.d.ts.map +1 -1
- package/dist/esm/components/RouteCard/RouteDetails.style.d.ts +5 -6
- package/dist/esm/components/RouteCard/RouteDetails.style.d.ts.map +1 -1
- package/dist/esm/components/RouteCard/RouteNotFoundCard.d.ts +1 -2
- package/dist/esm/components/RouteCard/RouteNotFoundCard.d.ts.map +1 -1
- package/dist/esm/components/RouteCard/RouteTokens.d.ts +1 -2
- package/dist/esm/components/RouteCard/RouteTokens.d.ts.map +1 -1
- package/dist/esm/components/RouteCard/types.d.ts +2 -3
- package/dist/esm/components/RouteCard/types.d.ts.map +1 -1
- package/dist/esm/components/Search/SearchInput.d.ts +1 -2
- package/dist/esm/components/Search/SearchInput.d.ts.map +1 -1
- package/dist/esm/components/SendToWallet/SendToWalletButton.d.ts +1 -2
- package/dist/esm/components/SendToWallet/SendToWalletButton.d.ts.map +1 -1
- package/dist/esm/components/Skeleton/WidgetSkeleton.d.ts +1 -2
- package/dist/esm/components/Skeleton/WidgetSkeleton.d.ts.map +1 -1
- package/dist/esm/components/StepActions/SentToWalletRow.d.ts +1 -2
- package/dist/esm/components/StepActions/SentToWalletRow.d.ts.map +1 -1
- package/dist/esm/components/StepActions/StepActionRow.style.d.ts +1 -2
- package/dist/esm/components/StepActions/StepActionRow.style.d.ts.map +1 -1
- package/dist/esm/components/StepActions/StepActionsList.d.ts +1 -2
- package/dist/esm/components/StepActions/StepActionsList.d.ts.map +1 -1
- package/dist/esm/components/StepActions/executionRows.d.ts +2 -3
- package/dist/esm/components/StepActions/executionRows.d.ts.map +1 -1
- package/dist/esm/components/Token/Token.d.ts.map +1 -1
- package/dist/esm/components/Token/Token.js +2 -4
- package/dist/esm/components/Token/Token.js.map +1 -1
- package/dist/esm/components/TokenList/RecentTokensHeader.js +44 -0
- package/dist/esm/components/TokenList/RecentTokensHeader.js.map +1 -0
- package/dist/esm/components/TokenList/RecentTokensToggle.js +36 -0
- package/dist/esm/components/TokenList/RecentTokensToggle.js.map +1 -0
- package/dist/esm/components/TokenList/RemoveRecentTokenButton.js +32 -0
- package/dist/esm/components/TokenList/RemoveRecentTokenButton.js.map +1 -0
- package/dist/esm/components/TokenList/TokenList.js +55 -5
- package/dist/esm/components/TokenList/TokenList.js.map +1 -1
- package/dist/esm/components/TokenList/TokenListItem.js +35 -19
- package/dist/esm/components/TokenList/TokenListItem.js.map +1 -1
- package/dist/esm/components/TokenList/TokenNotFound.d.ts +1 -2
- package/dist/esm/components/TokenList/TokenNotFound.d.ts.map +1 -1
- package/dist/esm/components/TokenList/VirtualizedTokenList.d.ts +1 -2
- package/dist/esm/components/TokenList/VirtualizedTokenList.d.ts.map +1 -1
- package/dist/esm/components/TokenList/VirtualizedTokenList.js +55 -42
- package/dist/esm/components/TokenList/VirtualizedTokenList.js.map +1 -1
- package/dist/esm/components/TokenList/types.d.ts +9 -2
- package/dist/esm/components/TokenList/types.d.ts.map +1 -1
- package/dist/esm/components/TokenList/useTokenSelect.d.ts +1 -2
- package/dist/esm/components/TokenList/useTokenSelect.d.ts.map +1 -1
- package/dist/esm/components/TokenRate/TokenRate.d.ts +1 -2
- package/dist/esm/components/TokenRate/TokenRate.d.ts.map +1 -1
- package/dist/esm/components/TransactionCard/TransactionCard.style.d.ts +2 -3
- package/dist/esm/components/TransactionCard/TransactionCard.style.d.ts.map +1 -1
- package/dist/esm/config/constants.d.ts +1 -2
- package/dist/esm/config/constants.d.ts.map +1 -1
- package/dist/esm/config/version.d.ts +2 -3
- package/dist/esm/config/version.d.ts.map +1 -1
- package/dist/esm/config/version.js +1 -1
- package/dist/esm/config/version.js.map +1 -1
- package/dist/esm/hooks/useAddressActivity.d.ts +1 -2
- package/dist/esm/hooks/useAddressActivity.d.ts.map +1 -1
- package/dist/esm/hooks/useAddressValidation.d.ts +2 -3
- package/dist/esm/hooks/useAddressValidation.d.ts.map +1 -1
- package/dist/esm/hooks/useAvailableChains.d.ts +1 -2
- package/dist/esm/hooks/useAvailableChains.d.ts.map +1 -1
- package/dist/esm/hooks/useChain.d.ts +1 -2
- package/dist/esm/hooks/useChain.d.ts.map +1 -1
- package/dist/esm/hooks/useContactSupport.d.ts +1 -2
- package/dist/esm/hooks/useContactSupport.d.ts.map +1 -1
- package/dist/esm/hooks/useDebouncedWatch.d.ts +1 -2
- package/dist/esm/hooks/useDebouncedWatch.d.ts.map +1 -1
- package/dist/esm/hooks/useDisplayedTokens.js +6 -4
- package/dist/esm/hooks/useDisplayedTokens.js.map +1 -1
- package/dist/esm/hooks/useExplorer.d.ts +2 -3
- package/dist/esm/hooks/useExplorer.d.ts.map +1 -1
- package/dist/esm/hooks/useExplorer.js +7 -3
- package/dist/esm/hooks/useExplorer.js.map +1 -1
- package/dist/esm/hooks/useHeader.d.ts +1 -2
- package/dist/esm/hooks/useHeader.d.ts.map +1 -1
- package/dist/esm/hooks/useListHeight.d.ts +1 -2
- package/dist/esm/hooks/useListHeight.d.ts.map +1 -1
- package/dist/esm/hooks/useNavigateBack.d.ts +1 -2
- package/dist/esm/hooks/useNavigateBack.d.ts.map +1 -1
- package/dist/esm/hooks/useRecentTokens.js +46 -0
- package/dist/esm/hooks/useRecentTokens.js.map +1 -0
- package/dist/esm/hooks/useRouteExecution.d.ts +1 -2
- package/dist/esm/hooks/useRouteExecution.d.ts.map +1 -1
- package/dist/esm/hooks/useRouteExecutionMessage.d.ts +1 -2
- package/dist/esm/hooks/useRouteExecutionMessage.d.ts.map +1 -1
- package/dist/esm/hooks/useRoutes.d.ts +1 -2
- package/dist/esm/hooks/useRoutes.d.ts.map +1 -1
- package/dist/esm/hooks/useRoutes.js +7 -2
- package/dist/esm/hooks/useRoutes.js.map +1 -1
- package/dist/esm/hooks/useToAddressRequirements.d.ts +1 -2
- package/dist/esm/hooks/useToAddressRequirements.d.ts.map +1 -1
- package/dist/esm/hooks/useToAddressRequirements.js +8 -2
- package/dist/esm/hooks/useToAddressRequirements.js.map +1 -1
- package/dist/esm/hooks/useToken.d.ts +1 -2
- package/dist/esm/hooks/useToken.d.ts.map +1 -1
- package/dist/esm/hooks/useTokenAddressBalance.d.ts +1 -2
- package/dist/esm/hooks/useTokenAddressBalance.d.ts.map +1 -1
- package/dist/esm/hooks/useTokenBalances.d.ts +3 -2
- package/dist/esm/hooks/useTokenBalances.d.ts.map +1 -1
- package/dist/esm/hooks/useTokenBalances.js +15 -9
- package/dist/esm/hooks/useTokenBalances.js.map +1 -1
- package/dist/esm/hooks/useTokenList.d.ts +1 -2
- package/dist/esm/hooks/useTokenList.d.ts.map +1 -1
- package/dist/esm/hooks/useTokenSearch.js +3 -2
- package/dist/esm/hooks/useTokenSearch.js.map +1 -1
- package/dist/esm/hooks/useTokens.js +26 -15
- package/dist/esm/hooks/useTokens.js.map +1 -1
- package/dist/esm/hooks/useTools.d.ts +1 -2
- package/dist/esm/hooks/useTools.d.ts.map +1 -1
- package/dist/esm/hooks/useWidgetChains.d.ts +1 -2
- package/dist/esm/hooks/useWidgetChains.d.ts.map +1 -1
- package/dist/esm/hooks/useWidgetEvents.d.ts +3 -4
- package/dist/esm/hooks/useWidgetEvents.d.ts.map +1 -1
- package/dist/esm/i18n/bn.json +4 -0
- package/dist/esm/i18n/de.json +4 -0
- package/dist/esm/i18n/en.json +4 -0
- package/dist/esm/i18n/es.json +4 -0
- package/dist/esm/i18n/fr.json +4 -0
- package/dist/esm/i18n/hi.json +4 -0
- package/dist/esm/i18n/id.json +4 -0
- package/dist/esm/i18n/it.json +4 -0
- package/dist/esm/i18n/ja.json +4 -0
- package/dist/esm/i18n/ko.json +4 -0
- package/dist/esm/i18n/pl.json +4 -0
- package/dist/esm/i18n/pt.json +4 -0
- package/dist/esm/i18n/th.json +4 -0
- package/dist/esm/i18n/tr.json +4 -0
- package/dist/esm/i18n/uk.json +4 -0
- package/dist/esm/i18n/vi.json +4 -0
- package/dist/esm/i18n/zh.json +4 -0
- package/dist/esm/pages/MainPage/MainWarningMessages.d.ts +1 -2
- package/dist/esm/pages/MainPage/MainWarningMessages.d.ts.map +1 -1
- package/dist/esm/pages/SelectChainPage/SelectChainPage.d.ts +1 -2
- package/dist/esm/pages/SelectChainPage/SelectChainPage.d.ts.map +1 -1
- package/dist/esm/pages/SelectChainPage/types.d.ts +1 -2
- package/dist/esm/pages/SelectChainPage/types.d.ts.map +1 -1
- package/dist/esm/pages/SelectTokenPage/SearchTokenInput.d.ts +1 -2
- package/dist/esm/pages/SelectTokenPage/SearchTokenInput.d.ts.map +1 -1
- package/dist/esm/pages/SendToWallet/BookmarksPage.js +2 -1
- package/dist/esm/pages/SendToWallet/BookmarksPage.js.map +1 -1
- package/dist/esm/pages/SendToWallet/ConnectedWalletsPage.js +2 -1
- package/dist/esm/pages/SendToWallet/ConnectedWalletsPage.js.map +1 -1
- package/dist/esm/pages/SendToWallet/RecentWalletsPage.js +2 -1
- package/dist/esm/pages/SendToWallet/RecentWalletsPage.js.map +1 -1
- package/dist/esm/pages/SendToWallet/SendToConfiguredWalletPage.js +2 -1
- package/dist/esm/pages/SendToWallet/SendToConfiguredWalletPage.js.map +1 -1
- package/dist/esm/pages/TransactionDetailsPage/ContactSupportButton.d.ts +1 -2
- package/dist/esm/pages/TransactionDetailsPage/ContactSupportButton.d.ts.map +1 -1
- package/dist/esm/pages/TransactionDetailsPage/TransactionDetailsPage.js +2 -1
- package/dist/esm/pages/TransactionDetailsPage/TransactionDetailsPage.js.map +1 -1
- package/dist/esm/pages/TransactionDetailsPage/TransferIdCard.js +2 -1
- package/dist/esm/pages/TransactionDetailsPage/TransferIdCard.js.map +1 -1
- package/dist/esm/pages/TransactionPage/ConfirmToAddressSheet.d.ts +1 -2
- package/dist/esm/pages/TransactionPage/ConfirmToAddressSheet.d.ts.map +1 -1
- package/dist/esm/pages/TransactionPage/ExchangeRateBottomSheet.d.ts +2 -3
- package/dist/esm/pages/TransactionPage/ExchangeRateBottomSheet.d.ts.map +1 -1
- package/dist/esm/pages/TransactionPage/ExecutionDoneCard.d.ts +1 -2
- package/dist/esm/pages/TransactionPage/ExecutionDoneCard.d.ts.map +1 -1
- package/dist/esm/pages/TransactionPage/RouteTracker.d.ts +1 -2
- package/dist/esm/pages/TransactionPage/RouteTracker.d.ts.map +1 -1
- package/dist/esm/pages/TransactionPage/StartTransactionButton.d.ts +1 -2
- package/dist/esm/pages/TransactionPage/StartTransactionButton.d.ts.map +1 -1
- package/dist/esm/pages/TransactionPage/TokenValueBottomSheet.d.ts +1 -2
- package/dist/esm/pages/TransactionPage/TokenValueBottomSheet.d.ts.map +1 -1
- package/dist/esm/pages/TransactionPage/TokenValueBottomSheet.js +0 -1
- package/dist/esm/pages/TransactionPage/TokenValueBottomSheet.js.map +1 -1
- package/dist/esm/pages/TransactionPage/TokenVerificationBottomSheet.js +0 -1
- package/dist/esm/pages/TransactionPage/TokenVerificationBottomSheet.js.map +1 -1
- package/dist/esm/pages/TransactionPage/TransactionDoneButtons.d.ts +1 -2
- package/dist/esm/pages/TransactionPage/TransactionDoneButtons.d.ts.map +1 -1
- package/dist/esm/pages/TransactionPage/TransactionFailedButtons.js +38 -12
- package/dist/esm/pages/TransactionPage/TransactionFailedButtons.js.map +1 -1
- package/dist/esm/pages/TransactionPage/TransactionReview.js +22 -21
- package/dist/esm/pages/TransactionPage/TransactionReview.js.map +1 -1
- package/dist/esm/pages/TransactionPage/types.d.ts +1 -2
- package/dist/esm/pages/TransactionPage/types.d.ts.map +1 -1
- package/dist/esm/pages/TransactionPage/utils.d.ts +2 -3
- package/dist/esm/pages/TransactionPage/utils.d.ts.map +1 -1
- package/dist/esm/pages/TransactionPage/utils.js +23 -1
- package/dist/esm/pages/TransactionPage/utils.js.map +1 -1
- package/dist/esm/providers/I18nProvider/I18nProvider.d.ts +1 -2
- package/dist/esm/providers/I18nProvider/I18nProvider.d.ts.map +1 -1
- package/dist/esm/providers/I18nProvider/types.d.ts +4 -5
- package/dist/esm/providers/I18nProvider/types.d.ts.map +1 -1
- package/dist/esm/providers/QueryClientProvider.d.ts +1 -2
- package/dist/esm/providers/QueryClientProvider.d.ts.map +1 -1
- package/dist/esm/providers/SDKClientProvider.d.ts +2 -3
- package/dist/esm/providers/SDKClientProvider.d.ts.map +1 -1
- package/dist/esm/providers/WalletProvider/WalletProvider.d.ts +1 -2
- package/dist/esm/providers/WalletProvider/WalletProvider.d.ts.map +1 -1
- package/dist/esm/providers/WidgetProvider/WidgetProvider.d.ts +2 -3
- package/dist/esm/providers/WidgetProvider/WidgetProvider.d.ts.map +1 -1
- package/dist/esm/providers/WidgetProvider/types.d.ts +2 -3
- package/dist/esm/providers/WidgetProvider/types.d.ts.map +1 -1
- package/dist/esm/shared.d.ts +2 -1
- package/dist/esm/shared.js +2 -1
- package/dist/esm/stores/StoreProvider.d.ts +1 -2
- package/dist/esm/stores/StoreProvider.d.ts.map +1 -1
- package/dist/esm/stores/StoreProvider.js +10 -6
- package/dist/esm/stores/StoreProvider.js.map +1 -1
- package/dist/esm/stores/bookmarks/BookmarkStore.d.ts +1 -2
- package/dist/esm/stores/bookmarks/BookmarkStore.d.ts.map +1 -1
- package/dist/esm/stores/bookmarks/types.d.ts +5 -6
- package/dist/esm/stores/bookmarks/types.d.ts.map +1 -1
- package/dist/esm/stores/chains/ChainOrderStore.d.ts +1 -2
- package/dist/esm/stores/chains/ChainOrderStore.d.ts.map +1 -1
- package/dist/esm/stores/chains/ChainOrderStore.js +11 -5
- package/dist/esm/stores/chains/ChainOrderStore.js.map +1 -1
- package/dist/esm/stores/chains/types.d.ts +1 -2
- package/dist/esm/stores/chains/types.d.ts.map +1 -1
- package/dist/esm/stores/form/types.d.ts +20 -21
- package/dist/esm/stores/form/types.d.ts.map +1 -1
- package/dist/esm/stores/form/useFieldActions.d.ts +1 -2
- package/dist/esm/stores/form/useFieldActions.d.ts.map +1 -1
- package/dist/esm/stores/form/useFieldValues.d.ts +1 -2
- package/dist/esm/stores/form/useFieldValues.d.ts.map +1 -1
- package/dist/esm/stores/header/types.d.ts +1 -2
- package/dist/esm/stores/header/types.d.ts.map +1 -1
- package/dist/esm/stores/header/useHeaderStore.d.ts +2 -3
- package/dist/esm/stores/header/useHeaderStore.d.ts.map +1 -1
- package/dist/esm/stores/inputMode/useInputModeStore.d.ts +1 -2
- package/dist/esm/stores/inputMode/useInputModeStore.d.ts.map +1 -1
- package/dist/esm/stores/recentTokens/RecentTokensStore.js +23 -0
- package/dist/esm/stores/recentTokens/RecentTokensStore.js.map +1 -0
- package/dist/esm/stores/recentTokens/createRecentTokensStore.js +54 -0
- package/dist/esm/stores/recentTokens/createRecentTokensStore.js.map +1 -0
- package/dist/esm/stores/recentTokens/utils.js +15 -0
- package/dist/esm/stores/recentTokens/utils.js.map +1 -0
- package/dist/esm/stores/routes/RouteExecutionStore.d.ts +2 -3
- package/dist/esm/stores/routes/RouteExecutionStore.d.ts.map +1 -1
- package/dist/esm/stores/routes/types.d.ts +3 -4
- package/dist/esm/stores/routes/types.d.ts.map +1 -1
- package/dist/esm/stores/routes/utils.d.ts +4 -5
- package/dist/esm/stores/routes/utils.d.ts.map +1 -1
- package/dist/esm/stores/settings/SettingsStore.d.ts +2 -3
- package/dist/esm/stores/settings/SettingsStore.d.ts.map +1 -1
- package/dist/esm/stores/settings/types.d.ts +2 -3
- package/dist/esm/stores/settings/types.d.ts.map +1 -1
- package/dist/esm/stores/types.d.ts +2 -3
- package/dist/esm/stores/types.d.ts.map +1 -1
- package/dist/esm/themes/azureLight.d.ts +1 -2
- package/dist/esm/themes/azureLight.d.ts.map +1 -1
- package/dist/esm/themes/jumper.d.ts +1 -2
- package/dist/esm/themes/jumper.d.ts.map +1 -1
- package/dist/esm/themes/palettes.d.ts +3 -4
- package/dist/esm/themes/palettes.d.ts.map +1 -1
- package/dist/esm/themes/types.d.ts +1 -0
- package/dist/esm/themes/watermelonLight.d.ts +1 -2
- package/dist/esm/themes/watermelonLight.d.ts.map +1 -1
- package/dist/esm/themes/windows95.d.ts +1 -2
- package/dist/esm/themes/windows95.d.ts.map +1 -1
- package/dist/esm/types/events.d.ts +13 -14
- package/dist/esm/types/events.d.ts.map +1 -1
- package/dist/esm/types/token.d.ts +4 -2
- package/dist/esm/types/token.d.ts.map +1 -1
- package/dist/esm/types/widget.d.ts +55 -51
- package/dist/esm/types/widget.d.ts.map +1 -1
- package/dist/esm/types/widget.js.map +1 -1
- package/dist/esm/utils/address.js +19 -0
- package/dist/esm/utils/address.js.map +1 -0
- package/dist/esm/utils/compactNumberFormatter.d.ts +1 -2
- package/dist/esm/utils/compactNumberFormatter.d.ts.map +1 -1
- package/dist/esm/utils/converters.d.ts +1 -2
- package/dist/esm/utils/converters.d.ts.map +1 -1
- package/dist/esm/utils/currencyExtendedFormatter.d.ts +1 -2
- package/dist/esm/utils/currencyExtendedFormatter.d.ts.map +1 -1
- package/dist/esm/utils/customReceiver.js +6 -1
- package/dist/esm/utils/customReceiver.js.map +1 -1
- package/dist/esm/utils/elements.d.ts +2 -3
- package/dist/esm/utils/elements.d.ts.map +1 -1
- package/dist/esm/utils/enum.d.ts +1 -2
- package/dist/esm/utils/enum.d.ts.map +1 -1
- package/dist/esm/utils/fees.d.ts +2 -3
- package/dist/esm/utils/fees.d.ts.map +1 -1
- package/dist/esm/utils/format.d.ts +8 -9
- package/dist/esm/utils/format.d.ts.map +1 -1
- package/dist/esm/utils/getPriceImpact.d.ts +1 -2
- package/dist/esm/utils/getPriceImpact.d.ts.map +1 -1
- package/dist/esm/utils/input.d.ts +1 -2
- package/dist/esm/utils/input.d.ts.map +1 -1
- package/dist/esm/utils/navigationRoutes.d.ts +2 -3
- package/dist/esm/utils/navigationRoutes.d.ts.map +1 -1
- package/dist/esm/utils/percentFormatter.d.ts +1 -2
- package/dist/esm/utils/percentFormatter.d.ts.map +1 -1
- package/dist/esm/utils/recentTokens.js +97 -0
- package/dist/esm/utils/recentTokens.js.map +1 -0
- package/dist/esm/utils/token.js +30 -4
- package/dist/esm/utils/token.js.map +1 -1
- package/dist/esm/utils/tokenList.js +18 -6
- package/dist/esm/utils/tokenList.js.map +1 -1
- package/dist/esm/utils/tokenListBands.js +85 -0
- package/dist/esm/utils/tokenListBands.js.map +1 -0
- package/dist/esm/utils/url.d.ts +5 -0
- package/dist/esm/utils/url.d.ts.map +1 -0
- package/dist/esm/utils/url.js +17 -0
- package/dist/esm/utils/url.js.map +1 -0
- package/dist/esm/utils/wallet.d.ts +1 -2
- package/dist/esm/utils/wallet.d.ts.map +1 -1
- package/package.json +9 -9
- package/src/components/AmountInputCard/ReceiveAmountCard.tsx +16 -3
- package/src/components/BottomSheet/BottomSheet.tsx +3 -0
- package/src/components/Token/Token.tsx +2 -1
- package/src/components/TokenList/RecentTokensHeader.tsx +52 -0
- package/src/components/TokenList/RecentTokensToggle.tsx +45 -0
- package/src/components/TokenList/RemoveRecentTokenButton.tsx +38 -0
- package/src/components/TokenList/TokenList.tsx +92 -3
- package/src/components/TokenList/TokenListItem.tsx +15 -0
- package/src/components/TokenList/VirtualizedTokenList.tsx +84 -125
- package/src/components/TokenList/types.ts +9 -0
- package/src/config/version.ts +1 -1
- package/src/hooks/useDisplayedTokens.ts +17 -3
- package/src/hooks/useExplorer.test.tsx +106 -0
- package/src/hooks/useExplorer.ts +11 -5
- package/src/hooks/useRecentTokens.ts +88 -0
- package/src/hooks/useRoutes.ts +8 -5
- package/src/hooks/useToAddressRequirements.ts +11 -5
- package/src/hooks/useTokenBalances.ts +34 -31
- package/src/hooks/useTokenSearch.ts +5 -14
- package/src/hooks/useTokens.ts +69 -27
- package/src/pages/SendToWallet/BookmarksPage.tsx +3 -3
- package/src/pages/SendToWallet/ConnectedWalletsPage.tsx +3 -3
- package/src/pages/SendToWallet/RecentWalletsPage.tsx +3 -3
- package/src/pages/SendToWallet/SendToConfiguredWalletPage.tsx +3 -3
- package/src/pages/TransactionDetailsPage/TransactionDetailsPage.tsx +5 -5
- package/src/pages/TransactionDetailsPage/TransferIdCard.tsx +2 -1
- package/src/pages/TransactionPage/TokenValueBottomSheet.tsx +1 -1
- package/src/pages/TransactionPage/TokenVerificationBottomSheet.tsx +1 -1
- package/src/pages/TransactionPage/TransactionFailedButtons.tsx +62 -26
- package/src/pages/TransactionPage/TransactionReview.tsx +36 -37
- package/src/pages/TransactionPage/utils.ts +78 -0
- package/src/shared.ts +1 -0
- package/src/stores/StoreProvider.tsx +10 -7
- package/src/stores/chains/ChainOrderStore.test.tsx +298 -0
- package/src/stores/chains/ChainOrderStore.tsx +25 -6
- package/src/stores/recentTokens/RecentTokensStore.tsx +39 -0
- package/src/stores/recentTokens/createRecentTokensStore.ts +107 -0
- package/src/stores/recentTokens/types.ts +37 -0
- package/src/stores/recentTokens/utils.ts +18 -0
- package/src/types/token.ts +2 -0
- package/src/types/widget.ts +5 -0
- package/src/utils/address.ts +21 -0
- package/src/utils/customReceiver.ts +24 -0
- package/src/utils/recentTokens.ts +187 -0
- package/src/utils/token.ts +69 -10
- package/src/utils/tokenList.ts +41 -23
- package/src/utils/tokenListBands.ts +181 -0
- package/src/utils/url.ts +17 -0
|
@@ -7,7 +7,6 @@ interface FeeBreakdownTooltipProps {
|
|
|
7
7
|
gasless?: boolean;
|
|
8
8
|
children: ReactElement<any, any>;
|
|
9
9
|
}
|
|
10
|
-
declare const FeeBreakdownTooltip: React.FC<FeeBreakdownTooltipProps>;
|
|
10
|
+
export declare const FeeBreakdownTooltip: React.FC<FeeBreakdownTooltipProps>;
|
|
11
11
|
//#endregion
|
|
12
|
-
export { FeeBreakdownTooltip };
|
|
13
12
|
//# sourceMappingURL=FeeBreakdownTooltip.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeeBreakdownTooltip.d.ts","names":[],"sources":["../../../src/components/FeeBreakdownTooltip.tsx"],"mappings":";;;UAOU;EACR,WAAW;EACX,WAAW;EACX;EACA,UAAU;;
|
|
1
|
+
{"version":3,"file":"FeeBreakdownTooltip.d.ts","names":[],"sources":["../../../src/components/FeeBreakdownTooltip.tsx"],"mappings":";;;UAOU;EACR,WAAW;EACX,WAAW;EACX;EACA,UAAU;;qBAGC,qBAAqB,MAAM,GAAG"}
|
|
@@ -5,7 +5,6 @@ interface IconCircleProps extends Omit<BoxProps, "color"> {
|
|
|
5
5
|
status: StatusIcon;
|
|
6
6
|
size?: number;
|
|
7
7
|
}
|
|
8
|
-
declare const IconCircle: React.FC<IconCircleProps>;
|
|
8
|
+
export declare const IconCircle: React.FC<IconCircleProps>;
|
|
9
9
|
//#endregion
|
|
10
|
-
export { IconCircle };
|
|
11
10
|
//# sourceMappingURL=IconCircle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconCircle.d.ts","names":[],"sources":["../../../../src/components/IconCircle/IconCircle.tsx"],"mappings":";;;UASU,wBAAwB,KAAK;EACrC,QAAQ;EACR;;
|
|
1
|
+
{"version":3,"file":"IconCircle.d.ts","names":[],"sources":["../../../../src/components/IconCircle/IconCircle.tsx"],"mappings":";;;UASU,wBAAwB,KAAK;EACrC,QAAQ;EACR;;qBAGW,YAAY,MAAM,GAAG"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import "@mui/material";
|
|
2
2
|
//#region src/components/IconCircle/statusIcons.d.ts
|
|
3
|
-
type StatusIcon = "success" | "error" | "warning" | "info";
|
|
3
|
+
export type StatusIcon = "success" | "error" | "warning" | "info";
|
|
4
4
|
//#endregion
|
|
5
|
-
export { StatusIcon };
|
|
6
5
|
//# sourceMappingURL=statusIcons.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"statusIcons.d.ts","names":[],"sources":["../../../../src/components/IconCircle/statusIcons.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"statusIcons.d.ts","names":[],"sources":["../../../../src/components/IconCircle/statusIcons.ts"],"mappings":";;YAMY"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { BoxProps } from "@mui/material";
|
|
3
3
|
//#region src/components/IconTypography.d.ts
|
|
4
|
-
declare const IconTypography: React.FC<BoxProps>;
|
|
4
|
+
export declare const IconTypography: React.FC<BoxProps>;
|
|
5
5
|
//#endregion
|
|
6
|
-
export { IconTypography };
|
|
7
6
|
//# sourceMappingURL=IconTypography.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconTypography.d.ts","names":[],"sources":["../../../src/components/IconTypography.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"IconTypography.d.ts","names":[],"sources":["../../../src/components/IconTypography.ts"],"mappings":";;;qBAIa,gBAAgB,MAAM,GAAG"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ListItemButton as ListItemButton$1 } from "../ListItemButton.js";
|
|
2
2
|
import React from "react";
|
|
3
3
|
//#region src/components/ListItem/ListItemButton.d.ts
|
|
4
|
-
declare const ListItemButton: React.FC<React.ComponentProps<typeof ListItemButton$1>>;
|
|
4
|
+
export declare const ListItemButton: React.FC<React.ComponentProps<typeof ListItemButton$1>>;
|
|
5
5
|
//#endregion
|
|
6
|
-
export { ListItemButton };
|
|
7
6
|
//# sourceMappingURL=ListItemButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItemButton.d.ts","names":[],"sources":["../../../../src/components/ListItem/ListItemButton.tsx"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"ListItemButton.d.ts","names":[],"sources":["../../../../src/components/ListItem/ListItemButton.tsx"],"mappings":";;;qBAIa,gBAAgB,MAAM,GACjC,MAAM,sBAAsB"}
|
|
@@ -5,7 +5,6 @@ type WarningMessagesProps = BoxProps & {
|
|
|
5
5
|
route?: Route;
|
|
6
6
|
allowInteraction?: boolean;
|
|
7
7
|
};
|
|
8
|
-
declare const WarningMessages: React.FC<WarningMessagesProps>;
|
|
8
|
+
export declare const WarningMessages: React.FC<WarningMessagesProps>;
|
|
9
9
|
//#endregion
|
|
10
|
-
export { WarningMessages };
|
|
11
10
|
//# sourceMappingURL=WarningMessages.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WarningMessages.d.ts","names":[],"sources":["../../../../src/components/Messages/WarningMessages.tsx"],"mappings":";;;KAYK,uBAAuB;EAC1B,QAAQ;EACR;;
|
|
1
|
+
{"version":3,"file":"WarningMessages.d.ts","names":[],"sources":["../../../../src/components/Messages/WarningMessages.tsx"],"mappings":";;;KAYK,uBAAuB;EAC1B,QAAQ;EACR;;qBAGW,iBAAiB,MAAM,GAAG"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Container, ContainerProps } from "@mui/material";
|
|
3
3
|
//#region src/components/PageContainer.d.ts
|
|
4
|
-
interface PageContainerProps extends ContainerProps {
|
|
4
|
+
export interface PageContainerProps extends ContainerProps {
|
|
5
5
|
halfGutters?: boolean;
|
|
6
6
|
topGutters?: boolean;
|
|
7
7
|
bottomGutters?: boolean;
|
|
8
8
|
}
|
|
9
|
-
declare const PageContainer: React.FC<React.ComponentProps<typeof Container> & PageContainerProps>;
|
|
9
|
+
export declare const PageContainer: React.FC<React.ComponentProps<typeof Container> & PageContainerProps>;
|
|
10
10
|
//#endregion
|
|
11
|
-
export { PageContainer, PageContainerProps };
|
|
12
11
|
//# sourceMappingURL=PageContainer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageContainer.d.ts","names":[],"sources":["../../../src/components/PageContainer.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"PageContainer.d.ts","names":[],"sources":["../../../src/components/PageContainer.ts"],"mappings":";;;iBAIiB,2BAA2B;EAC1C;EACA;EACA;;qBAGW,eAAe,MAAM,GAChC,MAAM,sBAAsB,aAAa"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PoweredBy.d.ts","names":[],"sources":["../../../../src/components/PoweredBy/PoweredBy.tsx"],"mappings":";
|
|
1
|
+
{"version":3,"file":"PoweredBy.d.ts","names":[],"sources":["../../../../src/components/PoweredBy/PoweredBy.tsx"],"mappings":";qBAgBa,WAAW,MAAM"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { IconButtonProps } from "@mui/material";
|
|
2
2
|
//#region src/components/ProgressToNextUpdate.d.ts
|
|
3
|
-
declare const ProgressToNextUpdate: React.FC<{
|
|
3
|
+
export declare const ProgressToNextUpdate: React.FC<{
|
|
4
4
|
updatedAt: number;
|
|
5
5
|
timeToUpdate: number;
|
|
6
6
|
isLoading?: boolean;
|
|
7
7
|
} & IconButtonProps>;
|
|
8
8
|
//#endregion
|
|
9
|
-
export { ProgressToNextUpdate };
|
|
10
9
|
//# sourceMappingURL=ProgressToNextUpdate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressToNextUpdate.d.ts","names":[],"sources":["../../../src/components/ProgressToNextUpdate.tsx"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"ProgressToNextUpdate.d.ts","names":[],"sources":["../../../src/components/ProgressToNextUpdate.tsx"],"mappings":";;qBAWa,sBAAsB,MAAM;EAErC;EACA;EACA;IACE"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { CardProps } from "../Card/Card.js";
|
|
2
2
|
import { RouteCardProps } from "./types.js";
|
|
3
3
|
//#region src/components/RouteCard/RouteCard.d.ts
|
|
4
|
-
declare const RouteCard: React.FC<RouteCardProps & Omit<CardProps, "variant">>;
|
|
4
|
+
export declare const RouteCard: React.FC<RouteCardProps & Omit<CardProps, "variant">>;
|
|
5
5
|
//#endregion
|
|
6
|
-
export { RouteCard };
|
|
7
6
|
//# sourceMappingURL=RouteCard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RouteCard.d.ts","names":[],"sources":["../../../../src/components/RouteCard/RouteCard.tsx"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"RouteCard.d.ts","names":[],"sources":["../../../../src/components/RouteCard/RouteCard.tsx"],"mappings":";;;qBAca,WAAW,MAAM,GAC5B,iBAAiB,KAAK"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { CardProps } from "../Card/Card.js";
|
|
2
2
|
import { RouteCardSkeletonProps } from "./types.js";
|
|
3
3
|
//#region src/components/RouteCard/RouteCardSkeleton.d.ts
|
|
4
|
-
declare const RouteCardSkeleton: React.FC<RouteCardSkeletonProps & Omit<CardProps, "variant">>;
|
|
4
|
+
export declare const RouteCardSkeleton: React.FC<RouteCardSkeletonProps & Omit<CardProps, "variant">>;
|
|
5
5
|
//#endregion
|
|
6
|
-
export { RouteCardSkeleton };
|
|
7
6
|
//# sourceMappingURL=RouteCardSkeleton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RouteCardSkeleton.d.ts","names":[],"sources":["../../../../src/components/RouteCard/RouteCardSkeleton.tsx"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"RouteCardSkeleton.d.ts","names":[],"sources":["../../../../src/components/RouteCard/RouteCardSkeleton.tsx"],"mappings":";;;qBAOa,mBAAmB,MAAM,GACpC,yBAAyB,KAAK"}
|
|
@@ -4,7 +4,6 @@ import { JSX } from "react";
|
|
|
4
4
|
interface RouteDetailsProps {
|
|
5
5
|
route: RouteExtended;
|
|
6
6
|
}
|
|
7
|
-
declare const RouteDetails: ({ route }: RouteDetailsProps) => JSX.Element;
|
|
7
|
+
export declare const RouteDetails: ({ route }: RouteDetailsProps) => JSX.Element;
|
|
8
8
|
//#endregion
|
|
9
|
-
export { RouteDetails };
|
|
10
9
|
//# sourceMappingURL=RouteDetails.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RouteDetails.d.ts","names":[],"sources":["../../../../src/components/RouteCard/RouteDetails.tsx"],"mappings":";;;UAyBU;EACR,OAAO;;
|
|
1
|
+
{"version":3,"file":"RouteDetails.d.ts","names":[],"sources":["../../../../src/components/RouteCard/RouteDetails.tsx"],"mappings":";;;UAyBU;EACR,OAAO;;qBAGI,iBAAkB,SAAS,sBAAoB,IAAI"}
|
|
@@ -2,11 +2,10 @@ import React from "react";
|
|
|
2
2
|
import { Box, Typography } from "@mui/material";
|
|
3
3
|
import InfoOutlined from "@mui/icons-material/InfoOutlined";
|
|
4
4
|
//#region src/components/RouteCard/RouteDetails.style.d.ts
|
|
5
|
-
declare const DetailRow: React.FC<React.ComponentProps<typeof Box>>;
|
|
6
|
-
declare const DetailLabelContainer: React.FC<React.ComponentProps<typeof Box>>;
|
|
7
|
-
declare const DetailLabel: React.FC<React.ComponentProps<typeof Typography>>;
|
|
8
|
-
declare const DetailValue: React.FC<React.ComponentProps<typeof Typography>>;
|
|
9
|
-
declare const DetailInfoIcon: React.FC<React.ComponentProps<typeof InfoOutlined>>;
|
|
5
|
+
export declare const DetailRow: React.FC<React.ComponentProps<typeof Box>>;
|
|
6
|
+
export declare const DetailLabelContainer: React.FC<React.ComponentProps<typeof Box>>;
|
|
7
|
+
export declare const DetailLabel: React.FC<React.ComponentProps<typeof Typography>>;
|
|
8
|
+
export declare const DetailValue: React.FC<React.ComponentProps<typeof Typography>>;
|
|
9
|
+
export declare const DetailInfoIcon: React.FC<React.ComponentProps<typeof InfoOutlined>>;
|
|
10
10
|
//#endregion
|
|
11
|
-
export { DetailInfoIcon, DetailLabel, DetailLabelContainer, DetailRow, DetailValue };
|
|
12
11
|
//# sourceMappingURL=RouteDetails.style.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RouteDetails.style.d.ts","names":[],"sources":["../../../../src/components/RouteCard/RouteDetails.style.tsx"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"RouteDetails.style.d.ts","names":[],"sources":["../../../../src/components/RouteCard/RouteDetails.style.tsx"],"mappings":";;;;qBAIa,WAAW,MAAM,GAAG,MAAM,sBAAsB;qBAShD,sBAAsB,MAAM,GAAG,MAAM,sBAAsB;qBAO3D,aAAa,MAAM,GAAG,MAAM,sBAAsB;qBAQlD,aAAa,MAAM,GAAG,MAAM,sBAAsB;qBAQlD,gBAAgB,MAAM,GACjC,MAAM,sBAAsB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RouteNotFoundCard.d.ts","names":[],"sources":["../../../../src/components/RouteCard/RouteNotFoundCard.tsx"],"mappings":";
|
|
1
|
+
{"version":3,"file":"RouteNotFoundCard.d.ts","names":[],"sources":["../../../../src/components/RouteCard/RouteNotFoundCard.tsx"],"mappings":";qBAIa,mBAAmB,MAAM"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { RouteExtended } from "@lifi/sdk";
|
|
2
2
|
//#region src/components/RouteCard/RouteTokens.d.ts
|
|
3
|
-
declare const RouteTokens: React.FC<{
|
|
3
|
+
export declare const RouteTokens: React.FC<{
|
|
4
4
|
route: RouteExtended;
|
|
5
5
|
showEssentials?: boolean;
|
|
6
6
|
defaultExpanded?: boolean;
|
|
7
7
|
fromSlot?: React.ReactNode;
|
|
8
8
|
}>;
|
|
9
9
|
//#endregion
|
|
10
|
-
export { RouteTokens };
|
|
11
10
|
//# sourceMappingURL=RouteTokens.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RouteTokens.d.ts","names":[],"sources":["../../../../src/components/RouteCard/RouteTokens.tsx"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"RouteTokens.d.ts","names":[],"sources":["../../../../src/components/RouteCard/RouteTokens.tsx"],"mappings":";;qBAOa,aAAa,MAAM;EAC9B,OAAO;EACP;EACA;EACA,WAAW,MAAM"}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { Route, RouteExtended } from "@lifi/sdk";
|
|
2
2
|
//#region src/components/RouteCard/types.d.ts
|
|
3
|
-
interface RouteCardProps {
|
|
3
|
+
export interface RouteCardProps {
|
|
4
4
|
route: Route;
|
|
5
5
|
variant?: "default" | "cardless";
|
|
6
6
|
active?: boolean;
|
|
7
7
|
expanded?: boolean;
|
|
8
8
|
}
|
|
9
|
-
interface RouteCardSkeletonProps {
|
|
9
|
+
export interface RouteCardSkeletonProps {
|
|
10
10
|
variant?: "default" | "cardless";
|
|
11
11
|
}
|
|
12
12
|
//#endregion
|
|
13
|
-
export { RouteCardProps, RouteCardSkeletonProps };
|
|
14
13
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","names":[],"sources":["../../../../src/components/RouteCard/types.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"types.d.ts","names":[],"sources":["../../../../src/components/RouteCard/types.ts"],"mappings":";;iBAEiB;EACf,OAAO;EACP;EACA;EACA;;iBAOe;EACf"}
|
|
@@ -11,7 +11,6 @@ interface SearchInputProps {
|
|
|
11
11
|
autoFocus?: boolean;
|
|
12
12
|
size?: "small" | "medium";
|
|
13
13
|
}
|
|
14
|
-
declare const SearchInput: ({ inputRef, name, placeholder, onChange, onBlur, onClear, value, autoFocus, size }: SearchInputProps) => JSX.Element;
|
|
14
|
+
export declare const SearchInput: ({ inputRef, name, placeholder, onChange, onBlur, onClear, value, autoFocus, size }: SearchInputProps) => JSX.Element;
|
|
15
15
|
//#endregion
|
|
16
|
-
export { SearchInput };
|
|
17
16
|
//# sourceMappingURL=SearchInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchInput.d.ts","names":[],"sources":["../../../../src/components/Search/SearchInput.tsx"],"mappings":";;UAYU;EACR,WAAW,UAAU;EACrB;EACA;EACA;EACA,WAAW,mBAAmB;EAC9B,SAAS,kBAAkB;EAC3B;EACA;EACA;;
|
|
1
|
+
{"version":3,"file":"SearchInput.d.ts","names":[],"sources":["../../../../src/components/Search/SearchInput.tsx"],"mappings":";;UAYU;EACR,WAAW,UAAU;EACrB;EACA;EACA;EACA,WAAW,mBAAmB;EAC9B,SAAS,kBAAkB;EAC3B;EACA;EACA;;qBAGW,gBACX,UACA,MACA,aACA,UACA,QACA,SACA,OACA,WACA,QACC,qBAAmB,IAAI"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { CardProps } from "../Card/Card.js";
|
|
2
2
|
//#region src/components/SendToWallet/SendToWalletButton.d.ts
|
|
3
|
-
declare const SendToWalletButton: React.FC<CardProps & {
|
|
3
|
+
export declare const SendToWalletButton: React.FC<CardProps & {
|
|
4
4
|
onEditAddress?: (() => void) | null;
|
|
5
5
|
onClearAddress?: () => void;
|
|
6
6
|
requireAddress?: boolean;
|
|
7
7
|
}>;
|
|
8
8
|
//#endregion
|
|
9
|
-
export { SendToWalletButton };
|
|
10
9
|
//# sourceMappingURL=SendToWalletButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SendToWalletButton.d.ts","names":[],"sources":["../../../../src/components/SendToWallet/SendToWalletButton.tsx"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"SendToWalletButton.d.ts","names":[],"sources":["../../../../src/components/SendToWallet/SendToWalletButton.tsx"],"mappings":";;qBA6Ba,oBAAoB,MAAM,GACrC;EACE;EACA;EAIA"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { WidgetConfigPartialProps } from "../../types/widget.js";
|
|
2
2
|
import { JSX } from "react";
|
|
3
3
|
//#region src/components/Skeleton/WidgetSkeleton.d.ts
|
|
4
|
-
declare const WidgetSkeleton: ({ config }: WidgetConfigPartialProps) => JSX.Element;
|
|
4
|
+
export declare const WidgetSkeleton: ({ config }: WidgetConfigPartialProps) => JSX.Element;
|
|
5
5
|
//#endregion
|
|
6
|
-
export { WidgetSkeleton };
|
|
7
6
|
//# sourceMappingURL=WidgetSkeleton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WidgetSkeleton.d.ts","names":[],"sources":["../../../../src/components/Skeleton/WidgetSkeleton.tsx"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"WidgetSkeleton.d.ts","names":[],"sources":["../../../../src/components/Skeleton/WidgetSkeleton.tsx"],"mappings":";;;qBAkEa,mBACX,UACC,6BAA2B,IAAI"}
|
|
@@ -3,7 +3,6 @@ interface SentToWalletRowProps {
|
|
|
3
3
|
toAddress: string;
|
|
4
4
|
toChainId: number;
|
|
5
5
|
}
|
|
6
|
-
declare const SentToWalletRow: React.FC<SentToWalletRowProps>;
|
|
6
|
+
export declare const SentToWalletRow: React.FC<SentToWalletRowProps>;
|
|
7
7
|
//#endregion
|
|
8
|
-
export { SentToWalletRow };
|
|
9
8
|
//# sourceMappingURL=SentToWalletRow.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SentToWalletRow.d.ts","names":[],"sources":["../../../../src/components/StepActions/SentToWalletRow.tsx"],"mappings":";UAWU;EACR;EACA;;
|
|
1
|
+
{"version":3,"file":"SentToWalletRow.d.ts","names":[],"sources":["../../../../src/components/StepActions/SentToWalletRow.tsx"],"mappings":";UAWU;EACR;EACA;;qBAGW,iBAAiB,MAAM,GAAG"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Link } from "@mui/material";
|
|
3
3
|
//#region src/components/StepActions/StepActionRow.style.d.ts
|
|
4
|
-
declare const ExternalLink: React.FC<React.ComponentProps<typeof Link>>;
|
|
4
|
+
export declare const ExternalLink: React.FC<React.ComponentProps<typeof Link>>;
|
|
5
5
|
//#endregion
|
|
6
|
-
export { ExternalLink };
|
|
7
6
|
//# sourceMappingURL=StepActionRow.style.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StepActionRow.style.d.ts","names":[],"sources":["../../../../src/components/StepActions/StepActionRow.style.tsx"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"StepActionRow.style.d.ts","names":[],"sources":["../../../../src/components/StepActions/StepActionRow.style.tsx"],"mappings":";;;qBAGa,cAAc,MAAM,GAAG,MAAM,sBAAsB"}
|
|
@@ -6,7 +6,6 @@ interface StepActionsListProps {
|
|
|
6
6
|
toAddress?: string;
|
|
7
7
|
}
|
|
8
8
|
/** Non-animated list of completed execution step rows (transaction details view). */
|
|
9
|
-
declare const StepActionsList: React.FC<StepActionsListProps>;
|
|
9
|
+
export declare const StepActionsList: React.FC<StepActionsListProps>;
|
|
10
10
|
//#endregion
|
|
11
|
-
export { StepActionsList };
|
|
12
11
|
//# sourceMappingURL=StepActionsList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StepActionsList.d.ts","names":[],"sources":["../../../../src/components/StepActions/StepActionsList.tsx"],"mappings":";;;UAMU;EACR,OAAO;EACP;;;
|
|
1
|
+
{"version":3,"file":"StepActionsList.d.ts","names":[],"sources":["../../../../src/components/StepActions/StepActionsList.tsx"],"mappings":";;;UAMU;EACR,OAAO;EACP;;;qBAIW,iBAAiB,MAAM,GAAG"}
|
|
@@ -5,7 +5,7 @@ import { ReactNode } from "react";
|
|
|
5
5
|
* A row in an execution list: either a completed/failed action with an explorer
|
|
6
6
|
* link, or the recipient wallet row appended when a route has a `toAddress`.
|
|
7
7
|
*/
|
|
8
|
-
type ExecutionRow = {
|
|
8
|
+
export type ExecutionRow = {
|
|
9
9
|
kind: "action";
|
|
10
10
|
step: LiFiStepExtended;
|
|
11
11
|
action: ExecutionAction;
|
|
@@ -20,7 +20,6 @@ type ExecutionRow = {
|
|
|
20
20
|
* transaction link, plus a wallet row when `toAddress` is set. Shared by the
|
|
21
21
|
* static step lists and the animated checklist.
|
|
22
22
|
*/
|
|
23
|
-
declare function useExecutionRows(route: RouteExtended, toAddress?: string): ExecutionRow[];
|
|
23
|
+
export declare function useExecutionRows(route: RouteExtended, toAddress?: string): ExecutionRow[];
|
|
24
24
|
//#endregion
|
|
25
|
-
export { ExecutionRow, useExecutionRows };
|
|
26
25
|
//# sourceMappingURL=executionRows.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"executionRows.d.ts","names":[],"sources":["../../../../src/components/StepActions/executionRows.tsx"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"executionRows.d.ts","names":[],"sources":["../../../../src/components/StepActions/executionRows.tsx"],"mappings":";;;;;;;YAgBY;EAEN;EACA,MAAM;EACN,QAAQ;EACR;;EAEA;EAAgB;EAAmB;;;;;;;wBAOzB,iBACd,OAAO,eACP,qBACC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Token.d.ts","names":[],"sources":["../../../../src/components/Token/Token.tsx"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"Token.d.ts","names":[],"sources":["../../../../src/components/Token/Token.tsx"],"mappings":";;;;UAgBU;EACR,OAAO;EACP,cAAc;EACd;EACA,OAAO;EACP;EACA;EACA;;cAGW,SAAO,GAAG,aAAa"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { formatTokenAmount, formatTokenPrice } from "../../utils/format.js";
|
|
2
|
+
import { mergeFallbackToken } from "../../utils/token.js";
|
|
2
3
|
import { useChain } from "../../hooks/useChain.js";
|
|
3
4
|
import { useToken } from "../../hooks/useToken.js";
|
|
4
5
|
import { getPriceImpact } from "../../utils/getPriceImpact.js";
|
|
@@ -24,10 +25,7 @@ const Token = ({ token, ...other }) => {
|
|
|
24
25
|
const TokenFallback = ({ token, isLoading, ...other }) => {
|
|
25
26
|
const { token: chainToken, isLoading: isLoadingToken } = useToken(token.chainId, token.address);
|
|
26
27
|
return /* @__PURE__ */ jsx(TokenBase, {
|
|
27
|
-
token:
|
|
28
|
-
...token,
|
|
29
|
-
...chainToken
|
|
30
|
-
},
|
|
28
|
+
token: mergeFallbackToken(token, chainToken),
|
|
31
29
|
isLoading: isLoading || isLoadingToken,
|
|
32
30
|
...other
|
|
33
31
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Token.js","names":[],"sources":["../../../../src/components/Token/Token.tsx"],"sourcesContent":["import type { LiFiStep, TokenAmount } from '@lifi/sdk'\nimport type { BoxProps } from '@mui/material'\nimport { Box, Grow, Skeleton, Tooltip } from '@mui/material'\nimport type { FC, PropsWithChildren, ReactElement } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { useChain } from '../../hooks/useChain.js'\nimport { useToken } from '../../hooks/useToken.js'\nimport { formatTokenAmount, formatTokenPrice } from '../../utils/format.js'\nimport { getPriceImpact } from '../../utils/getPriceImpact.js'\nimport { AvatarBadgedSkeleton } from '../Avatar/Avatar.js'\nimport { SmallAvatar } from '../Avatar/SmallAvatar.js'\nimport { TokenAvatar } from '../Avatar/TokenAvatar.js'\nimport { TextFitter } from '../TextFitter/TextFitter.js'\nimport { TextSecondary, TextSecondaryContainer } from './Token.style.js'\n\ninterface TokenProps {\n token: TokenAmount\n impactToken?: TokenAmount\n enableImpactTokenTooltip?: boolean\n step?: LiFiStep\n stepVisible?: boolean\n disableDescription?: boolean\n isLoading?: boolean\n}\n\nexport const Token: FC<TokenProps & BoxProps> = ({ token, ...other }) => {\n if (!token.priceUSD || !token.logoURI) {\n return <TokenFallback token={token} {...other} />\n }\n return <TokenBase token={token} {...other} />\n}\n\nconst TokenFallback: FC<TokenProps & BoxProps> = ({\n token,\n isLoading,\n ...other\n}) => {\n const { token: chainToken, isLoading: isLoadingToken } = useToken(\n token.chainId,\n token.address\n )\n\n return (\n <TokenBase\n token={{ ...token, ...chainToken } as TokenAmount}\n isLoading={isLoading || isLoadingToken}\n {...other}\n />\n )\n}\n\nconst TokenBase: FC<TokenProps & BoxProps> = ({\n token,\n impactToken,\n enableImpactTokenTooltip,\n step,\n stepVisible,\n disableDescription,\n isLoading,\n ...other\n}) => {\n const { t, i18n } = useTranslation()\n const { chain } = useChain(token?.chainId)\n\n if (isLoading) {\n return (\n <TokenSkeleton\n token={token}\n step={step}\n disableDescription={disableDescription}\n {...other}\n />\n )\n }\n\n const tokenAmount = formatTokenAmount(token.amount, token.decimals)\n const tokenPrice = formatTokenPrice(\n token.amount,\n token.priceUSD,\n token.decimals\n )\n\n let priceImpact: number | undefined\n let priceImpactPercent: number | undefined\n if (impactToken) {\n priceImpact = getPriceImpact({\n fromToken: impactToken,\n fromAmount: impactToken.amount,\n toToken: token,\n toAmount: token.amount,\n })\n priceImpactPercent = priceImpact * 100\n }\n\n const tokenOnChain = !disableDescription ? (\n <TextSecondary>\n {t('main.tokenOnChain', {\n tokenSymbol: token.symbol,\n chainName: chain?.name,\n })}\n </TextSecondary>\n ) : null\n\n return (\n <Box\n {...other}\n sx={[\n {\n flex: 1,\n display: 'flex',\n alignItems: 'center',\n },\n ...(Array.isArray(other.sx) ? other.sx : [other.sx]),\n ]}\n >\n <TokenAvatar\n token={token}\n chain={chain}\n isLoading={isLoading}\n sx={{ marginRight: 2 }}\n />\n <Box\n sx={{\n flex: 1,\n }}\n >\n <Box\n sx={{\n mb: 0.5,\n height: 24,\n display: 'flex',\n alignItems: 'center',\n }}\n title={tokenAmount}\n >\n <TextFitter\n height={30}\n textStyle={{\n fontWeight: 700,\n }}\n >\n {t('format.tokenAmount', {\n value: tokenAmount,\n })}\n </TextFitter>\n </Box>\n <TextSecondaryContainer>\n <TextSecondary>\n {t('format.currency', {\n value: tokenPrice,\n })}\n </TextSecondary>\n {impactToken ? (\n <TextSecondary sx={{ px: 0.5 }} dot>\n •\n </TextSecondary>\n ) : null}\n {impactToken ? (\n enableImpactTokenTooltip ? (\n <Tooltip title={t('tooltip.priceImpact')} sx={{ cursor: 'help' }}>\n <TextSecondary>\n {t('format.percent', {\n value: priceImpact,\n usePlusSign: true,\n })}\n </TextSecondary>\n </Tooltip>\n ) : (\n <TextSecondary\n title={priceImpactPercent?.toLocaleString(i18n.language, {\n maximumFractionDigits: 9,\n })}\n >\n {t('format.percent', { value: priceImpact, usePlusSign: true })}\n </TextSecondary>\n )\n ) : null}\n {!disableDescription ? (\n <TextSecondary sx={{ px: 0.5 }} dot>\n •\n </TextSecondary>\n ) : null}\n {!disableDescription && step ? (\n <TokenStep\n step={step}\n stepVisible={stepVisible}\n disableDescription={disableDescription}\n >\n {tokenOnChain}\n </TokenStep>\n ) : (\n tokenOnChain\n )}\n </TextSecondaryContainer>\n </Box>\n </Box>\n )\n}\n\nconst TokenStep: FC<PropsWithChildren<Partial<TokenProps>>> = ({\n step,\n stepVisible,\n disableDescription,\n children,\n}) => {\n return (\n <Box\n sx={{\n flex: 1,\n position: 'relative',\n overflow: 'hidden',\n height: 16,\n }}\n >\n <Grow\n in={!stepVisible && !disableDescription}\n style={{\n position: 'absolute',\n }}\n appear={false}\n timeout={225}\n >\n <Box\n sx={{\n display: 'flex',\n alignItems: 'center',\n height: 16,\n }}\n >\n {children as ReactElement}\n </Box>\n </Grow>\n <Grow\n in={stepVisible}\n style={{\n position: 'absolute',\n }}\n appear={false}\n timeout={225}\n >\n <Box\n sx={{\n display: 'flex',\n alignItems: 'center',\n height: 16,\n }}\n >\n <Box\n sx={{\n mr: 0.75,\n height: 16,\n }}\n >\n <SmallAvatar\n src={step?.toolDetails.logoURI}\n alt={step?.toolDetails.name}\n >\n {step?.toolDetails.name[0]}\n </SmallAvatar>\n </Box>\n <TextSecondary>{step?.toolDetails.name}</TextSecondary>\n </Box>\n </Grow>\n </Box>\n )\n}\n\nexport const TokenSkeleton: FC<Partial<TokenProps> & BoxProps> = ({\n step,\n disableDescription,\n ...other\n}) => {\n return (\n <Box\n {...other}\n sx={[\n {\n flex: 1,\n },\n ...(Array.isArray(other.sx) ? other.sx : [other.sx]),\n ]}\n >\n <Box\n sx={{\n display: 'flex',\n flex: 1,\n alignItems: 'center',\n }}\n >\n <AvatarBadgedSkeleton sx={{ marginRight: 2 }} />\n <Box\n sx={{\n flex: 1,\n }}\n >\n <Skeleton width={112} height={28} variant=\"text\" />\n <TextSecondaryContainer>\n <Skeleton\n width={48}\n height={12}\n variant=\"rounded\"\n sx={{ marginTop: 0.5 }}\n />\n {!step && !disableDescription ? (\n <Skeleton\n width={96}\n height={12}\n variant=\"rounded\"\n sx={{ marginTop: 0.5, marginLeft: 1.5 }}\n />\n ) : null}\n </TextSecondaryContainer>\n </Box>\n </Box>\n </Box>\n )\n}\n"],"mappings":";;;;;;;;;;;;;AAyBA,MAAa,SAAoC,EAAE,OAAO,GAAG,YAAY;CACvE,IAAI,CAAC,MAAM,YAAY,CAAC,MAAM,SAC5B,OAAO,oBAAC,eAAD;EAAsB;EAAO,GAAI;CAAQ,CAAA;CAElD,OAAO,oBAAC,WAAD;EAAkB;EAAO,GAAI;CAAQ,CAAA;AAC9C;AAEA,MAAM,iBAA4C,EAChD,OACA,WACA,GAAG,YACC;CACJ,MAAM,EAAE,OAAO,YAAY,WAAW,mBAAmB,SACvD,MAAM,SACN,MAAM,OACR;CAEA,OACE,oBAAC,WAAD;EACE,OAAO;GAAE,GAAG;GAAO,GAAG;EAAW;EACjC,WAAW,aAAa;EACxB,GAAI;CACL,CAAA;AAEL;AAEA,MAAM,aAAwC,EAC5C,OACA,aACA,0BACA,MACA,aACA,oBACA,WACA,GAAG,YACC;CACJ,MAAM,EAAE,GAAG,SAAS,eA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;MACvB,KAAK,MAAM,YAAY;MAEtB,UAAA,MAAM,YAAY,KAAK;KACb,CAAA;IACV,CAAA,GACL,oBAAC,eAAD,EAAA,UAAgB,MAAM,YAAY,KAAoB,CAAA,CACnD;;EACD,CAAA,CACH;;AAET;AAEA,MAAa,iBAAqD,EAChE,MACA,oBACA,GAAG,YACC;CACJ,OACE,oBAAC,KAAD;EACE,GAAI;EACJ,IAAI,CACF,EACE,MAAM,EACR,GACA,GAAI,MAAM,QAAQ,MAAM,EAAE,IAAI,MAAM,KAAK,CAAC,MAAM,EAAE,CACpD;EAEA,UAAA,qBAAC,KAAD;GACE,IAAI;IACF,SAAS;IACT,MAAM;IACN,YAAY;GACd;GALF,UAAA,CAOE,oBAAC,sBAAD,EAAsB,IAAI,EAAE,aAAa,EAAE,EAAI,CAAA,GAC/C,qBAAC,KAAD;IACE,IAAI,EACF,MAAM,EACR;IAHF,UAAA,CAKE,oBAAC,UAAD;KAAU,OAAO;KAAK,QAAQ;KAAI,SAAQ;IAAQ,CAAA,GAClD,qBAAC,wBAAD,EAAA,UAAA,CACE,oBAAC,UAAD;KACE,OAAO;KACP,QAAQ;KACR,SAAQ;KACR,IAAI,EAAE,WAAW,GAAI;IACtB,CAAA,GACA,CAAC,QAAQ,CAAC,qBACT,oBAAC,UAAD;KACE,OAAO;KACP,QAAQ;KACR,SAAQ;KACR,IAAI;MAAE,WAAW;MAAK,YAAY;KAAI;IACvC,CAAA,IACC,IACkB,EAAA,CAAA,CACrB;GACF,CAAA,CAAA;;CACF,CAAA;AAET"}
|
|
1
|
+
{"version":3,"file":"Token.js","names":[],"sources":["../../../../src/components/Token/Token.tsx"],"sourcesContent":["import type { LiFiStep, TokenAmount } from '@lifi/sdk'\nimport type { BoxProps } from '@mui/material'\nimport { Box, Grow, Skeleton, Tooltip } from '@mui/material'\nimport type { FC, PropsWithChildren, ReactElement } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { useChain } from '../../hooks/useChain.js'\nimport { useToken } from '../../hooks/useToken.js'\nimport { formatTokenAmount, formatTokenPrice } from '../../utils/format.js'\nimport { getPriceImpact } from '../../utils/getPriceImpact.js'\nimport { mergeFallbackToken } from '../../utils/token.js'\nimport { AvatarBadgedSkeleton } from '../Avatar/Avatar.js'\nimport { SmallAvatar } from '../Avatar/SmallAvatar.js'\nimport { TokenAvatar } from '../Avatar/TokenAvatar.js'\nimport { TextFitter } from '../TextFitter/TextFitter.js'\nimport { TextSecondary, TextSecondaryContainer } from './Token.style.js'\n\ninterface TokenProps {\n token: TokenAmount\n impactToken?: TokenAmount\n enableImpactTokenTooltip?: boolean\n step?: LiFiStep\n stepVisible?: boolean\n disableDescription?: boolean\n isLoading?: boolean\n}\n\nexport const Token: FC<TokenProps & BoxProps> = ({ token, ...other }) => {\n if (!token.priceUSD || !token.logoURI) {\n return <TokenFallback token={token} {...other} />\n }\n return <TokenBase token={token} {...other} />\n}\n\nconst TokenFallback: FC<TokenProps & BoxProps> = ({\n token,\n isLoading,\n ...other\n}) => {\n const { token: chainToken, isLoading: isLoadingToken } = useToken(\n token.chainId,\n token.address\n )\n\n return (\n <TokenBase\n token={mergeFallbackToken(token, chainToken)}\n isLoading={isLoading || isLoadingToken}\n {...other}\n />\n )\n}\n\nconst TokenBase: FC<TokenProps & BoxProps> = ({\n token,\n impactToken,\n enableImpactTokenTooltip,\n step,\n stepVisible,\n disableDescription,\n isLoading,\n ...other\n}) => {\n const { t, i18n } = useTranslation()\n const { chain } = useChain(token?.chainId)\n\n if (isLoading) {\n return (\n <TokenSkeleton\n token={token}\n step={step}\n disableDescription={disableDescription}\n {...other}\n />\n )\n }\n\n const tokenAmount = formatTokenAmount(token.amount, token.decimals)\n const tokenPrice = formatTokenPrice(\n token.amount,\n token.priceUSD,\n token.decimals\n )\n\n let priceImpact: number | undefined\n let priceImpactPercent: number | undefined\n if (impactToken) {\n priceImpact = getPriceImpact({\n fromToken: impactToken,\n fromAmount: impactToken.amount,\n toToken: token,\n toAmount: token.amount,\n })\n priceImpactPercent = priceImpact * 100\n }\n\n const tokenOnChain = !disableDescription ? (\n <TextSecondary>\n {t('main.tokenOnChain', {\n tokenSymbol: token.symbol,\n chainName: chain?.name,\n })}\n </TextSecondary>\n ) : null\n\n return (\n <Box\n {...other}\n sx={[\n {\n flex: 1,\n display: 'flex',\n alignItems: 'center',\n },\n ...(Array.isArray(other.sx) ? other.sx : [other.sx]),\n ]}\n >\n <TokenAvatar\n token={token}\n chain={chain}\n isLoading={isLoading}\n sx={{ marginRight: 2 }}\n />\n <Box\n sx={{\n flex: 1,\n }}\n >\n <Box\n sx={{\n mb: 0.5,\n height: 24,\n display: 'flex',\n alignItems: 'center',\n }}\n title={tokenAmount}\n >\n <TextFitter\n height={30}\n textStyle={{\n fontWeight: 700,\n }}\n >\n {t('format.tokenAmount', {\n value: tokenAmount,\n })}\n </TextFitter>\n </Box>\n <TextSecondaryContainer>\n <TextSecondary>\n {t('format.currency', {\n value: tokenPrice,\n })}\n </TextSecondary>\n {impactToken ? (\n <TextSecondary sx={{ px: 0.5 }} dot>\n •\n </TextSecondary>\n ) : null}\n {impactToken ? (\n enableImpactTokenTooltip ? (\n <Tooltip title={t('tooltip.priceImpact')} sx={{ cursor: 'help' }}>\n <TextSecondary>\n {t('format.percent', {\n value: priceImpact,\n usePlusSign: true,\n })}\n </TextSecondary>\n </Tooltip>\n ) : (\n <TextSecondary\n title={priceImpactPercent?.toLocaleString(i18n.language, {\n maximumFractionDigits: 9,\n })}\n >\n {t('format.percent', { value: priceImpact, usePlusSign: true })}\n </TextSecondary>\n )\n ) : null}\n {!disableDescription ? (\n <TextSecondary sx={{ px: 0.5 }} dot>\n •\n </TextSecondary>\n ) : null}\n {!disableDescription && step ? (\n <TokenStep\n step={step}\n stepVisible={stepVisible}\n disableDescription={disableDescription}\n >\n {tokenOnChain}\n </TokenStep>\n ) : (\n tokenOnChain\n )}\n </TextSecondaryContainer>\n </Box>\n </Box>\n )\n}\n\nconst TokenStep: FC<PropsWithChildren<Partial<TokenProps>>> = ({\n step,\n stepVisible,\n disableDescription,\n children,\n}) => {\n return (\n <Box\n sx={{\n flex: 1,\n position: 'relative',\n overflow: 'hidden',\n height: 16,\n }}\n >\n <Grow\n in={!stepVisible && !disableDescription}\n style={{\n position: 'absolute',\n }}\n appear={false}\n timeout={225}\n >\n <Box\n sx={{\n display: 'flex',\n alignItems: 'center',\n height: 16,\n }}\n >\n {children as ReactElement}\n </Box>\n </Grow>\n <Grow\n in={stepVisible}\n style={{\n position: 'absolute',\n }}\n appear={false}\n timeout={225}\n >\n <Box\n sx={{\n display: 'flex',\n alignItems: 'center',\n height: 16,\n }}\n >\n <Box\n sx={{\n mr: 0.75,\n height: 16,\n }}\n >\n <SmallAvatar\n src={step?.toolDetails.logoURI}\n alt={step?.toolDetails.name}\n >\n {step?.toolDetails.name[0]}\n </SmallAvatar>\n </Box>\n <TextSecondary>{step?.toolDetails.name}</TextSecondary>\n </Box>\n </Grow>\n </Box>\n )\n}\n\nexport const TokenSkeleton: FC<Partial<TokenProps> & BoxProps> = ({\n step,\n disableDescription,\n ...other\n}) => {\n return (\n <Box\n {...other}\n sx={[\n {\n flex: 1,\n },\n ...(Array.isArray(other.sx) ? other.sx : [other.sx]),\n ]}\n >\n <Box\n sx={{\n display: 'flex',\n flex: 1,\n alignItems: 'center',\n }}\n >\n <AvatarBadgedSkeleton sx={{ marginRight: 2 }} />\n <Box\n sx={{\n flex: 1,\n }}\n >\n <Skeleton width={112} height={28} variant=\"text\" />\n <TextSecondaryContainer>\n <Skeleton\n width={48}\n height={12}\n variant=\"rounded\"\n sx={{ marginTop: 0.5 }}\n />\n {!step && !disableDescription ? (\n <Skeleton\n width={96}\n height={12}\n variant=\"rounded\"\n sx={{ marginTop: 0.5, marginLeft: 1.5 }}\n />\n ) : null}\n </TextSecondaryContainer>\n </Box>\n </Box>\n </Box>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;AA0BA,MAAa,SAAoC,EAAE,OAAO,GAAG,YAAY;CACvE,IAAI,CAA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B,CAAA,GACA,CAAC,QAAQ,CAAC,qBACT,oBAAC,UAAD;KACE,OAAO;KACP,QAAQ;KACR,SAAQ;KACR,IAAI;MAAE,WAAW;MAAK,YAAY;KAAI;IACvC,CAAA,IACC,IACkB,EAAA,CAAA,CACrB;GACF,CAAA,CAAA;;CACF,CAAA;AAET"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { FooterText, ToggleButton } from "../AmountInputCard/AmountInputCard.style.js";
|
|
2
|
+
import { Box, Typography } from "@mui/material";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { useTranslation } from "react-i18next";
|
|
5
|
+
//#region src/components/TokenList/RecentTokensHeader.tsx
|
|
6
|
+
const RecentTokensHeader = ({ atListStart, onClear }) => {
|
|
7
|
+
const { t } = useTranslation();
|
|
8
|
+
return /* @__PURE__ */ jsxs(Box, {
|
|
9
|
+
sx: {
|
|
10
|
+
width: "100%",
|
|
11
|
+
display: "flex",
|
|
12
|
+
alignItems: "center",
|
|
13
|
+
justifyContent: "space-between",
|
|
14
|
+
px: 1.5,
|
|
15
|
+
pt: atListStart ? 0 : 1,
|
|
16
|
+
pb: 1
|
|
17
|
+
},
|
|
18
|
+
children: [/* @__PURE__ */ jsx(Typography, {
|
|
19
|
+
sx: {
|
|
20
|
+
fontSize: 14,
|
|
21
|
+
fontWeight: 600,
|
|
22
|
+
lineHeight: "16px"
|
|
23
|
+
},
|
|
24
|
+
children: t("main.recentSearches")
|
|
25
|
+
}), onClear ? /* @__PURE__ */ jsx(ToggleButton, {
|
|
26
|
+
clickable: true,
|
|
27
|
+
sx: {
|
|
28
|
+
px: .75,
|
|
29
|
+
ml: 0,
|
|
30
|
+
mr: -.75
|
|
31
|
+
},
|
|
32
|
+
onClick: (e) => {
|
|
33
|
+
e.stopPropagation();
|
|
34
|
+
e.currentTarget.blur();
|
|
35
|
+
onClear();
|
|
36
|
+
},
|
|
37
|
+
children: /* @__PURE__ */ jsx(FooterText, { children: t("button.clear") })
|
|
38
|
+
}) : null]
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
//#endregion
|
|
42
|
+
export { RecentTokensHeader };
|
|
43
|
+
|
|
44
|
+
//# sourceMappingURL=RecentTokensHeader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RecentTokensHeader.js","names":[],"sources":["../../../../src/components/TokenList/RecentTokensHeader.tsx"],"sourcesContent":["import { Box, Typography } from '@mui/material'\nimport type { JSX } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport {\n FooterText,\n ToggleButton,\n} from '../AmountInputCard/AmountInputCard.style.js'\n\ninterface RecentTokensHeaderProps {\n atListStart: boolean\n onClear?: () => void\n}\n\nexport const RecentTokensHeader = ({\n atListStart,\n onClear,\n}: RecentTokensHeaderProps): JSX.Element => {\n const { t } = useTranslation()\n\n return (\n <Box\n sx={{\n // ListItem is a flex container; claim the width for space-between.\n width: '100%',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n px: 1.5,\n pt: atListStart ? 0 : 1,\n pb: 1,\n }}\n >\n <Typography sx={{ fontSize: 14, fontWeight: 600, lineHeight: '16px' }}>\n {t('main.recentSearches')}\n </Typography>\n {onClear ? (\n <ToggleButton\n clickable\n // Right-aligned, so the padding hangs past the right edge instead.\n sx={{ px: 0.75, ml: 0, mr: -0.75 }}\n onClick={(e) => {\n e.stopPropagation()\n e.currentTarget.blur()\n onClear()\n }}\n >\n <FooterText>{t('button.clear')}</FooterText>\n </ToggleButton>\n ) : null}\n </Box>\n )\n}\n"],"mappings":";;;;;AAaA,MAAa,sBAAsB,EACjC,aACA,cAC0C;CAC1C,MAAM,EAAE,MAAM,eAAe;CAE7B,OACE,qBAAC,KAAD;EACE,IAAI;GAEF,OAAO;GACP,SAAS;GACT,YAAY;GACZ,gBAAgB;GAChB,IAAI;GACJ,IAAI,cAAc,IAAI;GACtB,IAAI;EACN;EAVF,UAAA,CAYE,oBAAC,YAAD;GAAY,IAAI;IAAE,UAAU;IAAI,YAAY;IAAK,YAAY;GAAO;GACjE,UAAA,EAAE,qBAAqB;EACd,CAAA,GACX,UACC,oBAAC,cAAD;GACE,WAAA;GAEA,IAAI;IAAE,IAAI;IAAM,IAAI;IAAG,IAAI;GAAM;GACjC,UAAU,MAAM;IACd,EAAE,gBAAgB;IAClB,EAAE,cAAc,KAAK;IACrB,QAAQ;GACV;GAEA,UAAA,oBAAC,YAAD,EAAA,UAAa,EAAE,cAAc,EAAc,CAAA;EAC/B,CAAA,IACZ,IACD;;AAET"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { FooterText, ToggleButton } from "../AmountInputCard/AmountInputCard.style.js";
|
|
2
|
+
import { Box } from "@mui/material";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { useTranslation } from "react-i18next";
|
|
5
|
+
import ExpandLess from "@mui/icons-material/ExpandLess";
|
|
6
|
+
import ExpandMore from "@mui/icons-material/ExpandMore";
|
|
7
|
+
//#region src/components/TokenList/RecentTokensToggle.tsx
|
|
8
|
+
const RecentTokensToggle = ({ expanded, hiddenCount, onToggle }) => {
|
|
9
|
+
const { t } = useTranslation();
|
|
10
|
+
const ExpandIcon = expanded ? ExpandLess : ExpandMore;
|
|
11
|
+
return /* @__PURE__ */ jsx(Box, {
|
|
12
|
+
sx: {
|
|
13
|
+
width: "100%",
|
|
14
|
+
display: "flex",
|
|
15
|
+
px: 1.5,
|
|
16
|
+
pt: "1px",
|
|
17
|
+
pb: "7px"
|
|
18
|
+
},
|
|
19
|
+
children: /* @__PURE__ */ jsxs(ToggleButton, {
|
|
20
|
+
clickable: true,
|
|
21
|
+
onClick: (e) => {
|
|
22
|
+
e.stopPropagation();
|
|
23
|
+
e.currentTarget.blur();
|
|
24
|
+
onToggle();
|
|
25
|
+
},
|
|
26
|
+
children: [/* @__PURE__ */ jsx(FooterText, { children: expanded ? t("button.showLess") : t("button.showMore", { count: hiddenCount }) }), /* @__PURE__ */ jsx(ExpandIcon, { sx: {
|
|
27
|
+
fontSize: 14,
|
|
28
|
+
color: "text.secondary"
|
|
29
|
+
} })]
|
|
30
|
+
})
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
//#endregion
|
|
34
|
+
export { RecentTokensToggle };
|
|
35
|
+
|
|
36
|
+
//# sourceMappingURL=RecentTokensToggle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RecentTokensToggle.js","names":["ExpandLessIcon","ExpandMoreIcon"],"sources":["../../../../src/components/TokenList/RecentTokensToggle.tsx"],"sourcesContent":["import ExpandLessIcon from '@mui/icons-material/ExpandLess'\nimport ExpandMoreIcon from '@mui/icons-material/ExpandMore'\nimport { Box } from '@mui/material'\nimport type { JSX } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport {\n FooterText,\n ToggleButton,\n} from '../AmountInputCard/AmountInputCard.style.js'\n\ninterface RecentTokensToggleProps {\n expanded: boolean\n hiddenCount: number\n onToggle: () => void\n}\n\nexport const RecentTokensToggle = ({\n expanded,\n hiddenCount,\n onToggle,\n}: RecentTokensToggleProps): JSX.Element => {\n const { t } = useTranslation()\n const ExpandIcon = expanded ? ExpandLessIcon : ExpandMoreIcon\n\n return (\n // 1 + 18 + 7 fills the reserved 26px: text 8px below the band, 18px above the next header.\n <Box sx={{ width: '100%', display: 'flex', px: 1.5, pt: '1px', pb: '7px' }}>\n <ToggleButton\n clickable\n onClick={(e) => {\n e.stopPropagation()\n e.currentTarget.blur()\n onToggle()\n }}\n >\n <FooterText>\n {expanded\n ? t('button.showLess')\n : t('button.showMore', { count: hiddenCount })}\n </FooterText>\n <ExpandIcon sx={{ fontSize: 14, color: 'text.secondary' }} />\n </ToggleButton>\n </Box>\n )\n}\n"],"mappings":";;;;;;;AAgBA,MAAa,sBAAsB,EACjC,UACA,aACA,eAC0C;CAC1C,MAAM,EAAE,MAAM,eAAe;CAC7B,MAAM,aAAa,WAAWA,aAAiBC;CAE/C,OAEE,oBAAC,KAAD;EAAK,IAAI;GAAE,OAAO;GAAQ,SAAS;GAAQ,IAAI;GAAK,IAAI;GAAO,IAAI;EAAM;EACvE,UAAA,qBAAC,cAAD;GACE,WAAA;GACA,UAAU,MAAM;IACd,EAAE,gBAAgB;IAClB,EAAE,cAAc,KAAK;IACrB,SAAS;GACX;GANF,UAAA,CAQE,oBAAC,YAAD,EAAA,UACG,WACG,EAAE,iBAAiB,IACnB,EAAE,mBAAmB,EAAE,OAAO,YAAY,CAAC,EACrC,CAAA,GACZ,oBAAC,YAAD,EAAY,IAAI;IAAE,UAAU;IAAI,OAAO;GAAiB,EAAI,CAAA,CAChD;;CACX,CAAA;AAET"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { useRecentTokensStore } from "../../stores/recentTokens/RecentTokensStore.js";
|
|
2
|
+
import { IconButton } from "@mui/material";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { useTranslation } from "react-i18next";
|
|
5
|
+
import Close from "@mui/icons-material/Close";
|
|
6
|
+
//#region src/components/TokenList/RemoveRecentTokenButton.tsx
|
|
7
|
+
const RemoveRecentTokenButton = ({ chainId, tokenAddress }) => {
|
|
8
|
+
const { t } = useTranslation();
|
|
9
|
+
const removeRecentToken = useRecentTokensStore((state) => state.removeRecentToken);
|
|
10
|
+
const handleClick = (e) => {
|
|
11
|
+
e.stopPropagation();
|
|
12
|
+
e.currentTarget.blur();
|
|
13
|
+
removeRecentToken(chainId, tokenAddress);
|
|
14
|
+
};
|
|
15
|
+
return /* @__PURE__ */ jsx(IconButton, {
|
|
16
|
+
"aria-label": t("button.delete"),
|
|
17
|
+
sx: {
|
|
18
|
+
width: 20,
|
|
19
|
+
height: 20
|
|
20
|
+
},
|
|
21
|
+
size: "small",
|
|
22
|
+
onClick: handleClick,
|
|
23
|
+
children: /* @__PURE__ */ jsx(Close, { sx: {
|
|
24
|
+
fontSize: 12,
|
|
25
|
+
color: "text.secondary"
|
|
26
|
+
} })
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
//#endregion
|
|
30
|
+
export { RemoveRecentTokenButton };
|
|
31
|
+
|
|
32
|
+
//# sourceMappingURL=RemoveRecentTokenButton.js.map
|