@lifi/widget 3.0.0-alpha.16 → 3.0.0-alpha.19
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/AppRoutes.tsx +22 -0
- package/_cjs/AppRoutes.js +17 -0
- package/_cjs/AppRoutes.js.map +1 -1
- package/_cjs/components/AccountAvatar.d.ts +7 -0
- package/_cjs/components/AccountAvatar.js +20 -0
- package/_cjs/components/AccountAvatar.js.map +1 -0
- package/_cjs/components/ActiveTransactions/ActiveTransactions.style.d.ts +2 -2
- package/_cjs/components/AlertMessage/AlertMessage.d.ts +11 -0
- package/_cjs/components/AlertMessage/AlertMessage.js +8 -0
- package/_cjs/components/AlertMessage/AlertMessage.js.map +1 -0
- package/_cjs/components/AlertMessage/AlertMessage.style.d.ts +12 -0
- package/_cjs/components/AlertMessage/AlertMessage.style.js +35 -0
- package/_cjs/components/AlertMessage/AlertMessage.style.js.map +1 -0
- package/_cjs/components/AlertMessage/index.d.ts +3 -0
- package/_cjs/components/AlertMessage/index.js +20 -0
- package/_cjs/components/AlertMessage/index.js.map +1 -0
- package/_cjs/components/AlertMessage/types.d.ts +1 -0
- package/_cjs/components/AlertMessage/types.js +3 -0
- package/_cjs/components/AlertMessage/types.js.map +1 -0
- package/_cjs/components/BaseTransactionButton/BaseTransactionButton.js +6 -3
- package/_cjs/components/BaseTransactionButton/BaseTransactionButton.js.map +1 -1
- package/_cjs/{pages/SettingsPage/SettingsCard/SettingCardButton.d.ts → components/Card/CardButton.d.ts} +2 -2
- package/_cjs/components/Card/CardButton.js +9 -0
- package/_cjs/components/Card/CardButton.js.map +1 -0
- package/_cjs/components/Card/CardButton.style.d.ts +13 -0
- package/_cjs/components/Card/CardButton.style.js +36 -0
- package/_cjs/components/Card/CardButton.style.js.map +1 -0
- package/_cjs/components/Card/index.d.ts +2 -0
- package/_cjs/components/Card/index.js +2 -0
- package/_cjs/components/Card/index.js.map +1 -1
- package/_cjs/components/ChainSelect/useChainSelect.js +4 -15
- package/_cjs/components/ChainSelect/useChainSelect.js.map +1 -1
- package/_cjs/components/GasMessage/FundsSufficiencyMessage.js +13 -5
- package/_cjs/components/GasMessage/FundsSufficiencyMessage.js.map +1 -1
- package/_cjs/components/GasMessage/GasMessage.style.d.ts +1 -14
- package/_cjs/components/GasMessage/GasMessage.style.js +1 -24
- package/_cjs/components/GasMessage/GasMessage.style.js.map +1 -1
- package/_cjs/components/GasMessage/GasRefuelMessage.js +4 -5
- package/_cjs/components/GasMessage/GasRefuelMessage.js.map +1 -1
- package/_cjs/components/GasMessage/GasSufficiencyMessage.js +2 -6
- package/_cjs/components/GasMessage/GasSufficiencyMessage.js.map +1 -1
- package/_cjs/components/Header/NavigationHeader.js +11 -2
- package/_cjs/components/Header/NavigationHeader.js.map +1 -1
- package/_cjs/components/ListItem/ListItem.d.ts +6 -0
- package/_cjs/components/ListItem/ListItem.js +27 -0
- package/_cjs/components/ListItem/ListItem.js.map +1 -0
- package/_cjs/components/ListItem/ListItemButton.d.ts +4 -0
- package/_cjs/components/ListItem/ListItemButton.js +12 -0
- package/_cjs/components/ListItem/ListItemButton.js.map +1 -0
- package/_cjs/components/ListItem/index.d.ts +2 -0
- package/_cjs/components/ListItem/index.js +19 -0
- package/_cjs/components/ListItem/index.js.map +1 -0
- package/_cjs/components/ListItemButton.d.ts +1 -1
- package/_cjs/components/ListItemButton.js +3 -2
- package/_cjs/components/ListItemButton.js.map +1 -1
- package/_cjs/components/Menu.d.ts +1 -0
- package/_cjs/components/Menu.js +25 -0
- package/_cjs/components/Menu.js.map +1 -0
- package/_cjs/components/PageContainer.d.ts +1 -2
- package/_cjs/components/PoweredBy/PoweredBy.style.d.ts +1 -1
- package/_cjs/components/ReverseTokensButton/ReverseTokensButton.js +11 -3
- package/_cjs/components/ReverseTokensButton/ReverseTokensButton.js.map +1 -1
- package/_cjs/components/Routes/Routes.js +1 -3
- package/_cjs/components/Routes/Routes.js.map +1 -1
- package/_cjs/components/Routes/RoutesExpanded.js +4 -7
- package/_cjs/components/Routes/RoutesExpanded.js.map +1 -1
- package/_cjs/components/SendToWallet/SendToWallet.style.d.ts +4 -3
- package/_cjs/components/SendToWallet/SendToWallet.style.js +26 -15
- package/_cjs/components/SendToWallet/SendToWallet.style.js.map +1 -1
- package/_cjs/components/SendToWallet/SendToWalletButton.d.ts +1 -2
- package/_cjs/components/SendToWallet/SendToWalletButton.js +55 -23
- package/_cjs/components/SendToWallet/SendToWalletButton.js.map +1 -1
- package/_cjs/components/SendToWallet/SendToWalletExpandButton.d.ts +2 -0
- package/_cjs/components/SendToWallet/SendToWalletExpandButton.js +41 -0
- package/_cjs/components/SendToWallet/SendToWalletExpandButton.js.map +1 -0
- package/_cjs/components/SendToWallet/index.d.ts +2 -1
- package/_cjs/components/SendToWallet/index.js +2 -1
- package/_cjs/components/SendToWallet/index.js.map +1 -1
- package/_cjs/components/SettingsListItemButton.d.ts +1 -1
- package/_cjs/components/Step/StepProcess.style.d.ts +1 -1
- package/_cjs/components/TokenList/TokenList.js +3 -2
- package/_cjs/components/TokenList/TokenList.js.map +1 -1
- package/_cjs/components/TokenList/TokenList.style.d.ts +2 -5
- package/_cjs/components/TokenList/TokenList.style.js +3 -28
- package/_cjs/components/TokenList/TokenList.style.js.map +1 -1
- package/_cjs/components/TokenList/TokenListItem.js +3 -2
- package/_cjs/components/TokenList/TokenListItem.js.map +1 -1
- package/_cjs/components/TokenList/VirtualizedTokenList.js +2 -2
- package/_cjs/components/TokenList/VirtualizedTokenList.js.map +1 -1
- package/_cjs/config/version.d.ts +1 -1
- package/_cjs/config/version.js +1 -1
- package/_cjs/hooks/index.d.ts +3 -1
- package/_cjs/hooks/index.js +3 -1
- package/_cjs/hooks/index.js.map +1 -1
- package/_cjs/hooks/useAccount.d.ts +14 -3
- package/_cjs/hooks/useAccount.js +24 -6
- package/_cjs/hooks/useAccount.js.map +1 -1
- package/_cjs/hooks/useAddressValidation.d.ts +17 -0
- package/_cjs/hooks/useAddressValidation.js +59 -0
- package/_cjs/hooks/useAddressValidation.js.map +1 -0
- package/_cjs/hooks/useFromTokenSufficiency.js +3 -4
- package/_cjs/hooks/useFromTokenSufficiency.js.map +1 -1
- package/_cjs/hooks/useGasSufficiency.js +6 -5
- package/_cjs/hooks/useGasSufficiency.js.map +1 -1
- package/_cjs/hooks/useRouteExecution.js +7 -5
- package/_cjs/hooks/useRouteExecution.js.map +1 -1
- package/_cjs/hooks/useRoutes.d.ts +2 -2
- package/_cjs/hooks/useRoutes.js +17 -29
- package/_cjs/hooks/useRoutes.js.map +1 -1
- package/_cjs/hooks/useToAddressRequirements.d.ts +4 -0
- package/_cjs/hooks/{useRequiredToAddress.js → useToAddressRequirements.js} +11 -8
- package/_cjs/hooks/useToAddressRequirements.js.map +1 -0
- package/_cjs/hooks/useToAddressReset.d.ts +4 -0
- package/_cjs/hooks/useToAddressReset.js +32 -0
- package/_cjs/hooks/useToAddressReset.js.map +1 -0
- package/_cjs/hooks/useTokenAddressBalance.d.ts +1 -1
- package/_cjs/hooks/useTokenBalance.d.ts +1 -1
- package/_cjs/hooks/useTokenBalance.js +4 -7
- package/_cjs/hooks/useTokenBalance.js.map +1 -1
- package/_cjs/hooks/useTokenBalances.d.ts +1 -1
- package/_cjs/hooks/useTokenBalances.js +3 -4
- package/_cjs/hooks/useTokenBalances.js.map +1 -1
- package/_cjs/hooks/useTransactionDetails.d.ts +1 -1
- package/_cjs/hooks/useTransactionDetails.js +24 -25
- package/_cjs/hooks/useTransactionDetails.js.map +1 -1
- package/_cjs/hooks/useTransactionHistory.js +2 -1
- package/_cjs/hooks/useTransactionHistory.js.map +1 -1
- package/_cjs/i18n/en.json +27 -6
- package/_cjs/pages/MainPage/MainPage.js +1 -1
- package/_cjs/pages/MainPage/MainPage.js.map +1 -1
- package/_cjs/pages/MainPage/ReviewButton.js +3 -2
- package/_cjs/pages/MainPage/ReviewButton.js.map +1 -1
- package/_cjs/pages/SendToWallet/BookmarkAddressSheet.d.ts +9 -0
- package/_cjs/pages/SendToWallet/BookmarkAddressSheet.js +111 -0
- package/_cjs/pages/SendToWallet/BookmarkAddressSheet.js.map +1 -0
- package/_cjs/pages/SendToWallet/BookmarksPage.d.ts +1 -0
- package/_cjs/pages/SendToWallet/BookmarksPage.js +88 -0
- package/_cjs/pages/SendToWallet/BookmarksPage.js.map +1 -0
- package/_cjs/pages/SendToWallet/ConfirmAddressSheet.d.ts +9 -0
- package/_cjs/pages/SendToWallet/ConfirmAddressSheet.js +35 -0
- package/_cjs/pages/SendToWallet/ConfirmAddressSheet.js.map +1 -0
- package/_cjs/pages/SendToWallet/ConnectedWalletsPage.d.ts +1 -0
- package/_cjs/pages/SendToWallet/ConnectedWalletsPage.js +84 -0
- package/_cjs/pages/SendToWallet/ConnectedWalletsPage.js.map +1 -0
- package/_cjs/pages/SendToWallet/EmptyListIndicator.d.ts +6 -0
- package/_cjs/pages/SendToWallet/EmptyListIndicator.js +8 -0
- package/_cjs/pages/SendToWallet/EmptyListIndicator.js.map +1 -0
- package/_cjs/pages/SendToWallet/RecentWalletsPage.d.ts +1 -0
- package/_cjs/pages/SendToWallet/RecentWalletsPage.js +105 -0
- package/_cjs/pages/SendToWallet/RecentWalletsPage.js.map +1 -0
- package/_cjs/pages/SendToWallet/SendToWalletPage.d.ts +1 -0
- package/_cjs/pages/SendToWallet/SendToWalletPage.js +131 -0
- package/_cjs/pages/SendToWallet/SendToWalletPage.js.map +1 -0
- package/_cjs/pages/SendToWallet/SendToWalletPage.style.d.ts +61 -0
- package/_cjs/pages/SendToWallet/SendToWalletPage.style.js +146 -0
- package/_cjs/pages/SendToWallet/SendToWalletPage.style.js.map +1 -0
- package/_cjs/pages/SendToWallet/index.d.ts +4 -0
- package/_cjs/pages/SendToWallet/index.js +21 -0
- package/_cjs/pages/SendToWallet/index.js.map +1 -0
- package/_cjs/pages/SettingsPage/BridgeAndExchangeSettings.js +2 -1
- package/_cjs/pages/SettingsPage/BridgeAndExchangeSettings.js.map +1 -1
- package/_cjs/pages/SettingsPage/LanguageSetting.js +2 -2
- package/_cjs/pages/SettingsPage/LanguageSetting.js.map +1 -1
- package/_cjs/pages/SettingsPage/SendToWalletOptionSetting.js +2 -2
- package/_cjs/pages/SettingsPage/SendToWalletOptionSetting.js.map +1 -1
- package/_cjs/pages/SettingsPage/SettingsCard/BadgedValue.js +2 -1
- package/_cjs/pages/SettingsPage/SettingsCard/BadgedValue.js.map +1 -1
- package/_cjs/pages/SettingsPage/SettingsCard/SettingCard.style.d.ts +0 -9
- package/_cjs/pages/SettingsPage/SettingsCard/SettingCard.style.js +2 -24
- package/_cjs/pages/SettingsPage/SettingsCard/SettingCard.style.js.map +1 -1
- package/_cjs/pages/SettingsPage/SettingsCard/SettingCardExpandable.js +2 -3
- package/_cjs/pages/SettingsPage/SettingsCard/SettingCardExpandable.js.map +1 -1
- package/_cjs/pages/SettingsPage/SettingsCard/index.d.ts +0 -2
- package/_cjs/pages/SettingsPage/SettingsCard/index.js +0 -2
- package/_cjs/pages/SettingsPage/SettingsCard/index.js.map +1 -1
- package/_cjs/pages/SettingsPage/SlippageSettings/SlippageSettings.js.map +1 -1
- package/_cjs/pages/SettingsPage/ThemeSettings.js +2 -1
- package/_cjs/pages/SettingsPage/ThemeSettings.js.map +1 -1
- package/_cjs/pages/TransactionDetailsPage/TransactionDetailsPage.js.map +1 -1
- package/_cjs/pages/TransactionHistoryPage/TransactionHistoryItem.js +2 -1
- package/_cjs/pages/TransactionHistoryPage/TransactionHistoryItem.js.map +1 -1
- package/_cjs/providers/I18nProvider/I18nProvider.js +1 -1
- package/_cjs/providers/I18nProvider/I18nProvider.js.map +1 -1
- package/_cjs/providers/WalletProvider/SDKProviders.js.map +1 -1
- package/_cjs/stores/StoreProvider.js +2 -1
- package/_cjs/stores/StoreProvider.js.map +1 -1
- package/_cjs/stores/bookmarks/BookmarkStore.d.ts +7 -0
- package/_cjs/stores/bookmarks/BookmarkStore.js +25 -0
- package/_cjs/stores/bookmarks/BookmarkStore.js.map +1 -0
- package/_cjs/stores/bookmarks/createBookmarkStore.d.ts +3 -0
- package/_cjs/stores/bookmarks/createBookmarkStore.js +49 -0
- package/_cjs/stores/bookmarks/createBookmarkStore.js.map +1 -0
- package/_cjs/stores/bookmarks/index.d.ts +5 -0
- package/_cjs/stores/bookmarks/index.js +22 -0
- package/_cjs/stores/bookmarks/index.js.map +1 -0
- package/_cjs/stores/bookmarks/types.d.ts +24 -0
- package/_cjs/stores/bookmarks/types.js +3 -0
- package/_cjs/stores/bookmarks/types.js.map +1 -0
- package/_cjs/stores/bookmarks/useBookmarkActions.d.ts +2 -0
- package/_cjs/stores/bookmarks/useBookmarkActions.js +18 -0
- package/_cjs/stores/bookmarks/useBookmarkActions.js.map +1 -0
- package/_cjs/stores/bookmarks/useBookmarks.d.ts +2 -0
- package/_cjs/stores/bookmarks/useBookmarks.js +15 -0
- package/_cjs/stores/bookmarks/useBookmarks.js.map +1 -0
- package/_cjs/stores/form/FormStore.js +16 -3
- package/_cjs/stores/form/FormStore.js.map +1 -1
- package/_cjs/stores/form/types.js.map +1 -1
- package/_cjs/stores/form/useTouchedFields.d.ts +4 -4
- package/_cjs/stores/index.d.ts +1 -0
- package/_cjs/stores/index.js +1 -0
- package/_cjs/stores/index.js.map +1 -1
- package/_cjs/utils/chainType.d.ts +6 -0
- package/_cjs/utils/chainType.js +24 -0
- package/_cjs/utils/chainType.js.map +1 -0
- package/_cjs/utils/converters.d.ts +2 -2
- package/_cjs/utils/converters.js.map +1 -1
- package/_cjs/utils/index.d.ts +1 -0
- package/_cjs/utils/index.js +1 -0
- package/_cjs/utils/index.js.map +1 -1
- package/_cjs/utils/navigationRoutes.d.ts +4 -0
- package/_cjs/utils/navigationRoutes.js +12 -0
- package/_cjs/utils/navigationRoutes.js.map +1 -1
- package/_esm/AppRoutes.js +17 -0
- package/_esm/AppRoutes.js.map +1 -1
- package/_esm/components/AccountAvatar.d.ts +7 -0
- package/_esm/components/AccountAvatar.js +16 -0
- package/_esm/components/AccountAvatar.js.map +1 -0
- package/_esm/components/ActiveTransactions/ActiveTransactions.style.d.ts +2 -2
- package/_esm/components/AlertMessage/AlertMessage.d.ts +11 -0
- package/_esm/components/AlertMessage/AlertMessage.js +4 -0
- package/_esm/components/AlertMessage/AlertMessage.js.map +1 -0
- package/_esm/components/AlertMessage/AlertMessage.style.d.ts +12 -0
- package/_esm/components/AlertMessage/AlertMessage.style.js +32 -0
- package/_esm/components/AlertMessage/AlertMessage.style.js.map +1 -0
- package/_esm/components/AlertMessage/index.d.ts +3 -0
- package/_esm/components/AlertMessage/index.js +4 -0
- package/_esm/components/AlertMessage/index.js.map +1 -0
- package/_esm/components/AlertMessage/types.d.ts +1 -0
- package/_esm/components/AlertMessage/types.js +2 -0
- package/_esm/components/AlertMessage/types.js.map +1 -0
- package/_esm/components/BaseTransactionButton/BaseTransactionButton.js +7 -4
- package/_esm/components/BaseTransactionButton/BaseTransactionButton.js.map +1 -1
- package/_esm/{pages/SettingsPage/SettingsCard/SettingCardButton.d.ts → components/Card/CardButton.d.ts} +2 -2
- package/_esm/components/Card/CardButton.js +5 -0
- package/_esm/components/Card/CardButton.js.map +1 -0
- package/_esm/components/Card/CardButton.style.d.ts +13 -0
- package/_esm/components/Card/CardButton.style.js +33 -0
- package/_esm/components/Card/CardButton.style.js.map +1 -0
- package/_esm/components/Card/index.d.ts +2 -0
- package/_esm/components/Card/index.js +2 -0
- package/_esm/components/Card/index.js.map +1 -1
- package/_esm/components/ChainSelect/useChainSelect.js +5 -16
- package/_esm/components/ChainSelect/useChainSelect.js.map +1 -1
- package/_esm/components/GasMessage/FundsSufficiencyMessage.js +14 -6
- package/_esm/components/GasMessage/FundsSufficiencyMessage.js.map +1 -1
- package/_esm/components/GasMessage/GasMessage.style.d.ts +1 -14
- package/_esm/components/GasMessage/GasMessage.style.js +1 -24
- package/_esm/components/GasMessage/GasMessage.style.js.map +1 -1
- package/_esm/components/GasMessage/GasRefuelMessage.js +5 -6
- package/_esm/components/GasMessage/GasRefuelMessage.js.map +1 -1
- package/_esm/components/GasMessage/GasSufficiencyMessage.js +2 -6
- package/_esm/components/GasMessage/GasSufficiencyMessage.js.map +1 -1
- package/_esm/components/Header/NavigationHeader.js +11 -2
- package/_esm/components/Header/NavigationHeader.js.map +1 -1
- package/_esm/components/ListItem/ListItem.d.ts +6 -0
- package/_esm/components/ListItem/ListItem.js +24 -0
- package/_esm/components/ListItem/ListItem.js.map +1 -0
- package/_esm/components/ListItem/ListItemButton.d.ts +4 -0
- package/_esm/components/ListItem/ListItemButton.js +9 -0
- package/_esm/components/ListItem/ListItemButton.js.map +1 -0
- package/_esm/components/ListItem/index.d.ts +2 -0
- package/_esm/components/ListItem/index.js +3 -0
- package/_esm/components/ListItem/index.js.map +1 -0
- package/_esm/components/ListItemButton.d.ts +1 -1
- package/_esm/components/ListItemButton.js +3 -2
- package/_esm/components/ListItemButton.js.map +1 -1
- package/_esm/components/Menu.d.ts +1 -0
- package/_esm/components/Menu.js +22 -0
- package/_esm/components/Menu.js.map +1 -0
- package/_esm/components/PageContainer.d.ts +1 -2
- package/_esm/components/PoweredBy/PoweredBy.style.d.ts +1 -1
- package/_esm/components/ReverseTokensButton/ReverseTokensButton.js +11 -3
- package/_esm/components/ReverseTokensButton/ReverseTokensButton.js.map +1 -1
- package/_esm/components/Routes/Routes.js +1 -3
- package/_esm/components/Routes/Routes.js.map +1 -1
- package/_esm/components/Routes/RoutesExpanded.js +5 -8
- package/_esm/components/Routes/RoutesExpanded.js.map +1 -1
- package/_esm/components/SendToWallet/SendToWallet.style.d.ts +4 -3
- package/_esm/components/SendToWallet/SendToWallet.style.js +25 -14
- package/_esm/components/SendToWallet/SendToWallet.style.js.map +1 -1
- package/_esm/components/SendToWallet/SendToWalletButton.d.ts +1 -2
- package/_esm/components/SendToWallet/SendToWalletButton.js +59 -27
- package/_esm/components/SendToWallet/SendToWalletButton.js.map +1 -1
- package/_esm/components/SendToWallet/SendToWalletExpandButton.d.ts +2 -0
- package/_esm/components/SendToWallet/SendToWalletExpandButton.js +37 -0
- package/_esm/components/SendToWallet/SendToWalletExpandButton.js.map +1 -0
- package/_esm/components/SendToWallet/index.d.ts +2 -1
- package/_esm/components/SendToWallet/index.js +2 -1
- package/_esm/components/SendToWallet/index.js.map +1 -1
- package/_esm/components/SettingsListItemButton.d.ts +1 -1
- package/_esm/components/Step/StepProcess.style.d.ts +1 -1
- package/_esm/components/TokenList/TokenList.js +3 -2
- package/_esm/components/TokenList/TokenList.js.map +1 -1
- package/_esm/components/TokenList/TokenList.style.d.ts +2 -5
- package/_esm/components/TokenList/TokenList.style.js +3 -28
- package/_esm/components/TokenList/TokenList.style.js.map +1 -1
- package/_esm/components/TokenList/TokenListItem.js +3 -2
- package/_esm/components/TokenList/TokenListItem.js.map +1 -1
- package/_esm/components/TokenList/VirtualizedTokenList.js +2 -2
- package/_esm/components/TokenList/VirtualizedTokenList.js.map +1 -1
- package/_esm/config/version.d.ts +1 -1
- package/_esm/config/version.js +1 -1
- package/_esm/hooks/index.d.ts +3 -1
- package/_esm/hooks/index.js +3 -1
- package/_esm/hooks/index.js.map +1 -1
- package/_esm/hooks/useAccount.d.ts +14 -3
- package/_esm/hooks/useAccount.js +24 -6
- package/_esm/hooks/useAccount.js.map +1 -1
- package/_esm/hooks/useAddressValidation.d.ts +17 -0
- package/_esm/hooks/useAddressValidation.js +55 -0
- package/_esm/hooks/useAddressValidation.js.map +1 -0
- package/_esm/hooks/useFromTokenSufficiency.js +3 -4
- package/_esm/hooks/useFromTokenSufficiency.js.map +1 -1
- package/_esm/hooks/useGasSufficiency.js +6 -5
- package/_esm/hooks/useGasSufficiency.js.map +1 -1
- package/_esm/hooks/useRouteExecution.js +7 -5
- package/_esm/hooks/useRouteExecution.js.map +1 -1
- package/_esm/hooks/useRoutes.d.ts +2 -2
- package/_esm/hooks/useRoutes.js +19 -31
- package/_esm/hooks/useRoutes.js.map +1 -1
- package/_esm/hooks/useToAddressRequirements.d.ts +4 -0
- package/_esm/hooks/{useRequiredToAddress.js → useToAddressRequirements.js} +9 -6
- package/_esm/hooks/useToAddressRequirements.js.map +1 -0
- package/_esm/hooks/useToAddressReset.d.ts +4 -0
- package/_esm/hooks/useToAddressReset.js +28 -0
- package/_esm/hooks/useToAddressReset.js.map +1 -0
- package/_esm/hooks/useTokenAddressBalance.d.ts +1 -1
- package/_esm/hooks/useTokenBalance.d.ts +1 -1
- package/_esm/hooks/useTokenBalance.js +4 -7
- package/_esm/hooks/useTokenBalance.js.map +1 -1
- package/_esm/hooks/useTokenBalances.d.ts +1 -1
- package/_esm/hooks/useTokenBalances.js +3 -4
- package/_esm/hooks/useTokenBalances.js.map +1 -1
- package/_esm/hooks/useTransactionDetails.d.ts +1 -1
- package/_esm/hooks/useTransactionDetails.js +24 -25
- package/_esm/hooks/useTransactionDetails.js.map +1 -1
- package/_esm/hooks/useTransactionHistory.js +2 -1
- package/_esm/hooks/useTransactionHistory.js.map +1 -1
- package/_esm/i18n/en.json +27 -6
- package/_esm/pages/MainPage/MainPage.js +2 -2
- package/_esm/pages/MainPage/MainPage.js.map +1 -1
- package/_esm/pages/MainPage/ReviewButton.js +5 -4
- package/_esm/pages/MainPage/ReviewButton.js.map +1 -1
- package/_esm/pages/SendToWallet/BookmarkAddressSheet.d.ts +9 -0
- package/_esm/pages/SendToWallet/BookmarkAddressSheet.js +108 -0
- package/_esm/pages/SendToWallet/BookmarkAddressSheet.js.map +1 -0
- package/_esm/pages/SendToWallet/BookmarksPage.d.ts +1 -0
- package/_esm/pages/SendToWallet/BookmarksPage.js +84 -0
- package/_esm/pages/SendToWallet/BookmarksPage.js.map +1 -0
- package/_esm/pages/SendToWallet/ConfirmAddressSheet.d.ts +9 -0
- package/_esm/pages/SendToWallet/ConfirmAddressSheet.js +32 -0
- package/_esm/pages/SendToWallet/ConfirmAddressSheet.js.map +1 -0
- package/_esm/pages/SendToWallet/ConnectedWalletsPage.d.ts +1 -0
- package/_esm/pages/SendToWallet/ConnectedWalletsPage.js +80 -0
- package/_esm/pages/SendToWallet/ConnectedWalletsPage.js.map +1 -0
- package/_esm/pages/SendToWallet/EmptyListIndicator.d.ts +6 -0
- package/_esm/pages/SendToWallet/EmptyListIndicator.js +4 -0
- package/_esm/pages/SendToWallet/EmptyListIndicator.js.map +1 -0
- package/_esm/pages/SendToWallet/RecentWalletsPage.d.ts +1 -0
- package/_esm/pages/SendToWallet/RecentWalletsPage.js +101 -0
- package/_esm/pages/SendToWallet/RecentWalletsPage.js.map +1 -0
- package/_esm/pages/SendToWallet/SendToWalletPage.d.ts +1 -0
- package/_esm/pages/SendToWallet/SendToWalletPage.js +127 -0
- package/_esm/pages/SendToWallet/SendToWalletPage.js.map +1 -0
- package/_esm/pages/SendToWallet/SendToWalletPage.style.d.ts +61 -0
- package/_esm/pages/SendToWallet/SendToWalletPage.style.js +143 -0
- package/_esm/pages/SendToWallet/SendToWalletPage.style.js.map +1 -0
- package/_esm/pages/SendToWallet/index.d.ts +4 -0
- package/_esm/pages/SendToWallet/index.js +5 -0
- package/_esm/pages/SendToWallet/index.js.map +1 -0
- package/_esm/pages/SettingsPage/BridgeAndExchangeSettings.js +3 -2
- package/_esm/pages/SettingsPage/BridgeAndExchangeSettings.js.map +1 -1
- package/_esm/pages/SettingsPage/LanguageSetting.js +2 -2
- package/_esm/pages/SettingsPage/LanguageSetting.js.map +1 -1
- package/_esm/pages/SettingsPage/SendToWalletOptionSetting.js +2 -2
- package/_esm/pages/SettingsPage/SendToWalletOptionSetting.js.map +1 -1
- package/_esm/pages/SettingsPage/SettingsCard/BadgedValue.js +3 -2
- package/_esm/pages/SettingsPage/SettingsCard/BadgedValue.js.map +1 -1
- package/_esm/pages/SettingsPage/SettingsCard/SettingCard.style.d.ts +0 -9
- package/_esm/pages/SettingsPage/SettingsCard/SettingCard.style.js +2 -24
- package/_esm/pages/SettingsPage/SettingsCard/SettingCard.style.js.map +1 -1
- package/_esm/pages/SettingsPage/SettingsCard/SettingCardExpandable.js +2 -3
- package/_esm/pages/SettingsPage/SettingsCard/SettingCardExpandable.js.map +1 -1
- package/_esm/pages/SettingsPage/SettingsCard/index.d.ts +0 -2
- package/_esm/pages/SettingsPage/SettingsCard/index.js +0 -2
- package/_esm/pages/SettingsPage/SettingsCard/index.js.map +1 -1
- package/_esm/pages/SettingsPage/SlippageSettings/SlippageSettings.js.map +1 -1
- package/_esm/pages/SettingsPage/ThemeSettings.js +3 -2
- package/_esm/pages/SettingsPage/ThemeSettings.js.map +1 -1
- package/_esm/pages/TransactionDetailsPage/TransactionDetailsPage.js.map +1 -1
- package/_esm/pages/TransactionHistoryPage/TransactionHistoryItem.js +2 -1
- package/_esm/pages/TransactionHistoryPage/TransactionHistoryItem.js.map +1 -1
- package/_esm/providers/I18nProvider/I18nProvider.js +2 -2
- package/_esm/providers/I18nProvider/I18nProvider.js.map +1 -1
- package/_esm/providers/WalletProvider/SDKProviders.js.map +1 -1
- package/_esm/stores/StoreProvider.js +2 -1
- package/_esm/stores/StoreProvider.js.map +1 -1
- package/_esm/stores/bookmarks/BookmarkStore.d.ts +7 -0
- package/_esm/stores/bookmarks/BookmarkStore.js +20 -0
- package/_esm/stores/bookmarks/BookmarkStore.js.map +1 -0
- package/_esm/stores/bookmarks/createBookmarkStore.d.ts +3 -0
- package/_esm/stores/bookmarks/createBookmarkStore.js +45 -0
- package/_esm/stores/bookmarks/createBookmarkStore.js.map +1 -0
- package/_esm/stores/bookmarks/index.d.ts +5 -0
- package/_esm/stores/bookmarks/index.js +6 -0
- package/_esm/stores/bookmarks/index.js.map +1 -0
- package/_esm/stores/bookmarks/types.d.ts +24 -0
- package/_esm/stores/bookmarks/types.js +2 -0
- package/_esm/stores/bookmarks/types.js.map +1 -0
- package/_esm/stores/bookmarks/useBookmarkActions.d.ts +2 -0
- package/_esm/stores/bookmarks/useBookmarkActions.js +14 -0
- package/_esm/stores/bookmarks/useBookmarkActions.js.map +1 -0
- package/_esm/stores/bookmarks/useBookmarks.d.ts +2 -0
- package/_esm/stores/bookmarks/useBookmarks.js +11 -0
- package/_esm/stores/bookmarks/useBookmarks.js.map +1 -0
- package/_esm/stores/form/FormStore.js +16 -3
- package/_esm/stores/form/FormStore.js.map +1 -1
- package/_esm/stores/form/types.js.map +1 -1
- package/_esm/stores/form/useTouchedFields.d.ts +4 -4
- package/_esm/stores/index.d.ts +1 -0
- package/_esm/stores/index.js +1 -0
- package/_esm/stores/index.js.map +1 -1
- package/_esm/utils/chainType.d.ts +6 -0
- package/_esm/utils/chainType.js +20 -0
- package/_esm/utils/chainType.js.map +1 -0
- package/_esm/utils/converters.d.ts +2 -2
- package/_esm/utils/converters.js.map +1 -1
- package/_esm/utils/index.d.ts +1 -0
- package/_esm/utils/index.js +1 -0
- package/_esm/utils/index.js.map +1 -1
- package/_esm/utils/navigationRoutes.d.ts +4 -0
- package/_esm/utils/navigationRoutes.js +12 -0
- package/_esm/utils/navigationRoutes.js.map +1 -1
- package/components/AccountAvatar.tsx +55 -0
- package/components/AlertMessage/AlertMessage.style.tsx +40 -0
- package/components/AlertMessage/AlertMessage.tsx +31 -0
- package/components/AlertMessage/index.ts +3 -0
- package/components/AlertMessage/types.ts +1 -0
- package/components/BaseTransactionButton/BaseTransactionButton.tsx +7 -4
- package/components/Card/CardButton.style.tsx +36 -0
- package/components/Card/CardButton.tsx +26 -0
- package/components/Card/index.ts +2 -0
- package/components/ChainSelect/useChainSelect.ts +5 -23
- package/components/GasMessage/FundsSufficiencyMessage.tsx +18 -17
- package/components/GasMessage/GasMessage.style.ts +1 -31
- package/components/GasMessage/GasRefuelMessage.tsx +21 -22
- package/components/GasMessage/GasSufficiencyMessage.tsx +9 -21
- package/components/Header/NavigationHeader.tsx +11 -2
- package/components/ListItem/ListItem.tsx +24 -0
- package/components/ListItem/ListItemButton.tsx +9 -0
- package/components/ListItem/index.ts +2 -0
- package/components/ListItemButton.tsx +12 -8
- package/components/Menu.tsx +27 -0
- package/components/PageContainer.ts +1 -1
- package/components/ReverseTokensButton/ReverseTokensButton.tsx +12 -3
- package/components/Routes/Routes.tsx +1 -7
- package/components/Routes/RoutesExpanded.tsx +5 -8
- package/components/SendToWallet/SendToWallet.style.tsx +25 -15
- package/components/SendToWallet/SendToWalletButton.tsx +107 -43
- package/components/SendToWallet/SendToWalletExpandButton.tsx +65 -0
- package/components/SendToWallet/index.ts +2 -1
- package/components/TokenList/TokenList.style.tsx +3 -32
- package/components/TokenList/TokenList.tsx +3 -2
- package/components/TokenList/TokenListItem.tsx +4 -3
- package/components/TokenList/VirtualizedTokenList.tsx +2 -2
- package/config/version.ts +1 -1
- package/hooks/index.ts +3 -1
- package/hooks/useAccount.ts +37 -9
- package/hooks/useAddressValidation.ts +79 -0
- package/hooks/useFromTokenSufficiency.ts +3 -8
- package/hooks/useGasSufficiency.ts +6 -10
- package/hooks/useRouteExecution.ts +9 -5
- package/hooks/useRoutes.ts +20 -30
- package/hooks/{useRequiredToAddress.ts → useToAddressRequirements.ts} +8 -5
- package/hooks/useToAddressReset.ts +36 -0
- package/hooks/useTokenBalance.ts +5 -8
- package/hooks/useTokenBalances.ts +3 -6
- package/hooks/useTransactionDetails.ts +30 -31
- package/hooks/useTransactionHistory.ts +3 -2
- package/i18n/en.json +27 -6
- package/package.json +14 -14
- package/pages/MainPage/MainPage.tsx +3 -3
- package/pages/MainPage/ReviewButton.tsx +5 -5
- package/pages/SendToWallet/BookmarkAddressSheet.tsx +219 -0
- package/pages/SendToWallet/BookmarksPage.tsx +182 -0
- package/pages/SendToWallet/ConfirmAddressSheet.tsx +90 -0
- package/pages/SendToWallet/ConnectedWalletsPage.tsx +165 -0
- package/pages/SendToWallet/EmptyListIndicator.tsx +19 -0
- package/pages/SendToWallet/RecentWalletsPage.tsx +215 -0
- package/pages/SendToWallet/SendToWalletPage.style.tsx +182 -0
- package/pages/SendToWallet/SendToWalletPage.tsx +246 -0
- package/pages/SendToWallet/index.ts +4 -0
- package/pages/SettingsPage/BridgeAndExchangeSettings.tsx +4 -3
- package/pages/SettingsPage/LanguageSetting.tsx +4 -4
- package/pages/SettingsPage/SendToWalletOptionSetting.tsx +12 -12
- package/pages/SettingsPage/SettingsCard/BadgedValue.tsx +4 -3
- package/pages/SettingsPage/SettingsCard/SettingCard.style.tsx +2 -27
- package/pages/SettingsPage/SettingsCard/SettingCardExpandable.tsx +13 -12
- package/pages/SettingsPage/SettingsCard/index.ts +0 -2
- package/pages/SettingsPage/SlippageSettings/SlippageSettings.tsx +1 -1
- package/pages/SettingsPage/ThemeSettings.tsx +3 -2
- package/pages/TransactionDetailsPage/TransactionDetailsPage.tsx +5 -1
- package/pages/TransactionHistoryPage/TransactionHistoryItem.tsx +4 -7
- package/providers/I18nProvider/I18nProvider.tsx +2 -2
- package/providers/WalletProvider/SDKProviders.tsx +2 -1
- package/stores/StoreProvider.tsx +8 -5
- package/stores/bookmarks/BookmarkStore.tsx +39 -0
- package/stores/bookmarks/createBookmarkStore.ts +63 -0
- package/stores/bookmarks/index.ts +5 -0
- package/stores/bookmarks/types.ts +31 -0
- package/stores/bookmarks/useBookmarkActions.ts +19 -0
- package/stores/bookmarks/useBookmarks.ts +16 -0
- package/stores/form/FormStore.tsx +25 -4
- package/stores/form/types.ts +2 -3
- package/stores/index.ts +1 -0
- package/utils/chainType.ts +25 -0
- package/utils/converters.ts +2 -3
- package/utils/index.ts +1 -0
- package/utils/navigationRoutes.ts +12 -0
- package/_cjs/components/SendToWallet/SendToWallet.d.ts +0 -4
- package/_cjs/components/SendToWallet/SendToWallet.js +0 -94
- package/_cjs/components/SendToWallet/SendToWallet.js.map +0 -1
- package/_cjs/hooks/useRequiredToAddress.d.ts +0 -1
- package/_cjs/hooks/useRequiredToAddress.js.map +0 -1
- package/_cjs/pages/SettingsPage/SettingsCard/SettingCard.d.ts +0 -2
- package/_cjs/pages/SettingsPage/SettingsCard/SettingCard.js +0 -12
- package/_cjs/pages/SettingsPage/SettingsCard/SettingCard.js.map +0 -1
- package/_cjs/pages/SettingsPage/SettingsCard/SettingCardButton.js +0 -9
- package/_cjs/pages/SettingsPage/SettingsCard/SettingCardButton.js.map +0 -1
- package/_esm/components/SendToWallet/SendToWallet.d.ts +0 -4
- package/_esm/components/SendToWallet/SendToWallet.js +0 -90
- package/_esm/components/SendToWallet/SendToWallet.js.map +0 -1
- package/_esm/hooks/useRequiredToAddress.d.ts +0 -1
- package/_esm/hooks/useRequiredToAddress.js.map +0 -1
- package/_esm/pages/SettingsPage/SettingsCard/SettingCard.d.ts +0 -2
- package/_esm/pages/SettingsPage/SettingsCard/SettingCard.js +0 -8
- package/_esm/pages/SettingsPage/SettingsCard/SettingCard.js.map +0 -1
- package/_esm/pages/SettingsPage/SettingsCard/SettingCardButton.js +0 -5
- package/_esm/pages/SettingsPage/SettingsCard/SettingCardButton.js.map +0 -1
- package/components/SendToWallet/SendToWallet.tsx +0 -144
- package/i18n/i18next.d.ts +0 -10
- package/pages/SettingsPage/SettingsCard/SettingCard.tsx +0 -16
- package/pages/SettingsPage/SettingsCard/SettingCardButton.tsx +0 -26
- package/react-app-env.d.ts +0 -1
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import type { ChainType } from '@lifi/sdk';
|
|
2
|
+
import { useMutation } from '@tanstack/react-query';
|
|
3
|
+
import { getEnsAddress } from '@wagmi/core';
|
|
4
|
+
import { useTranslation } from 'react-i18next';
|
|
5
|
+
import { normalize } from 'viem/ens';
|
|
6
|
+
import { useConfig } from 'wagmi';
|
|
7
|
+
import { getChainTypeFromAddress } from '../utils';
|
|
8
|
+
|
|
9
|
+
type AddressType = 'address' | 'ENS';
|
|
10
|
+
|
|
11
|
+
type ValidResponse = {
|
|
12
|
+
address: string;
|
|
13
|
+
addressType: AddressType;
|
|
14
|
+
chainType: ChainType;
|
|
15
|
+
isValid: true;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
type InvalidResponse = {
|
|
19
|
+
error: string;
|
|
20
|
+
isValid: false;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export const useAddressValidation = () => {
|
|
24
|
+
const { t } = useTranslation();
|
|
25
|
+
const config = useConfig();
|
|
26
|
+
|
|
27
|
+
const { mutateAsync: validateAddress, isPending: isValidating } = useMutation(
|
|
28
|
+
{
|
|
29
|
+
mutationFn: async (
|
|
30
|
+
value: string,
|
|
31
|
+
): Promise<ValidResponse | InvalidResponse> => {
|
|
32
|
+
try {
|
|
33
|
+
if (!value) {
|
|
34
|
+
throw new Error();
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const chainType = getChainTypeFromAddress(value);
|
|
38
|
+
if (chainType) {
|
|
39
|
+
return {
|
|
40
|
+
address: value,
|
|
41
|
+
addressType: 'address',
|
|
42
|
+
chainType,
|
|
43
|
+
isValid: true,
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const address = await getEnsAddress(config, {
|
|
48
|
+
chainId: 1,
|
|
49
|
+
name: normalize(value),
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
if (address) {
|
|
53
|
+
const chainType = getChainTypeFromAddress(address);
|
|
54
|
+
if (chainType) {
|
|
55
|
+
return {
|
|
56
|
+
address: address,
|
|
57
|
+
addressType: 'ENS',
|
|
58
|
+
chainType,
|
|
59
|
+
isValid: true,
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
throw new Error();
|
|
65
|
+
} catch (_) {
|
|
66
|
+
return {
|
|
67
|
+
isValid: false,
|
|
68
|
+
error: t('error.title.walletAddressInvalid'),
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
);
|
|
74
|
+
|
|
75
|
+
return {
|
|
76
|
+
validateAddress,
|
|
77
|
+
isValidating,
|
|
78
|
+
};
|
|
79
|
+
};
|
|
@@ -9,7 +9,6 @@ import { getTokenBalancesWithRetry } from './useTokenBalance';
|
|
|
9
9
|
const refetchInterval = 30_000;
|
|
10
10
|
|
|
11
11
|
export const useFromTokenSufficiency = (route?: RouteExtended) => {
|
|
12
|
-
const { accounts } = useAccount();
|
|
13
12
|
const [fromChainId, fromTokenAddress, fromAmount] = useFieldValues(
|
|
14
13
|
'fromChain',
|
|
15
14
|
'fromToken',
|
|
@@ -29,14 +28,12 @@ export const useFromTokenSufficiency = (route?: RouteExtended) => {
|
|
|
29
28
|
isLoading: isTokenAddressBalanceLoading,
|
|
30
29
|
} = useTokenAddressBalance(chainId, tokenAddress);
|
|
31
30
|
|
|
32
|
-
const account =
|
|
33
|
-
(account) => account.chainType === chain?.chainType,
|
|
34
|
-
);
|
|
31
|
+
const { account } = useAccount({ chainType: chain?.chainType });
|
|
35
32
|
|
|
36
33
|
const { data: insufficientFromToken, isLoading } = useQuery({
|
|
37
34
|
queryKey: [
|
|
38
35
|
'from-token-sufficiency-check',
|
|
39
|
-
account
|
|
36
|
+
account.address,
|
|
40
37
|
chainId,
|
|
41
38
|
tokenAddress,
|
|
42
39
|
route?.id ?? fromAmount,
|
|
@@ -77,9 +74,7 @@ export const useFromTokenSufficiency = (route?: RouteExtended) => {
|
|
|
77
74
|
return insufficientFunds;
|
|
78
75
|
},
|
|
79
76
|
|
|
80
|
-
enabled: Boolean(
|
|
81
|
-
account?.address && token && !isTokenAddressBalanceLoading,
|
|
82
|
-
),
|
|
77
|
+
enabled: Boolean(account.address && token && !isTokenAddressBalanceLoading),
|
|
83
78
|
refetchInterval,
|
|
84
79
|
staleTime: refetchInterval,
|
|
85
80
|
placeholderData: keepPreviousData,
|
|
@@ -17,20 +17,16 @@ export interface GasSufficiency {
|
|
|
17
17
|
const refetchInterval = 30_000;
|
|
18
18
|
|
|
19
19
|
export const useGasSufficiency = (route?: RouteExtended) => {
|
|
20
|
-
const { accounts } = useAccount();
|
|
21
20
|
const { getChainById } = useAvailableChains();
|
|
22
|
-
|
|
21
|
+
const { account } = useAccount({
|
|
22
|
+
chainType: getChainById(route?.fromChainId)?.chainType,
|
|
23
|
+
});
|
|
23
24
|
const { enabledAutoRefuel } = useSettings(['enabledAutoRefuel']);
|
|
24
25
|
const { enabled, isLoading: isRefuelLoading } = useGasRefuel();
|
|
25
26
|
const enabledRefuel = enabled && enabledAutoRefuel;
|
|
26
27
|
|
|
27
|
-
const account = accounts.find(
|
|
28
|
-
(account) =>
|
|
29
|
-
account.chainType === getChainById(route?.fromChainId)?.chainType,
|
|
30
|
-
);
|
|
31
|
-
|
|
32
28
|
const { data: insufficientGas, isLoading } = useQuery({
|
|
33
|
-
queryKey: ['gas-sufficiency-check', account
|
|
29
|
+
queryKey: ['gas-sufficiency-check', account.address, route?.id],
|
|
34
30
|
queryFn: async ({ queryKey: [, accountAddress] }) => {
|
|
35
31
|
// TODO: include LI.Fuel into calculation once steps and tools are properly typed
|
|
36
32
|
// const refuelSteps = route.steps
|
|
@@ -43,7 +39,7 @@ export const useGasSufficiency = (route?: RouteExtended) => {
|
|
|
43
39
|
(groupedGasCosts, step) => {
|
|
44
40
|
if (
|
|
45
41
|
step.estimate.gasCosts &&
|
|
46
|
-
(account
|
|
42
|
+
(account.connector as Connector)?.id !== 'safe'
|
|
47
43
|
) {
|
|
48
44
|
const { token } = step.estimate.gasCosts[0];
|
|
49
45
|
const gasCostAmount = step.estimate.gasCosts.reduce(
|
|
@@ -130,7 +126,7 @@ export const useGasSufficiency = (route?: RouteExtended) => {
|
|
|
130
126
|
return gasCostResult;
|
|
131
127
|
},
|
|
132
128
|
|
|
133
|
-
enabled: Boolean(account
|
|
129
|
+
enabled: Boolean(account.address && route),
|
|
134
130
|
refetchInterval,
|
|
135
131
|
staleTime: refetchInterval,
|
|
136
132
|
});
|
|
@@ -31,7 +31,7 @@ export const useRouteExecution = ({
|
|
|
31
31
|
onAcceptExchangeRateUpdate,
|
|
32
32
|
}: RouteExecutionProps) => {
|
|
33
33
|
const queryClient = useQueryClient();
|
|
34
|
-
const {
|
|
34
|
+
const { account } = useAccount();
|
|
35
35
|
const resumedAfterMount = useRef(false);
|
|
36
36
|
const emitter = useWidgetEvents();
|
|
37
37
|
const routeExecutionStoreContext = useRouteExecutionStoreContext();
|
|
@@ -87,7 +87,7 @@ export const useRouteExecution = ({
|
|
|
87
87
|
|
|
88
88
|
const executeRouteMutation = useMutation({
|
|
89
89
|
mutationFn: () => {
|
|
90
|
-
if (!isConnected) {
|
|
90
|
+
if (!account.isConnected) {
|
|
91
91
|
throw Error('Account is not connected.');
|
|
92
92
|
}
|
|
93
93
|
if (!routeExecution?.route) {
|
|
@@ -111,7 +111,7 @@ export const useRouteExecution = ({
|
|
|
111
111
|
|
|
112
112
|
const resumeRouteMutation = useMutation({
|
|
113
113
|
mutationFn: (resumedRoute?: Route) => {
|
|
114
|
-
if (!isConnected) {
|
|
114
|
+
if (!account.isConnected) {
|
|
115
115
|
throw Error('Account is not connected.');
|
|
116
116
|
}
|
|
117
117
|
if (!routeExecution?.route) {
|
|
@@ -169,7 +169,11 @@ export const useRouteExecution = ({
|
|
|
169
169
|
useEffect(() => {
|
|
170
170
|
// Check if route is eligible for automatic resuming
|
|
171
171
|
const route = routeExecutionStoreContext.getState().routes[routeId]?.route;
|
|
172
|
-
if (
|
|
172
|
+
if (
|
|
173
|
+
isRouteActive(route) &&
|
|
174
|
+
account.isConnected &&
|
|
175
|
+
!resumedAfterMount.current
|
|
176
|
+
) {
|
|
173
177
|
resumedAfterMount.current = true;
|
|
174
178
|
_resumeRoute();
|
|
175
179
|
}
|
|
@@ -186,7 +190,7 @@ export const useRouteExecution = ({
|
|
|
186
190
|
resumedAfterMount.current = false;
|
|
187
191
|
};
|
|
188
192
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
189
|
-
}, [isConnected, routeExecutionStoreContext, routeId]);
|
|
193
|
+
}, [account.isConnected, routeExecutionStoreContext, routeId]);
|
|
190
194
|
|
|
191
195
|
return {
|
|
192
196
|
executeRoute: _executeRoute,
|
package/hooks/useRoutes.ts
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import type { Route, RoutesResponse, Token } from '@lifi/sdk';
|
|
2
2
|
import { LiFiErrorCode, getContractCallQuote, getRoutes } from '@lifi/sdk';
|
|
3
3
|
import { useQuery, useQueryClient } from '@tanstack/react-query';
|
|
4
|
-
import { getEnsAddress } from '@wagmi/core';
|
|
5
4
|
import { v4 as uuidv4 } from 'uuid';
|
|
6
|
-
import {
|
|
7
|
-
import { normalize } from 'viem/ens';
|
|
8
|
-
import { useConfig } from 'wagmi';
|
|
5
|
+
import { parseUnits } from 'viem';
|
|
9
6
|
import { useChain, useDebouncedWatch, useGasRefuel, useToken } from '.';
|
|
10
7
|
import { useWidgetConfig } from '../providers';
|
|
11
8
|
import { defaultSlippage, useFieldValues, useSettings } from '../stores';
|
|
12
|
-
import {
|
|
9
|
+
import { getChainTypeFromAddress } from '../utils';
|
|
13
10
|
import { useAccount } from './useAccount';
|
|
14
11
|
import { useSwapOnly } from './useSwapOnly';
|
|
15
12
|
|
|
@@ -21,9 +18,7 @@ interface RoutesProps {
|
|
|
21
18
|
|
|
22
19
|
export const useRoutes = ({ insurableRoute }: RoutesProps = {}) => {
|
|
23
20
|
const { subvariant, sdkConfig, insurance, contractTool } = useWidgetConfig();
|
|
24
|
-
const { accounts } = useAccount();
|
|
25
21
|
const queryClient = useQueryClient();
|
|
26
|
-
const config = useConfig();
|
|
27
22
|
const swapOnly = useSwapOnly();
|
|
28
23
|
const {
|
|
29
24
|
slippage,
|
|
@@ -67,10 +62,7 @@ export const useRoutes = ({ insurableRoute }: RoutesProps = {}) => {
|
|
|
67
62
|
const { enabled: enabledRefuel, fromAmount: gasRecommendationFromAmount } =
|
|
68
63
|
useGasRefuel();
|
|
69
64
|
|
|
70
|
-
const
|
|
71
|
-
? accounts.find((account) => account.chainType === fromChain.chainType)
|
|
72
|
-
?.address
|
|
73
|
-
: undefined;
|
|
65
|
+
const { account } = useAccount({ chainType: fromChain?.chainType });
|
|
74
66
|
|
|
75
67
|
const hasAmount = Number(fromTokenAmount) > 0 || Number(toTokenAmount) > 0;
|
|
76
68
|
|
|
@@ -80,13 +72,24 @@ export const useRoutes = ({ insurableRoute }: RoutesProps = {}) => {
|
|
|
80
72
|
toContractAddress &&
|
|
81
73
|
toContractCallData &&
|
|
82
74
|
toContractGasLimit &&
|
|
83
|
-
|
|
75
|
+
account.address,
|
|
84
76
|
)
|
|
85
77
|
: true;
|
|
86
78
|
|
|
87
|
-
//
|
|
79
|
+
// If toAddress is set, it must have the same chainType as toChain
|
|
80
|
+
const hasToAddressAndChainTypeSatisfied =
|
|
81
|
+
toChain &&
|
|
82
|
+
Boolean(toAddress) &&
|
|
83
|
+
getChainTypeFromAddress(toAddress) === toChain.chainType;
|
|
84
|
+
// We need to check for toAddress only if it is set
|
|
85
|
+
const isToAddressSatisfied = toAddress
|
|
86
|
+
? hasToAddressAndChainTypeSatisfied
|
|
87
|
+
: true;
|
|
88
|
+
// When we bridge between ecosystems we need to be sure toAddress is set and has the same chainType as toChain
|
|
88
89
|
const isChainTypeSatisfied =
|
|
89
|
-
fromChain
|
|
90
|
+
fromChain && toChain && fromChain.chainType !== toChain.chainType
|
|
91
|
+
? hasToAddressAndChainTypeSatisfied
|
|
92
|
+
: true;
|
|
90
93
|
|
|
91
94
|
const isEnabled =
|
|
92
95
|
Boolean(Number(fromChainId)) &&
|
|
@@ -95,13 +98,14 @@ export const useRoutes = ({ insurableRoute }: RoutesProps = {}) => {
|
|
|
95
98
|
Boolean(toToken?.address) &&
|
|
96
99
|
!Number.isNaN(slippage) &&
|
|
97
100
|
hasAmount &&
|
|
101
|
+
isToAddressSatisfied &&
|
|
98
102
|
isChainTypeSatisfied &&
|
|
99
103
|
contractCallQuoteEnabled;
|
|
100
104
|
|
|
101
105
|
// Some values should be strictly typed and isEnabled ensures that
|
|
102
106
|
const queryKey = [
|
|
103
107
|
'routes',
|
|
104
|
-
|
|
108
|
+
account.address,
|
|
105
109
|
fromChainId as number,
|
|
106
110
|
fromToken?.address as string,
|
|
107
111
|
fromTokenAmount,
|
|
@@ -154,21 +158,7 @@ export const useRoutes = ({ insurableRoute }: RoutesProps = {}) => {
|
|
|
154
158
|
],
|
|
155
159
|
signal,
|
|
156
160
|
}) => {
|
|
157
|
-
|
|
158
|
-
const isAddress = isEVMAddress(toAddress) || isSVMAddress(toAddress);
|
|
159
|
-
try {
|
|
160
|
-
// FIXME: resolve address in one place
|
|
161
|
-
toWalletAddress = !isAddress
|
|
162
|
-
? (await getEnsAddress(config, {
|
|
163
|
-
chainId: toChainId,
|
|
164
|
-
name: normalize(toAddress),
|
|
165
|
-
})) || undefined
|
|
166
|
-
: isAddress
|
|
167
|
-
? toAddress
|
|
168
|
-
: fromAddress;
|
|
169
|
-
} catch {
|
|
170
|
-
toWalletAddress = isAddress ? toAddress : fromAddress;
|
|
171
|
-
}
|
|
161
|
+
const toWalletAddress = toAddress || fromAddress;
|
|
172
162
|
const fromAmount = parseUnits(
|
|
173
163
|
fromTokenAmount,
|
|
174
164
|
fromToken!.decimals,
|
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
import { useChain } from '../hooks';
|
|
2
2
|
import { useWidgetConfig } from '../providers';
|
|
3
|
-
import { RequiredUI } from '../types';
|
|
4
3
|
import { useFieldValues } from '../stores';
|
|
4
|
+
import { RequiredUI } from '../types';
|
|
5
5
|
|
|
6
|
-
export const
|
|
6
|
+
export const useToAddressRequirements = () => {
|
|
7
7
|
const { requiredUI } = useWidgetConfig();
|
|
8
8
|
const [fromChainId, toChainId] = useFieldValues('fromChain', 'toChain');
|
|
9
9
|
|
|
10
10
|
const { chain: fromChain } = useChain(fromChainId);
|
|
11
11
|
const { chain: toChain } = useChain(toChainId);
|
|
12
12
|
|
|
13
|
-
const
|
|
13
|
+
const isDifferentChainType =
|
|
14
14
|
fromChain && toChain && fromChain.chainType !== toChain.chainType;
|
|
15
15
|
|
|
16
16
|
const requiredToAddress =
|
|
17
|
-
requiredUI?.includes(RequiredUI.ToAddress) ||
|
|
17
|
+
requiredUI?.includes(RequiredUI.ToAddress) || isDifferentChainType;
|
|
18
18
|
|
|
19
|
-
return
|
|
19
|
+
return {
|
|
20
|
+
requiredToAddress,
|
|
21
|
+
requiredToChainType: toChain?.chainType,
|
|
22
|
+
};
|
|
20
23
|
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { ExtendedChain } from '@lifi/sdk';
|
|
2
|
+
import { useWidgetConfig } from '../providers';
|
|
3
|
+
import { useBookmarkActions, useBookmarks, useFieldActions } from '../stores';
|
|
4
|
+
import { RequiredUI } from '../types';
|
|
5
|
+
|
|
6
|
+
export const useToAddressReset = () => {
|
|
7
|
+
const { requiredUI } = useWidgetConfig();
|
|
8
|
+
const { setFieldValue } = useFieldActions();
|
|
9
|
+
const { selectedBookmark } = useBookmarks();
|
|
10
|
+
const { setSelectedBookmark } = useBookmarkActions();
|
|
11
|
+
|
|
12
|
+
const tryResetToAddress = (toChain: ExtendedChain) => {
|
|
13
|
+
const requiredToAddress = requiredUI?.includes(RequiredUI.ToAddress);
|
|
14
|
+
|
|
15
|
+
const bookmarkSatisfiesToChainType =
|
|
16
|
+
selectedBookmark?.chainType === toChain?.chainType;
|
|
17
|
+
|
|
18
|
+
const shouldResetToAddress =
|
|
19
|
+
!requiredToAddress && !bookmarkSatisfiesToChainType;
|
|
20
|
+
|
|
21
|
+
// toAddress field is required (always visible) when bridging between
|
|
22
|
+
// two ecosystems (fromChain and toChain have different chain types).
|
|
23
|
+
// We clean up toAddress on every chain change if toAddress is not required.
|
|
24
|
+
// This is used when we switch between different chain ecosystems (chain types) and
|
|
25
|
+
// prevents cases when after we switch the chain from one type to another "Send to wallet" field hides,
|
|
26
|
+
// but it keeps toAddress value set for the previous chain pair.
|
|
27
|
+
if (shouldResetToAddress) {
|
|
28
|
+
setSelectedBookmark();
|
|
29
|
+
setFieldValue('toAddress', '');
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
return {
|
|
34
|
+
tryResetToAddress,
|
|
35
|
+
};
|
|
36
|
+
};
|
package/hooks/useTokenBalance.ts
CHANGED
|
@@ -11,15 +11,12 @@ export const useTokenBalance = (
|
|
|
11
11
|
token?: Token,
|
|
12
12
|
chain?: ExtendedChain,
|
|
13
13
|
) => {
|
|
14
|
-
const { account
|
|
15
|
-
const queryClient = useQueryClient();
|
|
16
|
-
const walletAddress =
|
|
17
|
-
accountAddress ||
|
|
14
|
+
const { account } = useAccount(
|
|
18
15
|
// When we provide chain we want to be sure that account address used is from the same ecosystem as token
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
chain ? { chainType: chain.chainType } : undefined,
|
|
17
|
+
);
|
|
18
|
+
const queryClient = useQueryClient();
|
|
19
|
+
const walletAddress = accountAddress || account.address;
|
|
23
20
|
|
|
24
21
|
const tokenBalanceQueryKey = useMemo(
|
|
25
22
|
() =>
|
|
@@ -9,15 +9,12 @@ import { useTokens } from './useTokens';
|
|
|
9
9
|
const defaultRefetchInterval = 32_000;
|
|
10
10
|
|
|
11
11
|
export const useTokenBalances = (selectedChainId?: number) => {
|
|
12
|
-
const { accounts } = useAccount();
|
|
13
12
|
const featuredTokens = useFeaturedTokens(selectedChainId);
|
|
14
13
|
const { tokens, chain, isLoading } = useTokens(selectedChainId);
|
|
14
|
+
const { account } = useAccount({ chainType: chain?.chainType });
|
|
15
15
|
|
|
16
|
-
const account = accounts.find(
|
|
17
|
-
(account) => account.chainType === chain?.chainType,
|
|
18
|
-
);
|
|
19
16
|
const isBalanceLoadingEnabled =
|
|
20
|
-
Boolean(account
|
|
17
|
+
Boolean(account.address) &&
|
|
21
18
|
Boolean(tokens?.length) &&
|
|
22
19
|
Boolean(selectedChainId);
|
|
23
20
|
|
|
@@ -28,7 +25,7 @@ export const useTokenBalances = (selectedChainId?: number) => {
|
|
|
28
25
|
} = useQuery({
|
|
29
26
|
queryKey: [
|
|
30
27
|
'token-balances',
|
|
31
|
-
account
|
|
28
|
+
account.address,
|
|
32
29
|
selectedChainId,
|
|
33
30
|
tokens?.length,
|
|
34
31
|
],
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { FullStatusData } from '@lifi/sdk';
|
|
1
2
|
import { getStatus, type StatusResponse } from '@lifi/sdk';
|
|
2
3
|
import {
|
|
3
4
|
keepPreviousData,
|
|
@@ -7,42 +8,40 @@ import {
|
|
|
7
8
|
import { useAccount } from './useAccount';
|
|
8
9
|
|
|
9
10
|
export const useTransactionDetails = (transactionHash: string) => {
|
|
10
|
-
const { account } = useAccount();
|
|
11
|
+
const { account, accounts } = useAccount();
|
|
11
12
|
const queryClient = useQueryClient();
|
|
12
13
|
|
|
13
14
|
const { data, isLoading } = useQuery({
|
|
14
|
-
queryKey: ['transaction-history',
|
|
15
|
-
queryFn: async ({
|
|
16
|
-
queryKey: [, accountAddress, transactionHash],
|
|
17
|
-
signal,
|
|
18
|
-
}) => {
|
|
19
|
-
if (!accountAddress) {
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
15
|
+
queryKey: ['transaction-history', transactionHash],
|
|
16
|
+
queryFn: async ({ queryKey: [, transactionHash], signal }) => {
|
|
22
17
|
if (transactionHash) {
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
18
|
+
for (const account of accounts) {
|
|
19
|
+
const cachedHistory = queryClient.getQueryData<StatusResponse[]>([
|
|
20
|
+
'transaction-history',
|
|
21
|
+
account.address,
|
|
22
|
+
]);
|
|
27
23
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
24
|
+
const transaction = cachedHistory?.find(
|
|
25
|
+
(t) => t.sending.txHash === transactionHash,
|
|
26
|
+
);
|
|
31
27
|
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
if (transaction) {
|
|
29
|
+
return transaction;
|
|
30
|
+
}
|
|
34
31
|
}
|
|
35
32
|
|
|
36
|
-
transaction = await getStatus(
|
|
33
|
+
const transaction = await getStatus(
|
|
37
34
|
{
|
|
38
35
|
txHash: transactionHash,
|
|
39
36
|
},
|
|
40
37
|
{ signal },
|
|
41
38
|
);
|
|
42
39
|
|
|
43
|
-
|
|
40
|
+
const fromAddress = (transaction as FullStatusData)?.fromAddress;
|
|
41
|
+
|
|
42
|
+
if (fromAddress) {
|
|
44
43
|
queryClient.setQueryData<StatusResponse[]>(
|
|
45
|
-
['transaction-history',
|
|
44
|
+
['transaction-history', fromAddress],
|
|
46
45
|
(data) => {
|
|
47
46
|
return [...data!, transaction!];
|
|
48
47
|
},
|
|
@@ -53,17 +52,17 @@ export const useTransactionDetails = (transactionHash: string) => {
|
|
|
53
52
|
}
|
|
54
53
|
},
|
|
55
54
|
refetchInterval: 300000,
|
|
56
|
-
enabled: Boolean(account.
|
|
55
|
+
enabled: Boolean(account.isConnected),
|
|
57
56
|
initialData: () => {
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
57
|
+
for (const account of accounts) {
|
|
58
|
+
const transaction = queryClient
|
|
59
|
+
.getQueryData<
|
|
60
|
+
StatusResponse[]
|
|
61
|
+
>(['transaction-history', account.address])
|
|
62
|
+
?.find((t) => t.sending.txHash === transactionHash);
|
|
63
|
+
if (transaction) {
|
|
64
|
+
return transaction;
|
|
65
|
+
}
|
|
67
66
|
}
|
|
68
67
|
},
|
|
69
68
|
placeholderData: keepPreviousData,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { StatusResponse } from '@lifi/sdk';
|
|
1
|
+
import type { FullStatusData, StatusResponse } from '@lifi/sdk';
|
|
2
2
|
import { getTransactionHistory, type ExtendedTransactionInfo } from '@lifi/sdk';
|
|
3
3
|
import type { QueryFunction } from '@tanstack/react-query';
|
|
4
4
|
import { useQueries } from '@tanstack/react-query';
|
|
@@ -37,7 +37,8 @@ export const useTransactionHistory = () => {
|
|
|
37
37
|
.flatMap((result) => result.data)
|
|
38
38
|
.filter(
|
|
39
39
|
(transaction) =>
|
|
40
|
-
transaction?.receiving
|
|
40
|
+
(transaction as FullStatusData)?.receiving?.chainId &&
|
|
41
|
+
transaction?.sending.chainId,
|
|
41
42
|
)
|
|
42
43
|
.sort((a, b) => {
|
|
43
44
|
return (
|
package/i18n/en.json
CHANGED
|
@@ -9,12 +9,15 @@
|
|
|
9
9
|
},
|
|
10
10
|
"button": {
|
|
11
11
|
"auto": "Auto",
|
|
12
|
+
"bookmark": "Bookmark",
|
|
13
|
+
"bookmarks": "Bookmarks",
|
|
12
14
|
"bridge": "Bridge",
|
|
13
15
|
"buy": "Buy",
|
|
14
16
|
"buyNow": "Buy now",
|
|
15
17
|
"cancel": "Cancel",
|
|
16
18
|
"changeWallet": "Change wallet",
|
|
17
19
|
"close": "Close",
|
|
20
|
+
"confirm": "Confirm",
|
|
18
21
|
"connectWallet": "Connect wallet",
|
|
19
22
|
"contactSupport": "Contact support",
|
|
20
23
|
"continue": "Continue",
|
|
@@ -32,6 +35,7 @@
|
|
|
32
35
|
"light": "Light",
|
|
33
36
|
"max": "max",
|
|
34
37
|
"ok": "Ok",
|
|
38
|
+
"options": "Options",
|
|
35
39
|
"removeTransaction": "Remove transaction",
|
|
36
40
|
"reset": "Reset",
|
|
37
41
|
"resetSettings": "Reset settings",
|
|
@@ -49,6 +53,7 @@
|
|
|
49
53
|
},
|
|
50
54
|
"header": {
|
|
51
55
|
"activeTransactions": "Active transactions",
|
|
56
|
+
"bookmarkedWallets": "Bookmarked wallets",
|
|
52
57
|
"bridge": "Bridge",
|
|
53
58
|
"checkout": "Checkout",
|
|
54
59
|
"exchange": "Exchange",
|
|
@@ -57,8 +62,10 @@
|
|
|
57
62
|
"payWith": "Pay with",
|
|
58
63
|
"purchase": "Purchase",
|
|
59
64
|
"purchaseDetails": "Purchase details",
|
|
65
|
+
"recentWallets": "Recent wallets",
|
|
60
66
|
"selectChain": "Select chain",
|
|
61
67
|
"selectWallet": "Select your wallet",
|
|
68
|
+
"sendToWallet": "Send to wallet",
|
|
62
69
|
"settings": "Settings",
|
|
63
70
|
"swap": "Swap",
|
|
64
71
|
"to": "Exchange to",
|
|
@@ -73,7 +80,8 @@
|
|
|
73
80
|
"emptyActiveTransactions": "Transactions in progress will appear here. Once completed, find them in transaction history.",
|
|
74
81
|
"emptyTokenList": "We couldn't find tokens on {{chainName}} chain or you don't have any. Please search by contract address if your token doesn't appear or choose another chain.",
|
|
75
82
|
"emptyTransactionHistory": "Transaction history is only stored locally and will be deleted if you clear your browser data.",
|
|
76
|
-
"routeNotFound": "Reasons for that could be: low liquidity, amount selected is too low, gas costs are too high or there are no routes for the selected combination."
|
|
83
|
+
"routeNotFound": "Reasons for that could be: low liquidity, amount selected is too low, gas costs are too high or there are no routes for the selected combination.",
|
|
84
|
+
"fundsToExchange": "Funds sent to an exchange may be lost"
|
|
77
85
|
},
|
|
78
86
|
"title": {
|
|
79
87
|
"autoRefuel": "Get gas",
|
|
@@ -131,22 +139,25 @@
|
|
|
131
139
|
"unknown": "Please try again or contact support."
|
|
132
140
|
},
|
|
133
141
|
"title": {
|
|
142
|
+
"addressRequired": "Wallet address is required",
|
|
134
143
|
"allowanceRequired": "Insufficient allowance",
|
|
135
144
|
"balanceIsTooLow": "The balance is too low",
|
|
145
|
+
"bookmarkAlreadyExists": "Wallet is already bookmarked as {{name}}",
|
|
146
|
+
"bookmarkNameRequired": "Bookmark name is required",
|
|
136
147
|
"chainSwitch": "Chain switch required",
|
|
148
|
+
"exchangeRateUpdateCanceled": "Exchange rate update canceled",
|
|
137
149
|
"gasLimitIsTooLow": "The gas limit is too low",
|
|
138
150
|
"insufficientFunds": "Insufficient funds",
|
|
139
151
|
"signatureRejected": "Signature required",
|
|
140
152
|
"slippageNotMet": "Slippage conditions not met",
|
|
141
153
|
"transactionCanceled": "Transaction canceled",
|
|
142
|
-
"exchangeRateUpdateCanceled": "Exchange rate update canceled",
|
|
143
154
|
"transactionFailed": "Transaction failed",
|
|
144
155
|
"transactionUnderpriced": "Transaction is underpriced",
|
|
145
156
|
"transactionUnprepared": "Unable to prepare transaction",
|
|
146
157
|
"unknown": "Something went wrong",
|
|
147
|
-
"walletAddressInvalid": "Wallet address is invalid.",
|
|
158
|
+
"walletAddressInvalid": "Wallet address or ENS is invalid, or the network doesn't support ENS.",
|
|
148
159
|
"walletAddressRequired": "Wallet address is required.",
|
|
149
|
-
"
|
|
160
|
+
"walletChainTypeInvalid": "Wallet address does not match the selected destination chain - {{chainName}}"
|
|
150
161
|
}
|
|
151
162
|
},
|
|
152
163
|
"tooltip": {
|
|
@@ -246,8 +257,7 @@
|
|
|
246
257
|
"tokenOnChain": "{{tokenSymbol}} on {{chainName}}",
|
|
247
258
|
"tokenOnChainAmount": "{{amount, number(maximumFractionDigits: 9)}} {{tokenSymbol}} on {{chainName}}",
|
|
248
259
|
"tokenSearch": "Search by token name or address",
|
|
249
|
-
"valueLoss": "Value loss"
|
|
250
|
-
"walletAddressOrEns": "Wallet address or ENS name"
|
|
260
|
+
"valueLoss": "Value loss"
|
|
251
261
|
},
|
|
252
262
|
"insurance": {
|
|
253
263
|
"bridgeExploits": "Bridge malfunctions, hacks or exploits",
|
|
@@ -271,6 +281,17 @@
|
|
|
271
281
|
"custom": "Custom",
|
|
272
282
|
"resetSettings": "You're using custom setting limiting the number of available routes."
|
|
273
283
|
},
|
|
284
|
+
"sendToWallet": {
|
|
285
|
+
"enterAddress": "Enter address or ENS",
|
|
286
|
+
"enterName": "Enter name",
|
|
287
|
+
"confirmWalletAddress": "Confirm wallet address",
|
|
288
|
+
"connectedWallets": "Connected wallets",
|
|
289
|
+
"bookmarkWallet": "Bookmark wallet",
|
|
290
|
+
"addBookmark": "Add bookmark",
|
|
291
|
+
"noBookmarkedWallets": "No bookmarked wallets",
|
|
292
|
+
"noConnectedWallets": "No connected wallets",
|
|
293
|
+
"noRecentWallets": "No recent wallets"
|
|
294
|
+
},
|
|
274
295
|
"wallet": {
|
|
275
296
|
"extensionNotFound": "Please make sure that only the {{name}} browser extension is active before choosing this wallet."
|
|
276
297
|
}
|