@lifi/widget 3.0.0-alpha.17 → 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.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.js +24 -22
- package/_cjs/hooks/useTransactionDetails.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/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/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.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.js +24 -22
- package/_esm/hooks/useTransactionDetails.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/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/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/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 -30
- package/i18n/en.json +27 -6
- package/package.json +12 -12
- 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/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/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,215 @@
|
|
|
1
|
+
import ContentCopyIcon from '@mui/icons-material/ContentCopy';
|
|
2
|
+
import DeleteIcon from '@mui/icons-material/Delete';
|
|
3
|
+
import MoreHorizIcon from '@mui/icons-material/MoreHoriz';
|
|
4
|
+
import OpenInNewIcon from '@mui/icons-material/OpenInNew';
|
|
5
|
+
import TurnedInIcon from '@mui/icons-material/TurnedIn';
|
|
6
|
+
import WalletIcon from '@mui/icons-material/Wallet';
|
|
7
|
+
import { ListItemAvatar, ListItemText, MenuItem } from '@mui/material';
|
|
8
|
+
import { useId, useRef, useState } from 'react';
|
|
9
|
+
import { useTranslation } from 'react-i18next';
|
|
10
|
+
import { useNavigate } from 'react-router-dom';
|
|
11
|
+
import { AccountAvatar } from '../../components/AccountAvatar';
|
|
12
|
+
import type { BottomSheetBase } from '../../components/BottomSheet';
|
|
13
|
+
import { ListItem, ListItemButton } from '../../components/ListItem';
|
|
14
|
+
import { Menu } from '../../components/Menu';
|
|
15
|
+
import { useChains, useToAddressRequirements } from '../../hooks';
|
|
16
|
+
import type { Bookmark } from '../../stores';
|
|
17
|
+
import { useBookmarkActions, useBookmarks } from '../../stores';
|
|
18
|
+
import {
|
|
19
|
+
defaultChainIdsByType,
|
|
20
|
+
navigationRoutes,
|
|
21
|
+
shortenAddress,
|
|
22
|
+
} from '../../utils';
|
|
23
|
+
import { BookmarkAddressSheet } from './BookmarkAddressSheet';
|
|
24
|
+
import { ConfirmAddressSheet } from './ConfirmAddressSheet';
|
|
25
|
+
import { EmptyListIndicator } from './EmptyListIndicator';
|
|
26
|
+
import {
|
|
27
|
+
ListContainer,
|
|
28
|
+
OptionsMenuButton,
|
|
29
|
+
SendToWalletPageContainer,
|
|
30
|
+
} from './SendToWalletPage.style';
|
|
31
|
+
|
|
32
|
+
export const RecentWalletsPage = () => {
|
|
33
|
+
const { t } = useTranslation();
|
|
34
|
+
const navigate = useNavigate();
|
|
35
|
+
const [selectedRecent, setSelectedRecent] = useState<Bookmark>();
|
|
36
|
+
const bookmarkAddressSheetRef = useRef<BottomSheetBase>(null);
|
|
37
|
+
const confirmAddressSheetRef = useRef<BottomSheetBase>(null);
|
|
38
|
+
const { recentWallets } = useBookmarks();
|
|
39
|
+
const { requiredToChainType } = useToAddressRequirements();
|
|
40
|
+
const {
|
|
41
|
+
removeRecentWallet,
|
|
42
|
+
addBookmark,
|
|
43
|
+
setSelectedBookmark,
|
|
44
|
+
addRecentWallet,
|
|
45
|
+
} = useBookmarkActions();
|
|
46
|
+
const { getChainById } = useChains();
|
|
47
|
+
const moreMenuId = useId();
|
|
48
|
+
const [moreMenuAnchorEl, setMenuAnchorEl] = useState<HTMLElement | null>();
|
|
49
|
+
const open = Boolean(moreMenuAnchorEl);
|
|
50
|
+
|
|
51
|
+
const handleRecentSelected = (recentWallet: Bookmark) => {
|
|
52
|
+
setSelectedRecent(recentWallet);
|
|
53
|
+
confirmAddressSheetRef.current?.open();
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
const handleAddBookmark = (bookmark: Bookmark) => {
|
|
57
|
+
addBookmark(bookmark);
|
|
58
|
+
navigate(`../${navigationRoutes.bookmarks}`, {
|
|
59
|
+
relative: 'path',
|
|
60
|
+
replace: true,
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
const handleOnConfirm = (confirmedBookmark: Bookmark) => {
|
|
65
|
+
setSelectedBookmark(confirmedBookmark);
|
|
66
|
+
addRecentWallet(confirmedBookmark);
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
const closeMenu = () => {
|
|
70
|
+
setMenuAnchorEl(null);
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
const handleMenuOpen = (el: HTMLElement, recentWallet: Bookmark) => {
|
|
74
|
+
setMenuAnchorEl(el);
|
|
75
|
+
setSelectedRecent(recentWallet);
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
const handleCopyAddress = () => {
|
|
79
|
+
if (selectedRecent) {
|
|
80
|
+
navigator.clipboard.writeText(selectedRecent.address);
|
|
81
|
+
}
|
|
82
|
+
closeMenu();
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
const handleViewOnExplorer = () => {
|
|
86
|
+
if (selectedRecent) {
|
|
87
|
+
const chain = getChainById(
|
|
88
|
+
defaultChainIdsByType[selectedRecent.chainType],
|
|
89
|
+
);
|
|
90
|
+
window.open(
|
|
91
|
+
`${chain?.metamask.blockExplorerUrls[0]}address/${selectedRecent.address}`,
|
|
92
|
+
'_blank',
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
closeMenu();
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
const handleOpenBookmarkSheet = () => {
|
|
99
|
+
if (selectedRecent) {
|
|
100
|
+
setSelectedRecent(selectedRecent);
|
|
101
|
+
bookmarkAddressSheetRef.current?.open();
|
|
102
|
+
}
|
|
103
|
+
closeMenu();
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
const handleRemoveRecentWallet = () => {
|
|
107
|
+
if (selectedRecent) {
|
|
108
|
+
removeRecentWallet(selectedRecent.address);
|
|
109
|
+
}
|
|
110
|
+
closeMenu();
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
return (
|
|
114
|
+
<SendToWalletPageContainer disableGutters>
|
|
115
|
+
<ListContainer sx={{ minHeight: 418 }}>
|
|
116
|
+
{recentWallets.map((recentWallet) => (
|
|
117
|
+
<ListItem key={recentWallet.address} sx={{ position: 'relative' }}>
|
|
118
|
+
<ListItemButton
|
|
119
|
+
disabled={
|
|
120
|
+
requiredToChainType &&
|
|
121
|
+
requiredToChainType !== recentWallet.chainType
|
|
122
|
+
}
|
|
123
|
+
onClick={() => handleRecentSelected(recentWallet)}
|
|
124
|
+
>
|
|
125
|
+
<ListItemAvatar>
|
|
126
|
+
<AccountAvatar
|
|
127
|
+
chainId={defaultChainIdsByType[recentWallet.chainType]}
|
|
128
|
+
/>
|
|
129
|
+
</ListItemAvatar>
|
|
130
|
+
<ListItemText
|
|
131
|
+
primary={
|
|
132
|
+
recentWallet.name || shortenAddress(recentWallet.address)
|
|
133
|
+
}
|
|
134
|
+
secondary={
|
|
135
|
+
recentWallet.name
|
|
136
|
+
? shortenAddress(recentWallet.address)
|
|
137
|
+
: undefined
|
|
138
|
+
}
|
|
139
|
+
/>
|
|
140
|
+
</ListItemButton>
|
|
141
|
+
<OptionsMenuButton
|
|
142
|
+
aria-label={t('button.options')}
|
|
143
|
+
aria-controls={
|
|
144
|
+
open && recentWallet.address === selectedRecent?.address
|
|
145
|
+
? moreMenuId
|
|
146
|
+
: undefined
|
|
147
|
+
}
|
|
148
|
+
aria-haspopup="true"
|
|
149
|
+
aria-expanded={open ? 'true' : undefined}
|
|
150
|
+
onClick={(e) =>
|
|
151
|
+
handleMenuOpen(e.target as HTMLElement, recentWallet)
|
|
152
|
+
}
|
|
153
|
+
sx={{
|
|
154
|
+
opacity:
|
|
155
|
+
requiredToChainType &&
|
|
156
|
+
requiredToChainType !== recentWallet.chainType
|
|
157
|
+
? 0.5
|
|
158
|
+
: 1,
|
|
159
|
+
}}
|
|
160
|
+
>
|
|
161
|
+
<MoreHorizIcon fontSize="small" />
|
|
162
|
+
</OptionsMenuButton>
|
|
163
|
+
</ListItem>
|
|
164
|
+
))}
|
|
165
|
+
{!recentWallets.length && (
|
|
166
|
+
<EmptyListIndicator icon={<WalletIcon sx={{ fontSize: 48 }} />}>
|
|
167
|
+
{t('sendToWallet.noRecentWallets')}
|
|
168
|
+
</EmptyListIndicator>
|
|
169
|
+
)}
|
|
170
|
+
<Menu
|
|
171
|
+
id={moreMenuId}
|
|
172
|
+
elevation={0}
|
|
173
|
+
anchorOrigin={{
|
|
174
|
+
vertical: 'bottom',
|
|
175
|
+
horizontal: 'right',
|
|
176
|
+
}}
|
|
177
|
+
transformOrigin={{
|
|
178
|
+
vertical: 'top',
|
|
179
|
+
horizontal: 'right',
|
|
180
|
+
}}
|
|
181
|
+
anchorEl={moreMenuAnchorEl}
|
|
182
|
+
open={open}
|
|
183
|
+
onClose={closeMenu}
|
|
184
|
+
>
|
|
185
|
+
<MenuItem onClick={handleCopyAddress}>
|
|
186
|
+
<ContentCopyIcon />
|
|
187
|
+
{t('button.copyAddress')}
|
|
188
|
+
</MenuItem>
|
|
189
|
+
<MenuItem onClick={handleViewOnExplorer}>
|
|
190
|
+
<OpenInNewIcon />
|
|
191
|
+
{t('button.viewOnExplorer')}
|
|
192
|
+
</MenuItem>
|
|
193
|
+
<MenuItem onClick={handleOpenBookmarkSheet}>
|
|
194
|
+
<TurnedInIcon />
|
|
195
|
+
{t('button.bookmark')}
|
|
196
|
+
</MenuItem>
|
|
197
|
+
<MenuItem onClick={handleRemoveRecentWallet}>
|
|
198
|
+
<DeleteIcon />
|
|
199
|
+
{t('button.delete')}
|
|
200
|
+
</MenuItem>
|
|
201
|
+
</Menu>
|
|
202
|
+
</ListContainer>
|
|
203
|
+
<BookmarkAddressSheet
|
|
204
|
+
ref={bookmarkAddressSheetRef}
|
|
205
|
+
validatedWallet={selectedRecent}
|
|
206
|
+
onAddBookmark={handleAddBookmark}
|
|
207
|
+
/>
|
|
208
|
+
<ConfirmAddressSheet
|
|
209
|
+
ref={confirmAddressSheetRef}
|
|
210
|
+
validatedBookmark={selectedRecent}
|
|
211
|
+
onConfirm={handleOnConfirm}
|
|
212
|
+
/>
|
|
213
|
+
</SendToWalletPageContainer>
|
|
214
|
+
);
|
|
215
|
+
};
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import type { Theme } from '@mui/material';
|
|
2
|
+
import {
|
|
3
|
+
Alert,
|
|
4
|
+
Box,
|
|
5
|
+
Button,
|
|
6
|
+
IconButton,
|
|
7
|
+
List,
|
|
8
|
+
Typography,
|
|
9
|
+
alertClasses,
|
|
10
|
+
inputBaseClasses,
|
|
11
|
+
styled,
|
|
12
|
+
} from '@mui/material';
|
|
13
|
+
import { Card } from '../../components/Card';
|
|
14
|
+
import { Input } from '../../components/Input';
|
|
15
|
+
import type { PageContainerProps } from '../../components/PageContainer';
|
|
16
|
+
import { PageContainer } from '../../components/PageContainer';
|
|
17
|
+
import { getContrastAlphaColor } from '../../utils';
|
|
18
|
+
|
|
19
|
+
export const AddressInput = styled(Input)(({ theme }) => ({
|
|
20
|
+
padding: 0,
|
|
21
|
+
[`.${inputBaseClasses.input}`]: {
|
|
22
|
+
padding: theme.spacing(2),
|
|
23
|
+
minHeight: 48,
|
|
24
|
+
},
|
|
25
|
+
}));
|
|
26
|
+
|
|
27
|
+
export const BookmarkInputFields = styled(Box)(({ theme }) => ({
|
|
28
|
+
display: 'flex',
|
|
29
|
+
flexDirection: 'column',
|
|
30
|
+
gap: theme.spacing(2),
|
|
31
|
+
width: '100%',
|
|
32
|
+
}));
|
|
33
|
+
|
|
34
|
+
export const SendToWalletPageContainer = styled(
|
|
35
|
+
PageContainer,
|
|
36
|
+
)<PageContainerProps>(({ theme }) => ({
|
|
37
|
+
display: 'flex',
|
|
38
|
+
flexDirection: 'column',
|
|
39
|
+
gap: theme.spacing(1),
|
|
40
|
+
}));
|
|
41
|
+
|
|
42
|
+
export const SendToWalletCard = styled(Card)(({ theme }) => ({
|
|
43
|
+
display: 'flex',
|
|
44
|
+
flexDirection: 'column',
|
|
45
|
+
}));
|
|
46
|
+
|
|
47
|
+
export const SendToWalletSheetContainer = styled(Box)(({ theme }) => ({
|
|
48
|
+
display: 'flex',
|
|
49
|
+
flexDirection: 'column',
|
|
50
|
+
alignItems: 'center',
|
|
51
|
+
padding: theme.spacing(6, 3, 3),
|
|
52
|
+
gap: theme.spacing(3),
|
|
53
|
+
}));
|
|
54
|
+
|
|
55
|
+
export const SendToWalletButtonRow = styled(Box)(({ theme }) => ({
|
|
56
|
+
display: 'flex',
|
|
57
|
+
width: '100%',
|
|
58
|
+
gap: theme.spacing(1),
|
|
59
|
+
}));
|
|
60
|
+
|
|
61
|
+
const tertiaryButtonStyles = (theme: Theme) => ({
|
|
62
|
+
color: theme.palette.text.primary,
|
|
63
|
+
height: 40,
|
|
64
|
+
fontSize: 14,
|
|
65
|
+
backgroundColor:
|
|
66
|
+
theme.palette.mode === 'light'
|
|
67
|
+
? theme.palette.grey[200]
|
|
68
|
+
: theme.palette.grey[800],
|
|
69
|
+
'&:hover': {
|
|
70
|
+
backgroundColor:
|
|
71
|
+
theme.palette.mode === 'light'
|
|
72
|
+
? theme.palette.grey[300]
|
|
73
|
+
: theme.palette.grey[700],
|
|
74
|
+
},
|
|
75
|
+
'&:active': {
|
|
76
|
+
backgroundColor:
|
|
77
|
+
theme.palette.mode === 'light'
|
|
78
|
+
? theme.palette.grey[300]
|
|
79
|
+
: theme.palette.grey[700],
|
|
80
|
+
},
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
export const SendToWalletButton = styled(Button)(({ theme }) => ({
|
|
84
|
+
...tertiaryButtonStyles(theme),
|
|
85
|
+
}));
|
|
86
|
+
|
|
87
|
+
export const SendToWalletIconButton = styled(Button)(({ theme }) => ({
|
|
88
|
+
...tertiaryButtonStyles(theme),
|
|
89
|
+
padding: theme.spacing(1.25),
|
|
90
|
+
minWidth: 40,
|
|
91
|
+
}));
|
|
92
|
+
|
|
93
|
+
export const WalletNumber = styled(Typography)(({ theme }) => ({
|
|
94
|
+
color:
|
|
95
|
+
theme.palette.mode === 'light'
|
|
96
|
+
? theme.palette.grey[600]
|
|
97
|
+
: theme.palette.grey[400],
|
|
98
|
+
}));
|
|
99
|
+
|
|
100
|
+
export const IconContainer = styled(Box)(({ theme }) => ({
|
|
101
|
+
display: 'flex',
|
|
102
|
+
justifyContent: 'center',
|
|
103
|
+
alignItems: 'center',
|
|
104
|
+
width: 96,
|
|
105
|
+
height: 96,
|
|
106
|
+
color:
|
|
107
|
+
theme.palette.mode === 'light'
|
|
108
|
+
? theme.palette.grey[700]
|
|
109
|
+
: theme.palette.grey[300],
|
|
110
|
+
background:
|
|
111
|
+
theme.palette.mode === 'light'
|
|
112
|
+
? theme.palette.grey[200]
|
|
113
|
+
: theme.palette.grey[800],
|
|
114
|
+
borderRadius: '50%',
|
|
115
|
+
}));
|
|
116
|
+
|
|
117
|
+
export const SheetTitle = styled(Typography)(() => ({
|
|
118
|
+
fontSize: 18,
|
|
119
|
+
fontWeight: 700,
|
|
120
|
+
}));
|
|
121
|
+
|
|
122
|
+
export const SheetAddressContainer = styled(Box)(() => ({
|
|
123
|
+
width: '100%',
|
|
124
|
+
wordWrap: 'break-word',
|
|
125
|
+
}));
|
|
126
|
+
|
|
127
|
+
export const ListContainer = styled(List)(({ theme }) => ({
|
|
128
|
+
display: 'flex',
|
|
129
|
+
flexDirection: 'column',
|
|
130
|
+
minHeight: 362,
|
|
131
|
+
paddingBottom: theme.spacing(3),
|
|
132
|
+
}));
|
|
133
|
+
|
|
134
|
+
export const BookmarkButtonContainer = styled(Box)(({ theme }) => ({
|
|
135
|
+
background: theme.palette.background.default,
|
|
136
|
+
display: 'flex',
|
|
137
|
+
flexDirection: 'column',
|
|
138
|
+
flexGrow: 1,
|
|
139
|
+
position: 'sticky',
|
|
140
|
+
bottom: 0,
|
|
141
|
+
padding: theme.spacing(0, 3, 2),
|
|
142
|
+
marginBottom: theme.spacing(-1.5),
|
|
143
|
+
zIndex: 2,
|
|
144
|
+
}));
|
|
145
|
+
|
|
146
|
+
export const EmptyContainer = styled(Box)(({ theme }) => ({
|
|
147
|
+
display: 'flex',
|
|
148
|
+
flexDirection: 'column',
|
|
149
|
+
justifyContent: 'center',
|
|
150
|
+
alignItems: 'center',
|
|
151
|
+
flexGrow: 1,
|
|
152
|
+
gap: theme.spacing(2),
|
|
153
|
+
}));
|
|
154
|
+
|
|
155
|
+
export const EmptyListMessage = styled(Typography)(({ theme }) => ({
|
|
156
|
+
fontSize: 14,
|
|
157
|
+
fontWeight: 700,
|
|
158
|
+
color:
|
|
159
|
+
theme.palette.mode === 'light'
|
|
160
|
+
? theme.palette.grey[600]
|
|
161
|
+
: theme.palette.grey[400],
|
|
162
|
+
}));
|
|
163
|
+
|
|
164
|
+
export const ValidationAlert = styled(Alert)(({ theme }) => ({
|
|
165
|
+
backgroundColor: 'transparent',
|
|
166
|
+
padding: 0,
|
|
167
|
+
color: theme.palette.text.primary,
|
|
168
|
+
[`.${alertClasses.icon}`]: {
|
|
169
|
+
padding: 0,
|
|
170
|
+
color: theme.palette.error.main,
|
|
171
|
+
},
|
|
172
|
+
[`.${alertClasses.message}`]: { padding: theme.spacing(0.25, 0, 0, 0) },
|
|
173
|
+
}));
|
|
174
|
+
|
|
175
|
+
export const OptionsMenuButton = styled(IconButton)(({ theme }) => ({
|
|
176
|
+
position: 'absolute',
|
|
177
|
+
top: theme.spacing(1.75),
|
|
178
|
+
right: theme.spacing(2),
|
|
179
|
+
'&:hover': {
|
|
180
|
+
backgroundColor: getContrastAlphaColor(theme.palette.mode, '4%'),
|
|
181
|
+
},
|
|
182
|
+
}));
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
import ErrorIcon from '@mui/icons-material/Error';
|
|
2
|
+
import HistoryIcon from '@mui/icons-material/History';
|
|
3
|
+
import TurnedInIcon from '@mui/icons-material/TurnedIn';
|
|
4
|
+
import WalletIcon from '@mui/icons-material/Wallet';
|
|
5
|
+
import { Tooltip } from '@mui/material';
|
|
6
|
+
import type { ChangeEvent, FocusEventHandler } from 'react';
|
|
7
|
+
import { useRef, useState } from 'react';
|
|
8
|
+
import { useTranslation } from 'react-i18next';
|
|
9
|
+
import { useNavigate } from 'react-router-dom';
|
|
10
|
+
import type { BottomSheetBase } from '../../components/BottomSheet';
|
|
11
|
+
import { CardButton } from '../../components/Card';
|
|
12
|
+
import {
|
|
13
|
+
useAccount,
|
|
14
|
+
useAddressValidation,
|
|
15
|
+
useChain,
|
|
16
|
+
useToAddressRequirements,
|
|
17
|
+
} from '../../hooks';
|
|
18
|
+
import type { Bookmark } from '../../stores';
|
|
19
|
+
import { useBookmarkActions, useBookmarks, useFieldValues } from '../../stores';
|
|
20
|
+
import { navigationRoutes } from '../../utils';
|
|
21
|
+
import { BookmarkAddressSheet } from './BookmarkAddressSheet';
|
|
22
|
+
import { ConfirmAddressSheet } from './ConfirmAddressSheet';
|
|
23
|
+
import {
|
|
24
|
+
AddressInput,
|
|
25
|
+
SendToWalletButton,
|
|
26
|
+
SendToWalletButtonRow,
|
|
27
|
+
SendToWalletCard,
|
|
28
|
+
SendToWalletIconButton,
|
|
29
|
+
SendToWalletPageContainer,
|
|
30
|
+
ValidationAlert,
|
|
31
|
+
WalletNumber,
|
|
32
|
+
} from './SendToWalletPage.style';
|
|
33
|
+
|
|
34
|
+
export const SendToWalletPage = () => {
|
|
35
|
+
const { t } = useTranslation();
|
|
36
|
+
const navigate = useNavigate();
|
|
37
|
+
const { bookmarks, recentWallets } = useBookmarks();
|
|
38
|
+
const { addBookmark, getBookmark, setSelectedBookmark, addRecentWallet } =
|
|
39
|
+
useBookmarkActions();
|
|
40
|
+
const bookmarkAddressSheetRef = useRef<BottomSheetBase>(null);
|
|
41
|
+
const confirmAddressSheetRef = useRef<BottomSheetBase>(null);
|
|
42
|
+
const doneButtonRef = useRef<HTMLButtonElement>(null);
|
|
43
|
+
const boomarkButtonRef = useRef<HTMLButtonElement>(null);
|
|
44
|
+
const [inputAddressValue, setInputAddressValue] = useState('');
|
|
45
|
+
const [validatedWallet, setValidatedWallet] = useState<Bookmark>();
|
|
46
|
+
const [errorMessage, setErrorMessage] = useState('');
|
|
47
|
+
const { validateAddress, isValidating } = useAddressValidation();
|
|
48
|
+
const { accounts } = useAccount();
|
|
49
|
+
const connectedWallets = accounts.filter((account) => account.isConnected);
|
|
50
|
+
const { requiredToChainType } = useToAddressRequirements();
|
|
51
|
+
const [toChainId] = useFieldValues('toChain');
|
|
52
|
+
const { chain: toChain } = useChain(toChainId);
|
|
53
|
+
|
|
54
|
+
const handleInputChange = (e: ChangeEvent) => {
|
|
55
|
+
setInputAddressValue((e.target as HTMLInputElement).value.trim());
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
const handleDone = async () => {
|
|
59
|
+
if (isValidating) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
if (!inputAddressValue) {
|
|
63
|
+
setErrorMessage(t('error.title.addressRequired'));
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const validationResult = await validateAddress(inputAddressValue);
|
|
68
|
+
if (!validationResult.isValid) {
|
|
69
|
+
setErrorMessage(validationResult.error);
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if (
|
|
74
|
+
requiredToChainType &&
|
|
75
|
+
requiredToChainType !== validationResult.chainType
|
|
76
|
+
) {
|
|
77
|
+
setErrorMessage(
|
|
78
|
+
t('error.title.walletChainTypeInvalid', {
|
|
79
|
+
chainName: toChain?.name,
|
|
80
|
+
}),
|
|
81
|
+
);
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
setValidatedWallet({
|
|
86
|
+
name:
|
|
87
|
+
validationResult.addressType === 'ENS' ? inputAddressValue : undefined,
|
|
88
|
+
address: validationResult.address,
|
|
89
|
+
chainType: validationResult.chainType,
|
|
90
|
+
});
|
|
91
|
+
confirmAddressSheetRef.current?.open();
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
const handleBookmarkAddress = async () => {
|
|
95
|
+
if (isValidating) {
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
if (!inputAddressValue) {
|
|
99
|
+
setErrorMessage(t('error.title.addressRequired'));
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
const existingBookmarkWallet = getBookmark(inputAddressValue);
|
|
104
|
+
if (existingBookmarkWallet) {
|
|
105
|
+
setErrorMessage(
|
|
106
|
+
t('error.title.bookmarkAlreadyExists', {
|
|
107
|
+
name: existingBookmarkWallet.name,
|
|
108
|
+
}),
|
|
109
|
+
);
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
const validationResult = await validateAddress(inputAddressValue);
|
|
114
|
+
|
|
115
|
+
if (validationResult.isValid) {
|
|
116
|
+
setValidatedWallet({
|
|
117
|
+
name:
|
|
118
|
+
validationResult.addressType === 'ENS'
|
|
119
|
+
? inputAddressValue
|
|
120
|
+
: undefined,
|
|
121
|
+
address: validationResult.address,
|
|
122
|
+
chainType: validationResult.chainType,
|
|
123
|
+
});
|
|
124
|
+
bookmarkAddressSheetRef.current?.open();
|
|
125
|
+
} else {
|
|
126
|
+
setErrorMessage(validationResult.error);
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
const handleRecentWalletsClick = () => {
|
|
131
|
+
navigate(navigationRoutes.recentWallets);
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
const handleConnectedWalletsClick = () => {
|
|
135
|
+
navigate(navigationRoutes.connectedWallets);
|
|
136
|
+
};
|
|
137
|
+
const handleBookmarkedWalletsClick = () => {
|
|
138
|
+
navigate(navigationRoutes.bookmarks);
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
const handleAddBookmark = (bookmark: Bookmark) => {
|
|
142
|
+
addBookmark(bookmark);
|
|
143
|
+
navigate(navigationRoutes.bookmarks);
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
const handleOnConfirm = (confirmedWallet: Bookmark) => {
|
|
147
|
+
setSelectedBookmark(confirmedWallet);
|
|
148
|
+
addRecentWallet(confirmedWallet);
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
const handleOnBlur: FocusEventHandler = async (e) => {
|
|
152
|
+
if (
|
|
153
|
+
!(
|
|
154
|
+
e.relatedTarget === doneButtonRef.current ||
|
|
155
|
+
e.relatedTarget === boomarkButtonRef.current
|
|
156
|
+
) &&
|
|
157
|
+
!isValidating
|
|
158
|
+
) {
|
|
159
|
+
if (!inputAddressValue) {
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
const validationResult = await validateAddress(inputAddressValue);
|
|
163
|
+
if (!validationResult.isValid) {
|
|
164
|
+
setErrorMessage(validationResult.error);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
return (
|
|
170
|
+
<SendToWalletPageContainer topBottomGutters>
|
|
171
|
+
<SendToWalletCard mb={1.5}>
|
|
172
|
+
<AddressInput
|
|
173
|
+
size="small"
|
|
174
|
+
autoComplete="off"
|
|
175
|
+
autoCorrect="off"
|
|
176
|
+
autoCapitalize="off"
|
|
177
|
+
spellCheck="false"
|
|
178
|
+
onChange={handleInputChange}
|
|
179
|
+
onBlur={handleOnBlur}
|
|
180
|
+
value={inputAddressValue}
|
|
181
|
+
placeholder={t('sendToWallet.enterAddress')}
|
|
182
|
+
aria-label={t('sendToWallet.enterAddress')}
|
|
183
|
+
multiline
|
|
184
|
+
/>
|
|
185
|
+
{!!errorMessage && (
|
|
186
|
+
<ValidationAlert icon={<ErrorIcon />} sx={{ pb: 2, paddingX: 2 }}>
|
|
187
|
+
{errorMessage}
|
|
188
|
+
</ValidationAlert>
|
|
189
|
+
)}
|
|
190
|
+
<SendToWalletButtonRow sx={{ paddingX: 2, paddingBottom: 2 }}>
|
|
191
|
+
<SendToWalletButton
|
|
192
|
+
ref={doneButtonRef}
|
|
193
|
+
variant="text"
|
|
194
|
+
onClick={handleDone}
|
|
195
|
+
sx={{ flexGrow: 1 }}
|
|
196
|
+
>
|
|
197
|
+
{t('button.done')}
|
|
198
|
+
</SendToWalletButton>
|
|
199
|
+
<Tooltip title={t('button.bookmark')} arrow>
|
|
200
|
+
<SendToWalletIconButton
|
|
201
|
+
ref={boomarkButtonRef}
|
|
202
|
+
onClick={handleBookmarkAddress}
|
|
203
|
+
>
|
|
204
|
+
<TurnedInIcon fontSize="small" />
|
|
205
|
+
</SendToWalletIconButton>
|
|
206
|
+
</Tooltip>
|
|
207
|
+
</SendToWalletButtonRow>
|
|
208
|
+
<ConfirmAddressSheet
|
|
209
|
+
ref={confirmAddressSheetRef}
|
|
210
|
+
validatedBookmark={validatedWallet}
|
|
211
|
+
onConfirm={handleOnConfirm}
|
|
212
|
+
/>
|
|
213
|
+
<BookmarkAddressSheet
|
|
214
|
+
ref={bookmarkAddressSheetRef}
|
|
215
|
+
validatedWallet={validatedWallet}
|
|
216
|
+
onAddBookmark={handleAddBookmark}
|
|
217
|
+
/>
|
|
218
|
+
</SendToWalletCard>
|
|
219
|
+
<CardButton
|
|
220
|
+
title={t('header.recentWallets')}
|
|
221
|
+
icon={<HistoryIcon />}
|
|
222
|
+
onClick={handleRecentWalletsClick}
|
|
223
|
+
>
|
|
224
|
+
{!!recentWallets.length && (
|
|
225
|
+
<WalletNumber>{recentWallets.length}</WalletNumber>
|
|
226
|
+
)}
|
|
227
|
+
</CardButton>
|
|
228
|
+
<CardButton
|
|
229
|
+
title={t('sendToWallet.connectedWallets')}
|
|
230
|
+
icon={<WalletIcon />}
|
|
231
|
+
onClick={handleConnectedWalletsClick}
|
|
232
|
+
>
|
|
233
|
+
{!!connectedWallets.length && (
|
|
234
|
+
<WalletNumber>{connectedWallets.length}</WalletNumber>
|
|
235
|
+
)}
|
|
236
|
+
</CardButton>
|
|
237
|
+
<CardButton
|
|
238
|
+
title={t('header.bookmarkedWallets')}
|
|
239
|
+
icon={<TurnedInIcon />}
|
|
240
|
+
onClick={handleBookmarkedWalletsClick}
|
|
241
|
+
>
|
|
242
|
+
{!!bookmarks.length && <WalletNumber>{bookmarks.length}</WalletNumber>}
|
|
243
|
+
</CardButton>
|
|
244
|
+
</SendToWalletPageContainer>
|
|
245
|
+
);
|
|
246
|
+
};
|
|
@@ -6,7 +6,8 @@ import { shallow } from 'zustand/shallow';
|
|
|
6
6
|
import { useSettingMonitor } from '../../hooks';
|
|
7
7
|
import { useSettingsStore } from '../../stores';
|
|
8
8
|
import { navigationRoutes } from '../../utils';
|
|
9
|
-
import {
|
|
9
|
+
import { CardButton } from '../../components/Card';
|
|
10
|
+
import { BadgedValue } from './SettingsCard';
|
|
10
11
|
|
|
11
12
|
const supportedIcons = {
|
|
12
13
|
Bridges: AirlineStopsIcon,
|
|
@@ -36,7 +37,7 @@ export const BridgeAndExchangeSettings: React.FC<{
|
|
|
36
37
|
const Icon = supportedIcons[type];
|
|
37
38
|
|
|
38
39
|
return (
|
|
39
|
-
<
|
|
40
|
+
<CardButton
|
|
40
41
|
onClick={handleClick}
|
|
41
42
|
icon={<Icon />}
|
|
42
43
|
title={t(`settings.enabled${type}`)}
|
|
@@ -45,6 +46,6 @@ export const BridgeAndExchangeSettings: React.FC<{
|
|
|
45
46
|
badgeColor="info"
|
|
46
47
|
showBadge={customisationLookUp[type]}
|
|
47
48
|
>{`${enabledTools}/${tools}`}</BadgedValue>
|
|
48
|
-
</
|
|
49
|
+
</CardButton>
|
|
49
50
|
);
|
|
50
51
|
};
|
|
@@ -5,7 +5,7 @@ import { useLanguages } from '../../hooks';
|
|
|
5
5
|
import { useWidgetConfig } from '../../providers';
|
|
6
6
|
import { HiddenUI } from '../../types';
|
|
7
7
|
import { navigationRoutes } from '../../utils';
|
|
8
|
-
import {
|
|
8
|
+
import { CardButton, CardValue } from '../../components/Card';
|
|
9
9
|
|
|
10
10
|
export const LanguageSetting: React.FC = () => {
|
|
11
11
|
const { t } = useTranslation();
|
|
@@ -22,12 +22,12 @@ export const LanguageSetting: React.FC = () => {
|
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
return (
|
|
25
|
-
<
|
|
25
|
+
<CardButton
|
|
26
26
|
onClick={handleClick}
|
|
27
27
|
icon={<LanguageIcon />}
|
|
28
28
|
title={t(`language.title`)}
|
|
29
29
|
>
|
|
30
|
-
<
|
|
31
|
-
</
|
|
30
|
+
<CardValue>{selectedLanguageDisplayName}</CardValue>
|
|
31
|
+
</CardButton>
|
|
32
32
|
);
|
|
33
33
|
};
|