@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
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const SettingsList: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
3
|
+
ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
|
|
4
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
5
|
+
export declare const SummaryTitleContainer: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
6
|
+
ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
|
|
7
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
8
|
+
export declare const SummaryRowContainer: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
9
|
+
ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
|
|
10
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
11
|
+
export declare const SummaryRowButton: import("@emotion/styled").StyledComponent<import("@mui/material").ButtonBaseOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
12
|
+
ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
|
|
13
|
+
}, "className" | "style" | "classes" | "action" | "centerRipple" | "children" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "tabIndex" | "TouchRippleProps" | "touchRippleRef"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
14
|
+
export declare const SummaryValue: import("@emotion/styled").StyledComponent<import("@mui/material").TypographyOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
15
|
+
ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
|
|
16
|
+
}, "className" | "style" | "classes" | "children" | "sx" | "p" | "color" | "border" | "boxShadow" | "fontWeight" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
17
|
+
export declare const Badge: import("@emotion/styled").StyledComponent<import("@mui/material").BadgeOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
18
|
+
ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
|
|
19
|
+
}, "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>, {}, {}>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Badge = exports.SummaryValue = exports.SummaryRowButton = exports.SummaryRowContainer = exports.SummaryTitleContainer = exports.SettingsList = 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
|
+
exports.SettingsList = (0, styles_1.styled)(material_1.Box)(({ theme }) => ({
|
|
8
|
+
display: 'flex',
|
|
9
|
+
flexDirection: 'column',
|
|
10
|
+
gap: theme.spacing(1),
|
|
11
|
+
padding: theme.spacing(1, 3, 2),
|
|
12
|
+
}));
|
|
13
|
+
exports.SummaryTitleContainer = (0, styles_1.styled)(material_1.Box)(({ theme }) => ({
|
|
14
|
+
display: 'flex',
|
|
15
|
+
alignItems: 'center',
|
|
16
|
+
gap: theme.spacing(1.5),
|
|
17
|
+
}));
|
|
18
|
+
exports.SummaryRowContainer = (0, styles_1.styled)(material_1.Box)({
|
|
19
|
+
display: 'flex',
|
|
20
|
+
width: '100%',
|
|
21
|
+
justifyContent: 'space-between',
|
|
22
|
+
alignItems: 'center',
|
|
23
|
+
});
|
|
24
|
+
exports.SummaryRowButton = (0, styles_1.styled)(material_1.ButtonBase)({
|
|
25
|
+
background: 'none',
|
|
26
|
+
color: 'inherit',
|
|
27
|
+
border: 'none',
|
|
28
|
+
padding: 0,
|
|
29
|
+
font: 'inherit',
|
|
30
|
+
cursor: 'pointer',
|
|
31
|
+
outline: 'inherit',
|
|
32
|
+
display: 'flex',
|
|
33
|
+
width: '100%',
|
|
34
|
+
justifyContent: 'space-between',
|
|
35
|
+
alignItems: 'center',
|
|
36
|
+
});
|
|
37
|
+
exports.SummaryValue = (0, styles_1.styled)(material_1.Typography)({
|
|
38
|
+
lineHeight: '1.25',
|
|
39
|
+
fontWeight: 500,
|
|
40
|
+
});
|
|
41
|
+
exports.Badge = (0, styles_1.styled)(material_1.Badge)(({ theme }) => ({
|
|
42
|
+
display: 'flex',
|
|
43
|
+
alignItems: 'center',
|
|
44
|
+
gap: theme.spacing(1.25),
|
|
45
|
+
[`.${Badge_1.badgeClasses.badge}`]: {
|
|
46
|
+
width: 10,
|
|
47
|
+
height: 10,
|
|
48
|
+
// the following removes MUI styling so we can position the badge with flex
|
|
49
|
+
position: 'relative',
|
|
50
|
+
transform: 'translateX(0)',
|
|
51
|
+
borderRadius: '50%',
|
|
52
|
+
},
|
|
53
|
+
}));
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { MouseEventHandler, PropsWithChildren } from 'react';
|
|
2
|
+
import type { SettingCardTitle } from './types';
|
|
3
|
+
interface SettingCardButtonProps extends SettingCardTitle {
|
|
4
|
+
onClick: MouseEventHandler;
|
|
5
|
+
}
|
|
6
|
+
export declare const SettingCardButton: React.FC<PropsWithChildren<SettingCardButtonProps>>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SettingCardButton = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const SettingCard_1 = require("./SettingCard");
|
|
6
|
+
const SettingCard_style_1 = require("./SettingCard.style");
|
|
7
|
+
const SettingCardButton = ({ onClick, icon, title, children }) => ((0, jsx_runtime_1.jsx)(SettingCard_1.SettingCard, { children: (0, jsx_runtime_1.jsxs)(SettingCard_style_1.SummaryRowButton, { onClick: onClick, disableRipple: true, children: [(0, jsx_runtime_1.jsxs)(SettingCard_style_1.SummaryTitleContainer, { children: [icon, (0, jsx_runtime_1.jsx)(SettingCard_style_1.SummaryValue, { children: title })] }), children] }) }));
|
|
8
|
+
exports.SettingCardButton = SettingCardButton;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { PropsWithChildren, ReactNode } from 'react';
|
|
2
|
+
import type { SettingCardTitle } from './types';
|
|
3
|
+
interface SettingCardExpandableProps extends SettingCardTitle {
|
|
4
|
+
value: ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export declare const SettingCardExpandable: React.FC<PropsWithChildren<SettingCardExpandableProps>>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SettingCardExpandable = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const material_1 = require("@mui/material");
|
|
7
|
+
const SettingCard_1 = require("./SettingCard");
|
|
8
|
+
const SettingCard_style_1 = require("./SettingCard.style");
|
|
9
|
+
const SettingsAccordian_1 = require("./SettingsAccordian");
|
|
10
|
+
const SettingCardExpandable = ({ icon, title, value, children }) => {
|
|
11
|
+
const { expanded, toggleExpanded } = (0, SettingsAccordian_1.useSettingsCardExpandable)();
|
|
12
|
+
const buttonId = (0, react_1.useId)();
|
|
13
|
+
const collapseId = (0, react_1.useId)();
|
|
14
|
+
return ((0, jsx_runtime_1.jsxs)(SettingCard_1.SettingCard, { children: [(0, jsx_runtime_1.jsxs)(SettingCard_style_1.SummaryRowButton, { id: buttonId, "aria-expanded": expanded, "aria-controls": collapseId, onClick: toggleExpanded, disableRipple: true, children: [(0, jsx_runtime_1.jsxs)(SettingCard_style_1.SummaryTitleContainer, { children: [icon, (0, jsx_runtime_1.jsx)(SettingCard_style_1.SummaryValue, { children: title })] }), !expanded && value] }), (0, jsx_runtime_1.jsx)(material_1.Collapse, { id: collapseId, role: "region", "aria-labelledby": buttonId, in: expanded, children: children })] }));
|
|
15
|
+
};
|
|
16
|
+
exports.SettingCardExpandable = SettingCardExpandable;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useSettingsCardExpandable = exports.SettingsCardAccordion = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const SettingsAccordionContext = (0, react_1.createContext)({
|
|
7
|
+
setOpenCard: (id) => { },
|
|
8
|
+
openCard: '',
|
|
9
|
+
});
|
|
10
|
+
const SettingsCardAccordion = ({ children, }) => {
|
|
11
|
+
const [openCard, setOpenCard] = (0, react_1.useState)('');
|
|
12
|
+
return ((0, jsx_runtime_1.jsx)(SettingsAccordionContext.Provider, { value: { openCard, setOpenCard }, children: children }));
|
|
13
|
+
};
|
|
14
|
+
exports.SettingsCardAccordion = SettingsCardAccordion;
|
|
15
|
+
const useSettingsCardExpandable = () => {
|
|
16
|
+
const settingCardExpandableId = (0, react_1.useId)();
|
|
17
|
+
const [expanded, setExpanded] = (0, react_1.useState)(false);
|
|
18
|
+
const { openCard, setOpenCard } = (0, react_1.useContext)(SettingsAccordionContext);
|
|
19
|
+
const toggleExpanded = () => {
|
|
20
|
+
const newExpanded = !expanded;
|
|
21
|
+
setExpanded(newExpanded);
|
|
22
|
+
if (newExpanded && openCard !== settingCardExpandableId) {
|
|
23
|
+
setOpenCard(settingCardExpandableId);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
(0, react_1.useEffect)(() => {
|
|
27
|
+
if (openCard !== settingCardExpandableId) {
|
|
28
|
+
setExpanded(false);
|
|
29
|
+
}
|
|
30
|
+
}, [settingCardExpandableId, openCard]);
|
|
31
|
+
return {
|
|
32
|
+
expanded,
|
|
33
|
+
toggleExpanded,
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
exports.useSettingsCardExpandable = useSettingsCardExpandable;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./SettingCard"), exports);
|
|
18
|
+
__exportStar(require("./SettingCard.style"), exports);
|
|
19
|
+
__exportStar(require("./SettingCardButton"), exports);
|
|
20
|
+
__exportStar(require("./SettingCardExpandable"), exports);
|
|
21
|
+
__exportStar(require("./BadgedValue"), exports);
|
|
22
|
+
__exportStar(require("./SettingsAccordian"), exports);
|
|
@@ -3,15 +3,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.SettingsPage = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const material_1 = require("@mui/material");
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const GasPriceSelect_1 = require("./GasPriceSelect");
|
|
9
|
-
const LanguageSelect_1 = require("./LanguageSelect");
|
|
6
|
+
const BridgeAndExchangeSettings_1 = require("./BridgeAndExchangeSettings");
|
|
7
|
+
const LanguageSetting_1 = require("./LanguageSetting");
|
|
10
8
|
const ResetSettingsButton_1 = require("./ResetSettingsButton");
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
9
|
+
const SendToWalletOptionSetting_1 = require("./SendToWalletOptionSetting");
|
|
10
|
+
const GasPriceSettings_1 = require("./GasPriceSettings");
|
|
11
|
+
const RoutePrioritySettings_1 = require("./RoutePrioritySettings");
|
|
12
|
+
const ThemeSettings_1 = require("./ThemeSettings");
|
|
13
|
+
const SlippageSettings_1 = require("./SlippageSettings");
|
|
14
|
+
const SettingsCard_1 = require("./SettingsCard");
|
|
14
15
|
const SettingsPage = () => {
|
|
15
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Container, { disableGutters: true, children: [(0, jsx_runtime_1.
|
|
16
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Container, { disableGutters: true, children: [(0, jsx_runtime_1.jsx)(SettingsCard_1.SettingsList, { children: (0, jsx_runtime_1.jsxs)(SettingsCard_1.SettingsCardAccordion, { children: [(0, jsx_runtime_1.jsx)(ThemeSettings_1.ThemeSettings, {}), (0, jsx_runtime_1.jsx)(LanguageSetting_1.LanguageSetting, {}), (0, jsx_runtime_1.jsx)(RoutePrioritySettings_1.RoutePrioritySettings, {}), (0, jsx_runtime_1.jsx)(GasPriceSettings_1.GasPriceSettings, {}), (0, jsx_runtime_1.jsx)(SlippageSettings_1.SlippageSettings, {}), (0, jsx_runtime_1.jsx)(BridgeAndExchangeSettings_1.BridgeAndExchangeSettings, { type: "Bridges" }), (0, jsx_runtime_1.jsx)(BridgeAndExchangeSettings_1.BridgeAndExchangeSettings, { type: "Exchanges" }), (0, jsx_runtime_1.jsx)(SendToWalletOptionSetting_1.SendToWalletOptionSetting, {})] }) }), (0, jsx_runtime_1.jsx)(ResetSettingsButton_1.ResetSettingsButton, {})] }));
|
|
16
17
|
};
|
|
17
18
|
exports.SettingsPage = SettingsPage;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SlippageSettings = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const react_i18next_1 = require("react-i18next");
|
|
7
|
+
const Percent_1 = require("@mui/icons-material/Percent");
|
|
8
|
+
const stores_1 = require("../../../stores");
|
|
9
|
+
const hooks_1 = require("../../../hooks");
|
|
10
|
+
const utils_1 = require("../../../utils");
|
|
11
|
+
const SlippageSettings_style_1 = require("./SlippageSettings.style");
|
|
12
|
+
const material_1 = require("@mui/material");
|
|
13
|
+
const SettingsCard_1 = require("../SettingsCard");
|
|
14
|
+
const WarningRounded_1 = require("@mui/icons-material/WarningRounded");
|
|
15
|
+
const slippageDefault = '0.5';
|
|
16
|
+
const SlippageSettings = () => {
|
|
17
|
+
const { t } = (0, react_i18next_1.useTranslation)();
|
|
18
|
+
const { isSlippageOutsideRecommendedLimits, isSlippageChanged } = (0, hooks_1.useSettingMonitor)();
|
|
19
|
+
const { slippage } = (0, stores_1.useSettings)(['slippage']);
|
|
20
|
+
const setValue = (0, stores_1.useSettingsStore)((state) => state.setValue);
|
|
21
|
+
const defaultValue = (0, react_1.useRef)(slippage);
|
|
22
|
+
const [focused, setFocused] = (0, react_1.useState)();
|
|
23
|
+
const handleDefaultClick = () => {
|
|
24
|
+
setValue('slippage', (0, utils_1.formatSlippage)(slippageDefault, defaultValue.current));
|
|
25
|
+
};
|
|
26
|
+
const handleInputUpdate = (event) => {
|
|
27
|
+
const { value } = event.target;
|
|
28
|
+
setValue('slippage', (0, utils_1.formatSlippage)(value || slippageDefault, defaultValue.current, true));
|
|
29
|
+
};
|
|
30
|
+
const handleInputBlur = (event) => {
|
|
31
|
+
setFocused(undefined);
|
|
32
|
+
const { value } = event.target;
|
|
33
|
+
setValue('slippage', (0, utils_1.formatSlippage)(value || slippageDefault, defaultValue.current));
|
|
34
|
+
};
|
|
35
|
+
const customInputValue = !slippage || slippage === slippageDefault ? '' : slippage;
|
|
36
|
+
const badgeColor = isSlippageOutsideRecommendedLimits
|
|
37
|
+
? 'warning'
|
|
38
|
+
: isSlippageChanged
|
|
39
|
+
? 'info'
|
|
40
|
+
: undefined;
|
|
41
|
+
return ((0, jsx_runtime_1.jsx)(SettingsCard_1.SettingCardExpandable, { value: (0, jsx_runtime_1.jsx)(SettingsCard_1.BadgedValue, { badgeColor: badgeColor, showBadge: !!badgeColor, children: `${slippage}%` }), icon: (0, jsx_runtime_1.jsx)(Percent_1.default, {}), title: t(`settings.slippage`), children: (0, jsx_runtime_1.jsxs)(material_1.Box, { mt: 1.5, children: [(0, jsx_runtime_1.jsxs)(SlippageSettings_style_1.SettingsFieldSet, { children: [(0, jsx_runtime_1.jsx)(SlippageSettings_style_1.SlippageDefaultButton, { selected: slippageDefault === slippage && focused !== 'input', onFocus: () => {
|
|
42
|
+
setFocused('button');
|
|
43
|
+
}, onBlur: () => {
|
|
44
|
+
setFocused(undefined);
|
|
45
|
+
}, onClick: handleDefaultClick, disableRipple: true, children: slippageDefault }), (0, jsx_runtime_1.jsx)(SlippageSettings_style_1.SlippageCustomInput, { selected: slippageDefault !== slippage && focused !== 'button', placeholder: focused === 'input' ? '' : t('settings.custom'), inputProps: {
|
|
46
|
+
inputMode: 'decimal',
|
|
47
|
+
}, onChange: handleInputUpdate, onFocus: () => {
|
|
48
|
+
setFocused('input');
|
|
49
|
+
}, onBlur: handleInputBlur, value: customInputValue, autoComplete: "off" })] }), isSlippageOutsideRecommendedLimits && ((0, jsx_runtime_1.jsxs)(SlippageSettings_style_1.SlippageLimitsWarningContainer, { children: [(0, jsx_runtime_1.jsx)(WarningRounded_1.default, { color: "warning" }), (0, jsx_runtime_1.jsx)(material_1.Typography, { fontSize: 13, fontWeight: 400, children: t('warning.message.slippageOutsideRecommendedLimits') })] }))] }) }));
|
|
50
|
+
};
|
|
51
|
+
exports.SlippageSettings = SlippageSettings;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { Theme } from '@mui/material';
|
|
3
|
+
export declare const SettingsFieldSet: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
4
|
+
ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
|
|
5
|
+
}, keyof import("@mui/system").BoxOwnProps<Theme>> & import("@mui/system").MUIStyledCommonProps<Theme>, {}, {}>;
|
|
6
|
+
interface SlippageDefaultProps {
|
|
7
|
+
selected?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const SlippageDefaultButton: import("@emotion/styled").StyledComponent<import("@mui/material").ButtonBaseOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
10
|
+
ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
|
|
11
|
+
}, "className" | "style" | "classes" | "action" | "centerRipple" | "children" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "tabIndex" | "TouchRippleProps" | "touchRippleRef"> & import("@mui/system").MUIStyledCommonProps<Theme> & SlippageDefaultProps, {}, {}>;
|
|
12
|
+
export declare const SlippageCustomInput: import("@emotion/styled").StyledComponent<import("@mui/material").InputBaseProps & import("@mui/system").MUIStyledCommonProps<Theme> & SlippageDefaultProps, {}, {}>;
|
|
13
|
+
export declare const SlippageLimitsWarningContainer: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
14
|
+
ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
|
|
15
|
+
}, keyof import("@mui/system").BoxOwnProps<Theme>> & import("@mui/system").MUIStyledCommonProps<Theme>, {}, {}>;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SlippageLimitsWarningContainer = exports.SlippageCustomInput = exports.SlippageDefaultButton = exports.SettingsFieldSet = void 0;
|
|
4
|
+
const styles_1 = require("@mui/material/styles");
|
|
5
|
+
const material_1 = require("@mui/material");
|
|
6
|
+
const InputBase_1 = require("@mui/material/InputBase");
|
|
7
|
+
const utils_1 = require("../../../utils");
|
|
8
|
+
exports.SettingsFieldSet = (0, styles_1.styled)(material_1.Box)(({ theme }) => ({
|
|
9
|
+
display: 'flex',
|
|
10
|
+
backgroundColor: (0, utils_1.getCardFieldsetBackgroundColor)(theme),
|
|
11
|
+
borderRadius: Math.max(theme.shape.borderRadius, theme.shape.borderRadiusSecondary),
|
|
12
|
+
padding: theme.spacing(0.5),
|
|
13
|
+
gap: theme.spacing(0.5),
|
|
14
|
+
height: '3.5rem',
|
|
15
|
+
}));
|
|
16
|
+
const slippageControlSelected = (theme) => ({
|
|
17
|
+
backgroundColor: theme.palette.mode === 'dark'
|
|
18
|
+
? theme.palette.background.default
|
|
19
|
+
: theme.palette.common.white,
|
|
20
|
+
borderRadius: theme.shape.borderRadiusSecondary,
|
|
21
|
+
boxShadow: `0px 2px 4px ${(0, styles_1.alpha)(theme.palette.common.black, 0.04)}`,
|
|
22
|
+
});
|
|
23
|
+
exports.SlippageDefaultButton = (0, styles_1.styled)(material_1.ButtonBase)(({ theme, selected, }) => {
|
|
24
|
+
const selectedStyle = selected
|
|
25
|
+
? {
|
|
26
|
+
'&:not(:focus)': {
|
|
27
|
+
...slippageControlSelected(theme),
|
|
28
|
+
},
|
|
29
|
+
}
|
|
30
|
+
: {};
|
|
31
|
+
return {
|
|
32
|
+
height: '100%',
|
|
33
|
+
width: '100%',
|
|
34
|
+
fontSize: '1rem',
|
|
35
|
+
fontWeight: 700,
|
|
36
|
+
'&:focus': {
|
|
37
|
+
...slippageControlSelected(theme),
|
|
38
|
+
},
|
|
39
|
+
...selectedStyle,
|
|
40
|
+
};
|
|
41
|
+
});
|
|
42
|
+
exports.SlippageCustomInput = (0, styles_1.styled)(material_1.InputBase)(({ theme, selected, }) => {
|
|
43
|
+
const selectedStyle = selected
|
|
44
|
+
? {
|
|
45
|
+
'&:not(:focus)': {
|
|
46
|
+
...slippageControlSelected(theme),
|
|
47
|
+
},
|
|
48
|
+
}
|
|
49
|
+
: {};
|
|
50
|
+
return {
|
|
51
|
+
height: '100%',
|
|
52
|
+
width: '100%',
|
|
53
|
+
[`.${InputBase_1.inputBaseClasses.input}`]: {
|
|
54
|
+
height: '100%',
|
|
55
|
+
width: '100%',
|
|
56
|
+
padding: 0,
|
|
57
|
+
textAlign: 'center',
|
|
58
|
+
'&::placeholder': {
|
|
59
|
+
fontSize: '1rem',
|
|
60
|
+
fontWeight: 700,
|
|
61
|
+
opacity: 1,
|
|
62
|
+
},
|
|
63
|
+
'&:focus': {
|
|
64
|
+
...slippageControlSelected(theme),
|
|
65
|
+
},
|
|
66
|
+
...selectedStyle,
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
});
|
|
70
|
+
exports.SlippageLimitsWarningContainer = (0, styles_1.styled)(material_1.Box)(({ theme }) => ({
|
|
71
|
+
display: 'flex',
|
|
72
|
+
gap: theme.spacing(1.25),
|
|
73
|
+
marginTop: theme.spacing(1.5),
|
|
74
|
+
}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './SlippageSettings';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./SlippageSettings"), exports);
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ThemeSettings = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const types_1 = require("../../types");
|
|
6
|
+
const providers_1 = require("../../providers");
|
|
7
|
+
const LightMode_1 = require("@mui/icons-material/LightMode");
|
|
8
|
+
const BrightnessAuto_1 = require("@mui/icons-material/BrightnessAuto");
|
|
9
|
+
const Nightlight_1 = require("@mui/icons-material/Nightlight");
|
|
10
|
+
const material_1 = require("@mui/material");
|
|
11
|
+
const react_i18next_1 = require("react-i18next");
|
|
12
|
+
const stores_1 = require("../../stores");
|
|
13
|
+
const SettingsCard_1 = require("./SettingsCard");
|
|
14
|
+
const Tabs_1 = require("../../components/Tabs");
|
|
15
|
+
const themeIcons = {
|
|
16
|
+
light: LightMode_1.default,
|
|
17
|
+
dark: Nightlight_1.default,
|
|
18
|
+
auto: BrightnessAuto_1.default,
|
|
19
|
+
};
|
|
20
|
+
// If the Tab is not the direct child of the Tabs component you can loose the switching
|
|
21
|
+
// The component passes the props to the Tab component so switching isn't lost
|
|
22
|
+
const ThemeTab = ({ title, value, Icon, ...props }) => ((0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: title, arrow: true, children: (0, jsx_runtime_1.jsx)(Tabs_1.Tab, { icon: Icon, value: value, ...props, disableRipple: true }) }));
|
|
23
|
+
const ThemeSettings = () => {
|
|
24
|
+
const { t } = (0, react_i18next_1.useTranslation)();
|
|
25
|
+
const [appearance, setAppearance] = (0, stores_1.useAppearance)();
|
|
26
|
+
const { hiddenUI } = (0, providers_1.useWidgetConfig)();
|
|
27
|
+
if (hiddenUI?.includes(types_1.HiddenUI.Appearance)) {
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
const ThemeIcon = themeIcons[appearance];
|
|
31
|
+
const handleThemeChange = (_, appearance) => {
|
|
32
|
+
setAppearance(appearance);
|
|
33
|
+
};
|
|
34
|
+
return ((0, jsx_runtime_1.jsx)(SettingsCard_1.SettingCardExpandable, { value: (0, jsx_runtime_1.jsxs)(SettingsCard_1.SummaryValue, { children: [t(`button.${appearance}`), " "] }), icon: (0, jsx_runtime_1.jsx)(ThemeIcon, {}), title: t('settings.theme'), children: (0, jsx_runtime_1.jsx)(Tabs_1.Tabs, { value: appearance, "aria-label": "tabs", indicatorColor: "primary", onChange: handleThemeChange, sx: { mt: 1.5 }, children: Object.entries(themeIcons).map(([theme, Icon]) => {
|
|
35
|
+
const supportedThemeOption = theme;
|
|
36
|
+
return ((0, jsx_runtime_1.jsx)(ThemeTab, { title: t(`button.${supportedThemeOption}`), value: supportedThemeOption, Icon: (0, jsx_runtime_1.jsx)(Icon, {}) }, supportedThemeOption));
|
|
37
|
+
}) }) }));
|
|
38
|
+
};
|
|
39
|
+
exports.ThemeSettings = ThemeSettings;
|
|
@@ -10,14 +10,14 @@ const ContactSupportButton = ({ supportId, }) => {
|
|
|
10
10
|
const { t } = (0, react_i18next_1.useTranslation)();
|
|
11
11
|
const widgetEvents = (0, hooks_1.useWidgetEvents)();
|
|
12
12
|
const handleClick = () => {
|
|
13
|
-
if (!widgetEvents.all.has(events_1.WidgetEvent.
|
|
13
|
+
if (!widgetEvents.all.has(events_1.WidgetEvent.ContactSupport)) {
|
|
14
14
|
const url = 'https://discord.gg/lifi';
|
|
15
15
|
const target = '_blank';
|
|
16
16
|
const rel = 'nofollow noreferrer';
|
|
17
17
|
window.open(url, target, rel);
|
|
18
18
|
}
|
|
19
19
|
else {
|
|
20
|
-
widgetEvents.emit(events_1.WidgetEvent.
|
|
20
|
+
widgetEvents.emit(events_1.WidgetEvent.ContactSupport, { supportId });
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
23
|
return ((0, jsx_runtime_1.jsx)(material_1.Button, { onClick: handleClick, fullWidth: true, children: t('button.contactSupport') }));
|
|
@@ -3,64 +3,69 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.TransactionDetailsPage = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const ContentCopyRounded_1 = require("@mui/icons-material/ContentCopyRounded");
|
|
6
|
-
const DeleteOutline_1 = require("@mui/icons-material/DeleteOutline");
|
|
7
6
|
const material_1 = require("@mui/material");
|
|
8
7
|
const react_1 = require("react");
|
|
9
8
|
const react_i18next_1 = require("react-i18next");
|
|
10
9
|
const react_router_dom_1 = require("react-router-dom");
|
|
11
|
-
const shallow_1 = require("zustand/shallow");
|
|
12
10
|
const Card_1 = require("../../components/Card");
|
|
13
11
|
const ContractComponent_1 = require("../../components/ContractComponent");
|
|
14
|
-
const Dialog_1 = require("../../components/Dialog");
|
|
15
12
|
const Insurance_1 = require("../../components/Insurance");
|
|
16
13
|
const Step_1 = require("../../components/Step");
|
|
17
14
|
const hooks_1 = require("../../hooks");
|
|
18
15
|
const providers_1 = require("../../providers");
|
|
19
16
|
const stores_1 = require("../../stores");
|
|
20
17
|
const utils_1 = require("../../utils");
|
|
18
|
+
const converters_1 = require("../../utils/converters");
|
|
21
19
|
const ContactSupportButton_1 = require("./ContactSupportButton");
|
|
22
20
|
const TransactionDetailsPage_style_1 = require("./TransactionDetailsPage.style");
|
|
21
|
+
const TransactionDetailsSkeleton_1 = require("./TransactionDetailsSkeleton");
|
|
23
22
|
const TransactionDetailsPage = () => {
|
|
24
23
|
const { t, i18n } = (0, react_i18next_1.useTranslation)();
|
|
25
|
-
const {
|
|
24
|
+
const { navigate } = (0, hooks_1.useNavigateBack)();
|
|
26
25
|
const { subvariant, contractComponent, contractSecondaryComponent } = (0, providers_1.useWidgetConfig)();
|
|
27
26
|
const { state } = (0, react_router_dom_1.useLocation)();
|
|
28
|
-
const
|
|
29
|
-
const
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
const handleDeleteRoute = () => {
|
|
35
|
-
navigateBack();
|
|
36
|
-
if (routeExecution) {
|
|
37
|
-
deleteRoute(routeExecution.route.id);
|
|
27
|
+
const { tools } = (0, hooks_1.useTools)();
|
|
28
|
+
const storedRouteExecution = (0, stores_1.useRouteExecutionStore)((store) => store.routes[state?.routeId]);
|
|
29
|
+
const { transaction, isLoading } = (0, hooks_1.useTransactionDetails)(state?.transactionHash);
|
|
30
|
+
const routeExecution = (0, react_1.useMemo)(() => {
|
|
31
|
+
if (storedRouteExecution) {
|
|
32
|
+
return storedRouteExecution;
|
|
38
33
|
}
|
|
34
|
+
if (isLoading) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
if (transaction) {
|
|
38
|
+
const routeExecution = (0, converters_1.buildRouteFromTxHistory)(transaction, tools);
|
|
39
|
+
return routeExecution;
|
|
40
|
+
}
|
|
41
|
+
}, [isLoading, storedRouteExecution, tools, transaction]);
|
|
42
|
+
(0, react_1.useEffect)(() => {
|
|
43
|
+
if (!isLoading && !routeExecution) {
|
|
44
|
+
navigate(utils_1.navigationRoutes.home);
|
|
45
|
+
}
|
|
46
|
+
}, [isLoading, navigate, routeExecution]);
|
|
47
|
+
const copySupportId = async () => {
|
|
48
|
+
await navigator.clipboard.writeText(supportId);
|
|
39
49
|
};
|
|
40
|
-
const sourceTxHash = routeExecution?.route
|
|
41
|
-
.filter((process) => process.type !== 'TOKEN_ALLOWANCE')
|
|
42
|
-
.find((process) => process.txHash)?.txHash;
|
|
50
|
+
const sourceTxHash = (0, stores_1.getSourceTxHash)(routeExecution?.route);
|
|
43
51
|
const insuranceCoverageId = sourceTxHash ?? routeExecution?.route.fromAddress;
|
|
44
52
|
let supportId = sourceTxHash ?? routeExecution?.route.id ?? '';
|
|
45
53
|
if (process.env.NODE_ENV === 'development') {
|
|
46
54
|
supportId += `_${routeExecution?.route.id}`;
|
|
47
55
|
}
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
(0, react_1.useEffect)(() => {
|
|
52
|
-
return headerStoreContext.getState().setAction((0, jsx_runtime_1.jsx)(material_1.IconButton, { size: "medium", edge: "end", onClick: toggleDialog, children: (0, jsx_runtime_1.jsx)(DeleteOutline_1.default, {}) }));
|
|
53
|
-
}, [headerStoreContext, toggleDialog]);
|
|
54
|
-
const startedAt = new Date(routeExecution?.route.steps[0].execution?.process[0].startedAt ?? 0);
|
|
55
|
-
return ((0, jsx_runtime_1.jsxs)(TransactionDetailsPage_style_1.Container, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
56
|
+
const startedAt = new Date((routeExecution?.route.steps[0].execution?.process[0].startedAt ?? 0) *
|
|
57
|
+
(storedRouteExecution ? 1 : 1000));
|
|
58
|
+
return isLoading && !storedRouteExecution ? ((0, jsx_runtime_1.jsx)(TransactionDetailsSkeleton_1.TransactionDetailsSkeleton, {})) : ((0, jsx_runtime_1.jsxs)(TransactionDetailsPage_style_1.Container, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
56
59
|
display: 'flex',
|
|
57
60
|
flex: 1,
|
|
58
61
|
justifyContent: 'space-between',
|
|
59
|
-
}, pb: 1, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { fontSize: 12, children: new Intl.DateTimeFormat(i18n.language, {
|
|
62
|
+
}, pb: 1, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { fontSize: 12, children: new Intl.DateTimeFormat(i18n.language, {
|
|
63
|
+
dateStyle: 'long',
|
|
64
|
+
}).format(startedAt) }), (0, jsx_runtime_1.jsx)(material_1.Typography, { fontSize: 12, children: new Intl.DateTimeFormat(i18n.language, {
|
|
60
65
|
timeStyle: 'short',
|
|
61
|
-
}).format(startedAt) })] }), (0, Step_1.getStepList)(routeExecution?.route, subvariant), subvariant === 'nft' ? ((0, jsx_runtime_1.jsx)(ContractComponent_1.ContractComponent, { mt: 2, children: contractSecondaryComponent || contractComponent })) : null, routeExecution?.route?.insurance?.state === 'INSURED' ? ((0, jsx_runtime_1.jsx)(Insurance_1.Insurance, { mt: 2, status: routeExecution.status, feeAmountUsd: routeExecution.route.insurance.feeAmountUsd, insuredAmount: (0, utils_1.formatTokenAmount)(routeExecution.route.toAmountMin, routeExecution.route.toToken.decimals), insuredTokenSymbol: routeExecution.route.toToken.symbol, insurableRouteId: routeExecution.route.id, insuranceCoverageId: insuranceCoverageId })) : null, (0, jsx_runtime_1.jsxs)(Card_1.Card, { mt: 2, children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
66
|
+
}).format(startedAt) })] }), (0, Step_1.getStepList)(routeExecution?.route, subvariant), subvariant === 'nft' ? ((0, jsx_runtime_1.jsx)(ContractComponent_1.ContractComponent, { mt: 2, children: contractSecondaryComponent || contractComponent })) : null, routeExecution?.route?.insurance?.state === 'INSURED' ? ((0, jsx_runtime_1.jsx)(Insurance_1.Insurance, { mt: 2, status: routeExecution.status, feeAmountUsd: routeExecution.route.insurance.feeAmountUsd, insuredAmount: (0, utils_1.formatTokenAmount)(BigInt(routeExecution.route.toAmountMin), routeExecution.route.toToken.decimals), insuredTokenSymbol: routeExecution.route.toToken.symbol, insurableRouteId: routeExecution.route.id, insuranceCoverageId: insuranceCoverageId })) : null, (0, jsx_runtime_1.jsxs)(Card_1.Card, { mt: 2, children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
62
67
|
display: 'flex',
|
|
63
68
|
flex: 1,
|
|
64
|
-
}, children: [(0, jsx_runtime_1.jsx)(Card_1.CardTitle, { flex: 1, children: t('main.supportId') }), (0, jsx_runtime_1.jsx)(material_1.Box, { mr: 1, mt: 1, children: (0, jsx_runtime_1.jsx)(material_1.IconButton, { size: "medium", onClick: copySupportId, children: (0, jsx_runtime_1.jsx)(ContentCopyRounded_1.default, { fontSize: "small" }) }) })] }), (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", pt: 1, pb: 2, px: 2, sx: { wordBreak: 'break-all' }, children: supportId })] }), (0, jsx_runtime_1.jsx)(material_1.Box, { mt: 2,
|
|
69
|
+
}, children: [(0, jsx_runtime_1.jsx)(Card_1.CardTitle, { flex: 1, children: t('main.supportId') }), (0, jsx_runtime_1.jsx)(material_1.Box, { mr: 1, mt: 1, children: (0, jsx_runtime_1.jsx)(material_1.IconButton, { size: "medium", onClick: copySupportId, children: (0, jsx_runtime_1.jsx)(ContentCopyRounded_1.default, { fontSize: "small" }) }) })] }), (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", pt: 1, pb: 2, px: 2, sx: { wordBreak: 'break-all' }, children: supportId })] }), (0, jsx_runtime_1.jsx)(material_1.Box, { mt: 2, mb: 2.5, children: (0, jsx_runtime_1.jsx)(ContactSupportButton_1.ContactSupportButton, { supportId: supportId }) })] }));
|
|
65
70
|
};
|
|
66
71
|
exports.TransactionDetailsPage = TransactionDetailsPage;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const TransactionDetailsSkeleton: () => import("react/jsx-runtime").JSX.Element;
|