@lifi/widget 2.9.3 → 3.0.0-alpha.0
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/AppProvider.js +2 -2
- package/AppRoutes.js +75 -67
- package/cjs/AppProvider.js +1 -1
- package/cjs/AppRoutes.js +74 -66
- package/cjs/components/ActiveTransactions/ActiveTransactionItem.js +1 -5
- package/cjs/components/ActiveTransactions/ActiveTransactions.js +2 -2
- package/cjs/components/AmountInput/AmountInputEndAdornment.js +9 -10
- package/cjs/components/AmountInput/FormPriceHelperText.js +1 -1
- package/cjs/components/BaseTransactionButton/BaseTransactionButton.js +5 -4
- package/cjs/components/Card/CardLabel.d.ts +1 -1
- package/cjs/components/ChainSelect/ChainSelect.js +8 -5
- package/cjs/components/ChainSelect/useChainSelect.js +21 -2
- package/cjs/components/GasMessage/GasMessage.style.js +3 -6
- package/cjs/components/GasMessage/GasSufficiencyMessage.js +2 -1
- package/cjs/components/Header/Header.style.d.ts +8 -0
- package/cjs/components/Header/Header.style.js +16 -1
- package/cjs/components/Header/NavigationHeader.d.ts +1 -0
- package/cjs/components/Header/NavigationHeader.js +15 -8
- package/cjs/components/Header/NavigationTabs.js +2 -2
- package/cjs/components/Header/SettingsButton.d.ts +1 -0
- package/cjs/components/Header/SettingsButton.js +25 -0
- package/cjs/components/Header/SettingsButton.style.d.ts +11 -0
- package/cjs/components/Header/SettingsButton.style.js +43 -0
- package/cjs/components/Header/WalletHeader.js +11 -24
- package/cjs/components/Header/WalletMenu.d.ts +3 -1
- package/cjs/components/Header/WalletMenu.js +58 -24
- package/cjs/components/Header/WalletMenu.style.d.ts +1 -0
- package/cjs/components/Header/WalletMenu.style.js +27 -0
- package/cjs/components/Insurance/InsuranceCollapsed.js +1 -1
- package/cjs/components/NFT/NFT.js +3 -1
- package/cjs/components/NFT/types.d.ts +1 -1
- package/cjs/components/PoweredBy/PoweredBy.js +2 -1
- package/cjs/components/RouteCard/RouteCard.js +3 -3
- package/cjs/components/RouteCard/RouteCardEssentials.js +2 -1
- package/cjs/components/RouteCard/utils.d.ts +2 -3
- package/cjs/components/RouteCard/utils.js +4 -9
- package/cjs/components/SendToWallet/SendToWallet.js +24 -21
- package/cjs/components/SendToWallet/SendToWalletButton.js +3 -2
- package/{pages/SelectEnabledToolsPage/SelectEnabledToolsPage.style.d.ts → cjs/components/SettingsListItemButton.d.ts} +1 -1
- package/cjs/components/SettingsListItemButton.js +8 -0
- package/cjs/components/Step/DestinationWalletAddress.d.ts +2 -2
- package/cjs/components/Step/GasStepProcess.d.ts +2 -2
- package/cjs/components/Step/Step.d.ts +2 -2
- package/cjs/components/Step/Step.js +1 -1
- package/cjs/components/Step/StepList.d.ts +2 -2
- package/cjs/components/Step/StepList.js +4 -4
- package/cjs/components/Step/StepProcess.d.ts +2 -2
- package/cjs/components/Step/StepTimer.d.ts +2 -2
- package/cjs/components/StepActions/StepActions.d.ts +3 -3
- package/cjs/components/StepActions/StepActions.js +11 -14
- package/cjs/components/StepActions/types.d.ts +2 -2
- package/cjs/components/{Header/NavigationTabs.style.d.ts → Tabs/Tabs.style.d.ts} +2 -2
- package/cjs/components/{Header/NavigationTabs.style.js → Tabs/Tabs.style.js} +9 -31
- package/cjs/components/Tabs/index.d.ts +1 -0
- package/cjs/{providers/SDKProvider → components/Tabs}/index.js +1 -1
- package/cjs/components/Token/Token.d.ts +3 -3
- package/cjs/components/Token/Token.js +5 -5
- package/cjs/components/TokenList/TokenList.js +2 -2
- package/cjs/components/TokenList/TokenListItem.js +9 -5
- package/cjs/components/TokenList/TokenNotFound.js +1 -1
- package/cjs/components/TokenList/VirtualizedTokenList.js +2 -1
- package/cjs/config/queryClient.js +0 -4
- package/cjs/config/version.d.ts +1 -1
- package/cjs/config/version.js +1 -1
- package/cjs/hooks/index.d.ts +7 -1
- package/cjs/hooks/index.js +7 -1
- package/cjs/hooks/useAccount.d.ts +31 -0
- package/cjs/hooks/useAccount.js +53 -0
- package/cjs/hooks/useAvailableChains.d.ts +6 -0
- package/cjs/hooks/useAvailableChains.js +36 -0
- package/cjs/hooks/useChain.js +3 -6
- package/cjs/hooks/useChains.d.ts +1 -1
- package/cjs/hooks/useChains.js +7 -38
- package/cjs/hooks/useFromTokenSufficiency.d.ts +3 -3
- package/cjs/hooks/useFromTokenSufficiency.js +39 -41
- package/cjs/hooks/useGasRecommendation.d.ts +2 -2
- package/cjs/hooks/useGasRecommendation.js +23 -18
- package/cjs/hooks/useGasRefuel.js +18 -11
- package/cjs/hooks/useGasSufficiency.d.ts +6 -7
- package/cjs/hooks/useGasSufficiency.js +68 -71
- package/cjs/hooks/useLanguages.d.ts +6 -0
- package/cjs/hooks/useLanguages.js +28 -0
- package/cjs/hooks/useProcessMessage.d.ts +3 -3
- package/cjs/hooks/useProcessMessage.js +32 -28
- package/cjs/hooks/useRequiredToAddress.d.ts +1 -0
- package/cjs/hooks/useRequiredToAddress.js +19 -0
- package/cjs/hooks/useRouteExecution.d.ts +2 -2
- package/cjs/hooks/useRouteExecution.js +44 -58
- package/cjs/hooks/useRoutes.d.ts +1 -1
- package/cjs/hooks/useRoutes.js +128 -113
- package/cjs/hooks/useSettingMonitor.d.ts +11 -0
- package/cjs/hooks/useSettingMonitor.js +57 -0
- package/cjs/hooks/useTokenAddressBalance.d.ts +1 -1
- package/cjs/hooks/useTokenBalance.d.ts +5 -3
- package/cjs/hooks/useTokenBalance.js +77 -47
- package/cjs/hooks/useTokenBalances.d.ts +3 -3
- package/cjs/hooks/useTokenBalances.js +34 -24
- package/cjs/hooks/useTokenSearch.js +18 -17
- package/cjs/hooks/useTokens.d.ts +2 -1
- package/cjs/hooks/useTokens.js +18 -15
- package/cjs/hooks/useTools.d.ts +1 -1
- package/cjs/hooks/useTools.js +12 -11
- package/cjs/hooks/useTransactionDetails.d.ts +4 -0
- package/cjs/hooks/useTransactionDetails.js +56 -0
- package/cjs/hooks/useTransactionHistory.d.ts +5 -0
- package/cjs/hooks/useTransactionHistory.js +39 -0
- package/cjs/i18n/en.json +18 -9
- package/cjs/i18n/fr.json +7 -4
- package/cjs/i18n/pt.json +7 -4
- package/cjs/i18n/tr.json +7 -4
- package/cjs/i18n/uk.json +7 -4
- package/cjs/i18n/zh.json +7 -4
- package/cjs/icons/index.d.ts +1 -3
- package/cjs/icons/index.js +1 -3
- package/cjs/icons/lifi.d.ts +1 -0
- package/cjs/icons/lifi.js +4 -0
- package/cjs/index.d.ts +2 -3
- package/cjs/index.js +4 -4
- package/cjs/pages/ActiveTransactionsPage/ActiveTransactionsPage.js +2 -2
- package/cjs/pages/LanguagesPage/LanguagesPage.d.ts +2 -0
- package/cjs/pages/LanguagesPage/LanguagesPage.js +22 -0
- package/cjs/pages/LanguagesPage/index.d.ts +1 -0
- package/cjs/pages/LanguagesPage/index.js +17 -0
- package/cjs/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.js +15 -5
- package/cjs/pages/SelectWalletPage/EVMListItemButton.d.ts +8 -0
- package/cjs/pages/SelectWalletPage/EVMListItemButton.js +40 -0
- package/cjs/pages/SelectWalletPage/SVMListItemButton.d.ts +6 -0
- package/cjs/pages/SelectWalletPage/SVMListItemButton.js +34 -0
- package/cjs/pages/SelectWalletPage/SelectWalletPage.js +31 -32
- package/cjs/pages/SelectWalletPage/utils.d.ts +3 -0
- package/cjs/pages/SelectWalletPage/utils.js +21 -0
- package/{pages/SettingsPage/EnabledToolsButton.d.ts → cjs/pages/SettingsPage/BridgeAndExchangeSettings.d.ts} +1 -1
- package/cjs/pages/SettingsPage/BridgeAndExchangeSettings.js +36 -0
- package/cjs/pages/SettingsPage/GasPriceSettings.d.ts +2 -0
- package/cjs/pages/SettingsPage/GasPriceSettings.js +21 -0
- package/cjs/pages/SettingsPage/LanguageSetting.d.ts +2 -0
- package/cjs/pages/SettingsPage/LanguageSetting.js +26 -0
- package/cjs/pages/SettingsPage/ResetSettingsButton.js +3 -30
- package/cjs/pages/SettingsPage/RoutePrioritySettings.d.ts +2 -0
- package/cjs/pages/SettingsPage/RoutePrioritySettings.js +25 -0
- package/cjs/pages/SettingsPage/SendToWalletOptionSetting.d.ts +1 -0
- package/cjs/pages/SettingsPage/{ShowDestinationWallet.js → SendToWalletOptionSetting.js} +6 -9
- package/cjs/pages/SettingsPage/SettingsCard/BadgedValue.d.ts +8 -0
- package/cjs/pages/SettingsPage/SettingsCard/BadgedValue.js +7 -0
- package/cjs/pages/SettingsPage/SettingsCard/SettingCard.d.ts +2 -0
- package/cjs/pages/SettingsPage/SettingsCard/SettingCard.js +11 -0
- package/cjs/pages/SettingsPage/SettingsCard/SettingCard.style.d.ts +19 -0
- package/cjs/pages/SettingsPage/SettingsCard/SettingCard.style.js +53 -0
- package/cjs/pages/SettingsPage/SettingsCard/SettingCardButton.d.ts +7 -0
- package/cjs/pages/SettingsPage/SettingsCard/SettingCardButton.js +8 -0
- package/cjs/pages/SettingsPage/SettingsCard/SettingCardExpandable.d.ts +7 -0
- package/cjs/pages/SettingsPage/SettingsCard/SettingCardExpandable.js +16 -0
- package/cjs/pages/SettingsPage/SettingsCard/SettingsAccordian.d.ts +6 -0
- package/cjs/pages/SettingsPage/SettingsCard/SettingsAccordian.js +36 -0
- package/cjs/pages/SettingsPage/SettingsCard/index.d.ts +6 -0
- package/cjs/pages/SettingsPage/SettingsCard/index.js +22 -0
- package/cjs/pages/SettingsPage/SettingsCard/types.d.ts +5 -0
- package/cjs/pages/SettingsPage/SettingsPage.js +9 -8
- package/cjs/pages/SettingsPage/SlippageSettings/SlippageSettings.d.ts +2 -0
- package/cjs/pages/SettingsPage/SlippageSettings/SlippageSettings.js +51 -0
- package/cjs/pages/SettingsPage/SlippageSettings/SlippageSettings.style.d.ts +16 -0
- package/cjs/pages/SettingsPage/SlippageSettings/SlippageSettings.style.js +74 -0
- package/cjs/pages/SettingsPage/SlippageSettings/index.d.ts +1 -0
- package/cjs/pages/SettingsPage/SlippageSettings/index.js +17 -0
- package/cjs/pages/SettingsPage/ThemeSettings.d.ts +2 -0
- package/cjs/pages/SettingsPage/ThemeSettings.js +39 -0
- package/cjs/pages/TransactionDetailsPage/ContactSupportButton.js +2 -2
- package/cjs/pages/TransactionDetailsPage/TransactionDetailsPage.js +33 -28
- package/cjs/pages/TransactionDetailsPage/TransactionDetailsSkeleton.d.ts +1 -0
- package/cjs/pages/TransactionDetailsPage/TransactionDetailsSkeleton.js +31 -0
- package/cjs/pages/TransactionHistoryPage/TransactionHistoryItem.d.ts +4 -2
- package/cjs/pages/TransactionHistoryPage/TransactionHistoryItem.js +34 -7
- package/cjs/pages/TransactionHistoryPage/TransactionHistoryPage.js +21 -22
- package/cjs/pages/TransactionHistoryPage/TransactionHistorySkeleton.d.ts +1 -0
- package/cjs/pages/TransactionHistoryPage/TransactionHistorySkeleton.js +26 -0
- package/cjs/pages/TransactionHistoryPage/constants.d.ts +1 -0
- package/cjs/pages/TransactionHistoryPage/constants.js +4 -0
- package/cjs/pages/TransactionPage/ExchangeRateBottomSheet.js +11 -10
- package/cjs/pages/TransactionPage/StartTransactionButton.js +2 -2
- package/cjs/pages/TransactionPage/StatusBottomSheet.js +12 -8
- package/cjs/pages/TransactionPage/TransactionPage.js +1 -1
- package/cjs/providers/FormProvider/FormUpdater.js +4 -4
- package/cjs/providers/I18nProvider/I18nProvider.js +3 -7
- package/cjs/providers/I18nProvider/types.d.ts +4 -3
- package/cjs/providers/WalletProvider/EVMProvider.d.ts +3 -0
- package/cjs/providers/WalletProvider/EVMProvider.js +79 -0
- package/cjs/providers/WalletProvider/SDKProviders.d.ts +1 -0
- package/cjs/providers/WalletProvider/SDKProviders.js +31 -0
- package/cjs/providers/WalletProvider/SolanaProvider.d.ts +3 -0
- package/cjs/providers/WalletProvider/SolanaProvider.js +35 -0
- package/cjs/providers/WalletProvider/WalletProvider.d.ts +1 -15
- package/cjs/providers/WalletProvider/WalletProvider.js +5 -183
- package/cjs/providers/WalletProvider/index.d.ts +1 -1
- package/cjs/providers/WalletProvider/index.js +1 -1
- package/cjs/providers/WalletProvider/utils.d.ts +3 -0
- package/cjs/providers/WalletProvider/utils.js +25 -0
- package/cjs/providers/WidgetProvider/WidgetProvider.js +51 -35
- package/cjs/providers/index.d.ts +0 -1
- package/cjs/providers/index.js +0 -1
- package/cjs/stores/chains/ChainOrderStore.js +24 -0
- package/cjs/stores/header/useHeaderStore.d.ts +1 -1
- package/cjs/stores/header/useHeaderStore.js +2 -2
- package/cjs/stores/routes/createRouteExecutionStore.js +6 -60
- package/cjs/stores/routes/index.d.ts +0 -1
- package/cjs/stores/routes/index.js +0 -1
- package/cjs/stores/routes/types.d.ts +2 -2
- package/cjs/stores/routes/utils.d.ts +8 -8
- package/cjs/stores/routes/utils.js +7 -5
- package/cjs/stores/settings/useSettingsStore.js +2 -4
- package/cjs/stores/settings/useSplitSubvariantStore.d.ts +1 -1
- package/cjs/stores/settings/useSplitSubvariantStore.js +2 -2
- package/cjs/types/events.d.ts +6 -5
- package/cjs/types/events.js +1 -1
- package/cjs/types/widget.d.ts +7 -14
- package/cjs/utils/colors.d.ts +3 -0
- package/cjs/utils/colors.js +13 -1
- package/cjs/utils/converters.d.ts +3 -0
- package/cjs/utils/converters.js +172 -0
- package/cjs/utils/format.d.ts +1 -1
- package/cjs/utils/format.js +5 -12
- package/cjs/utils/index.d.ts +1 -0
- package/cjs/utils/index.js +1 -0
- package/cjs/utils/navigationRoutes.d.ts +1 -0
- package/cjs/utils/navigationRoutes.js +3 -1
- package/cjs/utils/svm.d.ts +1 -0
- package/cjs/utils/svm.js +14 -0
- package/components/ActiveTransactions/ActiveTransactionItem.js +1 -5
- package/components/ActiveTransactions/ActiveTransactions.js +2 -2
- package/components/AmountInput/AmountInputEndAdornment.js +10 -11
- package/components/AmountInput/FormPriceHelperText.js +1 -1
- package/components/BaseTransactionButton/BaseTransactionButton.js +6 -5
- package/components/Card/CardLabel.d.ts +1 -1
- package/components/ChainSelect/ChainSelect.js +8 -5
- package/components/ChainSelect/useChainSelect.js +22 -3
- package/components/GasMessage/GasMessage.style.js +3 -6
- package/components/GasMessage/GasSufficiencyMessage.js +2 -1
- package/components/Header/Header.style.d.ts +8 -0
- package/components/Header/Header.style.js +16 -1
- package/components/Header/NavigationHeader.d.ts +1 -0
- package/components/Header/NavigationHeader.js +16 -10
- package/components/Header/NavigationTabs.js +3 -3
- package/components/Header/SettingsButton.d.ts +1 -0
- package/components/Header/SettingsButton.js +21 -0
- package/components/Header/SettingsButton.style.d.ts +11 -0
- package/components/Header/SettingsButton.style.js +40 -0
- package/components/Header/WalletHeader.js +15 -28
- package/components/Header/WalletMenu.d.ts +3 -1
- package/components/Header/WalletMenu.js +58 -25
- package/components/Header/WalletMenu.style.d.ts +1 -0
- package/components/Header/WalletMenu.style.js +24 -0
- package/components/Insurance/InsuranceCollapsed.js +1 -1
- package/components/NFT/NFT.js +3 -1
- package/components/NFT/types.d.ts +1 -1
- package/components/PoweredBy/PoweredBy.js +2 -1
- package/components/RouteCard/RouteCard.js +3 -3
- package/components/RouteCard/RouteCardEssentials.js +2 -1
- package/components/RouteCard/utils.d.ts +2 -3
- package/components/RouteCard/utils.js +4 -9
- package/components/SendToWallet/SendToWallet.js +26 -23
- package/components/SendToWallet/SendToWalletButton.js +5 -4
- package/{cjs/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.style.d.ts → components/SettingsListItemButton.d.ts} +1 -1
- package/components/SettingsListItemButton.js +5 -0
- package/components/Step/DestinationWalletAddress.d.ts +2 -2
- package/components/Step/GasStepProcess.d.ts +2 -2
- package/components/Step/Step.d.ts +2 -2
- package/components/Step/Step.js +2 -2
- package/components/Step/StepList.d.ts +2 -2
- package/components/Step/StepList.js +4 -4
- package/components/Step/StepProcess.d.ts +2 -2
- package/components/Step/StepTimer.d.ts +2 -2
- package/components/StepActions/StepActions.d.ts +3 -3
- package/components/StepActions/StepActions.js +12 -15
- package/components/StepActions/types.d.ts +2 -2
- package/components/{Header/NavigationTabs.style.d.ts → Tabs/Tabs.style.d.ts} +2 -2
- package/components/Tabs/Tabs.style.js +36 -0
- package/components/Tabs/index.d.ts +1 -0
- package/components/Tabs/index.js +1 -0
- package/components/Token/Token.d.ts +3 -3
- package/components/Token/Token.js +5 -5
- package/components/TokenList/TokenList.js +4 -4
- package/components/TokenList/TokenListItem.js +9 -6
- package/components/TokenList/TokenNotFound.js +2 -2
- package/components/TokenList/VirtualizedTokenList.js +2 -1
- package/config/queryClient.js +0 -4
- package/config/version.d.ts +1 -1
- package/config/version.js +1 -1
- package/hooks/index.d.ts +7 -1
- package/hooks/index.js +7 -1
- package/hooks/useAccount.d.ts +31 -0
- package/hooks/useAccount.js +48 -0
- package/hooks/useAvailableChains.d.ts +6 -0
- package/hooks/useAvailableChains.js +32 -0
- package/hooks/useChain.js +3 -6
- package/hooks/useChains.d.ts +1 -1
- package/hooks/useChains.js +9 -40
- package/hooks/useFromTokenSufficiency.d.ts +3 -3
- package/hooks/useFromTokenSufficiency.js +41 -43
- package/hooks/useGasRecommendation.d.ts +2 -2
- package/hooks/useGasRecommendation.js +23 -18
- package/hooks/useGasRefuel.js +19 -12
- package/hooks/useGasSufficiency.d.ts +6 -7
- package/hooks/useGasSufficiency.js +69 -72
- package/hooks/useLanguages.d.ts +6 -0
- package/hooks/useLanguages.js +24 -0
- package/hooks/useProcessMessage.d.ts +3 -3
- package/hooks/useProcessMessage.js +33 -29
- package/hooks/useRequiredToAddress.d.ts +1 -0
- package/hooks/useRequiredToAddress.js +15 -0
- package/hooks/useRouteExecution.d.ts +2 -2
- package/hooks/useRouteExecution.js +44 -58
- package/hooks/useRoutes.d.ts +1 -1
- package/hooks/useRoutes.js +131 -116
- package/hooks/useSettingMonitor.d.ts +11 -0
- package/hooks/useSettingMonitor.js +53 -0
- package/hooks/useTokenAddressBalance.d.ts +1 -1
- package/hooks/useTokenBalance.d.ts +5 -3
- package/hooks/useTokenBalance.js +74 -45
- package/hooks/useTokenBalances.d.ts +3 -3
- package/hooks/useTokenBalances.js +34 -24
- package/hooks/useTokenSearch.js +18 -17
- package/hooks/useTokens.d.ts +2 -1
- package/hooks/useTokens.js +19 -16
- package/hooks/useTools.d.ts +1 -1
- package/hooks/useTools.js +13 -12
- package/hooks/useTransactionDetails.d.ts +4 -0
- package/hooks/useTransactionDetails.js +52 -0
- package/hooks/useTransactionHistory.d.ts +5 -0
- package/hooks/useTransactionHistory.js +35 -0
- package/i18n/en.json +18 -9
- package/i18n/fr.json +7 -4
- package/i18n/pt.json +7 -4
- package/i18n/tr.json +7 -4
- package/i18n/uk.json +7 -4
- package/i18n/zh.json +7 -4
- package/icons/index.d.ts +1 -3
- package/icons/index.js +1 -3
- package/icons/lifi.d.ts +1 -0
- package/icons/lifi.js +1 -0
- package/index.d.ts +2 -3
- package/index.js +2 -4
- package/package.json +19 -19
- package/pages/ActiveTransactionsPage/ActiveTransactionsPage.js +2 -2
- package/pages/LanguagesPage/LanguagesPage.d.ts +2 -0
- package/pages/LanguagesPage/LanguagesPage.js +18 -0
- package/pages/LanguagesPage/index.d.ts +1 -0
- package/pages/LanguagesPage/index.js +1 -0
- package/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.js +16 -6
- package/pages/SelectWalletPage/EVMListItemButton.d.ts +8 -0
- package/pages/SelectWalletPage/EVMListItemButton.js +36 -0
- package/pages/SelectWalletPage/SVMListItemButton.d.ts +6 -0
- package/pages/SelectWalletPage/SVMListItemButton.js +30 -0
- package/pages/SelectWalletPage/SelectWalletPage.js +34 -35
- package/pages/SelectWalletPage/utils.d.ts +3 -0
- package/pages/SelectWalletPage/utils.js +17 -0
- package/{cjs/pages/SettingsPage/EnabledToolsButton.d.ts → pages/SettingsPage/BridgeAndExchangeSettings.d.ts} +1 -1
- package/pages/SettingsPage/BridgeAndExchangeSettings.js +32 -0
- package/pages/SettingsPage/GasPriceSettings.d.ts +2 -0
- package/pages/SettingsPage/GasPriceSettings.js +17 -0
- package/pages/SettingsPage/LanguageSetting.d.ts +2 -0
- package/pages/SettingsPage/LanguageSetting.js +22 -0
- package/pages/SettingsPage/ResetSettingsButton.js +4 -31
- package/pages/SettingsPage/RoutePrioritySettings.d.ts +2 -0
- package/pages/SettingsPage/RoutePrioritySettings.js +21 -0
- package/pages/SettingsPage/SendToWalletOptionSetting.d.ts +1 -0
- package/pages/SettingsPage/{ShowDestinationWallet.js → SendToWalletOptionSetting.js} +4 -7
- package/pages/SettingsPage/SettingsCard/BadgedValue.d.ts +8 -0
- package/pages/SettingsPage/SettingsCard/BadgedValue.js +3 -0
- package/pages/SettingsPage/SettingsCard/SettingCard.d.ts +2 -0
- package/pages/SettingsPage/SettingsCard/SettingCard.js +7 -0
- package/pages/SettingsPage/SettingsCard/SettingCard.style.d.ts +19 -0
- package/pages/SettingsPage/SettingsCard/SettingCard.style.js +50 -0
- package/pages/SettingsPage/SettingsCard/SettingCardButton.d.ts +7 -0
- package/pages/SettingsPage/SettingsCard/SettingCardButton.js +4 -0
- package/pages/SettingsPage/SettingsCard/SettingCardExpandable.d.ts +7 -0
- package/pages/SettingsPage/SettingsCard/SettingCardExpandable.js +12 -0
- package/pages/SettingsPage/SettingsCard/SettingsAccordian.d.ts +6 -0
- package/pages/SettingsPage/SettingsCard/SettingsAccordian.js +31 -0
- package/pages/SettingsPage/SettingsCard/index.d.ts +6 -0
- package/pages/SettingsPage/SettingsCard/index.js +6 -0
- package/pages/SettingsPage/SettingsCard/types.d.ts +5 -0
- package/pages/SettingsPage/SettingsPage.js +10 -9
- package/pages/SettingsPage/SlippageSettings/SlippageSettings.d.ts +2 -0
- package/pages/SettingsPage/SlippageSettings/SlippageSettings.js +47 -0
- package/pages/SettingsPage/SlippageSettings/SlippageSettings.style.d.ts +16 -0
- package/pages/SettingsPage/SlippageSettings/SlippageSettings.style.js +71 -0
- package/pages/SettingsPage/SlippageSettings/index.d.ts +1 -0
- package/pages/SettingsPage/SlippageSettings/index.js +1 -0
- package/pages/SettingsPage/ThemeSettings.d.ts +2 -0
- package/pages/SettingsPage/ThemeSettings.js +35 -0
- package/pages/TransactionDetailsPage/ContactSupportButton.js +2 -2
- package/pages/TransactionDetailsPage/TransactionDetailsPage.js +38 -33
- package/pages/TransactionDetailsPage/TransactionDetailsSkeleton.d.ts +1 -0
- package/pages/TransactionDetailsPage/TransactionDetailsSkeleton.js +27 -0
- package/pages/TransactionHistoryPage/TransactionHistoryItem.d.ts +4 -2
- package/pages/TransactionHistoryPage/TransactionHistoryItem.js +34 -7
- package/pages/TransactionHistoryPage/TransactionHistoryPage.js +24 -25
- package/pages/TransactionHistoryPage/TransactionHistorySkeleton.d.ts +1 -0
- package/pages/TransactionHistoryPage/TransactionHistorySkeleton.js +22 -0
- package/pages/TransactionHistoryPage/constants.d.ts +1 -0
- package/pages/TransactionHistoryPage/constants.js +1 -0
- package/pages/TransactionPage/ExchangeRateBottomSheet.js +11 -10
- package/pages/TransactionPage/StartTransactionButton.js +2 -2
- package/pages/TransactionPage/StatusBottomSheet.js +14 -10
- package/pages/TransactionPage/TransactionPage.js +1 -1
- package/providers/FormProvider/FormUpdater.js +4 -4
- package/providers/I18nProvider/I18nProvider.js +4 -8
- package/providers/I18nProvider/types.d.ts +4 -3
- package/providers/WalletProvider/EVMProvider.d.ts +3 -0
- package/providers/WalletProvider/EVMProvider.js +74 -0
- package/providers/WalletProvider/SDKProviders.d.ts +1 -0
- package/providers/WalletProvider/SDKProviders.js +27 -0
- package/providers/WalletProvider/SolanaProvider.d.ts +3 -0
- package/providers/WalletProvider/SolanaProvider.js +30 -0
- package/providers/WalletProvider/WalletProvider.d.ts +1 -15
- package/providers/WalletProvider/WalletProvider.js +5 -181
- package/providers/WalletProvider/index.d.ts +1 -1
- package/providers/WalletProvider/index.js +1 -1
- package/providers/WalletProvider/utils.d.ts +3 -0
- package/providers/WalletProvider/utils.js +21 -0
- package/providers/WidgetProvider/WidgetProvider.js +52 -36
- package/providers/index.d.ts +0 -1
- package/providers/index.js +0 -1
- package/stores/chains/ChainOrderStore.js +25 -1
- package/stores/header/useHeaderStore.d.ts +1 -1
- package/stores/header/useHeaderStore.js +2 -2
- package/stores/routes/createRouteExecutionStore.js +6 -60
- package/stores/routes/index.d.ts +0 -1
- package/stores/routes/index.js +0 -1
- package/stores/routes/types.d.ts +2 -2
- package/stores/routes/utils.d.ts +8 -8
- package/stores/routes/utils.js +5 -3
- package/stores/settings/useSettingsStore.js +2 -4
- package/stores/settings/useSplitSubvariantStore.d.ts +1 -1
- package/stores/settings/useSplitSubvariantStore.js +2 -2
- package/tsconfig.cjs.tsbuildinfo +1 -1
- package/types/events.d.ts +6 -5
- package/types/events.js +1 -1
- package/types/widget.d.ts +7 -14
- package/utils/colors.d.ts +3 -0
- package/utils/colors.js +10 -1
- package/utils/converters.d.ts +3 -0
- package/utils/converters.js +168 -0
- package/utils/format.d.ts +1 -1
- package/utils/format.js +5 -12
- package/utils/index.d.ts +1 -0
- package/utils/index.js +1 -0
- package/utils/navigationRoutes.d.ts +1 -0
- package/utils/navigationRoutes.js +3 -1
- package/utils/svm.d.ts +1 -0
- package/utils/svm.js +10 -0
- package/cjs/components/LiFiLogo.d.ts +0 -5
- package/cjs/components/LiFiLogo.js +0 -10
- package/cjs/fonts/Inter-Black.woff +0 -0
- package/cjs/fonts/Inter-Black.woff2 +0 -0
- package/cjs/fonts/Inter-BlackItalic.woff +0 -0
- package/cjs/fonts/Inter-BlackItalic.woff2 +0 -0
- package/cjs/fonts/Inter-Bold.woff +0 -0
- package/cjs/fonts/Inter-Bold.woff2 +0 -0
- package/cjs/fonts/Inter-BoldItalic.woff +0 -0
- package/cjs/fonts/Inter-BoldItalic.woff2 +0 -0
- package/cjs/fonts/Inter-ExtraBold.woff +0 -0
- package/cjs/fonts/Inter-ExtraBold.woff2 +0 -0
- package/cjs/fonts/Inter-ExtraBoldItalic.woff +0 -0
- package/cjs/fonts/Inter-ExtraBoldItalic.woff2 +0 -0
- package/cjs/fonts/Inter-ExtraLight.woff +0 -0
- package/cjs/fonts/Inter-ExtraLight.woff2 +0 -0
- package/cjs/fonts/Inter-ExtraLightItalic.woff +0 -0
- package/cjs/fonts/Inter-ExtraLightItalic.woff2 +0 -0
- package/cjs/fonts/Inter-Italic.woff +0 -0
- package/cjs/fonts/Inter-Italic.woff2 +0 -0
- package/cjs/fonts/Inter-Light.woff +0 -0
- package/cjs/fonts/Inter-Light.woff2 +0 -0
- package/cjs/fonts/Inter-LightItalic.woff +0 -0
- package/cjs/fonts/Inter-LightItalic.woff2 +0 -0
- package/cjs/fonts/Inter-Medium.woff +0 -0
- package/cjs/fonts/Inter-Medium.woff2 +0 -0
- package/cjs/fonts/Inter-MediumItalic.woff +0 -0
- package/cjs/fonts/Inter-MediumItalic.woff2 +0 -0
- package/cjs/fonts/Inter-Regular.woff +0 -0
- package/cjs/fonts/Inter-Regular.woff2 +0 -0
- package/cjs/fonts/Inter-SemiBold.woff +0 -0
- package/cjs/fonts/Inter-SemiBold.woff2 +0 -0
- package/cjs/fonts/Inter-SemiBoldItalic.woff +0 -0
- package/cjs/fonts/Inter-SemiBoldItalic.woff2 +0 -0
- package/cjs/fonts/Inter-Thin.woff +0 -0
- package/cjs/fonts/Inter-Thin.woff2 +0 -0
- package/cjs/fonts/Inter-ThinItalic.woff +0 -0
- package/cjs/fonts/Inter-ThinItalic.woff2 +0 -0
- package/cjs/fonts/Inter-italic.var.woff2 +0 -0
- package/cjs/fonts/Inter-roman.var.woff2 +0 -0
- package/cjs/fonts/Inter.var.woff2 +0 -0
- package/cjs/fonts/inter.css +0 -217
- package/cjs/hooks/useGetTokenBalancesWithRetry.d.ts +0 -3
- package/cjs/hooks/useGetTokenBalancesWithRetry.js +0 -33
- package/cjs/icons/LiFiFullLogo.d.ts +0 -2
- package/cjs/icons/LiFiFullLogo.js +0 -6
- package/cjs/icons/LiFiLogo.d.ts +0 -2
- package/cjs/icons/LiFiLogo.js +0 -6
- package/cjs/icons/LiFiToolLogo.d.ts +0 -2
- package/cjs/icons/LiFiToolLogo.js +0 -6
- package/cjs/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.style.js +0 -8
- package/cjs/pages/SettingsPage/ColorSchemeButtonGroup.d.ts +0 -2
- package/cjs/pages/SettingsPage/ColorSchemeButtonGroup.js +0 -27
- package/cjs/pages/SettingsPage/ColorSchemeButtonGroup.style.d.ts +0 -4
- package/cjs/pages/SettingsPage/ColorSchemeButtonGroup.style.js +0 -19
- package/cjs/pages/SettingsPage/EnabledToolsButton.js +0 -25
- package/cjs/pages/SettingsPage/EnabledToolsButton.style.d.ts +0 -5
- package/cjs/pages/SettingsPage/EnabledToolsButton.style.js +0 -17
- package/cjs/pages/SettingsPage/GasPriceSelect.d.ts +0 -1
- package/cjs/pages/SettingsPage/GasPriceSelect.js +0 -17
- package/cjs/pages/SettingsPage/LanguageSelect.d.ts +0 -2
- package/cjs/pages/SettingsPage/LanguageSelect.js +0 -37
- package/cjs/pages/SettingsPage/RoutePrioritySelect.d.ts +0 -2
- package/cjs/pages/SettingsPage/RoutePrioritySelect.js +0 -23
- package/cjs/pages/SettingsPage/ShowDestinationWallet.d.ts +0 -1
- package/cjs/pages/SettingsPage/SlippageInput.d.ts +0 -1
- package/cjs/pages/SettingsPage/SlippageInput.js +0 -30
- package/cjs/providers/SDKProvider/SDKProvider.d.ts +0 -4
- package/cjs/providers/SDKProvider/SDKProvider.js +0 -41
- package/cjs/providers/SDKProvider/index.d.ts +0 -1
- package/cjs/providers/WalletProvider/types.d.ts +0 -17
- package/cjs/stores/routes/useTransactionHistory.d.ts +0 -2
- package/cjs/stores/routes/useTransactionHistory.js +0 -15
- package/components/Header/NavigationTabs.style.js +0 -58
- package/components/LiFiLogo.d.ts +0 -5
- package/components/LiFiLogo.js +0 -6
- package/fonts/Inter-Black.woff +0 -0
- package/fonts/Inter-Black.woff2 +0 -0
- package/fonts/Inter-BlackItalic.woff +0 -0
- package/fonts/Inter-BlackItalic.woff2 +0 -0
- package/fonts/Inter-Bold.woff +0 -0
- package/fonts/Inter-Bold.woff2 +0 -0
- package/fonts/Inter-BoldItalic.woff +0 -0
- package/fonts/Inter-BoldItalic.woff2 +0 -0
- package/fonts/Inter-ExtraBold.woff +0 -0
- package/fonts/Inter-ExtraBold.woff2 +0 -0
- package/fonts/Inter-ExtraBoldItalic.woff +0 -0
- package/fonts/Inter-ExtraBoldItalic.woff2 +0 -0
- package/fonts/Inter-ExtraLight.woff +0 -0
- package/fonts/Inter-ExtraLight.woff2 +0 -0
- package/fonts/Inter-ExtraLightItalic.woff +0 -0
- package/fonts/Inter-ExtraLightItalic.woff2 +0 -0
- package/fonts/Inter-Italic.woff +0 -0
- package/fonts/Inter-Italic.woff2 +0 -0
- package/fonts/Inter-Light.woff +0 -0
- package/fonts/Inter-Light.woff2 +0 -0
- package/fonts/Inter-LightItalic.woff +0 -0
- package/fonts/Inter-LightItalic.woff2 +0 -0
- package/fonts/Inter-Medium.woff +0 -0
- package/fonts/Inter-Medium.woff2 +0 -0
- package/fonts/Inter-MediumItalic.woff +0 -0
- package/fonts/Inter-MediumItalic.woff2 +0 -0
- package/fonts/Inter-Regular.woff +0 -0
- package/fonts/Inter-Regular.woff2 +0 -0
- package/fonts/Inter-SemiBold.woff +0 -0
- package/fonts/Inter-SemiBold.woff2 +0 -0
- package/fonts/Inter-SemiBoldItalic.woff +0 -0
- package/fonts/Inter-SemiBoldItalic.woff2 +0 -0
- package/fonts/Inter-Thin.woff +0 -0
- package/fonts/Inter-Thin.woff2 +0 -0
- package/fonts/Inter-ThinItalic.woff +0 -0
- package/fonts/Inter-ThinItalic.woff2 +0 -0
- package/fonts/Inter-italic.var.woff2 +0 -0
- package/fonts/Inter-roman.var.woff2 +0 -0
- package/fonts/Inter.var.woff2 +0 -0
- package/fonts/inter.css +0 -217
- package/hooks/useGetTokenBalancesWithRetry.d.ts +0 -3
- package/hooks/useGetTokenBalancesWithRetry.js +0 -29
- package/icons/LiFiFullLogo.d.ts +0 -2
- package/icons/LiFiFullLogo.js +0 -2
- package/icons/LiFiLogo.d.ts +0 -2
- package/icons/LiFiLogo.js +0 -2
- package/icons/LiFiToolLogo.d.ts +0 -2
- package/icons/LiFiToolLogo.js +0 -2
- package/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.style.js +0 -5
- package/pages/SettingsPage/ColorSchemeButtonGroup.d.ts +0 -2
- package/pages/SettingsPage/ColorSchemeButtonGroup.js +0 -23
- package/pages/SettingsPage/ColorSchemeButtonGroup.style.d.ts +0 -4
- package/pages/SettingsPage/ColorSchemeButtonGroup.style.js +0 -16
- package/pages/SettingsPage/EnabledToolsButton.js +0 -21
- package/pages/SettingsPage/EnabledToolsButton.style.d.ts +0 -5
- package/pages/SettingsPage/EnabledToolsButton.style.js +0 -14
- package/pages/SettingsPage/GasPriceSelect.d.ts +0 -1
- package/pages/SettingsPage/GasPriceSelect.js +0 -13
- package/pages/SettingsPage/LanguageSelect.d.ts +0 -2
- package/pages/SettingsPage/LanguageSelect.js +0 -33
- package/pages/SettingsPage/RoutePrioritySelect.d.ts +0 -2
- package/pages/SettingsPage/RoutePrioritySelect.js +0 -19
- package/pages/SettingsPage/ShowDestinationWallet.d.ts +0 -1
- package/pages/SettingsPage/SlippageInput.d.ts +0 -1
- package/pages/SettingsPage/SlippageInput.js +0 -26
- package/providers/SDKProvider/SDKProvider.d.ts +0 -4
- package/providers/SDKProvider/SDKProvider.js +0 -36
- package/providers/SDKProvider/index.d.ts +0 -1
- package/providers/SDKProvider/index.js +0 -1
- package/providers/WalletProvider/types.d.ts +0 -17
- package/stores/routes/useTransactionHistory.d.ts +0 -2
- package/stores/routes/useTransactionHistory.js +0 -11
- /package/cjs/{providers/WalletProvider → pages/SettingsPage/SettingsCard}/types.js +0 -0
- /package/{providers/WalletProvider → pages/SettingsPage/SettingsCard}/types.js +0 -0
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NavigationHeader = void 0;
|
|
3
|
+
exports.NavigationHeader = exports.TransactionHistoryButton = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const ArrowBack_1 = require("@mui/icons-material/ArrowBack");
|
|
6
|
-
const ReceiptLong_1 = require("@mui/icons-material/ReceiptLong");
|
|
7
|
-
const Settings_1 = require("@mui/icons-material/Settings");
|
|
8
6
|
const material_1 = require("@mui/material");
|
|
9
7
|
const react_i18next_1 = require("react-i18next");
|
|
10
8
|
const react_router_dom_1 = require("react-router-dom");
|
|
@@ -16,11 +14,19 @@ const utils_1 = require("../../utils");
|
|
|
16
14
|
const Header_style_1 = require("./Header.style");
|
|
17
15
|
const NavigationTabs_1 = require("./NavigationTabs");
|
|
18
16
|
const WalletHeader_1 = require("./WalletHeader");
|
|
17
|
+
const SettingsButton_1 = require("./SettingsButton");
|
|
18
|
+
const ReceiptLong_1 = require("@mui/icons-material/ReceiptLong");
|
|
19
|
+
const TransactionHistoryButton = () => {
|
|
20
|
+
const { t } = (0, react_i18next_1.useTranslation)();
|
|
21
|
+
const { navigate } = (0, hooks_1.useNavigateBack)();
|
|
22
|
+
return ((0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: t(`header.transactionHistory`), enterDelay: 400, arrow: true, children: (0, jsx_runtime_1.jsx)(material_1.IconButton, { size: "medium", edge: "start", onClick: () => navigate(utils_1.navigationRoutes.transactionHistory), children: (0, jsx_runtime_1.jsx)(ReceiptLong_1.default, {}) }) }));
|
|
23
|
+
};
|
|
24
|
+
exports.TransactionHistoryButton = TransactionHistoryButton;
|
|
19
25
|
const NavigationHeader = () => {
|
|
20
26
|
const { t } = (0, react_i18next_1.useTranslation)();
|
|
21
27
|
const { subvariant, hiddenUI, variant } = (0, providers_1.useWidgetConfig)();
|
|
22
|
-
const {
|
|
23
|
-
const { account } = (0,
|
|
28
|
+
const { navigateBack } = (0, hooks_1.useNavigateBack)();
|
|
29
|
+
const { account } = (0, hooks_1.useAccount)();
|
|
24
30
|
const { element, title } = (0, stores_1.useHeaderStore)((state) => state);
|
|
25
31
|
const { pathname } = (0, react_router_dom_1.useLocation)();
|
|
26
32
|
const cleanedPathname = pathname.endsWith('/')
|
|
@@ -39,6 +45,8 @@ const NavigationHeader = () => {
|
|
|
39
45
|
return t(`settings.enabledBridges`);
|
|
40
46
|
case utils_1.navigationRoutes.exchanges:
|
|
41
47
|
return t(`settings.enabledExchanges`);
|
|
48
|
+
case utils_1.navigationRoutes.languages:
|
|
49
|
+
return t(`language.title`);
|
|
42
50
|
case utils_1.navigationRoutes.transactionHistory:
|
|
43
51
|
return t(`header.transactionHistory`);
|
|
44
52
|
case utils_1.navigationRoutes.fromToken: {
|
|
@@ -81,8 +89,7 @@ const NavigationHeader = () => {
|
|
|
81
89
|
}
|
|
82
90
|
}
|
|
83
91
|
};
|
|
84
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(Header_style_1.HeaderAppBar, { elevation: 0, children: [utils_1.backButtonRoutes.includes(path) ? ((0, jsx_runtime_1.jsx)(material_1.IconButton, { size: "medium", edge: "start", onClick: navigateBack, children: (0, jsx_runtime_1.jsx)(ArrowBack_1.default, {}) })) : null, splitSubvariant ? ((0, jsx_runtime_1.jsx)(material_1.Box, { flex: 1, children: !hiddenUI?.includes(types_1.HiddenUI.WalletMenu) ? ((0, jsx_runtime_1.jsx)(WalletHeader_1.WalletMenuButton, {})) : null })) : ((0, jsx_runtime_1.jsx)(material_1.Typography, { fontSize: hasPath ? 18 : 24, align: hasPath ? 'center' : 'left', fontWeight: "700", flex: 1, noWrap: true, children: title || handleHeaderTitle() })), (0, jsx_runtime_1.jsxs)(react_router_dom_1.Routes, { children: [(0, jsx_runtime_1.jsx)(react_router_dom_1.Route, { path: utils_1.navigationRoutes.home, element: (0, jsx_runtime_1.jsxs)(
|
|
85
|
-
|
|
86
|
-
}, children: (0, jsx_runtime_1.jsx)(Settings_1.default, {}) }) })] }) }), (0, jsx_runtime_1.jsx)(react_router_dom_1.Route, { path: "*", element: element || (0, jsx_runtime_1.jsx)(material_1.Box, { width: 28, height: 40 }) })] })] }), splitSubvariant ? (0, jsx_runtime_1.jsx)(NavigationTabs_1.NavigationTabs, {}) : null] }));
|
|
92
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(Header_style_1.HeaderAppBar, { elevation: 0, children: [utils_1.backButtonRoutes.includes(path) ? ((0, jsx_runtime_1.jsx)(material_1.IconButton, { size: "medium", edge: "start", onClick: navigateBack, children: (0, jsx_runtime_1.jsx)(ArrowBack_1.default, {}) })) : null, splitSubvariant ? ((0, jsx_runtime_1.jsx)(material_1.Box, { flex: 1, children: !hiddenUI?.includes(types_1.HiddenUI.WalletMenu) ? ((0, jsx_runtime_1.jsx)(WalletHeader_1.WalletMenuButton, {})) : null })) : ((0, jsx_runtime_1.jsx)(material_1.Typography, { fontSize: hasPath ? 18 : 24, align: hasPath ? 'center' : 'left', fontWeight: "700", flex: 1, noWrap: true, children: title || handleHeaderTitle() })), (0, jsx_runtime_1.jsxs)(react_router_dom_1.Routes, { children: [(0, jsx_runtime_1.jsx)(react_router_dom_1.Route, { path: utils_1.navigationRoutes.home, element: (0, jsx_runtime_1.jsxs)(Header_style_1.HeaderControlsContainer, { paddingRight: variant === 'drawer' && subvariant === 'split' ? 5 : 0, children: [account.isConnected &&
|
|
93
|
+
!hiddenUI?.includes(types_1.HiddenUI.History) ? ((0, jsx_runtime_1.jsx)(exports.TransactionHistoryButton, {})) : null, (0, jsx_runtime_1.jsx)(SettingsButton_1.SettingsButton, {})] }) }), (0, jsx_runtime_1.jsx)(react_router_dom_1.Route, { path: "*", element: element || (0, jsx_runtime_1.jsx)(material_1.Box, { width: 28, height: 40 }) })] })] }), splitSubvariant ? (0, jsx_runtime_1.jsx)(NavigationTabs_1.NavigationTabs, {}) : null] }));
|
|
87
94
|
};
|
|
88
95
|
exports.NavigationHeader = NavigationHeader;
|
|
@@ -7,7 +7,7 @@ const react_i18next_1 = require("react-i18next");
|
|
|
7
7
|
const providers_1 = require("../../providers");
|
|
8
8
|
const stores_1 = require("../../stores");
|
|
9
9
|
const Header_style_1 = require("./Header.style");
|
|
10
|
-
const
|
|
10
|
+
const Tabs_1 = require("../Tabs");
|
|
11
11
|
const NavigationTabs = () => {
|
|
12
12
|
const { t } = (0, react_i18next_1.useTranslation)();
|
|
13
13
|
const [state, setState] = (0, stores_1.useSplitSubvariantStore)((state) => [
|
|
@@ -21,6 +21,6 @@ const NavigationTabs = () => {
|
|
|
21
21
|
setValue(providers_1.FormKey.ToToken, '');
|
|
22
22
|
setState(value === 0 ? 'swap' : 'bridge');
|
|
23
23
|
};
|
|
24
|
-
return ((0, jsx_runtime_1.jsx)(Header_style_1.HeaderAppBar, { elevation: 0, sx: { py: 1 }, children: (0, jsx_runtime_1.jsxs)(
|
|
24
|
+
return ((0, jsx_runtime_1.jsx)(Header_style_1.HeaderAppBar, { elevation: 0, sx: { py: 1 }, children: (0, jsx_runtime_1.jsxs)(Header_style_1.SplitTabs, { value: state === 'swap' ? 0 : 1, onChange: handleChange, "aria-label": "tabs", indicatorColor: "primary", children: [(0, jsx_runtime_1.jsx)(Tabs_1.Tab, { label: t('header.swap'), disableRipple: true }), (0, jsx_runtime_1.jsx)(Tabs_1.Tab, { label: t('header.bridge'), disableRipple: true })] }) }));
|
|
25
25
|
};
|
|
26
26
|
exports.NavigationTabs = NavigationTabs;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SettingsButton: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SettingsButton = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_i18next_1 = require("react-i18next");
|
|
6
|
+
const material_1 = require("@mui/material");
|
|
7
|
+
const Settings_1 = require("@mui/icons-material/Settings");
|
|
8
|
+
const hooks_1 = require("../../hooks");
|
|
9
|
+
const utils_1 = require("../../utils");
|
|
10
|
+
const SettingsButton_style_1 = require("./SettingsButton.style");
|
|
11
|
+
const SettingsButton = () => {
|
|
12
|
+
const { t } = (0, react_i18next_1.useTranslation)();
|
|
13
|
+
const { navigate } = (0, hooks_1.useNavigateBack)();
|
|
14
|
+
const { isCustomRouteSettings, isRouteSettingsWithWarnings } = (0, hooks_1.useSettingMonitor)();
|
|
15
|
+
const notification = isRouteSettingsWithWarnings
|
|
16
|
+
? 'warning'
|
|
17
|
+
: isCustomRouteSettings
|
|
18
|
+
? 'info'
|
|
19
|
+
: undefined;
|
|
20
|
+
const tooltipMessage = notification
|
|
21
|
+
? t(`tooltip.settingsModified`)
|
|
22
|
+
: t(`header.settings`);
|
|
23
|
+
return ((0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: tooltipMessage, enterDelay: 400, arrow: true, children: (0, jsx_runtime_1.jsx)(SettingsButton_style_1.SettingsIconButton, { size: "medium", onClick: () => navigate(utils_1.navigationRoutes.settings), notification: notification, children: notification ? ((0, jsx_runtime_1.jsx)(SettingsButton_style_1.SettingsIconBadge, { variant: "dot", color: notification, children: (0, jsx_runtime_1.jsx)(Settings_1.default, {}) })) : ((0, jsx_runtime_1.jsx)(Settings_1.default, {})) }) }));
|
|
24
|
+
};
|
|
25
|
+
exports.SettingsButton = SettingsButton;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const SettingsIconBadge: import("@emotion/styled").StyledComponent<import("@mui/material").BadgeOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
3
|
+
ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
|
|
4
|
+
}, "className" | "style" | "classes" | "children" | "sx" | "color" | "variant" | "max" | "components" | "componentsProps" | "slots" | "slotProps" | "invisible" | "anchorOrigin" | "badgeContent" | "overlap" | "showZero"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
5
|
+
interface SettingsIconButtonProps {
|
|
6
|
+
notification?: 'info' | 'warning';
|
|
7
|
+
}
|
|
8
|
+
export declare const SettingsIconButton: 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"> & {
|
|
9
|
+
ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
|
|
10
|
+
}, "className" | "style" | "classes" | "action" | "centerRipple" | "children" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "tabIndex" | "TouchRippleProps" | "touchRippleRef" | "color" | "disableFocusRipple" | "size" | "edge"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & SettingsIconButtonProps, {}, {}>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SettingsIconButton = exports.SettingsIconBadge = void 0;
|
|
4
|
+
const material_1 = require("@mui/material");
|
|
5
|
+
const Badge_1 = require("@mui/material/Badge");
|
|
6
|
+
const styles_1 = require("@mui/material/styles");
|
|
7
|
+
const utils_1 = require("../../utils");
|
|
8
|
+
exports.SettingsIconBadge = (0, styles_1.styled)(material_1.Badge)(({ theme }) => ({
|
|
9
|
+
display: 'flex',
|
|
10
|
+
alignItems: 'center',
|
|
11
|
+
gap: theme.spacing(1.25),
|
|
12
|
+
[`.${Badge_1.badgeClasses.badge}`]: {
|
|
13
|
+
width: 10,
|
|
14
|
+
height: 10,
|
|
15
|
+
borderRadius: '50%',
|
|
16
|
+
transform: 'translate(70%, -70%)',
|
|
17
|
+
},
|
|
18
|
+
}));
|
|
19
|
+
exports.SettingsIconButton = (0, styles_1.styled)(material_1.IconButton, {
|
|
20
|
+
shouldForwardProp: (props) => props !== 'notification',
|
|
21
|
+
})(({ theme, notification }) => {
|
|
22
|
+
const notificationStyles = {
|
|
23
|
+
info: {
|
|
24
|
+
backgroundColor: (0, utils_1.getInfoBackgroundColor)(theme),
|
|
25
|
+
'&:hover': {
|
|
26
|
+
backgroundColor: (0, styles_1.darken)((0, utils_1.getInfoBackgroundColor)(theme), 0.2),
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
warning: {
|
|
30
|
+
backgroundColor: (0, utils_1.getWarningBackgroundColor)(theme),
|
|
31
|
+
'&:hover': {
|
|
32
|
+
backgroundColor: (0, styles_1.darken)((0, utils_1.getWarningBackgroundColor)(theme), 0.2),
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
default: {
|
|
36
|
+
marginRight: theme.spacing(-1.25),
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
return {
|
|
40
|
+
borderRadius: 20,
|
|
41
|
+
...notificationStyles[notification ?? 'default'],
|
|
42
|
+
};
|
|
43
|
+
});
|
|
@@ -2,10 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.WalletMenuButton = exports.WalletHeader = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const ContentCopyRounded_1 = require("@mui/icons-material/ContentCopyRounded");
|
|
6
5
|
const ExpandMore_1 = require("@mui/icons-material/ExpandMore");
|
|
7
|
-
const OpenInNewRounded_1 = require("@mui/icons-material/OpenInNewRounded");
|
|
8
|
-
const PowerSettingsNewRounded_1 = require("@mui/icons-material/PowerSettingsNewRounded");
|
|
9
6
|
const Wallet_1 = require("@mui/icons-material/Wallet");
|
|
10
7
|
const material_1 = require("@mui/material");
|
|
11
8
|
const react_1 = require("react");
|
|
@@ -14,30 +11,31 @@ const react_router_dom_1 = require("react-router-dom");
|
|
|
14
11
|
const hooks_1 = require("../../hooks");
|
|
15
12
|
const providers_1 = require("../../providers");
|
|
16
13
|
const utils_1 = require("../../utils");
|
|
14
|
+
const SmallAvatar_1 = require("../SmallAvatar");
|
|
17
15
|
const Header_style_1 = require("./Header.style");
|
|
18
16
|
const WalletMenu_1 = require("./WalletMenu");
|
|
17
|
+
const WalletMenu_style_1 = require("./WalletMenu.style");
|
|
19
18
|
const WalletHeader = () => {
|
|
20
19
|
return ((0, jsx_runtime_1.jsx)(Header_style_1.HeaderAppBar, { elevation: 0, sx: { justifyContent: 'flex-end' }, children: (0, jsx_runtime_1.jsx)(exports.WalletMenuButton, {}) }));
|
|
21
20
|
};
|
|
22
21
|
exports.WalletHeader = WalletHeader;
|
|
23
22
|
const WalletMenuButton = () => {
|
|
24
|
-
const { account } = (0,
|
|
23
|
+
const { account } = (0, hooks_1.useAccount)();
|
|
25
24
|
const { variant } = (0, providers_1.useWidgetConfig)();
|
|
26
25
|
if (variant === 'drawer') {
|
|
27
|
-
return ((0, jsx_runtime_1.jsx)(Header_style_1.DrawerWalletContainer, { children: account.
|
|
26
|
+
return ((0, jsx_runtime_1.jsx)(Header_style_1.DrawerWalletContainer, { children: account.isConnected ? ((0, jsx_runtime_1.jsx)(ConnectedButton, { account: account })) : ((0, jsx_runtime_1.jsx)(ConnectButton, {})) }));
|
|
28
27
|
}
|
|
29
|
-
return account.
|
|
28
|
+
return account.isConnected ? ((0, jsx_runtime_1.jsx)(ConnectedButton, { account: account })) : ((0, jsx_runtime_1.jsx)(ConnectButton, {}));
|
|
30
29
|
};
|
|
31
30
|
exports.WalletMenuButton = WalletMenuButton;
|
|
32
31
|
const ConnectButton = () => {
|
|
33
32
|
const { t } = (0, react_i18next_1.useTranslation)();
|
|
34
33
|
const { pathname } = (0, react_router_dom_1.useLocation)();
|
|
35
34
|
const { walletManagement, subvariant, variant } = (0, providers_1.useWidgetConfig)();
|
|
36
|
-
const { connect: connectWallet } = (0, providers_1.useWallet)();
|
|
37
35
|
const navigate = (0, react_router_dom_1.useNavigate)();
|
|
38
36
|
const connect = async () => {
|
|
39
37
|
if (walletManagement) {
|
|
40
|
-
await
|
|
38
|
+
await walletManagement.connect();
|
|
41
39
|
return;
|
|
42
40
|
}
|
|
43
41
|
navigate(utils_1.navigationRoutes.selectWallet);
|
|
@@ -47,31 +45,20 @@ const ConnectButton = () => {
|
|
|
47
45
|
marginLeft: subvariant === 'split' ? -1.25 : 0,
|
|
48
46
|
}, children: t(`button.connectWallet`) }));
|
|
49
47
|
};
|
|
50
|
-
const ConnectedButton = () => {
|
|
51
|
-
const { t } = (0, react_i18next_1.useTranslation)();
|
|
48
|
+
const ConnectedButton = ({ account }) => {
|
|
52
49
|
const { subvariant } = (0, providers_1.useWidgetConfig)();
|
|
53
|
-
const { account, disconnect } = (0, providers_1.useWallet)();
|
|
54
|
-
const walletAddress = (0, utils_1.shortenAddress)(account.address);
|
|
55
50
|
const { chain } = (0, hooks_1.useChain)(account.chainId);
|
|
56
51
|
const [anchorEl, setAnchorEl] = (0, react_1.useState)(null);
|
|
52
|
+
const walletAddress = (0, utils_1.shortenAddress)(account.address);
|
|
57
53
|
const handleClick = (event) => {
|
|
58
54
|
setAnchorEl(event.currentTarget);
|
|
59
55
|
};
|
|
60
56
|
const handleClose = () => {
|
|
61
57
|
setAnchorEl(null);
|
|
62
58
|
};
|
|
63
|
-
const
|
|
64
|
-
|
|
65
|
-
handleClose();
|
|
66
|
-
};
|
|
67
|
-
const handleCopyAddress = async () => {
|
|
68
|
-
await navigator.clipboard.writeText(account.address ?? '');
|
|
69
|
-
handleClose();
|
|
70
|
-
};
|
|
71
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Header_style_1.WalletButton, { endIcon: (0, jsx_runtime_1.jsx)(ExpandMore_1.default, {}), startIcon: (0, jsx_runtime_1.jsx)(material_1.Avatar, { src: chain?.logoURI, alt: chain?.key, sx: { width: 24, height: 24 }, children: chain?.name[0] }), sx: {
|
|
59
|
+
const avatar = ((0, jsx_runtime_1.jsx)(material_1.Avatar, { src: account.connector?.icon, alt: account.connector?.name, sx: { width: 24, height: 24 }, children: account.connector?.name[0] }));
|
|
60
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Header_style_1.WalletButton, { endIcon: (0, jsx_runtime_1.jsx)(ExpandMore_1.default, {}), startIcon: chain?.logoURI ? ((0, jsx_runtime_1.jsx)(material_1.Badge, { overlap: "circular", anchorOrigin: { vertical: 'bottom', horizontal: 'right' }, badgeContent: (0, jsx_runtime_1.jsx)(SmallAvatar_1.SmallAvatar, { src: chain?.logoURI, alt: chain?.name, children: chain?.name[0] }), children: avatar })) : (avatar), sx: {
|
|
72
61
|
marginRight: subvariant === 'split' ? 0 : -1.25,
|
|
73
62
|
marginLeft: subvariant === 'split' ? -1 : 0,
|
|
74
|
-
}, onClick: handleClick, children: walletAddress }), (0, jsx_runtime_1.
|
|
75
|
-
marginTop: 1,
|
|
76
|
-
}, children: t(`button.disconnect`) })] })] }));
|
|
63
|
+
}, onClick: handleClick, children: walletAddress }), (0, jsx_runtime_1.jsx)(WalletMenu_style_1.WalletMenuContainer, { anchorEl: anchorEl, open: Boolean(anchorEl), onClose: handleClose, children: (0, jsx_runtime_1.jsx)(WalletMenu_1.WalletMenu, { onClose: handleClose }) })] }));
|
|
77
64
|
};
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
export declare const WalletMenu:
|
|
1
|
+
export declare const WalletMenu: ({ onClose }: {
|
|
2
|
+
onClose: () => void;
|
|
3
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,28 +1,62 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.WalletMenu = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const sdk_1 = require("@lifi/sdk");
|
|
6
|
+
const ContentCopyRounded_1 = require("@mui/icons-material/ContentCopyRounded");
|
|
7
|
+
const OpenInNewRounded_1 = require("@mui/icons-material/OpenInNewRounded");
|
|
8
|
+
const PowerSettingsNewRounded_1 = require("@mui/icons-material/PowerSettingsNewRounded");
|
|
4
9
|
const material_1 = require("@mui/material");
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
10
|
+
const wallet_adapter_react_1 = require("@solana/wallet-adapter-react");
|
|
11
|
+
const react_i18next_1 = require("react-i18next");
|
|
12
|
+
const react_router_dom_1 = require("react-router-dom");
|
|
13
|
+
const wagmi_1 = require("wagmi");
|
|
14
|
+
const hooks_1 = require("../../hooks");
|
|
15
|
+
const utils_1 = require("../../utils");
|
|
16
|
+
const SmallAvatar_1 = require("../SmallAvatar");
|
|
17
|
+
const WalletMenu = ({ onClose }) => {
|
|
18
|
+
const { t } = (0, react_i18next_1.useTranslation)();
|
|
19
|
+
const navigate = (0, react_router_dom_1.useNavigate)();
|
|
20
|
+
const { pathname } = (0, react_router_dom_1.useLocation)();
|
|
21
|
+
const { accounts } = (0, hooks_1.useAccount)();
|
|
22
|
+
const { getChainById } = (0, hooks_1.useAvailableChains)();
|
|
23
|
+
const connect = async () => {
|
|
24
|
+
navigate(utils_1.navigationRoutes.selectWallet);
|
|
25
|
+
onClose();
|
|
26
|
+
};
|
|
27
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { children: [(0, jsx_runtime_1.jsx)(material_1.Box, { display: "flex", flexDirection: "column", children: accounts
|
|
28
|
+
.filter((account) => account.isConnected)
|
|
29
|
+
.map((account) => {
|
|
30
|
+
const chain = getChainById(account.chainId);
|
|
31
|
+
const walletAddress = (0, utils_1.shortenAddress)(account.address);
|
|
32
|
+
const handleCopyAddress = async () => {
|
|
33
|
+
await navigator.clipboard.writeText(account.address ?? '');
|
|
34
|
+
onClose();
|
|
35
|
+
};
|
|
36
|
+
const avatar = ((0, jsx_runtime_1.jsx)(material_1.Avatar, { src: account.connector?.icon, alt: account.connector?.name, sx: {
|
|
37
|
+
width: 32,
|
|
38
|
+
height: 32,
|
|
39
|
+
marginRight: chain?.logoURI ? 0 : 1.5,
|
|
40
|
+
}, children: account.connector?.name[0] }));
|
|
41
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.MenuItem, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { flex: 1, display: "flex", alignItems: "center", children: [chain?.logoURI ? ((0, jsx_runtime_1.jsx)(material_1.Badge, { overlap: "circular", anchorOrigin: { vertical: 'bottom', horizontal: 'right' }, badgeContent: (0, jsx_runtime_1.jsx)(SmallAvatar_1.SmallAvatar, { src: chain?.logoURI, alt: chain?.name, children: chain?.name[0] }), sx: { marginRight: 1.5 }, children: avatar })) : (avatar), walletAddress] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { ml: 1, children: [(0, jsx_runtime_1.jsx)(material_1.IconButton, { size: "medium", onClick: handleCopyAddress, children: (0, jsx_runtime_1.jsx)(ContentCopyRounded_1.default, {}) }), (0, jsx_runtime_1.jsx)(material_1.IconButton, { size: "medium", component: "a", onClick: onClose, href: `${chain?.metamask.blockExplorerUrls[0]}address/${account.address}`, target: "_blank", children: (0, jsx_runtime_1.jsx)(OpenInNewRounded_1.default, {}) }), account.chainType === sdk_1.ChainType.EVM ? ((0, jsx_runtime_1.jsx)(EVMDisconnectIconButton, { connector: account.connector })) : account.chainType === sdk_1.ChainType.SVM ? ((0, jsx_runtime_1.jsx)(SVMDisconnectIconButton, {})) : null] })] }, account.address));
|
|
42
|
+
}) }), !pathname.includes(utils_1.navigationRoutes.selectWallet) ? ((0, jsx_runtime_1.jsx)(material_1.Button, { onClick: connect, fullWidth: true, startIcon: (0, jsx_runtime_1.jsx)(PowerSettingsNewRounded_1.default, {}), sx: {
|
|
43
|
+
marginTop: 1,
|
|
44
|
+
}, children: accounts.filter((account) => account.isConnected).length > 1
|
|
45
|
+
? t(`button.changeWallet`)
|
|
46
|
+
: t(`button.connectWallet`) })) : null] }));
|
|
47
|
+
};
|
|
48
|
+
exports.WalletMenu = WalletMenu;
|
|
49
|
+
const EVMDisconnectIconButton = ({ connector }) => {
|
|
50
|
+
const { disconnect } = (0, wagmi_1.useDisconnect)();
|
|
51
|
+
return ((0, jsx_runtime_1.jsx)(material_1.IconButton, { size: "medium", onClick: (e) => {
|
|
52
|
+
e.stopPropagation();
|
|
53
|
+
disconnect({ connector });
|
|
54
|
+
}, children: (0, jsx_runtime_1.jsx)(PowerSettingsNewRounded_1.default, {}) }));
|
|
55
|
+
};
|
|
56
|
+
const SVMDisconnectIconButton = () => {
|
|
57
|
+
const { disconnect } = (0, wallet_adapter_react_1.useWallet)();
|
|
58
|
+
return ((0, jsx_runtime_1.jsx)(material_1.IconButton, { size: "medium", onClick: (e) => {
|
|
59
|
+
e.stopPropagation();
|
|
60
|
+
disconnect();
|
|
61
|
+
}, children: (0, jsx_runtime_1.jsx)(PowerSettingsNewRounded_1.default, {}) }));
|
|
62
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const WalletMenuContainer: import("@emotion/styled").StyledComponent<import("@mui/material").MenuProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WalletMenuContainer = void 0;
|
|
4
|
+
const material_1 = require("@mui/material");
|
|
5
|
+
const Menu_1 = require("@mui/material/Menu");
|
|
6
|
+
const MenuItem_1 = require("@mui/material/MenuItem");
|
|
7
|
+
const styles_1 = require("@mui/material/styles");
|
|
8
|
+
const SvgIcon_1 = require("@mui/material/SvgIcon");
|
|
9
|
+
exports.WalletMenuContainer = (0, styles_1.styled)(material_1.Menu)(({ theme }) => ({
|
|
10
|
+
[`& .${Menu_1.menuClasses.paper}`]: {
|
|
11
|
+
borderRadius: theme.shape.borderRadius,
|
|
12
|
+
color: theme.palette.text.primary,
|
|
13
|
+
boxShadow: '0px 2px 4px rgb(0 0 0 / 8%), 0px 8px 16px rgb(0 0 0 / 8%)',
|
|
14
|
+
padding: theme.spacing(2),
|
|
15
|
+
[`& .${Menu_1.menuClasses.list}`]: {
|
|
16
|
+
padding: 0,
|
|
17
|
+
},
|
|
18
|
+
[`& .${MenuItem_1.menuItemClasses.root}`]: {
|
|
19
|
+
borderRadius: theme.shape.borderRadiusSecondary,
|
|
20
|
+
padding: theme.spacing(1, 2, 1, 1),
|
|
21
|
+
[`& .${SvgIcon_1.svgIconClasses.root}`]: {
|
|
22
|
+
fontSize: 20,
|
|
23
|
+
color: theme.palette.text.primary,
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
}));
|
|
@@ -25,6 +25,6 @@ const InsuranceCollapsed = ({ status, insurableRouteId, onChange, ...props }) =>
|
|
|
25
25
|
if (!insuredRoute) {
|
|
26
26
|
return null;
|
|
27
27
|
}
|
|
28
|
-
return ((0, jsx_runtime_1.jsx)(material_1.Collapse, { timeout: 225, in: insuredRoute.insurance.state === 'INSURED', unmountOnExit: true, mountOnEnter: true, appear: status === stores_1.RouteExecutionStatus.Idle, children: (0, jsx_runtime_1.jsx)(InsuranceCard_1.InsuranceCard, { ...props, status: status, insuredAmount: (0, utils_1.formatTokenAmount)(insuredRoute.toAmountMin, insuredRoute.toToken.decimals), insuredTokenSymbol: insuredRoute.toToken.symbol, onChange: toggleInsurance }) }));
|
|
28
|
+
return ((0, jsx_runtime_1.jsx)(material_1.Collapse, { timeout: 225, in: insuredRoute.insurance.state === 'INSURED', unmountOnExit: true, mountOnEnter: true, appear: status === stores_1.RouteExecutionStatus.Idle, children: (0, jsx_runtime_1.jsx)(InsuranceCard_1.InsuranceCard, { ...props, status: status, insuredAmount: (0, utils_1.formatTokenAmount)(BigInt(insuredRoute.toAmountMin), insuredRoute.toToken.decimals), insuredTokenSymbol: insuredRoute.toToken.symbol, onChange: toggleInsurance }) }));
|
|
29
29
|
};
|
|
30
30
|
exports.InsuranceCollapsed = InsuranceCollapsed;
|
|
@@ -12,7 +12,9 @@ const NFT = ({ imageUrl, isLoading, collectionName, assetName, owner, token, con
|
|
|
12
12
|
if (token) {
|
|
13
13
|
setValue(providers_1.FormKey.ToChain, token.chainId, { shouldTouch: true });
|
|
14
14
|
setValue(providers_1.FormKey.ToToken, token.address, { shouldTouch: true });
|
|
15
|
-
setValue(providers_1.FormKey.ToAmount, token.amount, {
|
|
15
|
+
setValue(providers_1.FormKey.ToAmount, token.amount?.toString(), {
|
|
16
|
+
shouldTouch: true,
|
|
17
|
+
});
|
|
16
18
|
}
|
|
17
19
|
if (contract) {
|
|
18
20
|
setValue(providers_1.FormKey.ToContractAddress, contract.address, {
|
|
@@ -13,7 +13,8 @@ const PoweredBy = () => {
|
|
|
13
13
|
const { hiddenUI } = (0, providers_1.useWidgetConfig)();
|
|
14
14
|
const { pathname } = (0, react_router_dom_1.useLocation)();
|
|
15
15
|
if (pathname.includes(utils_1.navigationRoutes.fromToken) ||
|
|
16
|
-
pathname.includes(utils_1.navigationRoutes.toToken)
|
|
16
|
+
pathname.includes(utils_1.navigationRoutes.toToken) ||
|
|
17
|
+
pathname.includes(utils_1.navigationRoutes.transactionHistory)) {
|
|
17
18
|
return null;
|
|
18
19
|
}
|
|
19
20
|
return ((0, jsx_runtime_1.jsx)(material_1.Box, { px: 3, pt: 1, pb: hiddenUI?.includes(types_1.HiddenUI.PoweredBy) ? 1 : 2, sx: {
|
|
@@ -24,10 +24,10 @@ const RouteCard = ({ route, active, variant = 'default', expanded, ...other }) =
|
|
|
24
24
|
setCardExpanded((expanded) => !expanded);
|
|
25
25
|
};
|
|
26
26
|
const token = subvariant === 'nft'
|
|
27
|
-
? { ...route.fromToken, amount: route.fromAmount }
|
|
28
|
-
: { ...route.toToken, amount: route.toAmount };
|
|
27
|
+
? { ...route.fromToken, amount: BigInt(route.fromAmount) }
|
|
28
|
+
: { ...route.toToken, amount: BigInt(route.toAmount) };
|
|
29
29
|
const RecommendedTagTooltip = route.tags?.[0] === 'RECOMMENDED' ? RecommendedTooltip : react_1.Fragment;
|
|
30
|
-
const cardContent = ((0, jsx_runtime_1.jsxs)(material_1.Box, { flex: 1, children: [subvariant !== 'refuel' && (insurable || route.tags?.length) ? ((0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", alignItems: "center", mb: 2, children: [insurable ? ((0, jsx_runtime_1.jsx)(InsuranceTooltip, { insuredAmount: (0, utils_1.formatTokenAmount)(route.toAmountMin, route.toToken.decimals), insuredTokenSymbol: route.toToken.symbol, children: (0, jsx_runtime_1.jsxs)(Card_1.CardLabel, { type: route.tags?.length && !cardExpanded
|
|
30
|
+
const cardContent = ((0, jsx_runtime_1.jsxs)(material_1.Box, { flex: 1, children: [subvariant !== 'refuel' && (insurable || route.tags?.length) ? ((0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", alignItems: "center", mb: 2, children: [insurable ? ((0, jsx_runtime_1.jsx)(InsuranceTooltip, { insuredAmount: (0, utils_1.formatTokenAmount)(BigInt(route.toAmountMin), route.toToken.decimals), insuredTokenSymbol: route.toToken.symbol, children: (0, jsx_runtime_1.jsxs)(Card_1.CardLabel, { type: route.tags?.length && !cardExpanded
|
|
31
31
|
? 'insurance-icon'
|
|
32
32
|
: 'insurance', children: [(0, jsx_runtime_1.jsx)(VerifiedUser_1.default, { fontSize: "inherit" }), cardExpanded || !route.tags?.length ? ((0, jsx_runtime_1.jsx)(Card_1.CardLabelTypography, { type: "icon", children: t(`main.tags.insurable`) })) : null] }) })) : null, route.tags?.length ? ((0, jsx_runtime_1.jsx)(RecommendedTagTooltip, { children: (0, jsx_runtime_1.jsx)(Card_1.CardLabel, { type: active ? 'active' : undefined, children: (0, jsx_runtime_1.jsx)(Card_1.CardLabelTypography, { children: t(`main.tags.${route.tags[0].toLowerCase()}`) }) }) })) : null] })) : null, (0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", justifyContent: "space-between", alignItems: "start", children: [(0, jsx_runtime_1.jsx)(Token_1.Token, { token: token, step: !cardExpanded ? route.steps[0] : undefined }), !expanded ? ((0, jsx_runtime_1.jsx)(Card_1.CardIconButton, { onClick: handleExpand, size: "small", children: cardExpanded ? (0, jsx_runtime_1.jsx)(ExpandLess_1.default, {}) : (0, jsx_runtime_1.jsx)(ExpandMore_1.default, {}) })) : null] }), (0, jsx_runtime_1.jsx)(material_1.Collapse, { timeout: 225, in: cardExpanded, mountOnEnter: true, unmountOnExit: true, children: route.steps.map((step) => ((0, jsx_runtime_1.jsx)(StepActions_1.StepActions, { step: step, mt: 2 }, step.id))) }), (0, jsx_runtime_1.jsx)(RouteCardEssentials_1.RouteCardEssentials, { route: route })] }));
|
|
33
33
|
return subvariant === 'refuel' || variant === 'cardless' ? (cardContent) : ((0, jsx_runtime_1.jsx)(Card_1.Card, { variant: active ? 'selected' : 'default', selectionColor: "secondary", indented: true, ...other, children: cardContent }));
|
|
@@ -8,6 +8,7 @@ const Layers_1 = require("@mui/icons-material/Layers");
|
|
|
8
8
|
const MonetizationOn_1 = require("@mui/icons-material/MonetizationOn");
|
|
9
9
|
const material_1 = require("@mui/material");
|
|
10
10
|
const react_i18next_1 = require("react-i18next");
|
|
11
|
+
const viem_1 = require("viem");
|
|
11
12
|
const RouteCard_style_1 = require("./RouteCard.style");
|
|
12
13
|
const utils_1 = require("./utils");
|
|
13
14
|
const RouteCardEssentials = ({ route, dense, }) => {
|
|
@@ -18,7 +19,7 @@ const RouteCardEssentials = ({ route, dense, }) => {
|
|
|
18
19
|
const gasCostUSD = parseFloat(route.gasCostUSD ?? '') || 0.01;
|
|
19
20
|
const gasCosts = (0, utils_1.getGasCostsBreakdown)(route);
|
|
20
21
|
const feeCosts = (0, utils_1.getFeeCostsBreakdown)(route, false);
|
|
21
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", justifyContent: 'space-between', flex: 1, mt: 2, children: [(0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: (0, jsx_runtime_1.jsxs)(material_1.Box, { component: "span", children: [t(`tooltip.estimatedNetworkFee`), gasCosts.map((gas, index) => ((0, jsx_runtime_1.jsxs)(material_1.Typography, { fontSize: 12, fontWeight: "500", children: [gas.amount?.toFixed(9),
|
|
22
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", justifyContent: 'space-between', flex: 1, mt: 2, children: [(0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: (0, jsx_runtime_1.jsxs)(material_1.Box, { component: "span", children: [t(`tooltip.estimatedNetworkFee`), gasCosts.map((gas, index) => ((0, jsx_runtime_1.jsxs)(material_1.Typography, { fontSize: 12, fontWeight: "500", children: [parseFloat((0, viem_1.formatUnits)(gas.amount, gas.token.decimals))?.toFixed(9), ' ', gas.token.symbol, " (", t(`format.currency`, { value: gas.amountUSD }), ")"] }, `${gas.token.address}${index}`)))] }), placement: "top", enterDelay: 400, arrow: true, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", alignItems: "center", mr: dense ? 0 : 2, children: [(0, jsx_runtime_1.jsx)(RouteCard_style_1.IconTypography, { children: (0, jsx_runtime_1.jsx)(EvStation_1.default, { fontSize: "small" }) }), (0, jsx_runtime_1.jsx)(material_1.Typography, { fontSize: 14, color: "text.primary", fontWeight: "500", lineHeight: 1, children: t(`format.currency`, { value: gasCostUSD }) })] }) }), (0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: (0, jsx_runtime_1.jsxs)(material_1.Box, { component: "span", children: [t(`tooltip.additionalProviderFee`), feeCosts.map((fee, index) => ((0, jsx_runtime_1.jsxs)(material_1.Typography, { fontSize: 12, fontWeight: "500", children: [parseFloat((0, viem_1.formatUnits)(fee.amount, fee.token.decimals))?.toFixed(9), ' ', fee.token.symbol, " (", t(`format.currency`, { value: fee.amountUSD }), ")"] }, `${fee.token.address}${index}`)))] }), placement: "top", enterDelay: 400, arrow: true, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", alignItems: "center", mr: dense ? 0 : 2, children: [(0, jsx_runtime_1.jsx)(RouteCard_style_1.IconTypography, { children: (0, jsx_runtime_1.jsx)(MonetizationOn_1.default, { fontSize: "small" }) }), (0, jsx_runtime_1.jsx)(material_1.Typography, { fontSize: 14, color: "text.primary", fontWeight: "500", lineHeight: 1, children: t(`format.currency`, {
|
|
22
23
|
value: feeCosts.reduce((sum, feeCost) => sum + feeCost.amountUSD, 0),
|
|
23
24
|
}) })] }) }), (0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: t(`tooltip.estimatedTime`), placement: "top", enterDelay: 400, arrow: true, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", alignItems: "center", mr: dense ? 0 : 2, children: [(0, jsx_runtime_1.jsx)(RouteCard_style_1.IconTypography, { children: (0, jsx_runtime_1.jsx)(AccessTimeFilled_1.default, { fontSize: "small" }) }), (0, jsx_runtime_1.jsx)(material_1.Typography, { fontSize: 14, color: "text.primary", fontWeight: "500", lineHeight: 1, children: t('main.estimatedTime', {
|
|
24
25
|
value: executionTimeMinutes,
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import type { Route, Token } from '@lifi/sdk';
|
|
2
|
-
import Big from 'big.js';
|
|
3
2
|
export declare const getGasCostsBreakdown: (route: Route) => {
|
|
4
|
-
amount:
|
|
3
|
+
amount: bigint;
|
|
5
4
|
amountUSD: number;
|
|
6
5
|
token: Token;
|
|
7
6
|
}[];
|
|
8
7
|
export declare const getFeeCostsBreakdown: (route: Route, included?: boolean) => {
|
|
9
|
-
amount:
|
|
8
|
+
amount: bigint;
|
|
10
9
|
amountUSD: number;
|
|
11
10
|
token: Token;
|
|
12
11
|
}[];
|
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getFeeCostsBreakdown = exports.getGasCostsBreakdown = void 0;
|
|
4
|
-
const big_js_1 = require("big.js");
|
|
5
4
|
const getGasCostsBreakdown = (route) => {
|
|
6
5
|
return Object.values(route.steps.reduce((groupedGasCosts, step) => {
|
|
7
6
|
if (step.estimate.gasCosts?.length) {
|
|
8
7
|
const { token } = step.estimate.gasCosts[0];
|
|
9
|
-
const gasCostAmount = step.estimate.gasCosts
|
|
10
|
-
.reduce((amount, gasCost) => amount.plus((0, big_js_1.default)(gasCost.amount || 0)), (0, big_js_1.default)(0))
|
|
11
|
-
.div(10 ** token.decimals);
|
|
8
|
+
const gasCostAmount = step.estimate.gasCosts.reduce((amount, gasCost) => amount + BigInt(gasCost.amount || 0), 0n);
|
|
12
9
|
const gasCostAmountUSD = step.estimate.gasCosts.reduce((amount, gasCost) => amount + parseFloat(gasCost.amountUSD || '0'), 0);
|
|
13
10
|
const groupedGasCost = groupedGasCosts[token.chainId];
|
|
14
11
|
const amount = groupedGasCost
|
|
15
|
-
? groupedGasCost.amount
|
|
12
|
+
? groupedGasCost.amount + gasCostAmount
|
|
16
13
|
: gasCostAmount;
|
|
17
14
|
const amountUSD = groupedGasCost
|
|
18
15
|
? groupedGasCost.amountUSD + gasCostAmountUSD
|
|
@@ -36,13 +33,11 @@ const getFeeCostsBreakdown = (route, included) => {
|
|
|
36
33
|
}
|
|
37
34
|
if (feeCosts?.length) {
|
|
38
35
|
const { token } = feeCosts[0];
|
|
39
|
-
const feeCostAmount = feeCosts
|
|
40
|
-
.reduce((amount, feeCost) => amount.plus((0, big_js_1.default)(feeCost.amount || 0)), (0, big_js_1.default)(0))
|
|
41
|
-
.div(10 ** token.decimals);
|
|
36
|
+
const feeCostAmount = feeCosts.reduce((amount, feeCost) => amount + BigInt(feeCost.amount || 0), 0n);
|
|
42
37
|
const feeCostAmountUSD = feeCosts.reduce((amount, feeCost) => amount + parseFloat(feeCost.amountUSD || '0'), 0);
|
|
43
38
|
const groupedFeeCost = groupedFeeCosts[token.chainId];
|
|
44
39
|
const amount = groupedFeeCost
|
|
45
|
-
? groupedFeeCost.amount
|
|
40
|
+
? groupedFeeCost.amount + feeCostAmount
|
|
46
41
|
: feeCostAmount;
|
|
47
42
|
const amountUSD = groupedFeeCost
|
|
48
43
|
? groupedFeeCost.amountUSD + feeCostAmountUSD
|
|
@@ -2,27 +2,38 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SendToWalletFormHelperText = exports.SendToWallet = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const address_1 = require("@ethersproject/address");
|
|
6
5
|
const material_1 = require("@mui/material");
|
|
6
|
+
const core_1 = require("@wagmi/core");
|
|
7
7
|
const react_1 = require("react");
|
|
8
8
|
const react_hook_form_1 = require("react-hook-form");
|
|
9
9
|
const react_i18next_1 = require("react-i18next");
|
|
10
|
+
const viem_1 = require("viem");
|
|
11
|
+
const ens_1 = require("viem/ens");
|
|
12
|
+
const wagmi_1 = require("wagmi");
|
|
13
|
+
const hooks_1 = require("../../hooks");
|
|
10
14
|
const providers_1 = require("../../providers");
|
|
11
15
|
const stores_1 = require("../../stores");
|
|
12
16
|
const types_1 = require("../../types");
|
|
17
|
+
const utils_1 = require("../../utils");
|
|
13
18
|
const Card_1 = require("../Card");
|
|
14
19
|
const SendToWallet_style_1 = require("./SendToWallet.style");
|
|
15
20
|
exports.SendToWallet = (0, react_1.forwardRef)((props, ref) => {
|
|
16
21
|
const { t } = (0, react_i18next_1.useTranslation)();
|
|
17
22
|
const { trigger, getValues, setValue, clearErrors } = (0, react_hook_form_1.useFormContext)();
|
|
18
|
-
const { account } = (0,
|
|
19
|
-
const
|
|
20
|
-
const {
|
|
23
|
+
const { account } = (0, hooks_1.useAccount)();
|
|
24
|
+
const config = (0, wagmi_1.useConfig)();
|
|
25
|
+
const { disabledUI, hiddenUI, toAddress } = (0, providers_1.useWidgetConfig)();
|
|
26
|
+
const { showSendToWallet, showSendToWalletDirty } = (0, stores_1.useSendToWalletStore)();
|
|
21
27
|
const { showDestinationWallet } = (0, stores_1.useSettings)(['showDestinationWallet']);
|
|
22
28
|
const hiddenToAddress = hiddenUI?.includes(types_1.HiddenUI.ToAddress);
|
|
23
29
|
const disabledToAddress = disabledUI?.includes(types_1.DisabledUI.ToAddress);
|
|
24
|
-
const requiredToAddress =
|
|
30
|
+
const requiredToAddress = (0, hooks_1.useRequiredToAddress)();
|
|
25
31
|
const requiredToAddressRef = (0, react_1.useRef)(requiredToAddress);
|
|
32
|
+
// We want to show toAddress field if it is set via widget configuration and not hidden
|
|
33
|
+
const showInstantly = Boolean(!showSendToWalletDirty &&
|
|
34
|
+
showDestinationWallet &&
|
|
35
|
+
toAddress &&
|
|
36
|
+
!hiddenToAddress) || requiredToAddress;
|
|
26
37
|
const { field: { onChange, onBlur, name, value }, } = (0, react_hook_form_1.useController)({
|
|
27
38
|
name: providers_1.FormKey.ToAddress,
|
|
28
39
|
rules: {
|
|
@@ -32,30 +43,22 @@ exports.SendToWallet = (0, react_1.forwardRef)((props, ref) => {
|
|
|
32
43
|
},
|
|
33
44
|
validate: async (value) => {
|
|
34
45
|
try {
|
|
35
|
-
if (!value) {
|
|
46
|
+
if (!value || (0, viem_1.isAddress)(value) || (0, utils_1.isSVMAddress)(value)) {
|
|
36
47
|
return true;
|
|
37
48
|
}
|
|
38
|
-
const address = await
|
|
39
|
-
|
|
40
|
-
|
|
49
|
+
const address = await (0, core_1.getEnsAddress)(config, {
|
|
50
|
+
chainId: getValues(providers_1.FormKey.ToChain),
|
|
51
|
+
name: (0, ens_1.normalize)(value),
|
|
52
|
+
});
|
|
53
|
+
return Boolean(address);
|
|
41
54
|
}
|
|
42
|
-
catch {
|
|
55
|
+
catch (error) {
|
|
43
56
|
return t('error.title.walletEnsAddressInvalid');
|
|
44
57
|
}
|
|
45
58
|
},
|
|
46
59
|
onBlur: () => trigger(providers_1.FormKey.ToAddress),
|
|
47
60
|
},
|
|
48
61
|
});
|
|
49
|
-
// We want to show toAddress field if it is set via widget configuration and not hidden
|
|
50
|
-
const showInstantly = Boolean(!showSendToWalletDirty &&
|
|
51
|
-
showDestinationWallet &&
|
|
52
|
-
toAddress &&
|
|
53
|
-
!hiddenToAddress) || requiredToAddress;
|
|
54
|
-
(0, react_1.useEffect)(() => {
|
|
55
|
-
if (showInstantly) {
|
|
56
|
-
setSendToWallet(true);
|
|
57
|
-
}
|
|
58
|
-
}, [showInstantly, setSendToWallet]);
|
|
59
62
|
(0, react_1.useEffect)(() => {
|
|
60
63
|
const value = getValues(providers_1.FormKey.ToAddress);
|
|
61
64
|
if (value) {
|
|
@@ -67,7 +70,7 @@ exports.SendToWallet = (0, react_1.forwardRef)((props, ref) => {
|
|
|
67
70
|
trigger(providers_1.FormKey.ToAddress).then(() => clearErrors(providers_1.FormKey.ToAddress));
|
|
68
71
|
}
|
|
69
72
|
}, [account.chainId, clearErrors, getValues, requiredToAddress, trigger]);
|
|
70
|
-
if (hiddenToAddress) {
|
|
73
|
+
if (hiddenToAddress && !requiredToAddress) {
|
|
71
74
|
return null;
|
|
72
75
|
}
|
|
73
76
|
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.jsxs)(Card_1.Card, { ...props, ref: ref, children: [(0, jsx_runtime_1.jsx)(Card_1.CardTitle, { required: requiredToAddress, children: t('main.sendToWallet') }), (0, jsx_runtime_1.jsxs)(SendToWallet_style_1.FormControl, { fullWidth: true, sx: { paddingTop: '6px', paddingBottom: '5px' }, children: [(0, jsx_runtime_1.jsx)(SendToWallet_style_1.Input, { size: "small", autoComplete: "off", autoCorrect: "off", autoCapitalize: "off", spellCheck: "false", onChange: onChange, onBlur: onBlur, name: name, value: value, placeholder: t('main.walletAddressOrEns'), disabled: Boolean(toAddress && disabledToAddress) }), (0, jsx_runtime_1.jsx)(exports.SendToWalletFormHelperText, {})] })] }) }));
|