@lifi/widget 3.24.3 → 3.25.0-beta.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/dist/esm/AppDefault.js +3 -3
- package/dist/esm/AppDefault.js.map +1 -1
- package/dist/esm/AppDrawer.style.d.ts +1 -1
- package/dist/esm/AppProvider.js +2 -2
- package/dist/esm/AppProvider.js.map +1 -1
- package/dist/esm/components/ActiveTransactions/ActiveTransactions.style.js +1 -1
- package/dist/esm/components/ActiveTransactions/ActiveTransactions.style.js.map +1 -1
- package/dist/esm/components/AmountInput/AmountInput.style.js +1 -1
- package/dist/esm/components/AmountInput/AmountInput.style.js.map +1 -1
- package/dist/esm/components/AmountInput/AmountInputAdornment.style.d.ts +1 -1
- package/dist/esm/components/AppContainer.js +6 -13
- package/dist/esm/components/AppContainer.js.map +1 -1
- package/dist/esm/components/Avatar/Avatar.style.js +1 -1
- package/dist/esm/components/Avatar/Avatar.style.js.map +1 -1
- package/dist/esm/components/ButtonTertiary.d.ts +1 -1
- package/dist/esm/components/Card/CardButton.style.js +1 -1
- package/dist/esm/components/Card/CardButton.style.js.map +1 -1
- package/dist/esm/components/Card/CardHeader.js +1 -1
- package/dist/esm/components/Card/CardHeader.js.map +1 -1
- package/dist/esm/components/Card/CardIconButton.d.ts +1 -1
- package/dist/esm/components/Card/CardLabel.js +1 -1
- package/dist/esm/components/Card/CardLabel.js.map +1 -1
- package/dist/esm/components/Card/CardTitle.js +1 -1
- package/dist/esm/components/Card/CardTitle.js.map +1 -1
- package/dist/esm/components/ChainSelect/ChainSelect.js +1 -1
- package/dist/esm/components/ChainSelect/ChainSelect.js.map +1 -1
- package/dist/esm/components/ChainSelect/useChainSelect.js +13 -2
- package/dist/esm/components/ChainSelect/useChainSelect.js.map +1 -1
- package/dist/esm/components/Chains/ChainList.d.ts +13 -0
- package/dist/esm/components/Chains/ChainList.js +17 -0
- package/dist/esm/components/Chains/ChainList.js.map +1 -0
- package/dist/esm/components/Chains/ChainList.style.d.ts +14 -0
- package/dist/esm/components/Chains/ChainList.style.js +38 -0
- package/dist/esm/components/Chains/ChainList.style.js.map +1 -0
- package/dist/esm/components/Chains/ChainListItem.d.ts +11 -0
- package/dist/esm/components/Chains/ChainListItem.js +11 -0
- package/dist/esm/components/Chains/ChainListItem.js.map +1 -0
- package/dist/esm/components/Chains/ChainSearchInput.d.ts +10 -0
- package/dist/esm/components/Chains/ChainSearchInput.js +19 -0
- package/dist/esm/components/Chains/ChainSearchInput.js.map +1 -0
- package/dist/esm/components/Chains/ChainsExpanded.d.ts +7 -0
- package/dist/esm/components/Chains/ChainsExpanded.js +11 -0
- package/dist/esm/components/Chains/ChainsExpanded.js.map +1 -0
- package/dist/esm/components/Chains/ChainsExpanded.style.d.ts +6 -0
- package/dist/esm/components/Chains/ChainsExpanded.style.js +16 -0
- package/dist/esm/components/Chains/ChainsExpanded.style.js.map +1 -0
- package/dist/esm/components/Chains/SelectChainContent.d.ts +9 -0
- package/dist/esm/components/Chains/SelectChainContent.js +60 -0
- package/dist/esm/components/Chains/SelectChainContent.js.map +1 -0
- package/dist/esm/components/Chains/VirtualizedChainList.d.ts +11 -0
- package/dist/esm/components/Chains/VirtualizedChainList.js +40 -0
- package/dist/esm/components/Chains/VirtualizedChainList.js.map +1 -0
- package/dist/esm/components/Expansion/Expansion.d.ts +1 -0
- package/dist/esm/components/Expansion/Expansion.js +41 -0
- package/dist/esm/components/Expansion/Expansion.js.map +1 -0
- package/dist/esm/components/Expansion/ExpansionTransition.d.ts +9 -0
- package/dist/esm/components/Expansion/ExpansionTransition.js +45 -0
- package/dist/esm/components/Expansion/ExpansionTransition.js.map +1 -0
- 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 +1 -1
- package/dist/esm/components/Header/Header.style.js +0 -1
- package/dist/esm/components/Header/Header.style.js.map +1 -1
- package/dist/esm/components/Header/NavigationHeader.js +2 -2
- package/dist/esm/components/Header/NavigationHeader.js.map +1 -1
- package/dist/esm/components/Header/SettingsButton.style.d.ts +1 -1
- package/dist/esm/components/Header/SettingsButton.style.js +1 -1
- package/dist/esm/components/Header/SettingsButton.style.js.map +1 -1
- package/dist/esm/components/ListItem/ListItem.js +1 -1
- package/dist/esm/components/ListItem/ListItem.js.map +1 -1
- package/dist/esm/components/ListItemButton.js +13 -1
- package/dist/esm/components/ListItemButton.js.map +1 -1
- package/dist/esm/components/ListItemText.js +1 -1
- package/dist/esm/components/ListItemText.js.map +1 -1
- package/dist/esm/components/ProgressToNextUpdate.js +1 -1
- package/dist/esm/components/ProgressToNextUpdate.js.map +1 -1
- package/dist/esm/components/RouteCard/RouteCard.js +4 -4
- package/dist/esm/components/RouteCard/RouteCard.js.map +1 -1
- package/dist/esm/components/RouteCard/RouteCardEssentials.js +5 -5
- package/dist/esm/components/RouteCard/RouteCardEssentials.js.map +1 -1
- package/dist/esm/components/RouteCard/RouteNotFoundCard.js +1 -0
- package/dist/esm/components/RouteCard/RouteNotFoundCard.js.map +1 -1
- package/dist/esm/components/RouteCard/getMatchingLabels.js +5 -3
- package/dist/esm/components/RouteCard/getMatchingLabels.js.map +1 -1
- package/dist/esm/components/Routes/Routes.js +1 -1
- package/dist/esm/components/Routes/Routes.js.map +1 -1
- package/dist/esm/components/Routes/RoutesContent.d.ts +14 -0
- package/dist/esm/components/Routes/RoutesContent.js +55 -0
- package/dist/esm/components/Routes/RoutesContent.js.map +1 -0
- package/dist/esm/components/Routes/RoutesExpanded.d.ts +7 -2
- package/dist/esm/components/Routes/RoutesExpanded.js +12 -70
- package/dist/esm/components/Routes/RoutesExpanded.js.map +1 -1
- package/dist/esm/components/Routes/RoutesExpanded.style.d.ts +1 -3
- package/dist/esm/components/Routes/RoutesExpanded.style.js +4 -16
- package/dist/esm/components/Routes/RoutesExpanded.style.js.map +1 -1
- package/dist/esm/components/Search/SearchInput.d.ts +5 -2
- package/dist/esm/components/Search/SearchInput.js +7 -3
- package/dist/esm/components/Search/SearchInput.js.map +1 -1
- package/dist/esm/components/Search/SearchInput.style.d.ts +4 -1
- package/dist/esm/components/Search/SearchInput.style.js +25 -3
- package/dist/esm/components/Search/SearchInput.style.js.map +1 -1
- package/dist/esm/components/Search/SearchNotFound.style.js +2 -1
- package/dist/esm/components/Search/SearchNotFound.style.js.map +1 -1
- package/dist/esm/components/Select.js +1 -1
- package/dist/esm/components/Select.js.map +1 -1
- package/dist/esm/components/SelectTokenButton/SelectTokenButton.style.js +1 -1
- package/dist/esm/components/SelectTokenButton/SelectTokenButton.style.js.map +1 -1
- package/dist/esm/components/SendToWallet/SendToWalletButton.js +2 -7
- package/dist/esm/components/SendToWallet/SendToWalletButton.js.map +1 -1
- package/dist/esm/components/Skeleton/WidgetSkeleton.style.d.ts +2 -2
- package/dist/esm/components/Skeleton/WidgetSkeleton.style.js +0 -1
- package/dist/esm/components/Skeleton/WidgetSkeleton.style.js.map +1 -1
- package/dist/esm/components/Step/CircularProgress.style.js +1 -1
- package/dist/esm/components/Step/CircularProgress.style.js.map +1 -1
- package/dist/esm/components/StepActions/StepActions.js +3 -3
- package/dist/esm/components/StepActions/StepActions.style.js +1 -1
- package/dist/esm/components/StepActions/StepActions.style.js.map +1 -1
- package/dist/esm/components/TextFitter/TextFitter.js +1 -1
- package/dist/esm/components/TextFitter/TextFitter.js.map +1 -1
- package/dist/esm/components/Token/Token.js +2 -2
- package/dist/esm/components/Token/Token.js.map +1 -1
- package/dist/esm/components/Token/Token.style.js +1 -1
- package/dist/esm/components/Token/Token.style.js.map +1 -1
- package/dist/esm/components/TokenList/TokenDetailsSheet.js.map +1 -1
- package/dist/esm/components/TokenList/TokenDetailsSheetContent.js.map +1 -1
- package/dist/esm/components/TokenList/TokenDetailsSheetContent.style.js +1 -1
- package/dist/esm/components/TokenList/TokenDetailsSheetContent.style.js.map +1 -1
- package/dist/esm/components/TokenList/TokenList.js +3 -3
- package/dist/esm/components/TokenList/TokenList.js.map +1 -1
- package/dist/esm/components/TokenList/TokenList.style.d.ts +2 -1
- package/dist/esm/components/TokenList/TokenList.style.js +6 -1
- package/dist/esm/components/TokenList/TokenList.style.js.map +1 -1
- package/dist/esm/components/TokenList/TokenListItem.js +16 -7
- package/dist/esm/components/TokenList/TokenListItem.js.map +1 -1
- package/dist/esm/components/TokenList/VirtualizedTokenList.js +13 -7
- package/dist/esm/components/TokenList/VirtualizedTokenList.js.map +1 -1
- package/dist/esm/components/TokenList/types.d.ts +3 -0
- 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.js +1 -1
- package/dist/esm/components/TokenRate/TokenRate.style.js.map +1 -1
- package/dist/esm/components/TransactionDetails.js +7 -9
- 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/timer/time.js +1 -1
- package/dist/esm/hooks/timer/time.js.map +1 -1
- package/dist/esm/hooks/timer/useTimer.js.map +1 -1
- package/dist/esm/hooks/useAvailableChains.js +3 -2
- package/dist/esm/hooks/useAvailableChains.js.map +1 -1
- package/dist/esm/hooks/useChains.js +4 -4
- package/dist/esm/hooks/useChains.js.map +1 -1
- package/dist/esm/hooks/useExpansionRoutes.d.ts +2 -0
- package/dist/esm/hooks/useExpansionRoutes.js +26 -0
- package/dist/esm/hooks/useExpansionRoutes.js.map +1 -0
- package/dist/esm/hooks/useHasChainExpansion.d.ts +2 -0
- package/dist/esm/hooks/useHasChainExpansion.js +16 -0
- package/dist/esm/hooks/useHasChainExpansion.js.map +1 -0
- package/dist/esm/hooks/useIsBatchingSupported.js +4 -1
- package/dist/esm/hooks/useIsBatchingSupported.js.map +1 -1
- package/dist/esm/hooks/useListHeight.js +1 -1
- package/dist/esm/hooks/useListHeight.js.map +1 -1
- package/dist/esm/hooks/useRouteExecution.js +3 -3
- package/dist/esm/hooks/useRouteExecution.js.map +1 -1
- package/dist/esm/hooks/useRoutes.js +6 -3
- package/dist/esm/hooks/useRoutes.js.map +1 -1
- package/dist/esm/hooks/useToAddressReset.js +10 -2
- package/dist/esm/hooks/useToAddressReset.js.map +1 -1
- package/dist/esm/hooks/useTokenBalance.js.map +1 -1
- package/dist/esm/hooks/useTokenBalances.js +1 -0
- package/dist/esm/hooks/useTokenBalances.js.map +1 -1
- package/dist/esm/hooks/useTokenSearch.js +6 -4
- package/dist/esm/hooks/useTokenSearch.js.map +1 -1
- package/dist/esm/hooks/useTokens.js +5 -3
- package/dist/esm/hooks/useTokens.js.map +1 -1
- package/dist/esm/hooks/useTools.js +5 -3
- package/dist/esm/hooks/useTools.js.map +1 -1
- package/dist/esm/hooks/useTransactionDetails.js.map +1 -1
- package/dist/esm/hooks/useWidgetEvents.js.map +1 -1
- package/dist/esm/i18n/bn.json +2 -1
- package/dist/esm/i18n/de.json +2 -1
- package/dist/esm/i18n/en.json +2 -1
- package/dist/esm/i18n/es.json +2 -1
- package/dist/esm/i18n/fr.json +2 -1
- package/dist/esm/i18n/hi.json +1 -0
- package/dist/esm/i18n/id.json +2 -1
- package/dist/esm/i18n/it.json +2 -1
- package/dist/esm/i18n/ja.json +2 -1
- package/dist/esm/i18n/ko.json +2 -1
- package/dist/esm/i18n/pl.json +350 -0
- package/dist/esm/i18n/pt.json +2 -1
- package/dist/esm/i18n/th.json +2 -1
- package/dist/esm/i18n/tr.json +2 -1
- package/dist/esm/i18n/uk.json +14 -13
- package/dist/esm/i18n/vi.json +2 -1
- package/dist/esm/i18n/zh.json +2 -1
- package/dist/esm/index.d.ts +8 -8
- package/dist/esm/index.js +8 -8
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/pages/RoutesPage/RoutesPage.js +1 -1
- package/dist/esm/pages/RoutesPage/RoutesPage.js.map +1 -1
- package/dist/esm/pages/SelectChainPage/SelectChainPage.js +7 -33
- package/dist/esm/pages/SelectChainPage/SelectChainPage.js.map +1 -1
- package/dist/esm/pages/SelectEnabledToolsPage.js +1 -1
- package/dist/esm/pages/SelectEnabledToolsPage.js.map +1 -1
- package/dist/esm/pages/SelectTokenPage/SearchTokenInput.js +1 -1
- package/dist/esm/pages/SelectTokenPage/SearchTokenInput.js.map +1 -1
- package/dist/esm/pages/SelectTokenPage/SelectTokenPage.js +20 -11
- package/dist/esm/pages/SelectTokenPage/SelectTokenPage.js.map +1 -1
- package/dist/esm/pages/SendToWallet/BookmarksPage.js +1 -1
- package/dist/esm/pages/SendToWallet/BookmarksPage.js.map +1 -1
- package/dist/esm/pages/SendToWallet/SendToWalletPage.style.d.ts +2 -2
- package/dist/esm/pages/SendToWallet/SendToWalletPage.style.js +1 -1
- package/dist/esm/pages/SendToWallet/SendToWalletPage.style.js.map +1 -1
- package/dist/esm/pages/SettingsPage/SettingsCard/SettingCard.style.js +1 -1
- package/dist/esm/pages/SettingsPage/SettingsCard/SettingCard.style.js.map +1 -1
- package/dist/esm/pages/SettingsPage/SettingsCard/SettingCardExpandable.js +1 -3
- package/dist/esm/pages/SettingsPage/SettingsCard/SettingCardExpandable.js.map +1 -1
- package/dist/esm/pages/SettingsPage/SlippageSettings/SlippageSettings.js +1 -1
- package/dist/esm/pages/SettingsPage/SlippageSettings/SlippageSettings.js.map +1 -1
- package/dist/esm/pages/TransactionHistoryPage/TransactionHistoryPage.js +8 -5
- package/dist/esm/pages/TransactionHistoryPage/TransactionHistoryPage.js.map +1 -1
- package/dist/esm/pages/TransactionPage/RouteTracker.js +2 -2
- package/dist/esm/pages/TransactionPage/RouteTracker.js.map +1 -1
- package/dist/esm/pages/TransactionPage/TokenValueBottomSheet.js +4 -4
- package/dist/esm/pages/TransactionPage/TokenValueBottomSheet.js.map +1 -1
- package/dist/esm/providers/I18nProvider/I18nProvider.js +8 -4
- package/dist/esm/providers/I18nProvider/I18nProvider.js.map +1 -1
- package/dist/esm/providers/QueryClientProvider.js.map +1 -1
- package/dist/esm/providers/WalletProvider/SDKProviders.js +1 -1
- package/dist/esm/providers/WalletProvider/SDKProviders.js.map +1 -1
- package/dist/esm/providers/WalletProvider/SuiBaseProvider.js +1 -1
- package/dist/esm/providers/WalletProvider/SuiBaseProvider.js.map +1 -1
- package/dist/esm/providers/WalletProvider/WalletProvider.js +1 -1
- package/dist/esm/providers/WalletProvider/useExternalWalletProvider.js +1 -1
- package/dist/esm/stores/chains/ChainOrderStore.js +5 -3
- package/dist/esm/stores/chains/ChainOrderStore.js.map +1 -1
- package/dist/esm/stores/form/FormStore.js +1 -1
- package/dist/esm/stores/form/FormStore.js.map +1 -1
- package/dist/esm/stores/form/FormUpdater.js +21 -5
- package/dist/esm/stores/form/FormUpdater.js.map +1 -1
- package/dist/esm/stores/form/URLSearchParamsBuilder.js +1 -1
- package/dist/esm/stores/form/URLSearchParamsBuilder.js.map +1 -1
- package/dist/esm/stores/form/useFormRef.js.map +1 -1
- package/dist/esm/stores/routes/createRouteExecutionStore.js +1 -1
- package/dist/esm/stores/routes/createRouteExecutionStore.js.map +1 -1
- package/dist/esm/stores/settings/useSettingsStore.js.map +1 -1
- package/dist/esm/types/widget.d.ts +25 -6
- package/dist/esm/types/widget.js +6 -0
- package/dist/esm/types/widget.js.map +1 -1
- package/dist/esm/utils/deepEqual.js +2 -2
- package/dist/esm/utils/deepEqual.js.map +1 -1
- package/dist/esm/utils/item.d.ts +5 -15
- package/dist/esm/utils/item.js +23 -19
- package/dist/esm/utils/item.js.map +1 -1
- package/dist/esm/utils/widgetSize.d.ts +3 -0
- package/dist/esm/utils/widgetSize.js +11 -0
- package/dist/esm/utils/widgetSize.js.map +1 -0
- package/package.json +7 -6
- package/package.json.tmp +12 -6
- package/src/AppDefault.tsx +3 -3
- package/src/AppProvider.tsx +2 -2
- package/src/components/ActiveTransactions/ActiveTransactions.style.ts +1 -1
- package/src/components/AmountInput/AmountInput.style.tsx +1 -1
- package/src/components/AppContainer.tsx +6 -14
- package/src/components/Avatar/Avatar.style.tsx +2 -2
- package/src/components/Card/CardButton.style.tsx +1 -1
- package/src/components/Card/CardHeader.tsx +1 -1
- package/src/components/Card/CardLabel.tsx +1 -1
- package/src/components/Card/CardTitle.tsx +1 -1
- package/src/components/ChainSelect/ChainSelect.tsx +1 -1
- package/src/components/ChainSelect/useChainSelect.ts +37 -23
- package/src/components/Chains/ChainList.style.tsx +59 -0
- package/src/components/Chains/ChainList.tsx +86 -0
- package/src/components/Chains/ChainListItem.tsx +52 -0
- package/src/components/Chains/ChainSearchInput.tsx +52 -0
- package/src/components/Chains/ChainsExpanded.style.tsx +21 -0
- package/src/components/Chains/ChainsExpanded.tsx +28 -0
- package/src/components/Chains/SelectChainContent.tsx +116 -0
- package/src/components/Chains/VirtualizedChainList.tsx +84 -0
- package/src/components/Expansion/Expansion.tsx +62 -0
- package/src/components/Expansion/ExpansionTransition.tsx +76 -0
- package/src/components/Header/Header.style.ts +0 -1
- package/src/components/Header/Header.tsx +1 -1
- package/src/components/Header/NavigationHeader.tsx +2 -2
- package/src/components/Header/SettingsButton.style.tsx +1 -1
- package/src/components/ListItem/ListItem.tsx +1 -1
- package/src/components/ListItemButton.tsx +17 -1
- package/src/components/ListItemText.tsx +1 -1
- package/src/components/ProgressToNextUpdate.tsx +1 -1
- package/src/components/RouteCard/RouteCard.tsx +4 -4
- package/src/components/RouteCard/RouteCardEssentials.tsx +5 -5
- package/src/components/RouteCard/RouteNotFoundCard.tsx +1 -0
- package/src/components/RouteCard/getMatchingLabels.ts +11 -3
- package/src/components/Routes/Routes.tsx +1 -1
- package/src/components/Routes/RoutesContent.tsx +137 -0
- package/src/components/Routes/RoutesExpanded.style.ts +4 -18
- package/src/components/Routes/RoutesExpanded.tsx +33 -158
- package/src/components/Search/SearchInput.style.tsx +36 -3
- package/src/components/Search/SearchInput.tsx +31 -5
- package/src/components/Search/SearchNotFound.style.tsx +2 -1
- package/src/components/Select.tsx +1 -1
- package/src/components/SelectTokenButton/SelectTokenButton.style.tsx +1 -1
- package/src/components/SendToWallet/SendToWalletButton.tsx +2 -3
- package/src/components/Skeleton/WidgetSkeleton.style.tsx +0 -1
- package/src/components/Step/CircularProgress.style.tsx +1 -1
- package/src/components/StepActions/StepActions.style.tsx +1 -1
- package/src/components/StepActions/StepActions.tsx +3 -3
- package/src/components/TextFitter/TextFitter.tsx +1 -1
- package/src/components/Token/Token.style.tsx +1 -1
- package/src/components/Token/Token.tsx +2 -2
- package/src/components/TokenList/TokenDetailsSheet.tsx +1 -0
- package/src/components/TokenList/TokenDetailsSheetContent.style.tsx +1 -1
- package/src/components/TokenList/TokenDetailsSheetContent.tsx +1 -1
- package/src/components/TokenList/TokenList.style.tsx +11 -1
- package/src/components/TokenList/TokenList.tsx +6 -2
- package/src/components/TokenList/TokenListItem.tsx +53 -37
- package/src/components/TokenList/VirtualizedTokenList.tsx +17 -5
- package/src/components/TokenList/types.ts +3 -0
- package/src/components/TokenRate/TokenRate.style.ts +1 -1
- package/src/components/TokenRate/TokenRate.tsx +1 -1
- package/src/components/TransactionDetails.tsx +9 -9
- package/src/config/version.ts +1 -1
- package/src/hooks/timer/time.ts +1 -1
- package/src/hooks/timer/useTimer.ts +1 -1
- package/src/hooks/useAvailableChains.ts +8 -2
- package/src/hooks/useChains.ts +10 -4
- package/src/hooks/useExpansionRoutes.ts +29 -0
- package/src/hooks/useHasChainExpansion.ts +19 -0
- package/src/hooks/useIsBatchingSupported.ts +5 -2
- package/src/hooks/useListHeight.ts +1 -1
- package/src/hooks/useRouteExecution.ts +3 -3
- package/src/hooks/useRoutes.ts +8 -2
- package/src/hooks/useToAddressReset.ts +32 -21
- package/src/hooks/useTokenBalance.ts +1 -1
- package/src/hooks/useTokenBalances.ts +1 -0
- package/src/hooks/useTokenSearch.ts +23 -6
- package/src/hooks/useTokens.ts +16 -6
- package/src/hooks/useTools.ts +12 -4
- package/src/hooks/useTransactionDetails.ts +1 -1
- package/src/hooks/useWidgetEvents.ts +1 -0
- package/src/i18n/bn.json +2 -1
- package/src/i18n/de.json +2 -1
- package/src/i18n/en.json +2 -1
- package/src/i18n/es.json +2 -1
- package/src/i18n/fr.json +2 -1
- package/src/i18n/hi.json +1 -0
- package/src/i18n/id.json +2 -1
- package/src/i18n/it.json +2 -1
- package/src/i18n/ja.json +2 -1
- package/src/i18n/ko.json +2 -1
- package/src/i18n/pl.json +350 -0
- package/src/i18n/pt.json +2 -1
- package/src/i18n/th.json +2 -1
- package/src/i18n/tr.json +2 -1
- package/src/i18n/uk.json +14 -13
- package/src/i18n/vi.json +2 -1
- package/src/i18n/zh.json +2 -1
- package/src/index.ts +8 -8
- package/src/pages/RoutesPage/RoutesPage.tsx +1 -1
- package/src/pages/SelectChainPage/SelectChainPage.tsx +18 -71
- package/src/pages/SelectEnabledToolsPage.tsx +1 -1
- package/src/pages/SelectTokenPage/SearchTokenInput.tsx +2 -0
- package/src/pages/SelectTokenPage/SelectTokenPage.tsx +44 -22
- package/src/pages/SendToWallet/BookmarksPage.tsx +1 -1
- package/src/pages/SendToWallet/SendToWalletPage.style.tsx +3 -3
- package/src/pages/SettingsPage/SettingsCard/SettingCard.style.tsx +1 -1
- package/src/pages/SettingsPage/SettingsCard/SettingCardExpandable.tsx +1 -1
- package/src/pages/SettingsPage/SlippageSettings/SlippageSettings.tsx +1 -1
- package/src/pages/TransactionHistoryPage/TransactionHistoryPage.tsx +12 -7
- package/src/pages/TransactionPage/RouteTracker.tsx +2 -2
- package/src/pages/TransactionPage/TokenValueBottomSheet.tsx +4 -4
- package/src/providers/I18nProvider/I18nProvider.tsx +10 -4
- package/src/providers/QueryClientProvider.tsx +1 -1
- package/src/providers/WalletProvider/SDKProviders.tsx +1 -1
- package/src/providers/WalletProvider/SuiBaseProvider.tsx +1 -1
- package/src/providers/WalletProvider/WalletProvider.tsx +1 -1
- package/src/providers/WalletProvider/useExternalWalletProvider.ts +1 -1
- package/src/stores/chains/ChainOrderStore.tsx +8 -3
- package/src/stores/form/FormStore.tsx +1 -1
- package/src/stores/form/FormUpdater.tsx +40 -6
- package/src/stores/form/URLSearchParamsBuilder.tsx +1 -1
- package/src/stores/form/useFormRef.ts +50 -54
- package/src/stores/routes/createRouteExecutionStore.ts +1 -1
- package/src/stores/settings/useSettingsStore.ts +1 -0
- package/src/types/widget.ts +29 -6
- package/src/utils/deepEqual.ts +2 -2
- package/src/utils/item.ts +46 -40
- package/src/utils/widgetSize.ts +17 -0
|
@@ -19,7 +19,7 @@ const getContentHeight = (
|
|
|
19
19
|
|
|
20
20
|
const listParentElement = listParentRef?.current
|
|
21
21
|
|
|
22
|
-
let oldHeight: string | undefined
|
|
22
|
+
let oldHeight: string | undefined
|
|
23
23
|
|
|
24
24
|
// This covers the case where in full height flex mode when the browser height is reduced
|
|
25
25
|
// - this allows a virtualised list to be made smaller
|
|
@@ -192,19 +192,19 @@ export const useRouteExecution = ({
|
|
|
192
192
|
[resumeRouteMutation, routeId]
|
|
193
193
|
)
|
|
194
194
|
|
|
195
|
-
// biome-ignore lint/correctness/useExhaustiveDependencies:
|
|
195
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: run only when routeId changes
|
|
196
196
|
const restartRouteMutation = useCallback(() => {
|
|
197
197
|
restartRoute(routeId)
|
|
198
198
|
_resumeRoute(routeExecution?.route)
|
|
199
199
|
}, [_resumeRoute, routeExecution?.route, routeId])
|
|
200
200
|
|
|
201
|
-
// biome-ignore lint/correctness/useExhaustiveDependencies:
|
|
201
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: run only when routeId changes
|
|
202
202
|
const deleteRouteMutation = useCallback(() => {
|
|
203
203
|
deleteRoute(routeId)
|
|
204
204
|
}, [routeId])
|
|
205
205
|
|
|
206
206
|
// Resume route execution after page reload
|
|
207
|
-
// biome-ignore lint/correctness/useExhaustiveDependencies:
|
|
207
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: run only when routeId changes
|
|
208
208
|
useEffect(() => {
|
|
209
209
|
// Check if route is eligible for automatic resuming
|
|
210
210
|
const route = routeExecutionStoreContext.getState().routes[routeId]?.route
|
package/src/hooks/useRoutes.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { Route, Token } from '@lifi/sdk'
|
|
2
2
|
import {
|
|
3
3
|
ChainType,
|
|
4
|
-
LiFiErrorCode,
|
|
5
4
|
convertQuoteToRoute,
|
|
6
5
|
getContractCallsQuote,
|
|
7
6
|
getRelayerQuote,
|
|
8
7
|
getRoutes,
|
|
9
8
|
isRelayerStep,
|
|
9
|
+
LiFiErrorCode,
|
|
10
10
|
} from '@lifi/sdk'
|
|
11
11
|
import { useAccount } from '@lifi/wallet-management'
|
|
12
12
|
import { useQuery, useQueryClient } from '@tanstack/react-query'
|
|
@@ -37,6 +37,7 @@ interface RoutesProps {
|
|
|
37
37
|
export const useRoutes = ({ observableRoute }: RoutesProps = {}) => {
|
|
38
38
|
const {
|
|
39
39
|
subvariant,
|
|
40
|
+
subvariantOptions,
|
|
40
41
|
sdkConfig,
|
|
41
42
|
contractTool,
|
|
42
43
|
bridges,
|
|
@@ -289,7 +290,12 @@ export const useRoutes = ({ observableRoute }: RoutesProps = {}) => {
|
|
|
289
290
|
}
|
|
290
291
|
|
|
291
292
|
// Prevent sending a request for the same chain token combinations.
|
|
292
|
-
if
|
|
293
|
+
// Exception: proceed anyway if subvariant is custom and subvariantOptions is deposit
|
|
294
|
+
if (
|
|
295
|
+
fromChainId === toChainId &&
|
|
296
|
+
fromTokenAddress === toTokenAddress &&
|
|
297
|
+
!(subvariant === 'custom' && subvariantOptions?.custom === 'deposit')
|
|
298
|
+
) {
|
|
293
299
|
return
|
|
294
300
|
}
|
|
295
301
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ExtendedChain } from '@lifi/sdk'
|
|
2
|
+
import { useCallback } from 'react'
|
|
2
3
|
import { useWidgetConfig } from '../providers/WidgetProvider/WidgetProvider.js'
|
|
3
4
|
import { useBookmarkActions } from '../stores/bookmarks/useBookmarkActions.js'
|
|
4
5
|
import { useBookmarks } from '../stores/bookmarks/useBookmarks.js'
|
|
@@ -13,31 +14,41 @@ export const useToAddressReset = () => {
|
|
|
13
14
|
const { setSelectedBookmark } = useBookmarkActions()
|
|
14
15
|
const { setSendToWallet } = useSendToWalletActions()
|
|
15
16
|
|
|
16
|
-
const tryResetToAddress = (
|
|
17
|
-
|
|
17
|
+
const tryResetToAddress = useCallback(
|
|
18
|
+
(toChain: ExtendedChain) => {
|
|
19
|
+
const requiredToAddress = requiredUI?.includes(RequiredUI.ToAddress)
|
|
18
20
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
const bookmarkSatisfiesToChainType =
|
|
22
|
+
selectedBookmark?.chainType === toChain?.chainType
|
|
21
23
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
const shouldResetToAddress =
|
|
25
|
+
!requiredToAddress && !bookmarkSatisfiesToChainType
|
|
24
26
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
27
|
+
// The toAddress field is required and always visible when bridging between
|
|
28
|
+
// different ecosystems (fromChain and toChain have different chain types).
|
|
29
|
+
// We reset toAddress on each chain change if it's no longer required, ensuring that
|
|
30
|
+
// switching chain types doesn't leave a previously set toAddress value when
|
|
31
|
+
// the "Send to Wallet" field is hidden.
|
|
32
|
+
if (shouldResetToAddress) {
|
|
33
|
+
setFieldValue('toAddress', '', { isTouched: true })
|
|
34
|
+
setSelectedBookmark()
|
|
35
|
+
// If toAddress was auto-filled (e.g., when making cross-ecosystem bridging and compatible destination wallet was connected)
|
|
36
|
+
// and not manually edited by the user, we need to hide "Send to Wallet".
|
|
37
|
+
const isToAddressDirty = isDirty('toAddress')
|
|
38
|
+
if (!isToAddressDirty) {
|
|
39
|
+
setSendToWallet(false)
|
|
40
|
+
}
|
|
38
41
|
}
|
|
39
|
-
}
|
|
40
|
-
|
|
42
|
+
},
|
|
43
|
+
[
|
|
44
|
+
setFieldValue,
|
|
45
|
+
isDirty,
|
|
46
|
+
setSelectedBookmark,
|
|
47
|
+
setSendToWallet,
|
|
48
|
+
requiredUI,
|
|
49
|
+
selectedBookmark,
|
|
50
|
+
]
|
|
51
|
+
)
|
|
41
52
|
|
|
42
53
|
return {
|
|
43
54
|
tryResetToAddress,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Token, type TokenAmount
|
|
1
|
+
import { getTokenBalances, type Token, type TokenAmount } from '@lifi/sdk'
|
|
2
2
|
import { useQuery, useQueryClient } from '@tanstack/react-query'
|
|
3
3
|
import { useCallback, useMemo } from 'react'
|
|
4
4
|
import { useWidgetConfig } from '../providers/WidgetProvider/WidgetProvider.js'
|
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
type BaseToken,
|
|
3
|
+
type ChainId,
|
|
4
|
+
getToken,
|
|
5
|
+
type TokensResponse,
|
|
6
|
+
} from '@lifi/sdk'
|
|
2
7
|
import { useQuery, useQueryClient } from '@tanstack/react-query'
|
|
3
8
|
import { useWidgetConfig } from '../providers/WidgetProvider/WidgetProvider.js'
|
|
4
9
|
import type { FormType } from '../stores/form/types.js'
|
|
5
10
|
import type { TokenAmount } from '../types/token.js'
|
|
6
|
-
import {
|
|
11
|
+
import { getConfigItemSets, isFormItemAllowed } from '../utils/item.js'
|
|
7
12
|
import { getQueryKey } from '../utils/queries.js'
|
|
8
13
|
|
|
9
14
|
export const useTokenSearch = (
|
|
@@ -24,14 +29,26 @@ export const useTokenSearch = (
|
|
|
24
29
|
|
|
25
30
|
if (token) {
|
|
26
31
|
// Filter config tokens by chain before checking if token is allowed
|
|
27
|
-
const filteredConfigTokens =
|
|
32
|
+
const filteredConfigTokens = getConfigItemSets(
|
|
28
33
|
configTokens,
|
|
29
|
-
|
|
30
|
-
|
|
34
|
+
(tokens: BaseToken[]) =>
|
|
35
|
+
new Set(
|
|
36
|
+
tokens
|
|
37
|
+
.filter((t) => t.chainId === token.chainId)
|
|
38
|
+
.map((t) => t.address)
|
|
39
|
+
),
|
|
40
|
+
formType
|
|
31
41
|
)
|
|
32
42
|
|
|
33
43
|
// Return undefined if the token is denied
|
|
34
|
-
if (
|
|
44
|
+
if (
|
|
45
|
+
!isFormItemAllowed(
|
|
46
|
+
token,
|
|
47
|
+
filteredConfigTokens,
|
|
48
|
+
formType,
|
|
49
|
+
(t) => t.address
|
|
50
|
+
)
|
|
51
|
+
) {
|
|
35
52
|
return undefined
|
|
36
53
|
}
|
|
37
54
|
|
package/src/hooks/useTokens.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ChainType, getTokens } from '@lifi/sdk'
|
|
1
|
+
import { type BaseToken, ChainType, getTokens } from '@lifi/sdk'
|
|
2
2
|
import { useQuery } from '@tanstack/react-query'
|
|
3
3
|
import { useMemo } from 'react'
|
|
4
4
|
import { useWidgetConfig } from '../providers/WidgetProvider/WidgetProvider.js'
|
|
5
5
|
import type { FormType } from '../stores/form/types.js'
|
|
6
6
|
import type { TokenAmount } from '../types/token.js'
|
|
7
|
-
import {
|
|
7
|
+
import { getConfigItemSets, isFormItemAllowed } from '../utils/item.js'
|
|
8
8
|
import { getQueryKey } from '../utils/queries.js'
|
|
9
9
|
import { useChains } from './useChains.js'
|
|
10
10
|
|
|
@@ -48,17 +48,27 @@ export const useTokens = (selectedChainId?: number, formType?: FormType) => {
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
// Filter config tokens by chain before checking if token is allowed
|
|
51
|
-
const filteredConfigTokens =
|
|
51
|
+
const filteredConfigTokens = getConfigItemSets(
|
|
52
52
|
configTokens,
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
(tokens: BaseToken[]) =>
|
|
54
|
+
new Set(
|
|
55
|
+
tokens
|
|
56
|
+
.filter((t) => t.chainId === selectedChainId)
|
|
57
|
+
.map((t) => t.address)
|
|
58
|
+
),
|
|
59
|
+
formType
|
|
55
60
|
)
|
|
56
61
|
|
|
57
62
|
// Get the appropriate allow/deny lists based on formType
|
|
58
63
|
filteredTokens = filteredTokens.filter(
|
|
59
64
|
(token) =>
|
|
60
65
|
token.chainId === selectedChainId &&
|
|
61
|
-
|
|
66
|
+
isFormItemAllowed(
|
|
67
|
+
token,
|
|
68
|
+
filteredConfigTokens,
|
|
69
|
+
formType,
|
|
70
|
+
(t) => t.address
|
|
71
|
+
)
|
|
62
72
|
)
|
|
63
73
|
|
|
64
74
|
const filteredTokensMap = new Map(
|
package/src/hooks/useTools.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { type ToolsResponse
|
|
1
|
+
import { getTools, type ToolsResponse } from '@lifi/sdk'
|
|
2
2
|
import { useQuery } from '@tanstack/react-query'
|
|
3
3
|
import { useWidgetConfig } from '../providers/WidgetProvider/WidgetProvider.js'
|
|
4
4
|
import { useSettingsStore } from '../stores/settings/useSettingsStore.js'
|
|
5
|
-
import {
|
|
5
|
+
import { getConfigItemSets, isItemAllowedForSets } from '../utils/item.js'
|
|
6
6
|
import { getQueryKey } from '../utils/queries.js'
|
|
7
7
|
|
|
8
8
|
export const useTools = () => {
|
|
@@ -17,12 +17,20 @@ export const useTools = () => {
|
|
|
17
17
|
],
|
|
18
18
|
queryFn: async (): Promise<ToolsResponse> => {
|
|
19
19
|
const tools = await getTools()
|
|
20
|
+
const bridgesConfigSets = getConfigItemSets(
|
|
21
|
+
bridges,
|
|
22
|
+
(bridges) => new Set(bridges)
|
|
23
|
+
)
|
|
24
|
+
const exchangesConfigSets = getConfigItemSets(
|
|
25
|
+
exchanges,
|
|
26
|
+
(exchanges) => new Set(exchanges)
|
|
27
|
+
)
|
|
20
28
|
const result = {
|
|
21
29
|
bridges: tools.bridges.filter((bridge) =>
|
|
22
|
-
|
|
30
|
+
isItemAllowedForSets(bridge.key, bridgesConfigSets)
|
|
23
31
|
),
|
|
24
32
|
exchanges: tools.exchanges.filter((exchange) =>
|
|
25
|
-
|
|
33
|
+
isItemAllowedForSets(exchange.key, exchangesConfigSets)
|
|
26
34
|
),
|
|
27
35
|
}
|
|
28
36
|
const { initializeTools } = useSettingsStore.getState()
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _mitt, { type Emitter, type EventHandlerMap, type EventType } from 'mitt'
|
|
2
2
|
import type { WidgetEvents } from '../types/events.js'
|
|
3
|
+
|
|
3
4
|
// https://github.com/developit/mitt/issues/191
|
|
4
5
|
const mitt = _mitt as unknown as <Events extends Record<EventType, unknown>>(
|
|
5
6
|
all?: EventHandlerMap<Events>
|
package/src/i18n/bn.json
CHANGED
|
@@ -309,8 +309,9 @@
|
|
|
309
309
|
"to": "প্রতি",
|
|
310
310
|
"tokenOnChain": "{{chainName}} -এ {{tokenSymbol}}",
|
|
311
311
|
"tokenOnChainAmount": "",
|
|
312
|
-
"tokenSearch": "
|
|
312
|
+
"tokenSearch": "",
|
|
313
313
|
"valueLoss": "মান ক্ষতি",
|
|
314
|
+
"searchChain": "",
|
|
314
315
|
"searchChains": "",
|
|
315
316
|
"searchBridges": "",
|
|
316
317
|
"searchExchanges": ""
|
package/src/i18n/de.json
CHANGED
|
@@ -309,8 +309,9 @@
|
|
|
309
309
|
"to": "Zu",
|
|
310
310
|
"tokenOnChain": "{{tokenSymbol}} auf {{chainName}}",
|
|
311
311
|
"tokenOnChainAmount": "",
|
|
312
|
-
"tokenSearch": "
|
|
312
|
+
"tokenSearch": "",
|
|
313
313
|
"valueLoss": "Wertverlust",
|
|
314
|
+
"searchChain": "",
|
|
314
315
|
"searchChains": "",
|
|
315
316
|
"searchBridges": "",
|
|
316
317
|
"searchExchanges": ""
|
package/src/i18n/en.json
CHANGED
|
@@ -309,8 +309,9 @@
|
|
|
309
309
|
"to": "To",
|
|
310
310
|
"tokenOnChain": "{{tokenSymbol}} on {{chainName}}",
|
|
311
311
|
"tokenOnChainAmount": "{{amount, numberExt}} {{tokenSymbol}} on {{chainName}}",
|
|
312
|
-
"tokenSearch": "Search by token
|
|
312
|
+
"tokenSearch": "Search by token or address",
|
|
313
313
|
"valueLoss": "Value loss",
|
|
314
|
+
"searchChain": "Search chain",
|
|
314
315
|
"searchChains": "Search by chain name",
|
|
315
316
|
"searchBridges": "Search by bridge name",
|
|
316
317
|
"searchExchanges": "Search by exchange name"
|
package/src/i18n/es.json
CHANGED
|
@@ -309,8 +309,9 @@
|
|
|
309
309
|
"to": "A",
|
|
310
310
|
"tokenOnChain": "{{tokenSymbol}} en {{chainName}}",
|
|
311
311
|
"tokenOnChainAmount": "",
|
|
312
|
-
"tokenSearch": "
|
|
312
|
+
"tokenSearch": "",
|
|
313
313
|
"valueLoss": "Valor perdido",
|
|
314
|
+
"searchChain": "",
|
|
314
315
|
"searchChains": "Buscar por nombre de cadena",
|
|
315
316
|
"searchBridges": "Buscar por nombre de puente",
|
|
316
317
|
"searchExchanges": "Buscar por nombre de intercambio"
|
package/src/i18n/fr.json
CHANGED
|
@@ -309,8 +309,9 @@
|
|
|
309
309
|
"to": "À",
|
|
310
310
|
"tokenOnChain": "{{tokenSymbol}} sur {{chainName}}",
|
|
311
311
|
"tokenOnChainAmount": "",
|
|
312
|
-
"tokenSearch": "
|
|
312
|
+
"tokenSearch": "",
|
|
313
313
|
"valueLoss": "Perte de valeur",
|
|
314
|
+
"searchChain": "",
|
|
314
315
|
"searchChains": "",
|
|
315
316
|
"searchBridges": "",
|
|
316
317
|
"searchExchanges": ""
|
package/src/i18n/hi.json
CHANGED
package/src/i18n/id.json
CHANGED
|
@@ -309,8 +309,9 @@
|
|
|
309
309
|
"to": "Kepada",
|
|
310
310
|
"tokenOnChain": "{{tokenSymbol}} di {{chainName}}",
|
|
311
311
|
"tokenOnChainAmount": "{{amount, numberExt}} {{tokenSymbol}} di {{chainName}}",
|
|
312
|
-
"tokenSearch": "
|
|
312
|
+
"tokenSearch": "",
|
|
313
313
|
"valueLoss": "Kehilangan nilai",
|
|
314
|
+
"searchChain": "",
|
|
314
315
|
"searchChains": "Cari berdasarkan nama rantai",
|
|
315
316
|
"searchBridges": "Cari berdasarkan nama bridge",
|
|
316
317
|
"searchExchanges": "Cari berdasarkan nama exchange"
|
package/src/i18n/it.json
CHANGED
|
@@ -309,8 +309,9 @@
|
|
|
309
309
|
"to": "A",
|
|
310
310
|
"tokenOnChain": "{{tokenSymbol}} su {{chainName}}",
|
|
311
311
|
"tokenOnChainAmount": "",
|
|
312
|
-
"tokenSearch": "
|
|
312
|
+
"tokenSearch": "",
|
|
313
313
|
"valueLoss": "Perdita di valore",
|
|
314
|
+
"searchChain": "",
|
|
314
315
|
"searchChains": "",
|
|
315
316
|
"searchBridges": "",
|
|
316
317
|
"searchExchanges": ""
|
package/src/i18n/ja.json
CHANGED
|
@@ -309,8 +309,9 @@
|
|
|
309
309
|
"to": "To",
|
|
310
310
|
"tokenOnChain": "{{chainName}} の {{tokenSymbol}}",
|
|
311
311
|
"tokenOnChainAmount": "",
|
|
312
|
-
"tokenSearch": "
|
|
312
|
+
"tokenSearch": "",
|
|
313
313
|
"valueLoss": "損失額",
|
|
314
|
+
"searchChain": "",
|
|
314
315
|
"searchChains": "",
|
|
315
316
|
"searchBridges": "",
|
|
316
317
|
"searchExchanges": ""
|
package/src/i18n/ko.json
CHANGED
|
@@ -309,8 +309,9 @@
|
|
|
309
309
|
"to": "도착",
|
|
310
310
|
"tokenOnChain": "{{chainName}}의 {{tokenSymbol}}",
|
|
311
311
|
"tokenOnChainAmount": "",
|
|
312
|
-
"tokenSearch": "
|
|
312
|
+
"tokenSearch": "",
|
|
313
313
|
"valueLoss": "가치 손실",
|
|
314
|
+
"searchChain": "",
|
|
314
315
|
"searchChains": "",
|
|
315
316
|
"searchBridges": "",
|
|
316
317
|
"searchExchanges": ""
|