@lifi/widget 3.40.11 → 4.0.0-alpha.2
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/dist/esm/AppDefault.d.ts +8 -0
- package/dist/esm/AppDefault.js +231 -14
- package/dist/esm/AppDefault.js.map +1 -1
- package/dist/esm/AppLayout.d.ts +1 -0
- package/dist/esm/AppLayout.js +19 -0
- package/dist/esm/AppLayout.js.map +1 -0
- package/dist/esm/AppProvider.js +7 -20
- package/dist/esm/AppProvider.js.map +1 -1
- package/dist/esm/components/ActiveTransactions/ActiveTransactionItem.js +9 -6
- package/dist/esm/components/ActiveTransactions/ActiveTransactionItem.js.map +1 -1
- package/dist/esm/components/ActiveTransactions/ActiveTransactions.js +2 -2
- package/dist/esm/components/ActiveTransactions/ActiveTransactions.js.map +1 -1
- package/dist/esm/components/ActiveTransactions/ActiveTransactions.style.d.ts +2 -2
- package/dist/esm/components/AmountInput/AmountInput.js +5 -7
- package/dist/esm/components/AmountInput/AmountInput.js.map +1 -1
- package/dist/esm/components/AmountInput/AmountInput.style.d.ts +2 -2
- package/dist/esm/components/AmountInput/AmountInputAdornment.style.d.ts +1 -1
- package/dist/esm/components/AmountInput/AmountInputEndAdornment.js +1 -1
- package/dist/esm/components/AmountInput/AmountInputEndAdornment.js.map +1 -1
- package/dist/esm/components/AmountInput/PriceFormHelperText.style.d.ts +1 -1
- package/dist/esm/components/AppContainer.d.ts +1 -1
- package/dist/esm/components/Avatar/AccountAvatar.d.ts +1 -1
- package/dist/esm/components/Avatar/AccountAvatar.js.map +1 -1
- package/dist/esm/components/Avatar/Avatar.style.d.ts +1 -1
- package/dist/esm/components/Avatar/SmallAvatar.d.ts +1 -1
- package/dist/esm/components/ButtonTertiary.d.ts +1 -1
- package/dist/esm/components/Card/Card.d.ts +1 -1
- package/dist/esm/components/Card/CardButton.style.d.ts +2 -2
- package/dist/esm/components/Card/CardHeader.d.ts +1 -1
- package/dist/esm/components/Card/CardIconButton.d.ts +3 -3
- package/dist/esm/components/Card/CardLabel.d.ts +1 -1
- package/dist/esm/components/Card/CardTitle.d.ts +1 -1
- package/dist/esm/components/Card/InputCard.d.ts +1 -1
- package/dist/esm/components/ChainSelect/ChainSelect.js +8 -3
- package/dist/esm/components/ChainSelect/ChainSelect.js.map +1 -1
- package/dist/esm/components/ChainSelect/ChainSelect.style.d.ts +3 -3
- package/dist/esm/components/Chains/ChainList.style.d.ts +4 -4
- package/dist/esm/components/Chains/VirtualizedChainList.d.ts +1 -1
- package/dist/esm/components/Chains/VirtualizedChainList.js +7 -1
- package/dist/esm/components/Chains/VirtualizedChainList.js.map +1 -1
- package/dist/esm/components/ContractComponent/ItemPrice.d.ts +1 -1
- package/dist/esm/components/ContractComponent/ItemPrice.js +1 -1
- package/dist/esm/components/ContractComponent/ItemPrice.js.map +1 -1
- package/dist/esm/components/ContractComponent/NFT/NFT.js +1 -1
- package/dist/esm/components/ContractComponent/NFT/NFT.js.map +1 -1
- package/dist/esm/components/ContractComponent/NFT/NFT.style.d.ts +1 -1
- package/dist/esm/components/Header/BackButton.d.ts +1 -2
- package/dist/esm/components/Header/BackButton.js +16 -2
- package/dist/esm/components/Header/BackButton.js.map +1 -1
- package/dist/esm/components/Header/DisconnectIconButton.d.ts +1 -1
- package/dist/esm/components/Header/DisconnectIconButton.js.map +1 -1
- package/dist/esm/components/Header/Header.js +1 -1
- package/dist/esm/components/Header/Header.js.map +1 -1
- package/dist/esm/components/Header/Header.style.d.ts +3 -3
- package/dist/esm/components/Header/NavigationHeader.js +7 -13
- package/dist/esm/components/Header/NavigationHeader.js.map +1 -1
- package/dist/esm/components/Header/SettingsButton.js +3 -3
- package/dist/esm/components/Header/SettingsButton.js.map +1 -1
- package/dist/esm/components/Header/SettingsButton.style.d.ts +2 -2
- package/dist/esm/components/Header/TransactionHistoryButton.js +3 -3
- package/dist/esm/components/Header/TransactionHistoryButton.js.map +1 -1
- package/dist/esm/components/Header/WalletHeader.js.map +1 -1
- package/dist/esm/components/ListItem/ListItem.d.ts +1 -1
- package/dist/esm/components/ListItem/ListItemButton.d.ts +1 -1
- package/dist/esm/components/ListItemButton.d.ts +1 -1
- package/dist/esm/components/Messages/GasSufficiencyMessage.js +1 -1
- package/dist/esm/components/Messages/GasSufficiencyMessage.js.map +1 -1
- package/dist/esm/components/PageContainer.d.ts +1 -1
- package/dist/esm/components/PageEntered.js +1 -1
- package/dist/esm/components/PageEntered.js.map +1 -1
- package/dist/esm/components/PoweredBy/PoweredBy.style.d.ts +1 -1
- package/dist/esm/components/ReverseTokensButton/ReverseTokensButton.js +0 -9
- package/dist/esm/components/ReverseTokensButton/ReverseTokensButton.js.map +1 -1
- package/dist/esm/components/ReverseTokensButton/ReverseTokensButton.style.d.ts +1 -1
- package/dist/esm/components/RouteCard/RouteCard.js +1 -3
- package/dist/esm/components/RouteCard/RouteCard.js.map +1 -1
- package/dist/esm/components/Routes/Routes.js +3 -4
- package/dist/esm/components/Routes/Routes.js.map +1 -1
- package/dist/esm/components/Routes/RoutesContent.js +1 -2
- package/dist/esm/components/Routes/RoutesContent.js.map +1 -1
- package/dist/esm/components/Routes/RoutesExpanded.js +4 -3
- package/dist/esm/components/Routes/RoutesExpanded.js.map +1 -1
- package/dist/esm/components/Routes/RoutesExpanded.style.d.ts +1 -1
- package/dist/esm/components/Search/SearchInput.style.d.ts +1 -1
- package/dist/esm/components/Search/SearchNotFound.style.d.ts +2 -2
- package/dist/esm/components/SelectChainAndToken.js +2 -3
- package/dist/esm/components/SelectChainAndToken.js.map +1 -1
- package/dist/esm/components/SelectTokenButton/SelectTokenButton.js +10 -10
- package/dist/esm/components/SelectTokenButton/SelectTokenButton.js.map +1 -1
- package/dist/esm/components/SelectTokenButton/SelectTokenButton.style.d.ts +3 -3
- package/dist/esm/components/SendToWallet/SendToWallet.style.d.ts +1 -1
- package/dist/esm/components/SendToWallet/SendToWalletButton.js +10 -8
- package/dist/esm/components/SendToWallet/SendToWalletButton.js.map +1 -1
- package/dist/esm/components/SettingsListItemButton.d.ts +1 -1
- package/dist/esm/components/Skeleton/WidgetSkeleton.style.d.ts +4 -4
- package/dist/esm/components/Step/CircularProgress.d.ts +3 -3
- package/dist/esm/components/Step/CircularProgress.js +8 -8
- package/dist/esm/components/Step/CircularProgress.js.map +1 -1
- package/dist/esm/components/Step/CircularProgress.style.d.ts +2 -2
- package/dist/esm/components/Step/CircularProgress.style.js.map +1 -1
- package/dist/esm/components/Step/Step.js +8 -11
- package/dist/esm/components/Step/Step.js.map +1 -1
- package/dist/esm/components/Step/StepAction.d.ts +5 -0
- package/dist/esm/components/Step/{StepProcess.js → StepAction.js} +16 -12
- package/dist/esm/components/Step/StepAction.js.map +1 -0
- package/dist/esm/components/StepActions/StepActions.js +3 -2
- package/dist/esm/components/StepActions/StepActions.js.map +1 -1
- package/dist/esm/components/StepActions/StepActions.style.d.ts +2 -2
- package/dist/esm/components/StepDivider/StepDivider.style.d.ts +1 -1
- package/dist/esm/components/Tabs/NavigationTabs.d.ts +4 -4
- package/dist/esm/components/Tabs/Tabs.style.d.ts +3 -3
- package/dist/esm/components/Timer/StepTimer.js +26 -74
- package/dist/esm/components/Timer/StepTimer.js.map +1 -1
- package/dist/esm/components/Token/Token.style.d.ts +1 -1
- package/dist/esm/components/TokenList/PinTokenButton.d.ts +6 -0
- package/dist/esm/components/TokenList/PinTokenButton.js +29 -0
- package/dist/esm/components/TokenList/PinTokenButton.js.map +1 -0
- package/dist/esm/components/TokenList/TokenDetailsSheetContent.style.d.ts +2 -2
- package/dist/esm/components/TokenList/TokenList.js +13 -5
- package/dist/esm/components/TokenList/TokenList.js.map +1 -1
- package/dist/esm/components/TokenList/TokenList.style.d.ts +6 -6
- package/dist/esm/components/TokenList/TokenListItem.js +5 -4
- package/dist/esm/components/TokenList/TokenListItem.js.map +1 -1
- package/dist/esm/components/TokenList/VirtualizedTokenList.js +63 -38
- package/dist/esm/components/TokenList/VirtualizedTokenList.js.map +1 -1
- package/dist/esm/components/TokenList/types.d.ts +2 -3
- package/dist/esm/components/TokenList/useTokenSelect.js +2 -3
- package/dist/esm/components/TokenList/useTokenSelect.js.map +1 -1
- package/dist/esm/components/TokenRate/TokenRate.d.ts +1 -1
- package/dist/esm/components/TokenRate/TokenRate.js +1 -1
- package/dist/esm/components/TokenRate/TokenRate.js.map +1 -1
- package/dist/esm/components/TokenRate/TokenRate.style.d.ts +1 -1
- package/dist/esm/components/TransactionDetails.js +3 -2
- package/dist/esm/components/TransactionDetails.js.map +1 -1
- package/dist/esm/config/version.d.ts +1 -1
- package/dist/esm/config/version.js +1 -1
- package/dist/esm/config/version.js.map +1 -1
- package/dist/esm/hooks/useActionMessage.d.ts +5 -0
- package/dist/esm/hooks/useActionMessage.js +18 -0
- package/dist/esm/hooks/useActionMessage.js.map +1 -0
- package/dist/esm/hooks/useAddressActivity.js +18 -9
- package/dist/esm/hooks/useAddressActivity.js.map +1 -1
- package/dist/esm/hooks/useAddressValidation.js +5 -2
- package/dist/esm/hooks/useAddressValidation.js.map +1 -1
- package/dist/esm/hooks/useAvailableChains.d.ts +2 -1
- package/dist/esm/hooks/useAvailableChains.js +32 -11
- package/dist/esm/hooks/useAvailableChains.js.map +1 -1
- package/dist/esm/hooks/useExplorer.js +1 -2
- package/dist/esm/hooks/useExplorer.js.map +1 -1
- package/dist/esm/hooks/useFilteredByTokenBalances.js +3 -1
- package/dist/esm/hooks/useFilteredByTokenBalances.js.map +1 -1
- package/dist/esm/hooks/useFromTokenSufficiency.d.ts +1 -1
- package/dist/esm/hooks/useFromTokenSufficiency.js +4 -4
- package/dist/esm/hooks/useFromTokenSufficiency.js.map +1 -1
- package/dist/esm/hooks/useGasRecommendation.js +3 -1
- package/dist/esm/hooks/useGasRecommendation.js.map +1 -1
- package/dist/esm/hooks/useGasSufficiency.js +21 -15
- package/dist/esm/hooks/useGasSufficiency.js.map +1 -1
- package/dist/esm/hooks/useHasChainExpansion.d.ts +1 -1
- package/dist/esm/hooks/useHasChainExpansion.js +11 -3
- package/dist/esm/hooks/useHasChainExpansion.js.map +1 -1
- package/dist/esm/hooks/useInitializeSDKProviders.d.ts +1 -0
- package/dist/esm/hooks/useInitializeSDKProviders.js +11 -0
- package/dist/esm/hooks/useInitializeSDKProviders.js.map +1 -0
- package/dist/esm/hooks/useIsBatchingSupported.js +7 -3
- package/dist/esm/hooks/useIsBatchingSupported.js.map +1 -1
- package/dist/esm/hooks/useIsContractAddress.js +12 -9
- package/dist/esm/hooks/useIsContractAddress.js.map +1 -1
- package/dist/esm/hooks/useNavigateBack.d.ts +1 -4
- package/dist/esm/hooks/useNavigateBack.js +9 -23
- package/dist/esm/hooks/useNavigateBack.js.map +1 -1
- package/dist/esm/hooks/useRouteExecution.js +12 -13
- package/dist/esm/hooks/useRouteExecution.js.map +1 -1
- package/dist/esm/hooks/useRoutes.js +23 -60
- package/dist/esm/hooks/useRoutes.js.map +1 -1
- package/dist/esm/hooks/useToAddressAutoPopulate.js +3 -1
- package/dist/esm/hooks/useToAddressAutoPopulate.js.map +1 -1
- package/dist/esm/hooks/useToAddressRequirements.js +3 -2
- package/dist/esm/hooks/useToAddressRequirements.js.map +1 -1
- package/dist/esm/hooks/useTokenBalance.d.ts +3 -3
- package/dist/esm/hooks/useTokenBalance.js +8 -6
- package/dist/esm/hooks/useTokenBalance.js.map +1 -1
- package/dist/esm/hooks/useTokenBalances.d.ts +1 -0
- package/dist/esm/hooks/useTokenBalances.js +70 -5
- package/dist/esm/hooks/useTokenBalances.js.map +1 -1
- package/dist/esm/hooks/useTokenBalancesQueries.js +4 -2
- package/dist/esm/hooks/useTokenBalancesQueries.js.map +1 -1
- package/dist/esm/hooks/useTokenSearch.js +3 -1
- package/dist/esm/hooks/useTokenSearch.js.map +1 -1
- package/dist/esm/hooks/useTokens.js +11 -5
- package/dist/esm/hooks/useTokens.js.map +1 -1
- package/dist/esm/hooks/useTools.js +3 -1
- package/dist/esm/hooks/useTools.js.map +1 -1
- package/dist/esm/hooks/useTransactionDetails.js +3 -1
- package/dist/esm/hooks/useTransactionDetails.js.map +1 -1
- package/dist/esm/hooks/useTransactionHistory.js +3 -1
- package/dist/esm/hooks/useTransactionHistory.js.map +1 -1
- package/dist/esm/hooks/useWidgetChains.d.ts +6 -0
- package/dist/esm/hooks/useWidgetChains.js +5 -0
- package/dist/esm/hooks/useWidgetChains.js.map +1 -0
- package/dist/esm/i18n/bn.json +4 -1
- package/dist/esm/i18n/de.json +4 -1
- package/dist/esm/i18n/en.json +3 -14
- package/dist/esm/i18n/es.json +4 -1
- package/dist/esm/i18n/fr.json +4 -1
- package/dist/esm/i18n/hi.json +4 -1
- package/dist/esm/i18n/id.json +4 -1
- package/dist/esm/i18n/it.json +4 -1
- package/dist/esm/i18n/ja.json +4 -1
- package/dist/esm/i18n/ko.json +4 -1
- package/dist/esm/i18n/pl.json +4 -1
- package/dist/esm/i18n/pt.json +4 -1
- package/dist/esm/i18n/th.json +4 -1
- package/dist/esm/i18n/tr.json +4 -1
- package/dist/esm/i18n/uk.json +4 -1
- package/dist/esm/i18n/vi.json +4 -1
- package/dist/esm/i18n/zh.json +4 -1
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/pages/LanguagesPage.js +7 -6
- package/dist/esm/pages/LanguagesPage.js.map +1 -1
- package/dist/esm/pages/MainPage/MainPage.js +1 -3
- package/dist/esm/pages/MainPage/MainPage.js.map +1 -1
- package/dist/esm/pages/MainPage/ReviewButton.js +5 -5
- package/dist/esm/pages/MainPage/ReviewButton.js.map +1 -1
- package/dist/esm/pages/RoutesPage/RoutesPage.d.ts +1 -2
- package/dist/esm/pages/RoutesPage/RoutesPage.js +5 -4
- package/dist/esm/pages/RoutesPage/RoutesPage.js.map +1 -1
- package/dist/esm/pages/SelectChainPage/SelectChainPage.js +1 -1
- package/dist/esm/pages/SelectChainPage/SelectChainPage.js.map +1 -1
- package/dist/esm/pages/SelectTokenPage/SelectTokenPage.js +2 -13
- package/dist/esm/pages/SelectTokenPage/SelectTokenPage.js.map +1 -1
- package/dist/esm/pages/SendToWallet/BookmarksPage.js +3 -5
- package/dist/esm/pages/SendToWallet/BookmarksPage.js.map +1 -1
- package/dist/esm/pages/SendToWallet/ConfirmAddressSheet.js +1 -1
- package/dist/esm/pages/SendToWallet/ConfirmAddressSheet.js.map +1 -1
- package/dist/esm/pages/SendToWallet/ConnectedWalletsPage.js +4 -3
- package/dist/esm/pages/SendToWallet/ConnectedWalletsPage.js.map +1 -1
- package/dist/esm/pages/SendToWallet/RecentWalletsPage.js +4 -7
- package/dist/esm/pages/SendToWallet/RecentWalletsPage.js.map +1 -1
- package/dist/esm/pages/SendToWallet/SendToConfiguredWalletPage.js +1 -1
- package/dist/esm/pages/SendToWallet/SendToConfiguredWalletPage.js.map +1 -1
- package/dist/esm/pages/SendToWallet/SendToWalletPage.d.ts +1 -1
- package/dist/esm/pages/SendToWallet/SendToWalletPage.js +5 -5
- package/dist/esm/pages/SendToWallet/SendToWalletPage.js.map +1 -1
- package/dist/esm/pages/SendToWallet/SendToWalletPage.style.d.ts +8 -8
- package/dist/esm/pages/SettingsPage/BridgeAndExchangeSettings.js +4 -2
- package/dist/esm/pages/SettingsPage/BridgeAndExchangeSettings.js.map +1 -1
- package/dist/esm/pages/SettingsPage/LanguageSetting.js +2 -2
- package/dist/esm/pages/SettingsPage/LanguageSetting.js.map +1 -1
- package/dist/esm/pages/SettingsPage/SettingsCard/SettingCard.style.d.ts +1 -1
- package/dist/esm/pages/SettingsPage/SettingsCard/SettingCardExpandable.d.ts +12 -2
- package/dist/esm/pages/SettingsPage/SettingsCard/SettingCardExpandable.js +10 -4
- package/dist/esm/pages/SettingsPage/SettingsCard/SettingCardExpandable.js.map +1 -1
- package/dist/esm/pages/SettingsPage/SettingsCard/SettingsAccordian.d.ts +1 -1
- package/dist/esm/pages/SettingsPage/SettingsCard/SettingsAccordian.js +2 -2
- package/dist/esm/pages/SettingsPage/SettingsCard/SettingsAccordian.js.map +1 -1
- package/dist/esm/pages/SettingsPage/SettingsPage.js +5 -1
- package/dist/esm/pages/SettingsPage/SettingsPage.js.map +1 -1
- package/dist/esm/pages/SettingsPage/SlippageSettings/SlippageSettings.js +3 -3
- package/dist/esm/pages/SettingsPage/SlippageSettings/SlippageSettings.js.map +1 -1
- package/dist/esm/pages/SettingsPage/SlippageSettings/SlippageSettings.style.d.ts +3 -3
- package/dist/esm/pages/SettingsPage/SlippageSettings/SlippageSettings.style.js +9 -9
- package/dist/esm/pages/SettingsPage/SmallBalanceFilterSettings.d.ts +1 -0
- package/dist/esm/pages/SettingsPage/SmallBalanceFilterSettings.js +58 -0
- package/dist/esm/pages/SettingsPage/SmallBalanceFilterSettings.js.map +1 -0
- package/dist/esm/pages/TransactionDetailsPage/TransactionDetailsPage.js +7 -8
- package/dist/esm/pages/TransactionDetailsPage/TransactionDetailsPage.js.map +1 -1
- package/dist/esm/pages/TransactionHistoryPage/TransactionHistoryItem.js +4 -3
- package/dist/esm/pages/TransactionHistoryPage/TransactionHistoryItem.js.map +1 -1
- package/dist/esm/pages/TransactionHistoryPage/TransactionHistoryPage.d.ts +1 -2
- package/dist/esm/pages/TransactionHistoryPage/TransactionHistoryPage.js.map +1 -1
- package/dist/esm/pages/TransactionPage/StatusBottomSheet.js +13 -12
- package/dist/esm/pages/TransactionPage/StatusBottomSheet.js.map +1 -1
- package/dist/esm/pages/TransactionPage/TransactionPage.d.ts +1 -1
- package/dist/esm/pages/TransactionPage/TransactionPage.js +13 -6
- package/dist/esm/pages/TransactionPage/TransactionPage.js.map +1 -1
- package/dist/esm/providers/I18nProvider/I18nProvider.js +1 -0
- package/dist/esm/providers/I18nProvider/I18nProvider.js.map +1 -1
- package/dist/esm/providers/SDKClientProvider.d.ts +4 -0
- package/dist/esm/providers/SDKClientProvider.js +29 -0
- package/dist/esm/providers/SDKClientProvider.js.map +1 -0
- package/dist/esm/providers/WalletProvider/WalletProvider.d.ts +7 -2
- package/dist/esm/providers/WalletProvider/WalletProvider.js +27 -11
- package/dist/esm/providers/WalletProvider/WalletProvider.js.map +1 -1
- package/dist/esm/providers/WalletProvider/useExternalWalletProvider.js +15 -18
- package/dist/esm/providers/WalletProvider/useExternalWalletProvider.js.map +1 -1
- package/dist/esm/providers/WidgetProvider/WidgetProvider.js +0 -27
- package/dist/esm/providers/WidgetProvider/WidgetProvider.js.map +1 -1
- package/dist/esm/stores/StoreProvider.js +2 -1
- package/dist/esm/stores/StoreProvider.js.map +1 -1
- package/dist/esm/stores/bookmarks/types.d.ts +2 -3
- package/dist/esm/stores/chains/ChainOrderStore.js +17 -12
- package/dist/esm/stores/chains/ChainOrderStore.js.map +1 -1
- package/dist/esm/stores/chains/createChainOrderStore.d.ts +0 -8
- package/dist/esm/stores/chains/createChainOrderStore.js +1 -5
- package/dist/esm/stores/chains/createChainOrderStore.js.map +1 -1
- package/dist/esm/stores/form/FormStore.js +18 -8
- package/dist/esm/stores/form/FormStore.js.map +1 -1
- package/dist/esm/stores/form/FormUpdater.js +5 -50
- package/dist/esm/stores/form/FormUpdater.js.map +1 -1
- package/dist/esm/stores/form/URLSearchParamsBuilder.js +11 -31
- package/dist/esm/stores/form/URLSearchParamsBuilder.js.map +1 -1
- package/dist/esm/stores/form/getDefaultValuesFromQueryString.d.ts +7 -0
- package/dist/esm/stores/form/getDefaultValuesFromQueryString.js +32 -0
- package/dist/esm/stores/form/getDefaultValuesFromQueryString.js.map +1 -0
- package/dist/esm/stores/form/types.d.ts +2 -3
- package/dist/esm/stores/form/types.js.map +1 -1
- package/dist/esm/stores/header/types.d.ts +5 -3
- package/dist/esm/stores/header/useHeaderStore.js +14 -0
- package/dist/esm/stores/header/useHeaderStore.js.map +1 -1
- package/dist/esm/stores/pinnedTokens/PinnedTokensStore.d.ts +4 -0
- package/dist/esm/stores/pinnedTokens/PinnedTokensStore.js +20 -0
- package/dist/esm/stores/pinnedTokens/PinnedTokensStore.js.map +1 -0
- package/dist/esm/stores/pinnedTokens/createPinnedTokensStore.d.ts +19 -0
- package/dist/esm/stores/pinnedTokens/createPinnedTokensStore.js +61 -0
- package/dist/esm/stores/pinnedTokens/createPinnedTokensStore.js.map +1 -0
- package/dist/esm/stores/pinnedTokens/types.d.ts +17 -0
- package/dist/esm/stores/pinnedTokens/types.js +2 -0
- package/dist/esm/stores/pinnedTokens/types.js.map +1 -0
- package/dist/esm/stores/routes/RouteExecutionStore.d.ts +2 -3
- package/dist/esm/stores/routes/RouteExecutionStore.js.map +1 -1
- package/dist/esm/stores/routes/createRouteExecutionStore.js +2 -5
- package/dist/esm/stores/routes/createRouteExecutionStore.js.map +1 -1
- package/dist/esm/stores/routes/useExecutingRoutesIds.js +2 -2
- package/dist/esm/stores/routes/useExecutingRoutesIds.js.map +1 -1
- package/dist/esm/stores/routes/utils.d.ts +2 -2
- package/dist/esm/stores/routes/utils.js +15 -15
- package/dist/esm/stores/routes/utils.js.map +1 -1
- package/dist/esm/stores/settings/SettingsStore.d.ts +2 -3
- package/dist/esm/stores/settings/SettingsStore.js.map +1 -1
- package/dist/esm/stores/settings/createSettingsStore.d.ts +2 -0
- package/dist/esm/stores/settings/createSettingsStore.js +2 -1
- package/dist/esm/stores/settings/createSettingsStore.js.map +1 -1
- package/dist/esm/stores/settings/types.d.ts +3 -3
- package/dist/esm/stores/settings/types.js.map +1 -1
- package/dist/esm/types/events.d.ts +2 -10
- package/dist/esm/types/events.js +0 -1
- package/dist/esm/types/events.js.map +1 -1
- package/dist/esm/types/token.d.ts +1 -0
- package/dist/esm/types/widget.d.ts +9 -16
- package/dist/esm/types/widget.js +1 -0
- package/dist/esm/types/widget.js.map +1 -1
- package/dist/esm/utils/chainType.d.ts +1 -2
- package/dist/esm/utils/chainType.js +1 -19
- package/dist/esm/utils/chainType.js.map +1 -1
- package/dist/esm/utils/converters.js +11 -18
- package/dist/esm/utils/converters.js.map +1 -1
- package/dist/esm/utils/format.d.ts +1 -0
- package/dist/esm/utils/format.js +2 -1
- package/dist/esm/utils/format.js.map +1 -1
- package/dist/esm/utils/getActionMessage.d.ts +7 -0
- package/dist/esm/utils/getActionMessage.js +111 -0
- package/dist/esm/utils/getActionMessage.js.map +1 -0
- package/dist/esm/utils/getErrorMessage.d.ts +6 -0
- package/dist/esm/utils/getErrorMessage.js +118 -0
- package/dist/esm/utils/getErrorMessage.js.map +1 -0
- package/dist/esm/utils/prepareActions.d.ts +2 -0
- package/dist/esm/utils/prepareActions.js +24 -0
- package/dist/esm/utils/prepareActions.js.map +1 -0
- package/dist/esm/utils/tokenList.d.ts +3 -2
- package/dist/esm/utils/tokenList.js +104 -8
- package/dist/esm/utils/tokenList.js.map +1 -1
- package/package.json +30 -23
- package/src/AppDefault.tsx +279 -31
- package/src/AppLayout.tsx +36 -0
- package/src/AppProvider.tsx +12 -40
- package/src/components/ActiveTransactions/ActiveTransactionItem.tsx +9 -6
- package/src/components/ActiveTransactions/ActiveTransactions.tsx +2 -2
- package/src/components/AmountInput/AmountInput.tsx +6 -8
- package/src/components/AmountInput/AmountInputEndAdornment.tsx +1 -1
- package/src/components/Avatar/AccountAvatar.tsx +1 -1
- package/src/components/ChainSelect/ChainSelect.tsx +8 -4
- package/src/components/Chains/VirtualizedChainList.tsx +7 -3
- package/src/components/ContractComponent/ItemPrice.tsx +1 -2
- package/src/components/ContractComponent/NFT/NFT.tsx +1 -1
- package/src/components/Header/BackButton.tsx +15 -3
- package/src/components/Header/DisconnectIconButton.tsx +2 -1
- package/src/components/Header/Header.tsx +1 -1
- package/src/components/Header/NavigationHeader.tsx +23 -46
- package/src/components/Header/SettingsButton.tsx +3 -3
- package/src/components/Header/TransactionHistoryButton.tsx +3 -3
- package/src/components/Header/WalletHeader.tsx +1 -1
- package/src/components/Messages/GasSufficiencyMessage.tsx +1 -1
- package/src/components/PageEntered.ts +1 -1
- package/src/components/ReverseTokensButton/ReverseTokensButton.tsx +0 -10
- package/src/components/RouteCard/RouteCard.tsx +1 -3
- package/src/components/Routes/Routes.tsx +3 -4
- package/src/components/Routes/RoutesContent.tsx +1 -2
- package/src/components/Routes/RoutesExpanded.tsx +4 -3
- package/src/components/SelectChainAndToken.tsx +2 -4
- package/src/components/SelectTokenButton/SelectTokenButton.tsx +11 -13
- package/src/components/SendToWallet/SendToWalletButton.tsx +9 -12
- package/src/components/Step/CircularProgress.style.tsx +3 -3
- package/src/components/Step/CircularProgress.tsx +11 -11
- package/src/components/Step/Step.tsx +13 -14
- package/src/components/Step/{StepProcess.tsx → StepAction.tsx} +20 -15
- package/src/components/StepActions/StepActions.tsx +3 -2
- package/src/components/Timer/StepTimer.tsx +43 -105
- package/src/components/TokenList/PinTokenButton.tsx +50 -0
- package/src/components/TokenList/TokenList.tsx +67 -59
- package/src/components/TokenList/TokenListItem.tsx +20 -11
- package/src/components/TokenList/VirtualizedTokenList.tsx +80 -53
- package/src/components/TokenList/types.ts +2 -3
- package/src/components/TokenList/useTokenSelect.ts +2 -8
- package/src/components/TokenRate/TokenRate.tsx +1 -2
- package/src/components/TransactionDetails.tsx +3 -2
- package/src/config/version.ts +1 -1
- package/src/hooks/useActionMessage.ts +33 -0
- package/src/hooks/useAddressActivity.ts +19 -11
- package/src/hooks/useAddressValidation.ts +9 -2
- package/src/hooks/useAvailableChains.ts +42 -14
- package/src/hooks/useExplorer.ts +1 -2
- package/src/hooks/useFilteredByTokenBalances.ts +3 -1
- package/src/hooks/useFromTokenSufficiency.ts +8 -5
- package/src/hooks/useGasRecommendation.ts +3 -0
- package/src/hooks/useGasSufficiency.ts +23 -13
- package/src/hooks/useHasChainExpansion.ts +13 -3
- package/src/hooks/useInitializeSDKProviders.ts +12 -0
- package/src/hooks/useIsBatchingSupported.ts +11 -5
- package/src/hooks/useIsContractAddress.ts +14 -10
- package/src/hooks/useNavigateBack.ts +11 -29
- package/src/hooks/useRouteExecution.ts +12 -16
- package/src/hooks/useRoutes.ts +26 -74
- package/src/hooks/useToAddressAutoPopulate.ts +3 -1
- package/src/hooks/useToAddressRequirements.ts +3 -2
- package/src/hooks/useTokenBalance.ts +18 -3
- package/src/hooks/useTokenBalances.ts +91 -5
- package/src/hooks/useTokenBalancesQueries.ts +4 -2
- package/src/hooks/useTokenSearch.ts +10 -3
- package/src/hooks/useTokens.ts +11 -6
- package/src/hooks/useTools.ts +3 -1
- package/src/hooks/useTransactionDetails.ts +3 -0
- package/src/hooks/useTransactionHistory.ts +3 -0
- package/src/hooks/useWidgetChains.ts +6 -0
- package/src/index.ts +2 -8
- package/src/pages/LanguagesPage.tsx +2 -1
- package/src/pages/MainPage/MainPage.tsx +1 -3
- package/src/pages/MainPage/ReviewButton.tsx +5 -5
- package/src/pages/RoutesPage/RoutesPage.tsx +6 -6
- package/src/pages/SelectChainPage/SelectChainPage.tsx +1 -1
- package/src/pages/SelectTokenPage/SelectTokenPage.tsx +4 -28
- package/src/pages/SendToWallet/BookmarksPage.tsx +3 -5
- package/src/pages/SendToWallet/ConfirmAddressSheet.tsx +1 -1
- package/src/pages/SendToWallet/ConnectedWalletsPage.tsx +5 -4
- package/src/pages/SendToWallet/RecentWalletsPage.tsx +4 -7
- package/src/pages/SendToWallet/SendToConfiguredWalletPage.tsx +1 -1
- package/src/pages/SendToWallet/SendToWalletPage.tsx +6 -6
- package/src/pages/SettingsPage/BridgeAndExchangeSettings.tsx +4 -2
- package/src/pages/SettingsPage/LanguageSetting.tsx +2 -2
- package/src/pages/SettingsPage/SettingsCard/SettingCardExpandable.tsx +63 -33
- package/src/pages/SettingsPage/SettingsCard/SettingsAccordian.tsx +3 -2
- package/src/pages/SettingsPage/SettingsPage.tsx +7 -0
- package/src/pages/SettingsPage/SlippageSettings/SlippageSettings.style.tsx +10 -10
- package/src/pages/SettingsPage/SlippageSettings/SlippageSettings.tsx +5 -5
- package/src/pages/SettingsPage/SmallBalanceFilterSettings.tsx +116 -0
- package/src/pages/TransactionDetailsPage/TransactionDetailsPage.tsx +7 -8
- package/src/pages/TransactionHistoryPage/TransactionHistoryItem.tsx +4 -3
- package/src/pages/TransactionHistoryPage/TransactionHistoryPage.tsx +1 -2
- package/src/pages/TransactionPage/StatusBottomSheet.tsx +15 -14
- package/src/pages/TransactionPage/TransactionPage.tsx +14 -7
- package/src/providers/I18nProvider/I18nProvider.tsx +1 -0
- package/src/providers/SDKClientProvider.tsx +41 -0
- package/src/providers/WalletProvider/WalletProvider.tsx +61 -20
- package/src/providers/WalletProvider/useExternalWalletProvider.ts +20 -18
- package/src/providers/WidgetProvider/WidgetProvider.tsx +0 -29
- package/src/stores/StoreProvider.tsx +10 -7
- package/src/stores/bookmarks/types.ts +2 -3
- package/src/stores/chains/ChainOrderStore.tsx +29 -16
- package/src/stores/chains/createChainOrderStore.ts +1 -5
- package/src/stores/form/FormStore.tsx +19 -18
- package/src/stores/form/FormUpdater.tsx +5 -73
- package/src/stores/form/URLSearchParamsBuilder.tsx +12 -39
- package/src/stores/form/getDefaultValuesFromQueryString.ts +48 -0
- package/src/stores/form/types.ts +2 -5
- package/src/stores/header/types.ts +5 -3
- package/src/stores/header/useHeaderStore.tsx +14 -0
- package/src/stores/pinnedTokens/PinnedTokensStore.tsx +38 -0
- package/src/stores/pinnedTokens/createPinnedTokensStore.ts +71 -0
- package/src/stores/pinnedTokens/types.ts +20 -0
- package/src/stores/routes/RouteExecutionStore.tsx +2 -5
- package/src/stores/routes/createRouteExecutionStore.ts +4 -5
- package/src/stores/routes/useExecutingRoutesIds.ts +2 -2
- package/src/stores/routes/utils.ts +21 -19
- package/src/stores/settings/SettingsStore.tsx +2 -3
- package/src/stores/settings/createSettingsStore.ts +2 -1
- package/src/stores/settings/types.ts +3 -5
- package/src/types/events.ts +2 -11
- package/src/types/token.ts +1 -0
- package/src/types/widget.ts +18 -26
- package/src/utils/chainType.ts +1 -24
- package/src/utils/converters.ts +14 -20
- package/src/utils/format.ts +3 -1
- package/src/utils/getActionMessage.ts +168 -0
- package/src/utils/getErrorMessage.ts +144 -0
- package/src/utils/prepareActions.ts +27 -0
- package/src/utils/tokenList.ts +117 -11
- package/CHANGELOG.md +0 -2646
- package/dist/esm/AppRoutes.d.ts +0 -1
- package/dist/esm/AppRoutes.js +0 -111
- package/dist/esm/AppRoutes.js.map +0 -1
- package/dist/esm/components/Step/StepProcess.d.ts +0 -5
- package/dist/esm/components/Step/StepProcess.js.map +0 -1
- package/dist/esm/config/baseAccount.d.ts +0 -2
- package/dist/esm/config/baseAccount.js +0 -6
- package/dist/esm/config/baseAccount.js.map +0 -1
- package/dist/esm/config/coinbase.d.ts +0 -2
- package/dist/esm/config/coinbase.js +0 -6
- package/dist/esm/config/coinbase.js.map +0 -1
- package/dist/esm/config/metaMask.d.ts +0 -2
- package/dist/esm/config/metaMask.js +0 -11
- package/dist/esm/config/metaMask.js.map +0 -1
- package/dist/esm/config/walletConnect.d.ts +0 -2
- package/dist/esm/config/walletConnect.js +0 -4
- package/dist/esm/config/walletConnect.js.map +0 -1
- package/dist/esm/hooks/useExpansionRoutes.d.ts +0 -2
- package/dist/esm/hooks/useExpansionRoutes.js +0 -26
- package/dist/esm/hooks/useExpansionRoutes.js.map +0 -1
- package/dist/esm/hooks/useInternalWalletProvider.d.ts +0 -1
- package/dist/esm/hooks/useInternalWalletProvider.js +0 -6
- package/dist/esm/hooks/useInternalWalletProvider.js.map +0 -1
- package/dist/esm/hooks/useProcessMessage.d.ts +0 -11
- package/dist/esm/hooks/useProcessMessage.js +0 -199
- package/dist/esm/hooks/useProcessMessage.js.map +0 -1
- package/dist/esm/providers/WalletProvider/EVMBaseProvider.d.ts +0 -2
- package/dist/esm/providers/WalletProvider/EVMBaseProvider.js +0 -31
- package/dist/esm/providers/WalletProvider/EVMBaseProvider.js.map +0 -1
- package/dist/esm/providers/WalletProvider/EVMExternalContext.d.ts +0 -1
- package/dist/esm/providers/WalletProvider/EVMExternalContext.js +0 -3
- package/dist/esm/providers/WalletProvider/EVMExternalContext.js.map +0 -1
- package/dist/esm/providers/WalletProvider/EVMProvider.d.ts +0 -2
- package/dist/esm/providers/WalletProvider/EVMProvider.js +0 -20
- package/dist/esm/providers/WalletProvider/EVMProvider.js.map +0 -1
- package/dist/esm/providers/WalletProvider/SDKProviders.d.ts +0 -1
- package/dist/esm/providers/WalletProvider/SDKProviders.js +0 -62
- package/dist/esm/providers/WalletProvider/SDKProviders.js.map +0 -1
- package/dist/esm/providers/WalletProvider/SVMBaseProvider.d.ts +0 -2
- package/dist/esm/providers/WalletProvider/SVMBaseProvider.js +0 -27
- package/dist/esm/providers/WalletProvider/SVMBaseProvider.js.map +0 -1
- package/dist/esm/providers/WalletProvider/SVMExternalContext.d.ts +0 -1
- package/dist/esm/providers/WalletProvider/SVMExternalContext.js +0 -3
- package/dist/esm/providers/WalletProvider/SVMExternalContext.js.map +0 -1
- package/dist/esm/providers/WalletProvider/SVMProvider.d.ts +0 -2
- package/dist/esm/providers/WalletProvider/SVMProvider.js +0 -20
- package/dist/esm/providers/WalletProvider/SVMProvider.js.map +0 -1
- package/dist/esm/providers/WalletProvider/SuiBaseProvider.d.ts +0 -2
- package/dist/esm/providers/WalletProvider/SuiBaseProvider.js +0 -17
- package/dist/esm/providers/WalletProvider/SuiBaseProvider.js.map +0 -1
- package/dist/esm/providers/WalletProvider/SuiExternalContext.d.ts +0 -1
- package/dist/esm/providers/WalletProvider/SuiExternalContext.js +0 -3
- package/dist/esm/providers/WalletProvider/SuiExternalContext.js.map +0 -1
- package/dist/esm/providers/WalletProvider/SuiProvider.d.ts +0 -2
- package/dist/esm/providers/WalletProvider/SuiProvider.js +0 -20
- package/dist/esm/providers/WalletProvider/SuiProvider.js.map +0 -1
- package/dist/esm/providers/WalletProvider/UTXOBaseProvider.d.ts +0 -2
- package/dist/esm/providers/WalletProvider/UTXOBaseProvider.js +0 -18
- package/dist/esm/providers/WalletProvider/UTXOBaseProvider.js.map +0 -1
- package/dist/esm/providers/WalletProvider/UTXOExternalContext.d.ts +0 -1
- package/dist/esm/providers/WalletProvider/UTXOExternalContext.js +0 -3
- package/dist/esm/providers/WalletProvider/UTXOExternalContext.js.map +0 -1
- package/dist/esm/providers/WalletProvider/UTXOProvider.d.ts +0 -2
- package/dist/esm/providers/WalletProvider/UTXOProvider.js +0 -20
- package/dist/esm/providers/WalletProvider/UTXOProvider.js.map +0 -1
- package/package.json.tmp +0 -100
- package/src/AppRoutes.tsx +0 -112
- package/src/config/baseAccount.ts +0 -7
- package/src/config/coinbase.ts +0 -7
- package/src/config/metaMask.ts +0 -13
- package/src/config/walletConnect.ts +0 -5
- package/src/hooks/useExpansionRoutes.ts +0 -29
- package/src/hooks/useInternalWalletProvider.ts +0 -6
- package/src/hooks/useProcessMessage.ts +0 -273
- package/src/i18n/bn.json +0 -354
- package/src/i18n/de.json +0 -354
- package/src/i18n/en.json +0 -368
- package/src/i18n/es.json +0 -354
- package/src/i18n/fr.json +0 -354
- package/src/i18n/hi.json +0 -354
- package/src/i18n/id.json +0 -354
- package/src/i18n/it.json +0 -354
- package/src/i18n/ja.json +0 -354
- package/src/i18n/ko.json +0 -354
- package/src/i18n/pl.json +0 -354
- package/src/i18n/pt.json +0 -354
- package/src/i18n/th.json +0 -354
- package/src/i18n/tr.json +0 -354
- package/src/i18n/uk.json +0 -354
- package/src/i18n/vi.json +0 -354
- package/src/i18n/zh.json +0 -354
- package/src/providers/WalletProvider/EVMBaseProvider.tsx +0 -41
- package/src/providers/WalletProvider/EVMExternalContext.ts +0 -3
- package/src/providers/WalletProvider/EVMProvider.tsx +0 -28
- package/src/providers/WalletProvider/SDKProviders.tsx +0 -86
- package/src/providers/WalletProvider/SVMBaseProvider.tsx +0 -37
- package/src/providers/WalletProvider/SVMExternalContext.ts +0 -3
- package/src/providers/WalletProvider/SVMProvider.tsx +0 -29
- package/src/providers/WalletProvider/SuiBaseProvider.tsx +0 -31
- package/src/providers/WalletProvider/SuiExternalContext.ts +0 -3
- package/src/providers/WalletProvider/SuiProvider.tsx +0 -28
- package/src/providers/WalletProvider/UTXOBaseProvider.tsx +0 -29
- package/src/providers/WalletProvider/UTXOExternalContext.ts +0 -3
- package/src/providers/WalletProvider/UTXOProvider.tsx +0 -28
- package/src/utils/compactNumberFormatter.test.ts +0 -67
- package/src/utils/format.test.ts +0 -53
- package/tsconfig.json +0 -15
|
@@ -5,9 +5,9 @@ import MoreHoriz from '@mui/icons-material/MoreHoriz'
|
|
|
5
5
|
import OpenInNewRounded from '@mui/icons-material/OpenInNewRounded'
|
|
6
6
|
import TurnedInNot from '@mui/icons-material/TurnedInNot'
|
|
7
7
|
import { ListItemAvatar, ListItemText, MenuItem } from '@mui/material'
|
|
8
|
+
import { useNavigate } from '@tanstack/react-router'
|
|
8
9
|
import { useId, useRef, useState } from 'react'
|
|
9
10
|
import { useTranslation } from 'react-i18next'
|
|
10
|
-
import { useNavigate } from 'react-router-dom'
|
|
11
11
|
import { AccountAvatar } from '../../components/Avatar/AccountAvatar.js'
|
|
12
12
|
import type { BottomSheetBase } from '../../components/BottomSheet/types.js'
|
|
13
13
|
import { ListItem } from '../../components/ListItem/ListItem.js'
|
|
@@ -62,18 +62,15 @@ export const RecentWalletsPage = () => {
|
|
|
62
62
|
})
|
|
63
63
|
setSelectedBookmark(recentWallet)
|
|
64
64
|
setSendToWallet(true)
|
|
65
|
-
navigate(
|
|
66
|
-
|
|
65
|
+
navigate({
|
|
66
|
+
to: navigationRoutes.home,
|
|
67
67
|
replace: true,
|
|
68
68
|
})
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
const handleAddBookmark = (bookmark: Bookmark) => {
|
|
72
72
|
addBookmark(bookmark)
|
|
73
|
-
navigate(
|
|
74
|
-
relative: 'path',
|
|
75
|
-
replace: true,
|
|
76
|
-
})
|
|
73
|
+
navigate({ to: navigationRoutes.bookmarks, replace: true })
|
|
77
74
|
}
|
|
78
75
|
|
|
79
76
|
const closeMenu = () => {
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
|
|
27
27
|
export const SendToConfiguredWalletPage = () => {
|
|
28
28
|
const { t } = useTranslation()
|
|
29
|
-
const
|
|
29
|
+
const navigateBack = useNavigateBack()
|
|
30
30
|
const { toAddresses } = useWidgetConfig()
|
|
31
31
|
const [selectedToAddress, setSelectedToAddress] = useState<ToAddress>()
|
|
32
32
|
const { requiredToChainType } = useToAddressRequirements()
|
|
@@ -4,10 +4,10 @@ import History from '@mui/icons-material/History'
|
|
|
4
4
|
import TurnedIn from '@mui/icons-material/TurnedIn'
|
|
5
5
|
import Wallet from '@mui/icons-material/Wallet'
|
|
6
6
|
import { Box, Tooltip, Typography } from '@mui/material'
|
|
7
|
+
import { useNavigate } from '@tanstack/react-router'
|
|
7
8
|
import type { ChangeEvent } from 'react'
|
|
8
9
|
import { useRef, useState } from 'react'
|
|
9
10
|
import { useTranslation } from 'react-i18next'
|
|
10
|
-
import { useNavigate } from 'react-router-dom'
|
|
11
11
|
import type { BottomSheetBase } from '../../components/BottomSheet/types.js'
|
|
12
12
|
import { ButtonTertiary } from '../../components/ButtonTertiary.js'
|
|
13
13
|
import { CardButton } from '../../components/Card/CardButton.js'
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
ValidationAlert,
|
|
39
39
|
} from './SendToWalletPage.style.js'
|
|
40
40
|
|
|
41
|
-
export const SendToWalletPage = () => {
|
|
41
|
+
export const SendToWalletPage: React.FC = () => {
|
|
42
42
|
const { t } = useTranslation()
|
|
43
43
|
const navigate = useNavigate()
|
|
44
44
|
const bookmarkAddressSheetRef = useRef<BottomSheetBase>(null)
|
|
@@ -164,19 +164,19 @@ export const SendToWalletPage = () => {
|
|
|
164
164
|
}
|
|
165
165
|
|
|
166
166
|
const handleRecentWalletsClick = () => {
|
|
167
|
-
navigate(navigationRoutes.recentWallets)
|
|
167
|
+
navigate({ to: navigationRoutes.recentWallets })
|
|
168
168
|
}
|
|
169
169
|
|
|
170
170
|
const handleConnectedWalletsClick = () => {
|
|
171
|
-
navigate(navigationRoutes.connectedWallets)
|
|
171
|
+
navigate({ to: navigationRoutes.connectedWallets })
|
|
172
172
|
}
|
|
173
173
|
const handleBookmarkedWalletsClick = () => {
|
|
174
|
-
navigate(navigationRoutes.bookmarks)
|
|
174
|
+
navigate({ to: navigationRoutes.bookmarks })
|
|
175
175
|
}
|
|
176
176
|
|
|
177
177
|
const handleAddBookmark = (bookmark: Bookmark) => {
|
|
178
178
|
addBookmark(bookmark)
|
|
179
|
-
navigate(navigationRoutes.bookmarks)
|
|
179
|
+
navigate({ to: navigationRoutes.bookmarks })
|
|
180
180
|
}
|
|
181
181
|
|
|
182
182
|
const handleOnConfirm = (confirmedWallet: Bookmark) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import AirlineStops from '@mui/icons-material/AirlineStops'
|
|
2
2
|
import SwapHoriz from '@mui/icons-material/SwapHoriz'
|
|
3
|
+
import { useNavigate } from '@tanstack/react-router'
|
|
3
4
|
import { useTranslation } from 'react-i18next'
|
|
4
|
-
import { useNavigate } from 'react-router-dom'
|
|
5
5
|
import { CardButton } from '../../components/Card/CardButton.js'
|
|
6
6
|
import { useSettingMonitor } from '../../hooks/useSettingMonitor.js'
|
|
7
7
|
import { useWidgetConfig } from '../../providers/WidgetProvider/WidgetProvider.js'
|
|
@@ -38,7 +38,9 @@ export const BridgeAndExchangeSettings: React.FC<{
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
const handleClick = () => {
|
|
41
|
-
navigate(
|
|
41
|
+
navigate({
|
|
42
|
+
to: navigationRoutes[type.toLowerCase() as 'bridges' | 'exchanges'],
|
|
43
|
+
})
|
|
42
44
|
}
|
|
43
45
|
|
|
44
46
|
const Icon = supportedIcons[type]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Language from '@mui/icons-material/Language'
|
|
2
|
+
import { useNavigate } from '@tanstack/react-router'
|
|
2
3
|
import { useTranslation } from 'react-i18next'
|
|
3
|
-
import { useNavigate } from 'react-router-dom'
|
|
4
4
|
import { CardButton } from '../../components/Card/CardButton.js'
|
|
5
5
|
import { CardValue } from '../../components/Card/CardButton.style.js'
|
|
6
6
|
import { useLanguages } from '../../hooks/useLanguages.js'
|
|
@@ -20,7 +20,7 @@ export const LanguageSetting: React.FC = () => {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
const handleClick = () => {
|
|
23
|
-
navigate(navigationRoutes.languages)
|
|
23
|
+
navigate({ to: navigationRoutes.languages })
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
return (
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Collapse } from '@mui/material'
|
|
2
2
|
import type { PropsWithChildren, ReactNode } from 'react'
|
|
3
|
-
import { useId } from 'react'
|
|
3
|
+
import { forwardRef, useId, useImperativeHandle, useRef } from 'react'
|
|
4
4
|
import { Card } from '../../../components/Card/Card.js'
|
|
5
5
|
import {
|
|
6
6
|
CardRowButton,
|
|
@@ -12,39 +12,69 @@ import type { SettingCardTitle } from './types.js'
|
|
|
12
12
|
|
|
13
13
|
interface SettingCardExpandableProps extends SettingCardTitle {
|
|
14
14
|
value: ReactNode
|
|
15
|
+
disabled?: boolean
|
|
16
|
+
keepValueVisible?: boolean
|
|
17
|
+
onEntered?: () => void
|
|
15
18
|
}
|
|
16
19
|
|
|
17
|
-
export
|
|
20
|
+
export interface SettingCardExpandableRef {
|
|
21
|
+
element: HTMLButtonElement | null
|
|
22
|
+
isExpanded: boolean
|
|
23
|
+
toggleExpanded: (forceExpanded?: boolean) => void
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export const SettingCardExpandable = forwardRef<
|
|
27
|
+
SettingCardExpandableRef,
|
|
18
28
|
PropsWithChildren<SettingCardExpandableProps>
|
|
19
|
-
>
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
29
|
+
>(
|
|
30
|
+
(
|
|
31
|
+
{ icon, title, value, children, disabled, keepValueVisible, onEntered },
|
|
32
|
+
ref
|
|
33
|
+
) => {
|
|
34
|
+
const { expanded, toggleExpanded } = useSettingsCardExpandable()
|
|
35
|
+
const buttonId = useId()
|
|
36
|
+
const collapseId = useId()
|
|
37
|
+
const buttonRef = useRef<HTMLButtonElement>(null)
|
|
23
38
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
39
|
+
useImperativeHandle(
|
|
40
|
+
ref,
|
|
41
|
+
() => ({
|
|
42
|
+
element: buttonRef.current,
|
|
43
|
+
isExpanded: expanded,
|
|
44
|
+
toggleExpanded,
|
|
45
|
+
}),
|
|
46
|
+
[expanded, toggleExpanded]
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
return (
|
|
50
|
+
<Card sx={{ p: 1 }}>
|
|
51
|
+
<CardRowButton
|
|
52
|
+
ref={buttonRef}
|
|
53
|
+
id={buttonId}
|
|
54
|
+
aria-expanded={expanded}
|
|
55
|
+
aria-controls={collapseId}
|
|
56
|
+
onClick={disabled ? undefined : () => toggleExpanded()}
|
|
57
|
+
disableRipple
|
|
58
|
+
sx={{ p: 1, cursor: disabled ? 'default' : 'pointer' }}
|
|
59
|
+
>
|
|
60
|
+
<CardTitleContainer>
|
|
61
|
+
{icon}
|
|
62
|
+
<CardValue>{title}</CardValue>
|
|
63
|
+
</CardTitleContainer>
|
|
64
|
+
{(!expanded || keepValueVisible) && value}
|
|
65
|
+
</CardRowButton>
|
|
66
|
+
<Collapse
|
|
67
|
+
id={collapseId}
|
|
68
|
+
role="region"
|
|
69
|
+
aria-labelledby={buttonId}
|
|
70
|
+
in={expanded}
|
|
71
|
+
mountOnEnter
|
|
72
|
+
unmountOnExit
|
|
73
|
+
onEntered={onEntered}
|
|
74
|
+
>
|
|
75
|
+
{children}
|
|
76
|
+
</Collapse>
|
|
77
|
+
</Card>
|
|
78
|
+
)
|
|
79
|
+
}
|
|
80
|
+
)
|
|
@@ -22,8 +22,9 @@ export const useSettingsCardExpandable = () => {
|
|
|
22
22
|
const settingCardExpandableId = useId()
|
|
23
23
|
const [expanded, setExpanded] = useState(false)
|
|
24
24
|
const { openCard, setOpenCard } = useContext(SettingsAccordionContext)
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
|
|
26
|
+
const toggleExpanded = (forceExpanded?: boolean) => {
|
|
27
|
+
const newExpanded = forceExpanded ?? !expanded
|
|
27
28
|
setExpanded(newExpanded)
|
|
28
29
|
|
|
29
30
|
if (newExpanded && openCard !== settingCardExpandableId) {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { useTranslation } from 'react-i18next'
|
|
2
2
|
import { PageContainer } from '../../components/PageContainer.js'
|
|
3
3
|
import { useHeader } from '../../hooks/useHeader.js'
|
|
4
|
+
import { useWidgetConfig } from '../../providers/WidgetProvider/WidgetProvider.js'
|
|
5
|
+
import { HiddenUI } from '../../types/widget.js'
|
|
4
6
|
import { BridgeAndExchangeSettings } from './BridgeAndExchangeSettings.js'
|
|
5
7
|
import { GasPriceSettings } from './GasPriceSettings.js'
|
|
6
8
|
import { LanguageSetting } from './LanguageSetting.js'
|
|
@@ -9,10 +11,12 @@ import { RoutePrioritySettings } from './RoutePrioritySettings.js'
|
|
|
9
11
|
import { SettingsList } from './SettingsCard/SettingCard.style.js'
|
|
10
12
|
import { SettingsCardAccordion } from './SettingsCard/SettingsAccordian.js'
|
|
11
13
|
import { SlippageSettings } from './SlippageSettings/SlippageSettings.js'
|
|
14
|
+
import { SmallBalanceFilterSettings } from './SmallBalanceFilterSettings.js'
|
|
12
15
|
import { ThemeSettings } from './ThemeSettings.js'
|
|
13
16
|
|
|
14
17
|
export const SettingsPage = () => {
|
|
15
18
|
const { t } = useTranslation()
|
|
19
|
+
const { hiddenUI } = useWidgetConfig()
|
|
16
20
|
useHeader(t('header.settings'))
|
|
17
21
|
|
|
18
22
|
return (
|
|
@@ -24,6 +28,9 @@ export const SettingsPage = () => {
|
|
|
24
28
|
<RoutePrioritySettings />
|
|
25
29
|
<GasPriceSettings />
|
|
26
30
|
<SlippageSettings />
|
|
31
|
+
{!hiddenUI?.includes(HiddenUI.HideSmallBalances) && (
|
|
32
|
+
<SmallBalanceFilterSettings />
|
|
33
|
+
)}
|
|
27
34
|
<BridgeAndExchangeSettings type="Bridges" />
|
|
28
35
|
<BridgeAndExchangeSettings type="Exchanges" />
|
|
29
36
|
</SettingsCardAccordion>
|
|
@@ -19,7 +19,7 @@ export const SettingsFieldSet = styled(Box)(({ theme }) => ({
|
|
|
19
19
|
}),
|
|
20
20
|
}))
|
|
21
21
|
|
|
22
|
-
const
|
|
22
|
+
const settingsControlSelected = (theme: Theme) => ({
|
|
23
23
|
backgroundColor: theme.vars.palette.background.paper,
|
|
24
24
|
boxShadow: `0px 2px 4px rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.04)`,
|
|
25
25
|
...theme.applyStyles('dark', {
|
|
@@ -29,17 +29,17 @@ const slippageControlSelected = (theme: Theme) => ({
|
|
|
29
29
|
borderRadius: `calc(${theme.vars.shape.borderRadius} - 4px)`,
|
|
30
30
|
})
|
|
31
31
|
|
|
32
|
-
interface
|
|
32
|
+
interface SettingsControlProps {
|
|
33
33
|
selected?: boolean
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
export const
|
|
36
|
+
export const SettingsDefaultButton = styled(ButtonBase)<SettingsControlProps>(
|
|
37
37
|
({ theme, selected }) => {
|
|
38
|
-
const
|
|
38
|
+
const settingsControlSelectedStyles = settingsControlSelected(theme)
|
|
39
39
|
const selectedStyle = selected
|
|
40
40
|
? {
|
|
41
41
|
'&:not(:focus)': {
|
|
42
|
-
...
|
|
42
|
+
...settingsControlSelectedStyles,
|
|
43
43
|
},
|
|
44
44
|
}
|
|
45
45
|
: {}
|
|
@@ -50,20 +50,20 @@ export const SlippageDefaultButton = styled(ButtonBase)<SlippageDefaultProps>(
|
|
|
50
50
|
fontSize: '1rem',
|
|
51
51
|
fontWeight: 700,
|
|
52
52
|
'&:focus': {
|
|
53
|
-
...
|
|
53
|
+
...settingsControlSelectedStyles,
|
|
54
54
|
},
|
|
55
55
|
...selectedStyle,
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
)
|
|
59
59
|
|
|
60
|
-
export const
|
|
60
|
+
export const SettingsCustomInput = styled(InputBase)<SettingsControlProps>(
|
|
61
61
|
({ theme, selected }) => {
|
|
62
|
-
const
|
|
62
|
+
const settingsControlSelectedStyles = settingsControlSelected(theme)
|
|
63
63
|
const selectedStyle = selected
|
|
64
64
|
? {
|
|
65
65
|
'&:not(:focus)': {
|
|
66
|
-
...
|
|
66
|
+
...settingsControlSelectedStyles,
|
|
67
67
|
},
|
|
68
68
|
}
|
|
69
69
|
: {}
|
|
@@ -82,7 +82,7 @@ export const SlippageCustomInput = styled(InputBase)<SlippageDefaultProps>(
|
|
|
82
82
|
opacity: 1,
|
|
83
83
|
},
|
|
84
84
|
'&:focus': {
|
|
85
|
-
...
|
|
85
|
+
...settingsControlSelectedStyles,
|
|
86
86
|
},
|
|
87
87
|
...selectedStyle,
|
|
88
88
|
},
|
|
@@ -12,9 +12,9 @@ import { formatInputAmount, formatSlippage } from '../../../utils/format.js'
|
|
|
12
12
|
import { BadgedValue } from '../SettingsCard/BadgedValue.js'
|
|
13
13
|
import { SettingCardExpandable } from '../SettingsCard/SettingCardExpandable.js'
|
|
14
14
|
import {
|
|
15
|
+
SettingsCustomInput,
|
|
16
|
+
SettingsDefaultButton,
|
|
15
17
|
SettingsFieldSet,
|
|
16
|
-
SlippageCustomInput,
|
|
17
|
-
SlippageDefaultButton,
|
|
18
18
|
SlippageLimitsWarningContainer,
|
|
19
19
|
} from './SlippageSettings.style.js'
|
|
20
20
|
|
|
@@ -106,7 +106,7 @@ export const SlippageSettings: React.FC = () => {
|
|
|
106
106
|
}}
|
|
107
107
|
>
|
|
108
108
|
<SettingsFieldSet>
|
|
109
|
-
<
|
|
109
|
+
<SettingsDefaultButton
|
|
110
110
|
selected={defaultSlippage === slippage && focused !== 'input'}
|
|
111
111
|
onFocus={() => {
|
|
112
112
|
setFocused('button')
|
|
@@ -118,8 +118,8 @@ export const SlippageSettings: React.FC = () => {
|
|
|
118
118
|
disableRipple
|
|
119
119
|
>
|
|
120
120
|
{t('button.auto')}
|
|
121
|
-
</
|
|
122
|
-
<
|
|
121
|
+
</SettingsDefaultButton>
|
|
122
|
+
<SettingsCustomInput
|
|
123
123
|
selected={defaultSlippage !== slippage && focused !== 'button'}
|
|
124
124
|
placeholder={focused === 'input' ? '' : t('settings.custom')}
|
|
125
125
|
inputProps={{
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import AttachMoney from '@mui/icons-material/AttachMoney'
|
|
2
|
+
import { Box } from '@mui/material'
|
|
3
|
+
import {
|
|
4
|
+
type ChangeEvent,
|
|
5
|
+
type ChangeEventHandler,
|
|
6
|
+
type FocusEventHandler,
|
|
7
|
+
useEffect,
|
|
8
|
+
useRef,
|
|
9
|
+
useState,
|
|
10
|
+
} from 'react'
|
|
11
|
+
import { useTranslation } from 'react-i18next'
|
|
12
|
+
import { Switch } from '../../components/Switch.js'
|
|
13
|
+
import { useSettings } from '../../stores/settings/useSettings.js'
|
|
14
|
+
import { useSettingsActions } from '../../stores/settings/useSettingsActions.js'
|
|
15
|
+
import { formatInputAmount, usdDecimals } from '../../utils/format.js'
|
|
16
|
+
import {
|
|
17
|
+
SettingCardExpandable,
|
|
18
|
+
type SettingCardExpandableRef,
|
|
19
|
+
} from './SettingsCard/SettingCardExpandable.js'
|
|
20
|
+
import {
|
|
21
|
+
SettingsCustomInput,
|
|
22
|
+
SettingsFieldSet,
|
|
23
|
+
} from './SlippageSettings/SlippageSettings.style.js'
|
|
24
|
+
|
|
25
|
+
const defaultThreshold = '0.01'
|
|
26
|
+
|
|
27
|
+
export const SmallBalanceFilterSettings: React.FC = () => {
|
|
28
|
+
const { t } = useTranslation()
|
|
29
|
+
const { smallBalanceThreshold } = useSettings(['smallBalanceThreshold'])
|
|
30
|
+
const { setValue } = useSettingsActions()
|
|
31
|
+
const [inputValue, setInputValue] = useState(
|
|
32
|
+
smallBalanceThreshold ?? defaultThreshold
|
|
33
|
+
)
|
|
34
|
+
const buttonRef = useRef<SettingCardExpandableRef>(null)
|
|
35
|
+
const inputRef = useRef<HTMLInputElement>(null)
|
|
36
|
+
|
|
37
|
+
const formatAndSetThreshold = (inputValue: string, returnInitial = false) => {
|
|
38
|
+
const value = inputValue.replace('$', '')
|
|
39
|
+
const formattedValue = formatInputAmount(value, usdDecimals, returnInitial)
|
|
40
|
+
if (returnInitial) {
|
|
41
|
+
setInputValue(formattedValue)
|
|
42
|
+
} else {
|
|
43
|
+
const formattedOrDefault = formattedValue || defaultThreshold
|
|
44
|
+
setInputValue(formattedOrDefault)
|
|
45
|
+
setValue('smallBalanceThreshold', formattedOrDefault)
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const handleInputUpdate: ChangeEventHandler<HTMLInputElement> = (event) => {
|
|
50
|
+
formatAndSetThreshold(event.target.value, true)
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const handleInputBlur: FocusEventHandler<HTMLInputElement> = (event) => {
|
|
54
|
+
formatAndSetThreshold(event.target.value, false)
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const handleHideSmallBalancesChange = (
|
|
58
|
+
event: ChangeEvent<HTMLInputElement>
|
|
59
|
+
) => {
|
|
60
|
+
setValue(
|
|
61
|
+
'smallBalanceThreshold',
|
|
62
|
+
event.target.checked ? defaultThreshold : undefined
|
|
63
|
+
)
|
|
64
|
+
if (buttonRef.current) {
|
|
65
|
+
buttonRef.current?.toggleExpanded(event.target.checked)
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const handleExpanded = () => {
|
|
70
|
+
if (inputRef.current) {
|
|
71
|
+
inputRef.current.focus()
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
useEffect(() => {
|
|
76
|
+
setInputValue(smallBalanceThreshold ?? defaultThreshold)
|
|
77
|
+
}, [smallBalanceThreshold])
|
|
78
|
+
|
|
79
|
+
return (
|
|
80
|
+
<SettingCardExpandable
|
|
81
|
+
ref={buttonRef}
|
|
82
|
+
value={
|
|
83
|
+
<Switch
|
|
84
|
+
checked={!!smallBalanceThreshold}
|
|
85
|
+
onChange={handleHideSmallBalancesChange}
|
|
86
|
+
aria-label={t('settings.hideSmallBalances')}
|
|
87
|
+
/>
|
|
88
|
+
}
|
|
89
|
+
icon={<AttachMoney />}
|
|
90
|
+
title={t('settings.hideSmallBalances')}
|
|
91
|
+
disabled={!smallBalanceThreshold}
|
|
92
|
+
keepValueVisible
|
|
93
|
+
onEntered={handleExpanded}
|
|
94
|
+
>
|
|
95
|
+
<Box
|
|
96
|
+
sx={{
|
|
97
|
+
mt: 1.5,
|
|
98
|
+
}}
|
|
99
|
+
>
|
|
100
|
+
<SettingsFieldSet>
|
|
101
|
+
<SettingsCustomInput
|
|
102
|
+
inputRef={inputRef}
|
|
103
|
+
selected
|
|
104
|
+
inputProps={{
|
|
105
|
+
inputMode: 'decimal',
|
|
106
|
+
}}
|
|
107
|
+
onChange={handleInputUpdate}
|
|
108
|
+
onBlur={handleInputBlur}
|
|
109
|
+
value={`$${inputValue}`}
|
|
110
|
+
autoComplete="off"
|
|
111
|
+
/>
|
|
112
|
+
</SettingsFieldSet>
|
|
113
|
+
</Box>
|
|
114
|
+
</SettingCardExpandable>
|
|
115
|
+
)
|
|
116
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { FullStatusData } from '@lifi/sdk'
|
|
2
2
|
import { Box, Typography } from '@mui/material'
|
|
3
|
+
import { useLocation, useNavigate } from '@tanstack/react-router'
|
|
3
4
|
import { useEffect, useMemo } from 'react'
|
|
4
5
|
import { useTranslation } from 'react-i18next'
|
|
5
|
-
import { useLocation } from 'react-router-dom'
|
|
6
6
|
import { ContractComponent } from '../../components/ContractComponent/ContractComponent.js'
|
|
7
7
|
import { PageContainer } from '../../components/PageContainer.js'
|
|
8
8
|
import { getStepList } from '../../components/Step/StepList.js'
|
|
@@ -10,7 +10,6 @@ import { TransactionDetails } from '../../components/TransactionDetails.js'
|
|
|
10
10
|
import { internalExplorerUrl } from '../../config/constants.js'
|
|
11
11
|
import { useExplorer } from '../../hooks/useExplorer.js'
|
|
12
12
|
import { useHeader } from '../../hooks/useHeader.js'
|
|
13
|
-
import { useNavigateBack } from '../../hooks/useNavigateBack.js'
|
|
14
13
|
import { useTools } from '../../hooks/useTools.js'
|
|
15
14
|
import { useTransactionDetails } from '../../hooks/useTransactionDetails.js'
|
|
16
15
|
import { useWidgetConfig } from '../../providers/WidgetProvider/WidgetProvider.js'
|
|
@@ -25,7 +24,7 @@ import { TransferIdCard } from './TransferIdCard.js'
|
|
|
25
24
|
|
|
26
25
|
export const TransactionDetailsPage: React.FC = () => {
|
|
27
26
|
const { t, i18n } = useTranslation()
|
|
28
|
-
const
|
|
27
|
+
const navigate = useNavigate()
|
|
29
28
|
const {
|
|
30
29
|
subvariant,
|
|
31
30
|
subvariantOptions,
|
|
@@ -33,14 +32,14 @@ export const TransactionDetailsPage: React.FC = () => {
|
|
|
33
32
|
explorerUrls,
|
|
34
33
|
hiddenUI,
|
|
35
34
|
} = useWidgetConfig()
|
|
36
|
-
const {
|
|
35
|
+
const { search }: any = useLocation()
|
|
37
36
|
const { tools } = useTools()
|
|
38
37
|
const { getTransactionLink } = useExplorer()
|
|
39
38
|
const storedRouteExecution = useRouteExecutionStore(
|
|
40
|
-
(store) => store.routes[
|
|
39
|
+
(store) => store.routes[search?.routeId]
|
|
41
40
|
)
|
|
42
41
|
const { transaction, isLoading } = useTransactionDetails(
|
|
43
|
-
!storedRouteExecution &&
|
|
42
|
+
!storedRouteExecution && search?.transactionHash
|
|
44
43
|
)
|
|
45
44
|
|
|
46
45
|
const title =
|
|
@@ -67,7 +66,7 @@ export const TransactionDetailsPage: React.FC = () => {
|
|
|
67
66
|
|
|
68
67
|
useEffect(() => {
|
|
69
68
|
if (!isLoading && !routeExecution) {
|
|
70
|
-
navigate(navigationRoutes.home)
|
|
69
|
+
navigate({ to: navigationRoutes.home })
|
|
71
70
|
}
|
|
72
71
|
}, [isLoading, navigate, routeExecution])
|
|
73
72
|
|
|
@@ -94,7 +93,7 @@ export const TransactionDetailsPage: React.FC = () => {
|
|
|
94
93
|
}
|
|
95
94
|
|
|
96
95
|
const startedAt = new Date(
|
|
97
|
-
(routeExecution?.route.steps[0].execution?.
|
|
96
|
+
(routeExecution?.route.steps[0].execution?.startedAt ?? 0) *
|
|
98
97
|
(storedRouteExecution ? 1 : 1000) // local and BE routes have different ms handling
|
|
99
98
|
)
|
|
100
99
|
|
|
@@ -5,8 +5,8 @@ import type {
|
|
|
5
5
|
TokenAmount,
|
|
6
6
|
} from '@lifi/sdk'
|
|
7
7
|
import { Box, Typography } from '@mui/material'
|
|
8
|
+
import { useNavigate } from '@tanstack/react-router'
|
|
8
9
|
import { useTranslation } from 'react-i18next'
|
|
9
|
-
import { useNavigate } from 'react-router-dom'
|
|
10
10
|
import { Card } from '../../components/Card/Card.js'
|
|
11
11
|
import { Token } from '../../components/Token/Token.js'
|
|
12
12
|
import { TokenDivider } from '../../components/Token/Token.style.js'
|
|
@@ -24,8 +24,9 @@ export const TransactionHistoryItem: React.FC<{
|
|
|
24
24
|
.receiving as ExtendedTransactionInfo
|
|
25
25
|
|
|
26
26
|
const handleClick = () => {
|
|
27
|
-
navigate(
|
|
28
|
-
|
|
27
|
+
navigate({
|
|
28
|
+
to: navigationRoutes.transactionDetails,
|
|
29
|
+
search: {
|
|
29
30
|
transactionHash: (transaction as FullStatusData).sending.txHash,
|
|
30
31
|
},
|
|
31
32
|
})
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { FullStatusData } from '@lifi/sdk'
|
|
2
2
|
import { Box, List } from '@mui/material'
|
|
3
3
|
import { useVirtualizer } from '@tanstack/react-virtual'
|
|
4
|
-
import type React from 'react'
|
|
5
4
|
import { useCallback, useRef } from 'react'
|
|
6
5
|
import { useTranslation } from 'react-i18next'
|
|
7
6
|
import { PageContainer } from '../../components/PageContainer.js'
|
|
@@ -13,7 +12,7 @@ import { TransactionHistoryEmpty } from './TransactionHistoryEmpty.js'
|
|
|
13
12
|
import { TransactionHistoryItem } from './TransactionHistoryItem.js'
|
|
14
13
|
import { TransactionHistoryItemSkeleton } from './TransactionHistorySkeleton.js'
|
|
15
14
|
|
|
16
|
-
export const TransactionHistoryPage
|
|
15
|
+
export const TransactionHistoryPage = () => {
|
|
17
16
|
// Parent ref and useVirtualizer should be in one file to avoid blank page (0 virtual items) issue
|
|
18
17
|
const parentRef = useRef<HTMLDivElement | null>(null)
|
|
19
18
|
const { data: transactions, isLoading } = useTransactionHistory()
|