@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
|
@@ -2,38 +2,70 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SendToWalletButton = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const Tooltip_1 = require("@mui/material/Tooltip");
|
|
5
|
+
const material_1 = require("@mui/material");
|
|
6
|
+
const react_1 = require("react");
|
|
8
7
|
const react_i18next_1 = require("react-i18next");
|
|
8
|
+
const react_router_dom_1 = require("react-router-dom");
|
|
9
9
|
const hooks_1 = require("../../hooks");
|
|
10
10
|
const providers_1 = require("../../providers");
|
|
11
11
|
const stores_1 = require("../../stores");
|
|
12
12
|
const types_1 = require("../../types");
|
|
13
|
+
const utils_1 = require("../../utils");
|
|
14
|
+
const AccountAvatar_1 = require("../AccountAvatar");
|
|
15
|
+
const Card_1 = require("../Card");
|
|
16
|
+
const SendToWallet_style_1 = require("./SendToWallet.style");
|
|
13
17
|
const SendToWalletButton = () => {
|
|
14
18
|
const { t } = (0, react_i18next_1.useTranslation)();
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const {
|
|
18
|
-
const { showSendToWallet, toggleSendToWallet } = (0, stores_1.useSendToWalletStore)();
|
|
19
|
+
const navigate = (0, react_router_dom_1.useNavigate)();
|
|
20
|
+
const { disabledUI, hiddenUI, toAddress } = (0, providers_1.useWidgetConfig)();
|
|
21
|
+
const { showSendToWallet, showSendToWalletDirty, setSendToWallet } = (0, stores_1.useSendToWalletStore)();
|
|
19
22
|
const { showDestinationWallet } = (0, stores_1.useSettings)(['showDestinationWallet']);
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
23
|
+
const [toAddressFieldValue] = (0, stores_1.useFieldValues)('toAddress');
|
|
24
|
+
const { selectedBookmark } = (0, stores_1.useBookmarks)();
|
|
25
|
+
const { accounts } = (0, hooks_1.useAccount)();
|
|
26
|
+
const disabledToAddress = disabledUI?.includes(types_1.DisabledUI.ToAddress);
|
|
27
|
+
const hiddenToAddress = hiddenUI?.includes(types_1.HiddenUI.ToAddress);
|
|
28
|
+
const { requiredToAddress } = (0, hooks_1.useToAddressRequirements)();
|
|
29
|
+
const showInstantly = Boolean(!showSendToWalletDirty &&
|
|
30
|
+
showDestinationWallet &&
|
|
31
|
+
toAddress &&
|
|
32
|
+
!hiddenToAddress) || requiredToAddress;
|
|
33
|
+
const address = toAddressFieldValue
|
|
34
|
+
? (0, utils_1.shortenAddress)(toAddressFieldValue)
|
|
35
|
+
: t('sendToWallet.enterAddress');
|
|
36
|
+
const matchingConnectedAccount = accounts.find((account) => account.address === toAddressFieldValue);
|
|
37
|
+
const chainType = !matchingConnectedAccount
|
|
38
|
+
? selectedBookmark?.chainType ||
|
|
39
|
+
(toAddressFieldValue
|
|
40
|
+
? (0, utils_1.getChainTypeFromAddress)(toAddressFieldValue)
|
|
41
|
+
: undefined)
|
|
42
|
+
: undefined;
|
|
43
|
+
const chainId = matchingConnectedAccount
|
|
44
|
+
? matchingConnectedAccount.chainId
|
|
45
|
+
: chainType
|
|
46
|
+
? utils_1.defaultChainIdsByType[chainType]
|
|
47
|
+
: undefined;
|
|
48
|
+
const headerTitle = selectedBookmark?.isConnectedAccount
|
|
49
|
+
? matchingConnectedAccount?.connector?.name || address
|
|
50
|
+
: selectedBookmark?.name || address;
|
|
51
|
+
const headerSubheader = selectedBookmark?.isConnectedAccount
|
|
52
|
+
? !!matchingConnectedAccount && address
|
|
53
|
+
: !!selectedBookmark?.name && address;
|
|
54
|
+
const handleOnClick = () => {
|
|
55
|
+
navigate(utils_1.navigationRoutes.sendToWallet);
|
|
32
56
|
};
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
57
|
+
// Sync SendToWalletExpandButton state
|
|
58
|
+
// TODO: find better way
|
|
59
|
+
(0, react_1.useEffect)(() => {
|
|
60
|
+
if (showInstantly) {
|
|
61
|
+
setSendToWallet(true);
|
|
62
|
+
}
|
|
63
|
+
}, [showInstantly, setSendToWallet]);
|
|
64
|
+
return ((0, jsx_runtime_1.jsx)(material_1.Collapse, { timeout: showInstantly ? 0 : 225, in: showSendToWallet || showInstantly, mountOnEnter: true, unmountOnExit: true, children: (0, jsx_runtime_1.jsx)(Card_1.Card, { component: "button", onClick: !!toAddress && disabledToAddress ? undefined : handleOnClick, sx: { mb: 2 }, children: (0, jsx_runtime_1.jsxs)(Card_1.CardRowContainer, { sx: {
|
|
65
|
+
flexDirection: 'column',
|
|
66
|
+
padding: 0,
|
|
67
|
+
alignItems: 'flex-start',
|
|
68
|
+
}, children: [(0, jsx_runtime_1.jsx)(Card_1.CardTitle, { required: requiredToAddress, children: t('header.sendToWallet') }), (0, jsx_runtime_1.jsx)(SendToWallet_style_1.SendToWalletCardHeader, { avatar: (0, jsx_runtime_1.jsx)(AccountAvatar_1.AccountAvatar, { chainId: chainId, account: matchingConnectedAccount }), title: headerTitle, subheader: headerSubheader, selected: !!toAddressFieldValue && !(toAddress && disabledToAddress) })] }) }) }));
|
|
37
69
|
};
|
|
38
70
|
exports.SendToWalletButton = SendToWalletButton;
|
|
39
71
|
//# sourceMappingURL=SendToWalletButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SendToWalletButton.js","sourceRoot":"","sources":["../../../components/SendToWallet/SendToWalletButton.tsx"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"SendToWalletButton.js","sourceRoot":"","sources":["../../../components/SendToWallet/SendToWalletButton.tsx"],"names":[],"mappings":";;;;AAAA,4CAAyC;AACzC,iCAAkC;AAClC,iDAA+C;AAC/C,uDAA+C;AAC/C,uCAAmE;AACnE,+CAAkD;AAClD,yCAKsB;AACtB,uCAAmD;AACnD,uCAKqB;AACrB,oDAAiD;AACjD,kCAA4D;AAC5D,6DAA8D;AAEvD,MAAM,kBAAkB,GAAG,GAAG,EAAE;IACrC,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,8BAAc,GAAE,CAAC;IAC/B,MAAM,QAAQ,GAAG,IAAA,8BAAW,GAAE,CAAC;IAC/B,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAA,2BAAe,GAAE,CAAC;IAC9D,MAAM,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,eAAe,EAAE,GAChE,IAAA,6BAAoB,GAAE,CAAC;IACzB,MAAM,EAAE,qBAAqB,EAAE,GAAG,IAAA,oBAAW,EAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC;IACzE,MAAM,CAAC,mBAAmB,CAAC,GAAG,IAAA,uBAAc,EAAC,WAAW,CAAC,CAAC;IAC1D,MAAM,EAAE,gBAAgB,EAAE,GAAG,IAAA,qBAAY,GAAE,CAAC;IAC5C,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAA,kBAAU,GAAE,CAAC;IAClC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GACE,CACZ,CAAC;AACJ,CAAC,CAAC;AAtGW,QAAA,kBAAkB,sBAsG7B"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SendToWalletExpandButton = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const Wallet_1 = require("@mui/icons-material/Wallet");
|
|
6
|
+
const Button_1 = require("@mui/material/Button");
|
|
7
|
+
const Tooltip_1 = require("@mui/material/Tooltip");
|
|
8
|
+
const react_i18next_1 = require("react-i18next");
|
|
9
|
+
const hooks_1 = require("../../hooks");
|
|
10
|
+
const providers_1 = require("../../providers");
|
|
11
|
+
const stores_1 = require("../../stores");
|
|
12
|
+
const types_1 = require("../../types");
|
|
13
|
+
const SendToWalletExpandButton = () => {
|
|
14
|
+
const { t } = (0, react_i18next_1.useTranslation)();
|
|
15
|
+
const { disabledUI, hiddenUI } = (0, providers_1.useWidgetConfig)();
|
|
16
|
+
const { setFieldValue } = (0, stores_1.useFieldActions)();
|
|
17
|
+
const { setSelectedBookmark } = (0, stores_1.useBookmarkActions)();
|
|
18
|
+
const emitter = (0, hooks_1.useWidgetEvents)();
|
|
19
|
+
const { showSendToWallet, toggleSendToWallet } = (0, stores_1.useSendToWalletStore)();
|
|
20
|
+
const { showDestinationWallet } = (0, stores_1.useSettings)(['showDestinationWallet']);
|
|
21
|
+
const { requiredToAddress } = (0, hooks_1.useToAddressRequirements)();
|
|
22
|
+
if (!showDestinationWallet ||
|
|
23
|
+
requiredToAddress ||
|
|
24
|
+
hiddenUI?.includes(types_1.HiddenUI.ToAddress)) {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
const handleClick = () => {
|
|
28
|
+
if (showSendToWallet && !disabledUI?.includes(types_1.DisabledUI.ToAddress)) {
|
|
29
|
+
setFieldValue('toAddress', '', { isTouched: true });
|
|
30
|
+
setSelectedBookmark();
|
|
31
|
+
}
|
|
32
|
+
toggleSendToWallet();
|
|
33
|
+
emitter.emit(types_1.WidgetEvent.SendToWalletToggled, stores_1.useSendToWalletStore.getState().showSendToWallet);
|
|
34
|
+
};
|
|
35
|
+
return ((0, jsx_runtime_1.jsx)(Tooltip_1.default, { title: t('main.sendToWallet'), placement: "bottom-end", enterDelay: 400, arrow: true, children: (0, jsx_runtime_1.jsx)(Button_1.default, { variant: showSendToWallet ? 'contained' : 'text', onClick: handleClick, sx: {
|
|
36
|
+
minWidth: 48,
|
|
37
|
+
marginLeft: 1,
|
|
38
|
+
}, children: (0, jsx_runtime_1.jsx)(Wallet_1.default, {}) }) }));
|
|
39
|
+
};
|
|
40
|
+
exports.SendToWalletExpandButton = SendToWalletExpandButton;
|
|
41
|
+
//# sourceMappingURL=SendToWalletExpandButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SendToWalletExpandButton.js","sourceRoot":"","sources":["../../../components/SendToWallet/SendToWalletExpandButton.tsx"],"names":[],"mappings":";;;;AAAA,uDAAoD;AACpD,iDAA0C;AAC1C,mDAA4C;AAC5C,iDAA+C;AAC/C,uCAAwE;AACxE,+CAAkD;AAClD,yCAKsB;AACtB,uCAAgE;AAEzD,MAAM,wBAAwB,GAAa,GAAG,EAAE;IACrD,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,8BAAc,GAAE,CAAC;IAC/B,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,IAAA,2BAAe,GAAE,CAAC;IACnD,MAAM,EAAE,aAAa,EAAE,GAAG,IAAA,wBAAe,GAAE,CAAC;IAC5C,MAAM,EAAE,mBAAmB,EAAE,GAAG,IAAA,2BAAkB,GAAE,CAAC;IACrD,MAAM,OAAO,GAAG,IAAA,uBAAe,GAAE,CAAC;IAClC,MAAM,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,GAAG,IAAA,6BAAoB,GAAE,CAAC;IACxE,MAAM,EAAE,qBAAqB,EAAE,GAAG,IAAA,oBAAW,EAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC;IAEzE,MAAM,EAAE,iBAAiB,EAAE,GAAG,IAAA,gCAAwB,GAAE,CAAC;IAEzD,IACE,CAAC,qBAAqB;QACtB,iBAAiB;QACjB,QAAQ,EAAE,QAAQ,CAAC,gBAAQ,CAAC,SAAS,CAAC,EACtC,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,WAAW,GAAG,GAAG,EAAE;QACvB,IAAI,gBAAgB,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,kBAAU,CAAC,SAAS,CAAC,EAAE,CAAC;YACpE,aAAa,CAAC,WAAW,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;YACpD,mBAAmB,EAAE,CAAC;QACxB,CAAC;QACD,kBAAkB,EAAE,CAAC;QACrB,OAAO,CAAC,IAAI,CACV,mBAAW,CAAC,mBAAmB,EAC/B,6BAAoB,CAAC,QAAQ,EAAE,CAAC,gBAAgB,CACjD,CAAC;IACJ,CAAC,CAAC;IAEF,OAAO,CACL,uBAAC,iBAAO,IACN,KAAK,EAAE,CAAC,CAAC,mBAAmB,CAAC,EAC7B,SAAS,EAAC,YAAY,EACtB,UAAU,EAAE,GAAG,EACf,KAAK,kBAEL,uBAAC,gBAAM,IACL,OAAO,EAAE,gBAAgB,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,EAChD,OAAO,EAAE,WAAW,EACpB,EAAE,EAAE;gBACF,QAAQ,EAAE,EAAE;gBACZ,UAAU,EAAE,CAAC;aACd,YAED,uBAAC,gBAAU,KAAG,GACP,GACD,CACX,CAAC;AACJ,CAAC,CAAC;AAlDW,QAAA,wBAAwB,4BAkDnC"}
|
|
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./SendToWallet"), exports);
|
|
18
17
|
__exportStar(require("./SendToWalletButton"), exports);
|
|
18
|
+
__exportStar(require("./SendToWalletExpandButton"), exports);
|
|
19
|
+
__exportStar(require("./SendToWallet.style"), exports);
|
|
19
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../components/SendToWallet/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../components/SendToWallet/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,6DAA2C;AAC3C,uDAAqC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const SettingsListItemButton: import("@emotion/styled").StyledComponent<import("@mui/material").ListItemButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
3
3
|
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
4
|
-
}, "alignItems" | "children" | "sx" | "style" | "autoFocus" | "className" | "tabIndex" | "disabled" | "action" | "selected" | "classes" | "
|
|
4
|
+
}, "alignItems" | "children" | "sx" | "style" | "autoFocus" | "className" | "tabIndex" | "disabled" | "action" | "selected" | "classes" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "dense" | "divider" | "disableGutters"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
@@ -5,6 +5,6 @@ export declare const LinkButton: import("@emotion/styled").StyledComponent<impor
|
|
|
5
5
|
component?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
6
6
|
} & import("@mui/material").LinkOwnProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
|
|
7
7
|
ref?: ((instance: HTMLAnchorElement | null) => void) | import("react").RefObject<HTMLAnchorElement> | null | undefined;
|
|
8
|
-
}, "border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "marginInline" | "marginInlineStart" | "marginInlineEnd" | "marginBlock" | "marginBlockStart" | "marginBlockEnd" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "paddingInline" | "paddingInlineStart" | "paddingInlineEnd" | "paddingBlock" | "paddingBlockStart" | "paddingBlockEnd" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform" | "children" | "sx" | "style" | "className" | "align" | "classes" | "gutterBottom" | "noWrap" | "paragraph" | "variant" | "variantMapping" | "
|
|
8
|
+
}, "border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "marginInline" | "marginInlineStart" | "marginInlineEnd" | "marginBlock" | "marginBlockStart" | "marginBlockEnd" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "paddingInline" | "paddingInlineStart" | "paddingInlineEnd" | "paddingBlock" | "paddingBlockStart" | "paddingBlockEnd" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform" | "children" | "sx" | "style" | "className" | "align" | "classes" | "gutterBottom" | "noWrap" | "paragraph" | "variant" | "variantMapping" | "underline" | "TypographyClasses"> & {
|
|
9
9
|
component?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
10
10
|
}, {}, {}>;
|
|
@@ -18,7 +18,8 @@ const TokenList = ({ formType, height, onClick, }) => {
|
|
|
18
18
|
let filteredTokens = (tokensWithBalance ??
|
|
19
19
|
chainTokens ??
|
|
20
20
|
[]);
|
|
21
|
-
const
|
|
21
|
+
const normalizedSearchFilter = tokenSearchFilter?.replaceAll('$', '');
|
|
22
|
+
const searchFilter = normalizedSearchFilter?.toUpperCase() ?? '';
|
|
22
23
|
filteredTokens = tokenSearchFilter
|
|
23
24
|
? filteredTokens.filter((token) => token.name.toUpperCase().includes(searchFilter) ||
|
|
24
25
|
token.symbol.toUpperCase().includes(searchFilter) ||
|
|
@@ -28,7 +29,7 @@ const TokenList = ({ formType, height, onClick, }) => {
|
|
|
28
29
|
!filteredTokens.length &&
|
|
29
30
|
!!tokenSearchFilter &&
|
|
30
31
|
!!selectedChainId;
|
|
31
|
-
const { token: searchedToken, isLoading: isSearchedTokenLoading } = (0, hooks_1.useTokenSearch)(selectedChainId,
|
|
32
|
+
const { token: searchedToken, isLoading: isSearchedTokenLoading } = (0, hooks_1.useTokenSearch)(selectedChainId, normalizedSearchFilter, tokenSearchEnabled);
|
|
32
33
|
const isLoading = isTokensLoading ||
|
|
33
34
|
isChainLoading ||
|
|
34
35
|
(tokenSearchEnabled && isSearchedTokenLoading);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TokenList.js","sourceRoot":"","sources":["../../../components/TokenList/TokenList.tsx"],"names":[],"mappings":";;;;AAAA,4CAAoC;AAEpC,iCAA+B;AAC/B,uCAKqB;AACrB,yCAA6D;AAE7D,mDAAgD;AAChD,iEAA8D;AAE9D,qDAAkD;AAE3C,MAAM,SAAS,GAAuB,CAAC,EAC5C,QAAQ,EACR,MAAM,EACN,OAAO,GACR,EAAE,EAAE;IACH,MAAM,SAAS,GAAG,IAAA,cAAM,EAA0B,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,eAAe,CAAC,GAAG,IAAA,uBAAc,EAAC,sBAAa,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC9E,MAAM,CAAC,iBAAiB,CAAC,GAAa,IAAA,yBAAiB,EACrD,GAA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AAM,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAC9B,uBAAC,6BAAa,IAAC,QAAQ,EAAE,QAAQ,GAAI,CACtC,CAAC,CAAC,CAAC,IAAI,EACR,uBAAC,2CAAoB,IACnB,MAAM,EAAE,MAAM,EACd,oBAAoB,EAAE,cAAc,EAAE,MAAM,EAC5C,gBAAgB,EAAE,SAAS,EAC3B,OAAO,EAAE,eAAe,EACxB,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,SAAS,EACpB,gBAAgB,EAAE,gBAAgB,EAClC,YAAY,EAAE,CAAC,iBAAiB,EAChC,OAAO,EAAE,gBAAgB,GACzB,IACE,CACP,CAAC;AACJ,CAAC,CAAC;AA5EW,QAAA,SAAS,aA4EpB"}
|
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const ListItemButton: import("@emotion/styled").StyledComponent<import("@mui/material").ListItemButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
3
|
-
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
4
|
-
}, "alignItems" | "children" | "sx" | "style" | "autoFocus" | "className" | "tabIndex" | "disabled" | "action" | "selected" | "classes" | "divider" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "dense" | "disableGutters"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
5
2
|
export declare const ListItem: import("@emotion/styled").StyledComponent<{
|
|
6
3
|
button?: false | undefined;
|
|
7
4
|
} & import("@mui/material").ListItemOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & {
|
|
8
5
|
ref?: ((instance: HTMLLIElement | null) => void) | import("react").RefObject<HTMLLIElement> | null | undefined;
|
|
9
|
-
}, "button" | "alignItems" | "children" | "sx" | "style" | "autoFocus" | "className" | "disabled" | "selected" | "classes" | "
|
|
6
|
+
}, "button" | "alignItems" | "children" | "sx" | "style" | "autoFocus" | "className" | "disabled" | "selected" | "classes" | "components" | "dense" | "divider" | "componentsProps" | "slotProps" | "slots" | "disableGutters" | "ContainerComponent" | "ContainerProps" | "disablePadding" | "secondaryAction"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
10
7
|
export declare const IconButton: import("@emotion/styled").StyledComponent<import("@mui/material").IconButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
11
8
|
ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
|
|
12
9
|
}, "color" | "children" | "sx" | "style" | "className" | "tabIndex" | "disabled" | "action" | "size" | "classes" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
13
10
|
component?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
14
11
|
} & import("@mui/material").LinkOwnProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
|
|
15
12
|
ref?: ((instance: HTMLAnchorElement | null) => void) | import("react").RefObject<HTMLAnchorElement> | null | undefined;
|
|
16
|
-
}, "border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "marginInline" | "marginInlineStart" | "marginInlineEnd" | "marginBlock" | "marginBlockStart" | "marginBlockEnd" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "paddingInline" | "paddingInlineStart" | "paddingInlineEnd" | "paddingBlock" | "paddingBlockStart" | "paddingBlockEnd" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform" | "children" | "sx" | "style" | "className" | "align" | "classes" | "gutterBottom" | "noWrap" | "paragraph" | "variant" | "variantMapping" | "
|
|
13
|
+
}, "border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "display" | "displayPrint" | "overflow" | "textOverflow" | "visibility" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "order" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "color" | "zIndex" | "position" | "top" | "right" | "bottom" | "left" | "boxShadow" | "width" | "maxWidth" | "minWidth" | "height" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "p" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "marginInline" | "marginInlineStart" | "marginInlineEnd" | "marginBlock" | "marginBlockStart" | "marginBlockEnd" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "paddingInline" | "paddingInlineStart" | "paddingInlineEnd" | "paddingBlock" | "paddingBlockStart" | "paddingBlockEnd" | "typography" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "lineHeight" | "textAlign" | "textTransform" | "children" | "sx" | "style" | "className" | "align" | "classes" | "gutterBottom" | "noWrap" | "paragraph" | "variant" | "variantMapping" | "underline" | "TypographyClasses"> & {
|
|
17
14
|
component?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
18
15
|
}, {}, {}>;
|
|
@@ -1,38 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IconButton = exports.ListItem =
|
|
3
|
+
exports.IconButton = exports.ListItem = void 0;
|
|
4
4
|
const material_1 = require("@mui/material");
|
|
5
|
-
const ListItemSecondaryAction_1 = require("@mui/material/ListItemSecondaryAction");
|
|
6
|
-
const ListItemText_1 = require("@mui/material/ListItemText");
|
|
7
5
|
const styles_1 = require("@mui/material/styles");
|
|
8
|
-
const
|
|
9
|
-
exports.
|
|
10
|
-
paddingLeft: theme.spacing(1.5),
|
|
11
|
-
paddingRight: theme.spacing(1.5),
|
|
12
|
-
height: 64,
|
|
13
|
-
width: '100%',
|
|
14
|
-
}));
|
|
15
|
-
exports.ListItem = (0, styles_1.styled)(material_1.ListItem)(({ theme }) => ({
|
|
6
|
+
const ListItem_1 = require("../ListItem");
|
|
7
|
+
exports.ListItem = (0, styles_1.styled)(ListItem_1.ListItem)(({ theme }) => ({
|
|
16
8
|
position: 'absolute',
|
|
17
9
|
top: 0,
|
|
18
10
|
left: 0,
|
|
19
|
-
height: 64,
|
|
20
|
-
flexDirection: 'column',
|
|
21
|
-
alignItems: 'flex-start',
|
|
22
|
-
padding: theme.spacing(0, 1.5),
|
|
23
|
-
[`.${ListItemSecondaryAction_1.listItemSecondaryActionClasses.root}`]: {
|
|
24
|
-
right: theme.spacing(3),
|
|
25
|
-
},
|
|
26
|
-
[`& .${ListItemText_1.listItemTextClasses.secondary}`]: {
|
|
27
|
-
fontSize: 12,
|
|
28
|
-
fontWeight: 500,
|
|
29
|
-
},
|
|
30
|
-
[`& .${ListItemText_1.listItemTextClasses.primary}, & .${ListItemText_1.listItemTextClasses.secondary}`]: {
|
|
31
|
-
lineHeight: 1.3334,
|
|
32
|
-
textOverflow: 'ellipsis',
|
|
33
|
-
overflow: 'hidden',
|
|
34
|
-
whiteSpace: 'nowrap',
|
|
35
|
-
},
|
|
36
11
|
}));
|
|
37
12
|
exports.IconButton = (0, styles_1.styled)(material_1.IconButton)(({ theme }) => ({
|
|
38
13
|
lineHeight: 1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TokenList.style.js","sourceRoot":"","sources":["../../../components/TokenList/TokenList.style.tsx"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"TokenList.style.js","sourceRoot":"","sources":["../../../components/TokenList/TokenList.style.tsx"],"names":[],"mappings":";;;AACA,4CAA4D;AAC5D,iDAAqD;AACrD,0CAAuD;AAE1C,QAAA,QAAQ,GAAG,IAAA,eAAM,EAAC,mBAAY,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;IAC3D,QAAQ,EAAE,UAAU;IACpB,GAAG,EAAE,CAAC;IACN,IAAI,EAAE,CAAC;CACR,CAAC,CAAC,CAAC;AAES,QAAA,UAAU,GAAG,IAAA,eAAM,EAAC,qBAAa,CAAC,CAC7C,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;IACd,UAAU,EAAE,CAAC;IACb,QAAQ,EAAE,EAAE;IACZ,UAAU,EAAE,GAAG;IACf,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC;IACpC,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC;IACpC,KAAK,EAAE,SAAS;IAChB,eAAe,EAAE,OAAO;IACxB,QAAQ,EAAE,OAAO;IACjB,YAAY,EAAE,KAAK;IACnB,SAAS,EAAE;QACT,eAAe,EACb,KAAK,CAAC,OAAO,CAAC,IAAI,KAAK,OAAO;YAC5B,CAAC,CAAC,IAAA,cAAK,EAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC;YACzC,CAAC,CAAC,IAAA,cAAK,EAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC;KAC9C;IACD,GAAG,EAAE;QACH,QAAQ,EAAE,EAAE;KACb;CACF,CAAC,CACH,CAAC"}
|
|
@@ -8,13 +8,14 @@ const react_1 = require("react");
|
|
|
8
8
|
const react_i18next_1 = require("react-i18next");
|
|
9
9
|
const viem_1 = require("viem");
|
|
10
10
|
const utils_1 = require("../../utils");
|
|
11
|
+
const ListItem_1 = require("../ListItem");
|
|
11
12
|
const TokenList_style_1 = require("./TokenList.style");
|
|
12
13
|
const TokenListItem = ({ onClick, size, start, token, chain, showBalance, isBalanceLoading, startAdornment, endAdornment, }) => {
|
|
13
14
|
const handleClick = (e) => {
|
|
14
15
|
e.stopPropagation();
|
|
15
16
|
onClick?.(token.address);
|
|
16
17
|
};
|
|
17
|
-
return ((0, jsx_runtime_1.jsxs)(TokenList_style_1.ListItem, {
|
|
18
|
+
return ((0, jsx_runtime_1.jsxs)(TokenList_style_1.ListItem, { style: {
|
|
18
19
|
height: `${size}px`,
|
|
19
20
|
transform: `translateY(${start}px)`,
|
|
20
21
|
}, children: [startAdornment, (0, jsx_runtime_1.jsx)(exports.TokenListItemButton, { token: token, chain: chain, showBalance: showBalance, isBalanceLoading: isBalanceLoading, onClick: handleClick }), endAdornment] }));
|
|
@@ -37,7 +38,7 @@ const TokenListItemButton = ({ onClick, token, chain, showBalance, isBalanceLoad
|
|
|
37
38
|
setShowAddress(false);
|
|
38
39
|
}
|
|
39
40
|
};
|
|
40
|
-
return ((0, jsx_runtime_1.jsxs)(
|
|
41
|
+
return ((0, jsx_runtime_1.jsxs)(ListItem_1.ListItemButton, { onClick: onClick, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, dense: true, children: [(0, jsx_runtime_1.jsx)(material_1.ListItemAvatar, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, { src: token.logoURI, alt: token.symbol, children: token.symbol?.[0] }) }), (0, jsx_runtime_1.jsx)(material_1.ListItemText, { primary: token.symbol, secondaryTypographyProps: {
|
|
41
42
|
component: 'div',
|
|
42
43
|
}, secondary: (0, jsx_runtime_1.jsxs)(material_1.Box, { position: "relative", height: 20, ref: container, children: [(0, jsx_runtime_1.jsx)(material_1.Slide, { direction: "down", in: !showAddress, container: container.current, style: {
|
|
43
44
|
position: 'absolute',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TokenListItem.js","sourceRoot":"","sources":["../../../components/TokenList/TokenListItem.tsx"],"names":[],"mappings":";;;;AAAA,2EAAiE;AACjE,4CASuB;
|
|
1
|
+
{"version":3,"file":"TokenListItem.js","sourceRoot":"","sources":["../../../components/TokenList/TokenListItem.tsx"],"names":[],"mappings":";;;;AAAA,2EAAiE;A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AAM,EAAC,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,GAAI,EAClD,uBAAC,mBAAQ,IAAC,OAAO,EAAC,MAAM,EAAC,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,GAAI,IAC9C,CACP,CAAC;AACJ,CAAC,CAAC;AAbW,QAAA,mBAAmB,uBAa9B"}
|
|
@@ -9,7 +9,7 @@ const react_i18next_1 = require("react-i18next");
|
|
|
9
9
|
const hooks_1 = require("../../hooks");
|
|
10
10
|
const TokenListItem_1 = require("./TokenListItem");
|
|
11
11
|
const VirtualizedTokenList = ({ tokens, featuredTokensLength, scrollElementRef, chainId, chain, isLoading, isBalanceLoading, showFeatured, onClick, }) => {
|
|
12
|
-
const {
|
|
12
|
+
const { account } = (0, hooks_1.useAccount)({ chainType: chain?.chainType });
|
|
13
13
|
const { t } = (0, react_i18next_1.useTranslation)();
|
|
14
14
|
const hasFeaturedTokens = !!featuredTokensLength && showFeatured;
|
|
15
15
|
const featuredTokensLastIndex = (featuredTokensLength ?? 0) - 1;
|
|
@@ -52,7 +52,7 @@ const VirtualizedTokenList = ({ tokens, featuredTokensLength, scrollElementRef,
|
|
|
52
52
|
}
|
|
53
53
|
return ((0, jsx_runtime_1.jsx)(material_1.List, { style: { height: getTotalSize() }, disablePadding: true, children: getVirtualItems().map((item) => {
|
|
54
54
|
const token = tokens[item.index];
|
|
55
|
-
return ((0, jsx_runtime_1.jsx)(TokenListItem_1.TokenListItem, { onClick: onClick, size: item.size, start: item.start, token: token, chain: chain, isBalanceLoading: isBalanceLoading, showBalance: isConnected, startAdornment: hasFeaturedTokens && token.featured && item.index === 0 ? ((0, jsx_runtime_1.jsx)(material_1.Typography, { fontSize: 14, fontWeight: 600, lineHeight: 1, px: 2, pb: 1.25, children: t('main.featuredTokens') })) : null, endAdornment: hasFeaturedTokens &&
|
|
55
|
+
return ((0, jsx_runtime_1.jsx)(TokenListItem_1.TokenListItem, { onClick: onClick, size: item.size, start: item.start, token: token, chain: chain, isBalanceLoading: isBalanceLoading, showBalance: account.isConnected, startAdornment: hasFeaturedTokens && token.featured && item.index === 0 ? ((0, jsx_runtime_1.jsx)(material_1.Typography, { fontSize: 14, fontWeight: 600, lineHeight: 1, px: 2, pb: 1.25, children: t('main.featuredTokens') })) : null, endAdornment: hasFeaturedTokens &&
|
|
56
56
|
token.featured &&
|
|
57
57
|
item.index === featuredTokensLastIndex &&
|
|
58
58
|
item.index !== tokensLastIndex ? ((0, jsx_runtime_1.jsx)(material_1.Typography, { fontSize: 14, fontWeight: 600, lineHeight: 1, px: 2, py: 1.25, children: t('main.otherTokens') })) : null }, item.key));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VirtualizedTokenList.js","sourceRoot":"","sources":["../../../components/TokenList/VirtualizedTokenList.tsx"],"names":[],"mappings":";;;;AAAA,4CAAiD;AACjD,2DAAyD;AAEzD,iCAAkC;AAClC,iDAA+C;AAC/C,uCAAyC;AACzC,mDAAuE;AAGhE,MAAM,oBAAoB,GAAkC,CAAC,EAClE,MAAM,EACN,oBAAoB,EACpB,gBAAgB,EAChB,OAAO,EACP,KAAK,EACL,SAAS,EACT,gBAAgB,EAChB,YAAY,EACZ,OAAO,GACR,EAAE,EAAE;IACH,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"VirtualizedTokenList.js","sourceRoot":"","sources":["../../../components/TokenList/VirtualizedTokenList.tsx"],"names":[],"mappings":";;;;AAAA,4CAAiD;AACjD,2DAAyD;AAEzD,iCAAkC;AAClC,iDAA+C;AAC/C,uCAAyC;AACzC,mDAAuE;AAGhE,MAAM,oBAAoB,GAAkC,CAAC,EAClE,MAAM,EACN,oBAAoB,EACpB,gBAAgB,EAChB,OAAO,EACP,KAAK,EACL,SAAS,EACT,gBAAgB,EAChB,YAAY,EACZ,OAAO,GACR,EAAE,EAAE;IACH,MAAM,EAAE,OAAO,EAAE,GAAG,IAAA,kBAAU,EAAC,EAAE,SAAS,EAAE,KAAK,EAAE,S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CAAC,IAAI,EAEV,YAAY,EACV,iBAAiB;oBACjB,KAAK,CAAC,QAAQ;oBACd,IAAI,CAAC,KAAK,KAAK,uBAAuB;oBACtC,IAAI,CAAC,KAAK,KAAK,eAAe,CAAC,CAAC,CAAC,CAC/B,uBAAC,qBAAU,IACT,QAAQ,EAAE,EAAE,EACZ,UAAU,EAAE,GAAG,EACf,UAAU,EAAE,CAAC,EACb,EAAE,EAAE,CAAC,EACL,EAAE,EAAE,IAAI,YAEP,CAAC,CAAC,kBAAkB,CAAC,GACX,CACd,CAAC,CAAC,CAAC,IAAI,IAnCL,IAAI,CAAC,GAAG,CAqCb,CACH,CAAC;QACJ,CAAC,CAAC,GACG,CACR,CAAC;AACJ,CAAC,CAAC;AAhHW,QAAA,oBAAoB,wBAgH/B"}
|
package/_cjs/config/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const name = "@lifi/widget";
|
|
2
|
-
export declare const version = "3.0.0-alpha.
|
|
2
|
+
export declare const version = "3.0.0-alpha.19";
|
package/_cjs/config/version.js
CHANGED
package/_cjs/hooks/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from './useAccount';
|
|
2
|
+
export * from './useAddressValidation';
|
|
2
3
|
export * from './useAvailableChains';
|
|
3
4
|
export * from './useChain';
|
|
4
5
|
export * from './useChains';
|
|
@@ -15,12 +16,13 @@ export * from './useInitializer';
|
|
|
15
16
|
export * from './useLanguages';
|
|
16
17
|
export * from './useNavigateBack';
|
|
17
18
|
export * from './useProcessMessage';
|
|
18
|
-
export * from './useRequiredToAddress';
|
|
19
19
|
export * from './useRouteExecution';
|
|
20
20
|
export * from './useRoutes';
|
|
21
21
|
export * from './useScrollableContainer';
|
|
22
22
|
export * from './useSettingMonitor';
|
|
23
23
|
export * from './useSwapOnly';
|
|
24
|
+
export * from './useToAddressRequirements';
|
|
25
|
+
export * from './useToAddressReset';
|
|
24
26
|
export * from './useToken';
|
|
25
27
|
export * from './useTokenAddressBalance';
|
|
26
28
|
export * from './useTokenBalance';
|
package/_cjs/hooks/index.js
CHANGED
|
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./useAccount"), exports);
|
|
18
|
+
__exportStar(require("./useAddressValidation"), exports);
|
|
18
19
|
__exportStar(require("./useAvailableChains"), exports);
|
|
19
20
|
__exportStar(require("./useChain"), exports);
|
|
20
21
|
__exportStar(require("./useChains"), exports);
|
|
@@ -31,12 +32,13 @@ __exportStar(require("./useInitializer"), exports);
|
|
|
31
32
|
__exportStar(require("./useLanguages"), exports);
|
|
32
33
|
__exportStar(require("./useNavigateBack"), exports);
|
|
33
34
|
__exportStar(require("./useProcessMessage"), exports);
|
|
34
|
-
__exportStar(require("./useRequiredToAddress"), exports);
|
|
35
35
|
__exportStar(require("./useRouteExecution"), exports);
|
|
36
36
|
__exportStar(require("./useRoutes"), exports);
|
|
37
37
|
__exportStar(require("./useScrollableContainer"), exports);
|
|
38
38
|
__exportStar(require("./useSettingMonitor"), exports);
|
|
39
39
|
__exportStar(require("./useSwapOnly"), exports);
|
|
40
|
+
__exportStar(require("./useToAddressRequirements"), exports);
|
|
41
|
+
__exportStar(require("./useToAddressReset"), exports);
|
|
40
42
|
__exportStar(require("./useToken"), exports);
|
|
41
43
|
__exportStar(require("./useTokenAddressBalance"), exports);
|
|
42
44
|
__exportStar(require("./useTokenBalance"), exports);
|
package/_cjs/hooks/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../hooks/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,uDAAqC;AACrC,6CAA2B;AAC3B,8CAA4B;AAC5B,qDAAmC;AACnC,sDAAoC;AACpC,wDAAsC;AACtC,yDAAuC;AACvC,sDAAoC;AACpC,4DAA0C;AAC1C,yDAAuC;AACvC,iDAA+B;AAC/B,sDAAoC;AACpC,mDAAiC;AACjC,iDAA+B;AAC/B,oDAAkC;AAClC,sDAAoC;AACpC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../hooks/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,yDAAuC;AACvC,uDAAqC;AACrC,6CAA2B;AAC3B,8CAA4B;AAC5B,qDAAmC;AACnC,sDAAoC;AACpC,wDAAsC;AACtC,yDAAuC;AACvC,sDAAoC;AACpC,4DAA0C;AAC1C,yDAAuC;AACvC,iDAA+B;AAC/B,sDAAoC;AACpC,mDAAiC;AACjC,iDAA+B;AAC/B,oDAAkC;AAClC,sDAAoC;AACpC,sDAAoC;AACpC,8CAA4B;AAC5B,2DAAyC;AACzC,sDAAoC;AACpC,gDAA8B;AAC9B,6DAA2C;AAC3C,sDAAoC;AACpC,6CAA2B;AAC3B,2DAAyC;AACzC,oDAAkC;AAClC,qDAAmC;AACnC,mDAAiC;AACjC,8CAA4B;AAC5B,6CAA2B;AAC3B,0DAAwC;AACxC,0DAAwC;AACxC,oDAAkC"}
|
|
@@ -22,13 +22,24 @@ export interface SVMAccount extends AccountBase {
|
|
|
22
22
|
chainType: ChainType.SVM;
|
|
23
23
|
connector?: WalletAdapter;
|
|
24
24
|
}
|
|
25
|
-
export
|
|
25
|
+
export interface DefaultAccount extends AccountBase {
|
|
26
|
+
connector?: never;
|
|
27
|
+
}
|
|
28
|
+
export type Account = EVMAccount | SVMAccount | DefaultAccount;
|
|
26
29
|
export interface AccountResult {
|
|
27
30
|
account: Account;
|
|
28
31
|
/**
|
|
29
32
|
* Connected accounts
|
|
30
33
|
*/
|
|
31
34
|
accounts: Account[];
|
|
32
|
-
isConnected: boolean;
|
|
33
35
|
}
|
|
34
|
-
|
|
36
|
+
interface UseAccountArgs {
|
|
37
|
+
chainType?: ChainType;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
*
|
|
41
|
+
* @param args When we provide args we want to return either account with corresponding chainType or default disconnected one
|
|
42
|
+
* @returns - Account result
|
|
43
|
+
*/
|
|
44
|
+
export declare const useAccount: (args?: UseAccountArgs) => AccountResult;
|
|
45
|
+
export {};
|
package/_cjs/hooks/useAccount.js
CHANGED
|
@@ -5,9 +5,24 @@ const sdk_1 = require("@lifi/sdk");
|
|
|
5
5
|
const wallet_adapter_react_1 = require("@solana/wallet-adapter-react");
|
|
6
6
|
const react_1 = require("react");
|
|
7
7
|
const wagmi_1 = require("wagmi");
|
|
8
|
-
const
|
|
8
|
+
const defaultAccount = {
|
|
9
|
+
isConnected: false,
|
|
10
|
+
isConnecting: false,
|
|
11
|
+
isReconnecting: false,
|
|
12
|
+
isDisconnected: true,
|
|
13
|
+
status: 'disconnected',
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
* @param args When we provide args we want to return either account with corresponding chainType or default disconnected one
|
|
18
|
+
* @returns - Account result
|
|
19
|
+
*/
|
|
20
|
+
const useAccount = (args) => {
|
|
9
21
|
const account = (0, wagmi_1.useAccount)();
|
|
10
22
|
const { wallet } = (0, wallet_adapter_react_1.useWallet)();
|
|
23
|
+
// We create a simple variable from the args object
|
|
24
|
+
// to avoid re-render useMemo on every object reference change.
|
|
25
|
+
const hasChainTypeArgs = Boolean(args);
|
|
11
26
|
return (0, react_1.useMemo)(() => {
|
|
12
27
|
const svm = wallet?.adapter.publicKey
|
|
13
28
|
? {
|
|
@@ -30,14 +45,17 @@ const useAccount = () => {
|
|
|
30
45
|
status: 'disconnected',
|
|
31
46
|
};
|
|
32
47
|
const evm = { ...account, chainType: sdk_1.ChainType.EVM };
|
|
33
|
-
const accounts = [evm, svm]
|
|
48
|
+
const accounts = [evm, svm];
|
|
49
|
+
const connectedAccounts = [evm, svm].filter((account) => account.isConnected);
|
|
34
50
|
return {
|
|
35
|
-
account:
|
|
51
|
+
account: hasChainTypeArgs
|
|
52
|
+
? accounts.find((account) => account.chainType === args?.chainType) ??
|
|
53
|
+
defaultAccount
|
|
54
|
+
: accounts.find((account) => account.isConnected) ?? defaultAccount,
|
|
36
55
|
// We need to return only connected account list
|
|
37
|
-
accounts,
|
|
38
|
-
isConnected: accounts.length > 0,
|
|
56
|
+
accounts: connectedAccounts,
|
|
39
57
|
};
|
|
40
|
-
}, [account, wallet]);
|
|
58
|
+
}, [account, args?.chainType, hasChainTypeArgs, wallet]);
|
|
41
59
|
};
|
|
42
60
|
exports.useAccount = useAccount;
|
|
43
61
|
//# sourceMappingURL=useAccount.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAccount.js","sourceRoot":"","sources":["../../hooks/useAccount.ts"],"names":[],"mappings":";;;AAAA,mCAA+C;AAE/C,uEAAyD;AACzD,iCAAgC;AAGhC,iCAAsD;
|
|
1
|
+
{"version":3,"file":"useAccount.js","sourceRoot":"","sources":["../../hooks/useAccount.ts"],"names":[],"mappings":";;;AAAA,mCAA+C;AAE/C,uEAAyD;AACzD,iCAAgC;AAGhC,iCAAsD;AA2CtD,MAAM,cAAc,GAAgB;IAClC,WAAW,EAAE,KAAK;IAClB,YAAY,EAAE,KAAK;IACnB,cAAc,EAAE,KAAK;IACrB,cAAc,EAAE,IAAI;IACpB,MAAM,EAAE,cAAc;CACvB,CAAC;AAEF;;;;GAIG;AACI,MAAM,UAAU,GAAG,CAAC,IAAqB,EAAiB,EAAE;IACjE,MAAM,OAAO,GAAG,IAAA,kBAAe,GAAE,CAAC;IAClC,MAAM,EAAE,MAAM,EAAE,GAAG,IAAA,gCAAS,GAAE,CAAC;IAE/B,mDAAmD;IACnD,+DAA+D;IAC/D,MAAM,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEvC,OAAO,IAAA,eAAO,EAAC,GAAG,EAAE;QAClB,MAAM,GAAG,GAAY,MAAM,EAAE,OAAO,CAAC,SAAS;YAC5C,CAAC,CAAC;gBACE,OAAO,EAAE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