@lifi/widget 1.31.0 → 1.32.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/App.js +4 -16
- package/AppDrawer.js +13 -7
- package/AppDrawer.style.d.ts +2 -2
- package/AppDrawer.style.js +1 -1
- package/AppProvider.js +2 -2
- package/AppRoutes.js +9 -0
- package/cjs/App.js +4 -16
- package/cjs/AppDrawer.js +13 -7
- package/cjs/AppDrawer.style.d.ts +2 -2
- package/cjs/AppDrawer.style.js +1 -1
- package/cjs/AppProvider.js +1 -1
- package/cjs/AppRoutes.js +9 -0
- package/cjs/components/ActiveSwaps/ActiveSwapItem.js +9 -7
- package/cjs/components/ActiveSwaps/ActiveSwaps.js +3 -3
- package/cjs/components/ActiveSwaps/ActiveSwaps.style.d.ts +3 -3
- package/cjs/components/AppContainer.d.ts +2 -2
- package/cjs/components/AppContainer.js +1 -1
- package/cjs/components/BottomSheet/BottomSheet.d.ts +1 -1
- package/cjs/components/BottomSheet/BottomSheet.js +2 -2
- package/cjs/components/Card/Card.d.ts +2 -2
- package/cjs/components/Card/CardHeader.d.ts +1 -1
- package/cjs/components/Card/CardTitle.d.ts +1 -1
- package/cjs/components/ChainSelect/ChainSelect.d.ts +0 -1
- package/cjs/components/ChainSelect/ChainSelect.js +3 -4
- package/cjs/components/ChainSelect/ChainSelect.style.d.ts +3 -3
- package/cjs/components/ContractComponent/ContractComponent.js +1 -1
- package/cjs/components/Dialog.js +1 -1
- package/cjs/components/GasSufficiencyMessage/GasSufficiencyMessage.js +13 -28
- package/cjs/components/GasSufficiencyMessage/GasSufficiencyMessage.style.d.ts +1 -1
- package/cjs/components/Header/Header.js +1 -1
- package/cjs/components/Header/Header.style.d.ts +3 -3
- package/cjs/components/Header/NavigationHeader.js +6 -2
- package/cjs/components/Header/WalletHeader.js +12 -22
- package/cjs/{pages/SelectNativeTokenPage/SelectNativeTokenPage.style.d.ts → components/ListItemButton.d.ts} +1 -2
- package/cjs/{pages/SelectWalletPage/SelectWalletPage.style.js → components/ListItemButton.js} +2 -8
- package/cjs/components/ListItemText.d.ts +2 -0
- package/cjs/{pages/SelectNativeTokenPage/SelectNativeTokenPage.style.js → components/ListItemText.js} +1 -10
- package/cjs/components/NFT/NFT.js +2 -14
- package/cjs/components/NFT/NFT.style.d.ts +1 -1
- package/cjs/components/NotFound.js +2 -2
- package/cjs/components/PoweredBy/PoweredBy.js +2 -2
- package/cjs/components/PoweredBy/PoweredBy.style.d.ts +1 -1
- package/cjs/components/ProgressToNextUpdate/ProgressToNextUpdate.js +5 -17
- package/cjs/components/ReverseTokensButton/ReverseTokensButton.js +1 -1
- package/cjs/components/ReverseTokensButton/ReverseTokensButton.style.d.ts +1 -1
- package/cjs/components/Select.js +1 -0
- package/cjs/components/SelectChainAndToken.js +4 -4
- package/cjs/components/SelectTokenButton/SelectTokenButton.js +2 -2
- package/cjs/components/SelectTokenButton/SelectTokenButton.style.d.ts +1 -1
- package/cjs/components/SendToWallet/SendToWallet.js +9 -19
- package/cjs/components/SendToWallet/SendToWallet.style.d.ts +1 -1
- package/cjs/components/SendToWallet/SendToWalletButton.js +5 -5
- package/cjs/components/SmallAvatar.d.ts +3 -3
- package/cjs/components/Step/CircularProgress.d.ts +0 -1
- package/cjs/components/Step/CircularProgress.js +2 -2
- package/cjs/components/Step/CircularProgress.style.d.ts +1 -1
- package/cjs/components/Step/DestinationWalletAddress.js +6 -7
- package/cjs/components/Step/GasStepProcess.js +8 -8
- package/cjs/components/Step/Step.js +4 -5
- package/cjs/components/Step/StepList.d.ts +0 -1
- package/cjs/components/Step/StepList.js +8 -4
- package/cjs/components/Step/StepProcess.js +3 -3
- package/cjs/components/Step/StepProcess.style.d.ts +2 -2
- package/cjs/components/Step/StepTimer.js +4 -8
- package/cjs/components/StepActions/StepActions.js +20 -37
- package/cjs/components/StepActions/StepActions.style.d.ts +1 -1
- package/cjs/components/StepDivider/StepDivider.style.d.ts +1 -1
- package/cjs/components/SwapButton/SwapButton.js +5 -14
- package/cjs/components/SwapInput/FormPriceHelperText.js +6 -6
- package/cjs/components/SwapInput/SwapInput.js +4 -16
- package/cjs/components/SwapInput/SwapInput.style.d.ts +1 -1
- package/cjs/components/SwapInput/SwapInputAdornment.style.d.ts +1 -1
- package/cjs/components/SwapInput/SwapInputEndAdornment.d.ts +0 -1
- package/cjs/components/SwapInput/SwapInputEndAdornment.js +2 -3
- package/cjs/components/SwapRouteCard/SwapRouteCard.js +9 -25
- package/cjs/components/SwapRouteCard/SwapRouteCard.style.d.ts +2 -2
- package/cjs/components/SwapRouteCard/SwapRouteCardSkeleton.js +4 -16
- package/cjs/components/SwapRouteCard/SwapRouteNotFoundCard.js +2 -2
- package/cjs/components/SwapRouteCard/utils.js +1 -1
- package/cjs/components/SwapRoutes/SwapRoutes.js +4 -4
- package/cjs/components/SwapRoutes/SwapRoutes.style.d.ts +5 -5
- package/cjs/components/SwapRoutes/SwapRoutesExpanded.d.ts +0 -1
- package/cjs/components/SwapRoutes/SwapRoutesExpanded.js +3 -3
- package/cjs/components/TextFitter/TextFitter.js +3 -3
- package/cjs/components/Token/Token.js +19 -33
- package/cjs/components/Token/Token.style.d.ts +3 -3
- package/cjs/components/TokenAvatar/TokenAvatar.js +6 -7
- package/cjs/components/TokenAvatar/TokenAvatar.style.d.ts +2 -2
- package/cjs/components/TokenList/TokenList.js +3 -4
- package/cjs/components/TokenList/TokenList.style.d.ts +2 -2
- package/cjs/components/TokenList/TokenList.style.js +2 -6
- package/cjs/components/TokenList/TokenListItem.js +9 -9
- package/cjs/components/TokenList/TokenNotFound.js +4 -5
- package/cjs/components/TokenList/VirtualizedTokenList.js +10 -11
- package/cjs/components/TokenList/useTokenSelect.js +2 -2
- package/cjs/config/env.js +1 -1
- package/cjs/config/sentry.js +3 -12
- package/cjs/config/theme.js +44 -16
- package/cjs/config/version.d.ts +1 -1
- package/cjs/config/version.js +1 -1
- package/cjs/hooks/useChain.js +1 -1
- package/cjs/hooks/useChains.js +5 -14
- package/cjs/hooks/useContentHeight.js +1 -2
- package/cjs/hooks/useFeaturedTokens.js +1 -4
- package/cjs/hooks/useGasSufficiency.js +28 -34
- package/cjs/hooks/useProcessMessage.js +7 -11
- package/cjs/hooks/useRouteExecution.js +17 -28
- package/cjs/hooks/useSwapRoutes.js +16 -26
- package/cjs/hooks/useToken.js +2 -2
- package/cjs/hooks/useTokenAddressBalance.js +1 -2
- package/cjs/hooks/useTokenBalance.js +24 -27
- package/cjs/hooks/useTokenBalances.d.ts +1 -1
- package/cjs/hooks/useTokenBalances.js +8 -20
- package/cjs/hooks/useTokenSearch.d.ts +1 -1
- package/cjs/hooks/useTokenSearch.js +12 -21
- package/cjs/hooks/useTokens.d.ts +1 -1
- package/cjs/hooks/useTokens.js +36 -38
- package/cjs/hooks/useTools.d.ts +2 -11
- package/cjs/hooks/useTools.js +10 -19
- package/cjs/i18n/en.json +8 -4
- package/cjs/icons/LiFiFullLogo.js +1 -1
- package/cjs/icons/LiFiLogo.js +1 -1
- package/cjs/icons/LiFiToolLogo.js +1 -1
- package/cjs/index.d.ts +1 -0
- package/cjs/index.js +2 -0
- package/cjs/pages/ActiveSwapsPage/ActiveSwapsEmpty.js +2 -2
- package/cjs/pages/ActiveSwapsPage/ActiveSwapsPage.d.ts +0 -1
- package/cjs/pages/ActiveSwapsPage/ActiveSwapsPage.js +3 -3
- package/cjs/pages/MainPage/MainPage.js +1 -1
- package/cjs/pages/MainPage/MainPage.style.d.ts +1 -1
- package/cjs/pages/MainPage/MainSwapButton.js +3 -12
- package/cjs/pages/SelectChainPage/SelectChainPage.js +6 -14
- package/cjs/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.d.ts +4 -0
- package/cjs/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.js +51 -0
- package/cjs/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.style.d.ts +20 -0
- package/cjs/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.style.js +8 -0
- package/cjs/pages/SelectEnabledToolsPage/index.d.ts +1 -0
- package/cjs/pages/SelectEnabledToolsPage/index.js +17 -0
- package/cjs/pages/SelectNativeTokenPage/SelectNativeTokenPage.js +4 -3
- package/cjs/pages/SelectTokenPage/SearchTokenInput.d.ts +0 -1
- package/cjs/pages/SelectTokenPage/SearchTokenInput.js +4 -1
- package/cjs/pages/SelectTokenPage/SelectTokenPage.js +2 -3
- package/cjs/pages/SelectWalletPage/SelectWalletPage.d.ts +0 -1
- package/cjs/pages/SelectWalletPage/SelectWalletPage.js +13 -19
- package/cjs/pages/SettingsPage/ColorSchemeButtonGroup.js +3 -3
- package/cjs/pages/SettingsPage/ColorSchemeButtonGroup.style.d.ts +1 -1
- package/cjs/pages/SettingsPage/EnabledToolsButton.d.ts +4 -0
- package/cjs/pages/SettingsPage/EnabledToolsButton.js +25 -0
- package/cjs/pages/{SelectChainPage/SelectChainPage.style.d.ts → SettingsPage/EnabledToolsButton.style.d.ts} +1 -1
- package/cjs/pages/{SelectChainPage/SelectChainPage.style.js → SettingsPage/EnabledToolsButton.style.js} +7 -10
- package/cjs/pages/SettingsPage/GasPriceSelect.d.ts +0 -1
- package/cjs/pages/SettingsPage/GasPriceSelect.js +1 -1
- package/cjs/pages/SettingsPage/LanguageSelect.js +5 -6
- package/cjs/pages/SettingsPage/ResetSettingsButton.d.ts +2 -0
- package/cjs/pages/SettingsPage/ResetSettingsButton.js +27 -0
- package/cjs/pages/SettingsPage/RoutePrioritySelect.js +4 -4
- package/cjs/pages/SettingsPage/SettingsPage.d.ts +0 -1
- package/cjs/pages/SettingsPage/SettingsPage.js +3 -2
- package/cjs/pages/SettingsPage/ShowDestinationWallet.d.ts +0 -1
- package/cjs/pages/SettingsPage/ShowDestinationWallet.js +3 -3
- package/cjs/pages/SettingsPage/SlippageInput.d.ts +0 -1
- package/cjs/pages/SettingsPage/SlippageInput.js +3 -3
- package/cjs/pages/SwapDetailsPage/SwapDetailsPage.js +14 -22
- package/cjs/pages/SwapDetailsPage/SwapDetailsPage.style.d.ts +1 -1
- package/cjs/pages/SwapHistoryPage/SwapHistoryEmpty.js +2 -2
- package/cjs/pages/SwapHistoryPage/SwapHistoryItem.js +9 -7
- package/cjs/pages/SwapHistoryPage/SwapHistoryPage.js +2 -2
- package/cjs/pages/SwapPage/ExchangeRateBottomSheet.js +21 -26
- package/cjs/pages/SwapPage/StartSwapButton.js +1 -1
- package/cjs/pages/SwapPage/StatusBottomSheet.js +21 -19
- package/cjs/pages/SwapPage/StatusBottomSheet.style.d.ts +2 -2
- package/cjs/pages/SwapPage/SwapPage.js +9 -21
- package/cjs/pages/SwapPage/SwapPage.style.d.ts +1 -1
- package/cjs/pages/SwapPage/TokenValueBottomSheet.js +8 -9
- package/cjs/pages/SwapRoutesPage/SwapRoutesPage.js +3 -3
- package/cjs/pages/SwapRoutesPage/SwapRoutesPage.style.d.ts +1 -1
- package/cjs/providers/I18nProvider/I18nProvider.js +7 -8
- package/cjs/providers/SDKProvider/SDKProvider.js +15 -4
- package/cjs/providers/SwapFormProvider/SwapFormProvider.js +12 -6
- package/cjs/providers/SwapFormProvider/URLSearchParamsBuilder.js +3 -12
- package/cjs/providers/TelemetryProvider/TelemetryProvider.js +1 -1
- package/cjs/providers/ThemeProvider/ThemeProvider.js +2 -2
- package/cjs/providers/WalletProvider/WalletProvider.js +30 -39
- package/cjs/providers/WidgetProvider/WidgetProvider.js +18 -23
- package/cjs/providers/WidgetProvider/utils.js +2 -3
- package/cjs/stores/StoreProvider.js +2 -2
- package/cjs/stores/chains/ChainOrderStore.js +2 -14
- package/cjs/stores/routes/RouteExecutionStore.js +2 -14
- package/cjs/stores/routes/createRouteExecutionStore.js +27 -16
- package/cjs/stores/routes/useExecutingRoutesIds.js +2 -5
- package/cjs/stores/routes/useSwapHistory.js +3 -6
- package/cjs/stores/routes/utils.js +4 -4
- package/cjs/stores/settings/SettingsStore.js +10 -20
- package/cjs/stores/settings/createSettingsStore.js +29 -25
- package/cjs/stores/settings/types.d.ts +6 -6
- package/cjs/utils/colors.js +1 -1
- package/cjs/utils/format.js +3 -3
- package/cjs/utils/index.d.ts +0 -1
- package/cjs/utils/index.js +0 -1
- package/cjs/utils/navigationRoutes.d.ts +2 -0
- package/cjs/utils/navigationRoutes.js +6 -0
- package/components/ActiveSwaps/ActiveSwapItem.js +9 -7
- package/components/ActiveSwaps/ActiveSwaps.js +3 -3
- package/components/ActiveSwaps/ActiveSwaps.style.d.ts +3 -3
- package/components/AppContainer.d.ts +2 -2
- package/components/AppContainer.js +1 -1
- package/components/BottomSheet/BottomSheet.d.ts +1 -1
- package/components/BottomSheet/BottomSheet.js +2 -2
- package/components/Card/Card.d.ts +2 -2
- package/components/Card/CardHeader.d.ts +1 -1
- package/components/Card/CardTitle.d.ts +1 -1
- package/components/ChainSelect/ChainSelect.d.ts +0 -1
- package/components/ChainSelect/ChainSelect.js +3 -4
- package/components/ChainSelect/ChainSelect.style.d.ts +3 -3
- package/components/ContractComponent/ContractComponent.js +1 -1
- package/components/Dialog.js +1 -1
- package/components/GasSufficiencyMessage/GasSufficiencyMessage.js +13 -28
- package/components/GasSufficiencyMessage/GasSufficiencyMessage.style.d.ts +1 -1
- package/components/Header/Header.js +1 -1
- package/components/Header/Header.style.d.ts +3 -3
- package/components/Header/NavigationHeader.js +6 -2
- package/components/Header/WalletHeader.js +12 -22
- package/{pages/SelectChainPage/SelectChainPage.style.d.ts → components/ListItemButton.d.ts} +1 -2
- package/components/ListItemButton.js +11 -0
- package/components/ListItemText.d.ts +2 -0
- package/components/ListItemText.js +8 -0
- package/components/NFT/NFT.js +2 -14
- package/components/NFT/NFT.style.d.ts +1 -1
- package/components/NotFound.js +2 -2
- package/components/PoweredBy/PoweredBy.js +2 -2
- package/components/PoweredBy/PoweredBy.style.d.ts +1 -1
- package/components/ProgressToNextUpdate/ProgressToNextUpdate.js +5 -17
- package/components/ReverseTokensButton/ReverseTokensButton.js +1 -1
- package/components/ReverseTokensButton/ReverseTokensButton.style.d.ts +1 -1
- package/components/Select.js +1 -0
- package/components/SelectChainAndToken.js +4 -4
- package/components/SelectTokenButton/SelectTokenButton.js +2 -2
- package/components/SelectTokenButton/SelectTokenButton.style.d.ts +1 -1
- package/components/SendToWallet/SendToWallet.js +9 -19
- package/components/SendToWallet/SendToWallet.style.d.ts +1 -1
- package/components/SendToWallet/SendToWalletButton.js +5 -5
- package/components/SmallAvatar.d.ts +3 -3
- package/components/Step/CircularProgress.d.ts +0 -1
- package/components/Step/CircularProgress.js +2 -2
- package/components/Step/CircularProgress.style.d.ts +1 -1
- package/components/Step/DestinationWalletAddress.js +6 -7
- package/components/Step/GasStepProcess.js +8 -8
- package/components/Step/Step.js +4 -5
- package/components/Step/StepList.d.ts +0 -1
- package/components/Step/StepList.js +8 -4
- package/components/Step/StepProcess.js +3 -3
- package/components/Step/StepProcess.style.d.ts +2 -2
- package/components/Step/StepTimer.js +4 -8
- package/components/StepActions/StepActions.js +20 -37
- package/components/StepActions/StepActions.style.d.ts +1 -1
- package/components/StepDivider/StepDivider.style.d.ts +1 -1
- package/components/SwapButton/SwapButton.js +5 -14
- package/components/SwapInput/FormPriceHelperText.js +6 -6
- package/components/SwapInput/SwapInput.js +4 -16
- package/components/SwapInput/SwapInput.style.d.ts +1 -1
- package/components/SwapInput/SwapInputAdornment.style.d.ts +1 -1
- package/components/SwapInput/SwapInputEndAdornment.d.ts +0 -1
- package/components/SwapInput/SwapInputEndAdornment.js +2 -3
- package/components/SwapRouteCard/SwapRouteCard.js +9 -25
- package/components/SwapRouteCard/SwapRouteCard.style.d.ts +2 -2
- package/components/SwapRouteCard/SwapRouteCardSkeleton.js +4 -16
- package/components/SwapRouteCard/SwapRouteNotFoundCard.js +2 -2
- package/components/SwapRouteCard/utils.js +1 -1
- package/components/SwapRoutes/SwapRoutes.js +4 -4
- package/components/SwapRoutes/SwapRoutes.style.d.ts +5 -5
- package/components/SwapRoutes/SwapRoutesExpanded.d.ts +0 -1
- package/components/SwapRoutes/SwapRoutesExpanded.js +3 -3
- package/components/TextFitter/TextFitter.js +3 -3
- package/components/Token/Token.js +19 -33
- package/components/Token/Token.style.d.ts +3 -3
- package/components/TokenAvatar/TokenAvatar.js +6 -7
- package/components/TokenAvatar/TokenAvatar.style.d.ts +2 -2
- package/components/TokenList/TokenList.js +3 -4
- package/components/TokenList/TokenList.style.d.ts +2 -2
- package/components/TokenList/TokenList.style.js +3 -7
- package/components/TokenList/TokenListItem.js +9 -9
- package/components/TokenList/TokenNotFound.js +4 -5
- package/components/TokenList/VirtualizedTokenList.js +10 -11
- package/components/TokenList/useTokenSelect.js +2 -2
- package/config/env.js +1 -1
- package/config/sentry.js +3 -12
- package/config/theme.js +44 -16
- package/config/version.d.ts +1 -1
- package/config/version.js +1 -1
- package/hooks/useChain.js +1 -1
- package/hooks/useChains.js +5 -14
- package/hooks/useContentHeight.js +1 -2
- package/hooks/useFeaturedTokens.js +1 -4
- package/hooks/useGasSufficiency.js +28 -34
- package/hooks/useProcessMessage.js +7 -11
- package/hooks/useRouteExecution.js +17 -28
- package/hooks/useSwapRoutes.js +16 -26
- package/hooks/useToken.js +2 -2
- package/hooks/useTokenAddressBalance.js +1 -2
- package/hooks/useTokenBalance.js +24 -27
- package/hooks/useTokenBalances.d.ts +1 -1
- package/hooks/useTokenBalances.js +8 -20
- package/hooks/useTokenSearch.d.ts +1 -1
- package/hooks/useTokenSearch.js +12 -21
- package/hooks/useTokens.d.ts +1 -1
- package/hooks/useTokens.js +36 -38
- package/hooks/useTools.d.ts +2 -11
- package/hooks/useTools.js +10 -19
- package/i18n/en.json +8 -4
- package/icons/LiFiFullLogo.js +1 -1
- package/icons/LiFiLogo.js +1 -1
- package/icons/LiFiToolLogo.js +1 -1
- package/index.d.ts +1 -0
- package/index.js +2 -0
- package/package.json +9 -9
- package/pages/ActiveSwapsPage/ActiveSwapsEmpty.js +2 -2
- package/pages/ActiveSwapsPage/ActiveSwapsPage.d.ts +0 -1
- package/pages/ActiveSwapsPage/ActiveSwapsPage.js +3 -3
- package/pages/MainPage/MainPage.js +1 -1
- package/pages/MainPage/MainPage.style.d.ts +1 -1
- package/pages/MainPage/MainSwapButton.js +3 -12
- package/pages/SelectChainPage/SelectChainPage.js +6 -14
- package/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.d.ts +4 -0
- package/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.js +47 -0
- package/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.style.d.ts +20 -0
- package/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.style.js +5 -0
- package/pages/SelectEnabledToolsPage/index.d.ts +1 -0
- package/pages/SelectEnabledToolsPage/index.js +1 -0
- package/pages/SelectNativeTokenPage/SelectNativeTokenPage.js +4 -3
- package/pages/SelectTokenPage/SearchTokenInput.d.ts +0 -1
- package/pages/SelectTokenPage/SearchTokenInput.js +4 -1
- package/pages/SelectTokenPage/SelectTokenPage.js +2 -3
- package/pages/SelectWalletPage/SelectWalletPage.d.ts +0 -1
- package/pages/SelectWalletPage/SelectWalletPage.js +13 -19
- package/pages/SettingsPage/ColorSchemeButtonGroup.js +3 -3
- package/pages/SettingsPage/ColorSchemeButtonGroup.style.d.ts +1 -1
- package/pages/SettingsPage/EnabledToolsButton.d.ts +4 -0
- package/pages/SettingsPage/EnabledToolsButton.js +21 -0
- package/{cjs/pages/SelectWalletPage/SelectWalletPage.style.d.ts → pages/SettingsPage/EnabledToolsButton.style.d.ts} +1 -1
- package/pages/SettingsPage/EnabledToolsButton.style.js +14 -0
- package/pages/SettingsPage/GasPriceSelect.d.ts +0 -1
- package/pages/SettingsPage/GasPriceSelect.js +1 -1
- package/pages/SettingsPage/LanguageSelect.js +5 -6
- package/pages/SettingsPage/ResetSettingsButton.d.ts +2 -0
- package/pages/SettingsPage/ResetSettingsButton.js +23 -0
- package/pages/SettingsPage/RoutePrioritySelect.js +4 -4
- package/pages/SettingsPage/SettingsPage.d.ts +0 -1
- package/pages/SettingsPage/SettingsPage.js +3 -2
- package/pages/SettingsPage/ShowDestinationWallet.d.ts +0 -1
- package/pages/SettingsPage/ShowDestinationWallet.js +3 -3
- package/pages/SettingsPage/SlippageInput.d.ts +0 -1
- package/pages/SettingsPage/SlippageInput.js +3 -3
- package/pages/SwapDetailsPage/SwapDetailsPage.js +14 -22
- package/pages/SwapDetailsPage/SwapDetailsPage.style.d.ts +1 -1
- package/pages/SwapHistoryPage/SwapHistoryEmpty.js +2 -2
- package/pages/SwapHistoryPage/SwapHistoryItem.js +9 -7
- package/pages/SwapHistoryPage/SwapHistoryPage.js +2 -2
- package/pages/SwapPage/ExchangeRateBottomSheet.js +21 -26
- package/pages/SwapPage/StartSwapButton.js +1 -1
- package/pages/SwapPage/StatusBottomSheet.js +21 -19
- package/pages/SwapPage/StatusBottomSheet.style.d.ts +2 -2
- package/pages/SwapPage/SwapPage.js +9 -21
- package/pages/SwapPage/SwapPage.style.d.ts +1 -1
- package/pages/SwapPage/TokenValueBottomSheet.js +8 -9
- package/pages/SwapRoutesPage/SwapRoutesPage.js +3 -3
- package/pages/SwapRoutesPage/SwapRoutesPage.style.d.ts +1 -1
- package/providers/I18nProvider/I18nProvider.js +7 -8
- package/providers/SDKProvider/SDKProvider.js +15 -4
- package/providers/SwapFormProvider/SwapFormProvider.js +12 -6
- package/providers/SwapFormProvider/URLSearchParamsBuilder.js +3 -12
- package/providers/TelemetryProvider/TelemetryProvider.js +1 -1
- package/providers/ThemeProvider/ThemeProvider.js +2 -2
- package/providers/WalletProvider/WalletProvider.js +30 -39
- package/providers/WidgetProvider/WidgetProvider.js +18 -23
- package/providers/WidgetProvider/utils.js +2 -3
- package/stores/StoreProvider.js +2 -2
- package/stores/chains/ChainOrderStore.js +2 -14
- package/stores/routes/RouteExecutionStore.js +2 -14
- package/stores/routes/createRouteExecutionStore.js +27 -16
- package/stores/routes/useExecutingRoutesIds.js +2 -5
- package/stores/routes/useSwapHistory.js +3 -6
- package/stores/routes/utils.js +4 -4
- package/stores/settings/SettingsStore.js +10 -20
- package/stores/settings/createSettingsStore.js +29 -25
- package/stores/settings/types.d.ts +6 -6
- package/tsconfig.cjs.tsbuildinfo +1 -1
- package/utils/colors.js +1 -1
- package/utils/format.js +3 -3
- package/utils/index.d.ts +0 -1
- package/utils/index.js +0 -1
- package/utils/navigationRoutes.d.ts +2 -0
- package/utils/navigationRoutes.js +6 -0
- package/cjs/pages/SettingsPage/AdvancedPreferences.d.ts +0 -2
- package/cjs/pages/SettingsPage/AdvancedPreferences.js +0 -24
- package/cjs/pages/SettingsPage/EnabledBridgesSelect.d.ts +0 -2
- package/cjs/pages/SettingsPage/EnabledBridgesSelect.js +0 -24
- package/cjs/pages/SettingsPage/EnabledExchangesSelect.d.ts +0 -2
- package/cjs/pages/SettingsPage/EnabledExchangesSelect.js +0 -24
- package/cjs/utils/deepClone.d.ts +0 -1
- package/cjs/utils/deepClone.js +0 -7
- package/pages/SelectChainPage/SelectChainPage.style.js +0 -17
- package/pages/SelectNativeTokenPage/SelectNativeTokenPage.style.d.ts +0 -21
- package/pages/SelectNativeTokenPage/SelectNativeTokenPage.style.js +0 -17
- package/pages/SelectWalletPage/SelectWalletPage.style.d.ts +0 -21
- package/pages/SelectWalletPage/SelectWalletPage.style.js +0 -17
- package/pages/SettingsPage/AdvancedPreferences.d.ts +0 -2
- package/pages/SettingsPage/AdvancedPreferences.js +0 -20
- package/pages/SettingsPage/EnabledBridgesSelect.d.ts +0 -2
- package/pages/SettingsPage/EnabledBridgesSelect.js +0 -20
- package/pages/SettingsPage/EnabledExchangesSelect.d.ts +0 -2
- package/pages/SettingsPage/EnabledExchangesSelect.js +0 -20
- package/utils/deepClone.d.ts +0 -1
- package/utils/deepClone.js +0 -3
|
@@ -4,7 +4,7 @@ export declare const ChainCard: import("@emotion/styled").StyledComponent<import
|
|
|
4
4
|
component?: import("react").ElementType<any> | undefined;
|
|
5
5
|
ref?: import("react").Ref<unknown> | undefined;
|
|
6
6
|
sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
|
|
7
|
-
} & Omit<
|
|
7
|
+
} & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
8
8
|
ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
|
|
9
9
|
}, "children" | "sx" | "ref" | ("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" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "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" | "overflow" | "padding" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint") | "component"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
10
10
|
variant?: ("default" | "error" | "selected") | undefined;
|
|
@@ -13,7 +13,7 @@ export declare const ChainCard: import("@emotion/styled").StyledComponent<import
|
|
|
13
13
|
indented?: boolean | undefined;
|
|
14
14
|
onClick?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
15
15
|
pointerEvents?: "none" | "auto" | undefined;
|
|
16
|
-
} & import("@mui/material/OverridableComponent").CommonProps & Omit<
|
|
16
|
+
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
17
17
|
ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
|
|
18
18
|
}, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "ref" | ("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" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "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" | "overflow" | "padding" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint") | "component">, {}, {}>;
|
|
19
19
|
export declare const ChainContainer: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material").Theme> & {
|
|
@@ -21,6 +21,6 @@ export declare const ChainContainer: import("@emotion/styled").StyledComponent<i
|
|
|
21
21
|
component?: import("react").ElementType<any> | undefined;
|
|
22
22
|
ref?: import("react").Ref<unknown> | undefined;
|
|
23
23
|
sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
|
|
24
|
-
} & Omit<
|
|
24
|
+
} & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
25
25
|
ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
|
|
26
26
|
}, "children" | "sx" | "ref" | ("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" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "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" | "overflow" | "padding" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint") | "component"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -9,6 +9,6 @@ const ContractComponent = (props) => {
|
|
|
9
9
|
if (!contractComponent) {
|
|
10
10
|
return null;
|
|
11
11
|
}
|
|
12
|
-
return ((0, jsx_runtime_1.jsx)(Card_1.Card,
|
|
12
|
+
return ((0, jsx_runtime_1.jsx)(Card_1.Card, { flex: 1, ...props, children: contractComponent }));
|
|
13
13
|
};
|
|
14
14
|
exports.ContractComponent = ContractComponent;
|
package/cjs/components/Dialog.js
CHANGED
|
@@ -27,6 +27,6 @@ exports.backdropProps = {
|
|
|
27
27
|
};
|
|
28
28
|
const Dialog = ({ children, open, onClose, }) => {
|
|
29
29
|
const getContainer = (0, hooks_1.useGetScrollableContainer)();
|
|
30
|
-
return ((0, jsx_runtime_1.jsx)(material_1.Dialog,
|
|
30
|
+
return ((0, jsx_runtime_1.jsx)(material_1.Dialog, { container: getContainer, open: open, onClose: onClose, sx: exports.modalProps.sx, PaperProps: exports.paperProps, BackdropProps: exports.backdropProps, children: children }));
|
|
31
31
|
};
|
|
32
32
|
exports.Dialog = Dialog;
|
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
-
var t = {};
|
|
4
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
-
t[p] = s[p];
|
|
6
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
-
t[p[i]] = s[p[i]];
|
|
10
|
-
}
|
|
11
|
-
return t;
|
|
12
|
-
};
|
|
13
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
3
|
exports.GasSufficiencyMessage = void 0;
|
|
15
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
@@ -20,27 +9,23 @@ const hooks_1 = require("../../hooks");
|
|
|
20
9
|
const stores_1 = require("../../stores");
|
|
21
10
|
const Card_1 = require("../Card");
|
|
22
11
|
const GasSufficiencyMessage_style_1 = require("./GasSufficiencyMessage.style");
|
|
23
|
-
const GasSufficiencyMessage = (
|
|
24
|
-
var { route } = _a, props = __rest(_a, ["route"]);
|
|
12
|
+
const GasSufficiencyMessage = ({ route, ...props }) => {
|
|
25
13
|
const { t } = (0, react_i18next_1.useTranslation)();
|
|
26
14
|
const recommendedRoute = (0, stores_1.useRecommendedRouteStore)((state) => state.recommendedRoute);
|
|
27
|
-
const { insufficientFunds, insufficientGas } = (0, hooks_1.useGasSufficiency)(route
|
|
28
|
-
return ((0, jsx_runtime_1.jsx)(material_1.Collapse,
|
|
15
|
+
const { insufficientFunds, insufficientGas } = (0, hooks_1.useGasSufficiency)(route ?? recommendedRoute);
|
|
16
|
+
return ((0, jsx_runtime_1.jsx)(material_1.Collapse, { timeout: 225, in: Boolean(insufficientFunds || insufficientGas?.length), unmountOnExit: true, mountOnEnter: true, appear: true, children: (0, jsx_runtime_1.jsx)(material_1.Box, { ...props, children: (0, jsx_runtime_1.jsxs)(GasSufficiencyMessage_style_1.MessageCard, { children: [(0, jsx_runtime_1.jsx)(icons_material_1.WarningAmberRounded, { sx: {
|
|
29
17
|
marginTop: 2,
|
|
30
18
|
marginLeft: 2,
|
|
31
|
-
} }), (0, jsx_runtime_1.jsxs)(material_1.Box, { children: [
|
|
19
|
+
} }), (0, jsx_runtime_1.jsxs)(material_1.Box, { children: [insufficientGas?.length ? ((0, jsx_runtime_1.jsx)(Card_1.CardTitle, { children: t(`swap.warning.title.insufficientGas`) })) : null, insufficientFunds ? ((0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", px: 2, pb: insufficientGas?.length ? 0 : 2, pt: insufficientGas?.length ? 1 : 2, children: insufficientFunds
|
|
32
20
|
? t(`swap.warning.message.insufficientFunds`)
|
|
33
|
-
: null }))
|
|
34
|
-
? insufficientGas.map((item, index) =>
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}) }), index));
|
|
43
|
-
})
|
|
44
|
-
: null] })] }) })) })));
|
|
21
|
+
: null })) : null, insufficientGas?.length ? ((0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", px: 2, pt: 1, children: t(`swap.warning.message.insufficientGas`) })) : null, insufficientGas?.length
|
|
22
|
+
? insufficientGas.map((item, index) => ((0, jsx_runtime_1.jsx)(material_1.Typography
|
|
23
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
24
|
+
, { variant: "body2", px: 2, pb: insufficientGas.length - 1 === index ? 2 : 0, pt: 0.5, children: t(`swap.tokenOnChainAmount`, {
|
|
25
|
+
amount: item.insufficientAmount?.toString(),
|
|
26
|
+
tokenSymbol: item.token.symbol,
|
|
27
|
+
chainName: item.chain?.name,
|
|
28
|
+
}) }, index)))
|
|
29
|
+
: null] })] }) }) }));
|
|
45
30
|
};
|
|
46
31
|
exports.GasSufficiencyMessage = GasSufficiencyMessage;
|
|
@@ -4,6 +4,6 @@ export declare const MessageCard: import("@emotion/styled").StyledComponent<impo
|
|
|
4
4
|
component?: import("react").ElementType<any> | undefined;
|
|
5
5
|
ref?: import("react").Ref<unknown> | undefined;
|
|
6
6
|
sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
|
|
7
|
-
} & Omit<
|
|
7
|
+
} & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
8
8
|
ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
|
|
9
9
|
}, "children" | "sx" | "ref" | ("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" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "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" | "overflow" | "padding" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint") | "component"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -12,7 +12,7 @@ const WalletHeader_1 = require("./WalletHeader");
|
|
|
12
12
|
const HeaderContainer = ({ children }) => {
|
|
13
13
|
const { pathname } = (0, react_router_dom_1.useLocation)();
|
|
14
14
|
const elementId = (0, hooks_1.useDefaultElementId)();
|
|
15
|
-
return ((0, jsx_runtime_1.jsx)(Header_style_1.Container,
|
|
15
|
+
return ((0, jsx_runtime_1.jsx)(Header_style_1.Container, { id: (0, utils_1.createElementId)(utils_1.ElementId.Header, elementId), sticky: utils_1.stickyHeaderRoutes.some((route) => pathname.includes(route)), children: children }));
|
|
16
16
|
};
|
|
17
17
|
exports.HeaderContainer = HeaderContainer;
|
|
18
18
|
const Header = () => {
|
|
@@ -5,7 +5,7 @@ export declare const HeaderAppBar: import("@emotion/styled").StyledComponent<Omi
|
|
|
5
5
|
enableColorOnDark?: boolean | undefined;
|
|
6
6
|
position?: "fixed" | "absolute" | "relative" | "static" | "sticky" | undefined;
|
|
7
7
|
sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
|
|
8
|
-
} & import("@mui/material/OverridableComponent").CommonProps & Omit<
|
|
8
|
+
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & {
|
|
9
9
|
ref?: ((instance: HTMLElement | null) => void) | import("react").RefObject<HTMLElement> | null | undefined;
|
|
10
10
|
}, keyof import("@mui/material/OverridableComponent").CommonProps | "slot" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "children" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "sx" | "ref" | "key" | "position" | "variant" | "square" | "elevation" | "enableColorOnDark"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
11
11
|
export declare const Container: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material").Theme> & {
|
|
@@ -13,7 +13,7 @@ export declare const Container: import("@emotion/styled").StyledComponent<import
|
|
|
13
13
|
component?: import("react").ElementType<any> | undefined;
|
|
14
14
|
ref?: import("react").Ref<unknown> | undefined;
|
|
15
15
|
sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
|
|
16
|
-
} & Omit<
|
|
16
|
+
} & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
17
17
|
ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
|
|
18
18
|
}, "children" | "sx" | "ref" | ("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" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "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" | "overflow" | "padding" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint") | "component"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
19
19
|
sticky?: boolean | undefined;
|
|
@@ -48,6 +48,6 @@ export declare const WalletButton: import("@emotion/styled").StyledComponent<{
|
|
|
48
48
|
tabIndex?: number | undefined;
|
|
49
49
|
TouchRippleProps?: Partial<import("@mui/material/ButtonBase/TouchRipple").TouchRippleProps> | undefined;
|
|
50
50
|
touchRippleRef?: import("react").Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions> | undefined;
|
|
51
|
-
}, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<
|
|
51
|
+
}, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
52
52
|
ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
|
|
53
53
|
}, keyof import("@mui/material/OverridableComponent").CommonProps | "tabIndex" | "color" | "children" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "TouchRippleProps" | "touchRippleRef" | "href" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "size" | "startIcon" | "variant"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -29,6 +29,10 @@ const NavigationHeader = () => {
|
|
|
29
29
|
return t(`header.selectWallet`);
|
|
30
30
|
case utils_1.navigationRoutes.settings:
|
|
31
31
|
return t(`header.settings`);
|
|
32
|
+
case utils_1.navigationRoutes.bridges:
|
|
33
|
+
return t(`settings.enabledBridges`);
|
|
34
|
+
case utils_1.navigationRoutes.exchanges:
|
|
35
|
+
return t(`settings.enabledExchanges`);
|
|
32
36
|
case utils_1.navigationRoutes.swapHistory:
|
|
33
37
|
return t(`header.swapHistory`);
|
|
34
38
|
case utils_1.navigationRoutes.fromToken:
|
|
@@ -59,8 +63,8 @@ const NavigationHeader = () => {
|
|
|
59
63
|
}
|
|
60
64
|
}
|
|
61
65
|
};
|
|
62
|
-
return ((0, jsx_runtime_1.jsxs)(Header_style_1.HeaderAppBar,
|
|
66
|
+
return ((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)(icons_material_1.ArrowBack, {}) })) : null, (0, jsx_runtime_1.jsx)(material_1.Typography, { fontSize: hasPath ? 18 : 24, align: hasPath ? 'center' : 'left', fontWeight: "700", flex: 1, noWrap: true, children: 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)(jsx_runtime_1.Fragment, { children: [account.isActive ? ((0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: t(`header.swapHistory`), enterDelay: 400, arrow: true, children: (0, jsx_runtime_1.jsx)(material_1.IconButton, { size: "medium", edge: "start", onClick: () => navigate(utils_1.navigationRoutes.swapHistory), children: (0, jsx_runtime_1.jsx)(icons_material_1.ReceiptLongRounded, {}) }) })) : null, (0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: t(`header.settings`), enterDelay: 400, arrow: true, children: (0, jsx_runtime_1.jsx)(material_1.IconButton, { size: "medium", onClick: () => navigate(utils_1.navigationRoutes.settings), sx: {
|
|
63
67
|
marginRight: -1.25,
|
|
64
|
-
}
|
|
68
|
+
}, children: (0, jsx_runtime_1.jsx)(icons_material_1.SettingsOutlined, {}) }) })] }) }), (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 }) })] })] }));
|
|
65
69
|
};
|
|
66
70
|
exports.NavigationHeader = NavigationHeader;
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.WalletHeader = void 0;
|
|
13
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
@@ -23,7 +14,7 @@ const Header_style_1 = require("./Header.style");
|
|
|
23
14
|
const WalletMenu_1 = require("./WalletMenu");
|
|
24
15
|
const WalletHeader = () => {
|
|
25
16
|
const { account } = (0, providers_1.useWallet)();
|
|
26
|
-
return ((0, jsx_runtime_1.jsx)(Header_style_1.HeaderAppBar,
|
|
17
|
+
return ((0, jsx_runtime_1.jsx)(Header_style_1.HeaderAppBar, { elevation: 0, sx: { justifyContent: 'flex-end' }, children: account.isActive ? (0, jsx_runtime_1.jsx)(ConnectedButton, {}) : (0, jsx_runtime_1.jsx)(ConnectButton, {}) }));
|
|
27
18
|
};
|
|
28
19
|
exports.WalletHeader = WalletHeader;
|
|
29
20
|
const ConnectButton = () => {
|
|
@@ -32,16 +23,16 @@ const ConnectButton = () => {
|
|
|
32
23
|
const config = (0, providers_1.useWidgetConfig)();
|
|
33
24
|
const { connect: connectWallet } = (0, providers_1.useWallet)();
|
|
34
25
|
const navigate = (0, react_router_dom_1.useNavigate)();
|
|
35
|
-
const connect = () =>
|
|
26
|
+
const connect = async () => {
|
|
36
27
|
if (config.walletManagement) {
|
|
37
|
-
|
|
28
|
+
await connectWallet();
|
|
38
29
|
return;
|
|
39
30
|
}
|
|
40
31
|
navigate(utils_1.navigationRoutes.selectWallet);
|
|
41
|
-
}
|
|
42
|
-
return ((0, jsx_runtime_1.jsx)(Header_style_1.WalletButton,
|
|
32
|
+
};
|
|
33
|
+
return ((0, jsx_runtime_1.jsx)(Header_style_1.WalletButton, { endIcon: (0, jsx_runtime_1.jsx)(icons_material_1.WalletOutlined, {}), onClick: !pathname.includes(utils_1.navigationRoutes.selectWallet) ? connect : undefined, sx: {
|
|
43
34
|
marginRight: -1.25,
|
|
44
|
-
}
|
|
35
|
+
}, children: t(`button.connectWallet`) }));
|
|
45
36
|
};
|
|
46
37
|
const ConnectedButton = () => {
|
|
47
38
|
const { t } = (0, react_i18next_1.useTranslation)();
|
|
@@ -59,14 +50,13 @@ const ConnectedButton = () => {
|
|
|
59
50
|
disconnect();
|
|
60
51
|
handleClose();
|
|
61
52
|
};
|
|
62
|
-
const handleCopyAddress = () =>
|
|
63
|
-
|
|
64
|
-
yield navigator.clipboard.writeText((_a = account.address) !== null && _a !== void 0 ? _a : '');
|
|
53
|
+
const handleCopyAddress = async () => {
|
|
54
|
+
await navigator.clipboard.writeText(account.address ?? '');
|
|
65
55
|
handleClose();
|
|
66
|
-
}
|
|
67
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Header_style_1.WalletButton,
|
|
56
|
+
};
|
|
57
|
+
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)(icons_material_1.ExpandMore, {}), 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: {
|
|
68
58
|
marginRight: -1.25,
|
|
69
|
-
}, onClick: handleClick
|
|
59
|
+
}, onClick: handleClick, children: walletAddress }), (0, jsx_runtime_1.jsxs)(WalletMenu_1.WalletMenu, { anchorEl: anchorEl, open: Boolean(anchorEl), onClose: handleClose, children: [(0, jsx_runtime_1.jsxs)(material_1.MenuItem, { onClick: handleCopyAddress, disableRipple: true, children: [(0, jsx_runtime_1.jsx)(icons_material_1.ContentCopy, {}), t(`button.copyAddress`)] }), (0, jsx_runtime_1.jsxs)(material_1.MenuItem, { component: "a", onClick: handleClose, href: `${chain?.metamask.blockExplorerUrls[0]}address/${account.address}`, target: "_blank", disableRipple: true, children: [(0, jsx_runtime_1.jsx)(icons_material_1.OpenInNewOutlined, {}), t(`button.viewOnExplorer`)] }), (0, jsx_runtime_1.jsx)(material_1.Button, { onClick: handleDisconnect, fullWidth: true, startIcon: (0, jsx_runtime_1.jsx)(icons_material_1.PowerSettingsNewRounded, {}), sx: {
|
|
70
60
|
marginTop: 1,
|
|
71
|
-
}
|
|
61
|
+
}, children: t(`button.disconnect`) })] })] }));
|
|
72
62
|
};
|
|
@@ -15,7 +15,6 @@ export declare const ListItemButton: import("@emotion/styled").StyledComponent<i
|
|
|
15
15
|
tabIndex?: number | undefined;
|
|
16
16
|
TouchRippleProps?: Partial<import("@mui/material/ButtonBase/TouchRipple").TouchRippleProps> | undefined;
|
|
17
17
|
touchRippleRef?: import("react").Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions> | undefined;
|
|
18
|
-
}, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<
|
|
18
|
+
}, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
19
19
|
ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
|
|
20
20
|
}, "className" | "style" | "classes" | "tabIndex" | "children" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "TouchRippleProps" | "touchRippleRef" | "alignItems" | "autoFocus" | "dense" | "divider" | "selected" | "disableGutters"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
21
|
-
export declare const ListItemText: import("@emotion/styled").StyledComponent<import("@mui/material").ListItemTextProps<import("react").ElementType<any>, import("react").ElementType<any>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
package/cjs/{pages/SelectWalletPage/SelectWalletPage.style.js → components/ListItemButton.js}
RENAMED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.ListItemButton = void 0;
|
|
4
4
|
const material_1 = require("@mui/material");
|
|
5
|
-
const ListItemText_1 = require("@mui/material/ListItemText");
|
|
6
5
|
const styles_1 = require("@mui/material/styles");
|
|
7
|
-
const utils_1 = require("
|
|
6
|
+
const utils_1 = require("../utils");
|
|
8
7
|
exports.ListItemButton = (0, styles_1.styled)(material_1.ListItemButton)(({ theme }) => ({
|
|
9
8
|
borderRadius: theme.shape.borderRadius,
|
|
10
9
|
paddingLeft: theme.spacing(1.5),
|
|
@@ -13,8 +12,3 @@ exports.ListItemButton = (0, styles_1.styled)(material_1.ListItemButton)(({ them
|
|
|
13
12
|
backgroundColor: (0, utils_1.getContrastAlphaColor)(theme, '4%'),
|
|
14
13
|
},
|
|
15
14
|
}));
|
|
16
|
-
exports.ListItemText = (0, styles_1.styled)(material_1.ListItemText)(({ theme }) => ({
|
|
17
|
-
[`.${ListItemText_1.listItemTextClasses.primary}`]: {
|
|
18
|
-
fontWeight: 400,
|
|
19
|
-
},
|
|
20
|
-
}));
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const ListItemText: import("@emotion/styled").StyledComponent<import("@mui/material").ListItemTextProps<import("react").ElementType<any>, import("react").ElementType<any>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -1,18 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ListItemText =
|
|
3
|
+
exports.ListItemText = void 0;
|
|
4
4
|
const material_1 = require("@mui/material");
|
|
5
5
|
const ListItemText_1 = require("@mui/material/ListItemText");
|
|
6
6
|
const styles_1 = require("@mui/material/styles");
|
|
7
|
-
const utils_1 = require("../../utils");
|
|
8
|
-
exports.ListItemButton = (0, styles_1.styled)(material_1.ListItemButton)(({ theme }) => ({
|
|
9
|
-
borderRadius: theme.shape.borderRadius,
|
|
10
|
-
paddingLeft: theme.spacing(1.5),
|
|
11
|
-
height: 56,
|
|
12
|
-
'&:hover': {
|
|
13
|
-
backgroundColor: (0, utils_1.getContrastAlphaColor)(theme, '4%'),
|
|
14
|
-
},
|
|
15
|
-
}));
|
|
16
7
|
exports.ListItemText = (0, styles_1.styled)(material_1.ListItemText)(({ theme }) => ({
|
|
17
8
|
[`.${ListItemText_1.listItemTextClasses.primary}`]: {
|
|
18
9
|
fontWeight: 400,
|
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
-
var t = {};
|
|
4
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
-
t[p] = s[p];
|
|
6
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
-
t[p[i]] = s[p[i]];
|
|
10
|
-
}
|
|
11
|
-
return t;
|
|
12
|
-
};
|
|
13
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
3
|
exports.NFT = void 0;
|
|
15
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
@@ -20,8 +9,7 @@ const react_i18next_1 = require("react-i18next");
|
|
|
20
9
|
const providers_1 = require("../../providers");
|
|
21
10
|
const Token_1 = require("../Token");
|
|
22
11
|
const NFT_style_1 = require("./NFT.style");
|
|
23
|
-
const NFT = (
|
|
24
|
-
var { imageUrl, isLoading, collectonName, assetName, owner, token, contract } = _a, props = __rest(_a, ["imageUrl", "isLoading", "collectonName", "assetName", "owner", "token", "contract"]);
|
|
12
|
+
const NFT = ({ imageUrl, isLoading, collectonName, assetName, owner, token, contract, ...props }) => {
|
|
25
13
|
const { t } = (0, react_i18next_1.useTranslation)();
|
|
26
14
|
const { setValue } = (0, react_hook_form_1.useFormContext)();
|
|
27
15
|
(0, react_1.useEffect)(() => {
|
|
@@ -36,6 +24,6 @@ const NFT = (_a) => {
|
|
|
36
24
|
setValue(providers_1.SwapFormKey.ToContractGasLimit, contract.gasLimit);
|
|
37
25
|
}
|
|
38
26
|
}, [contract, setValue, token]);
|
|
39
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Box,
|
|
27
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { p: 2, children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", children: [isLoading ? ((0, jsx_runtime_1.jsx)(material_1.Skeleton, { width: 96, height: 96, variant: "rectangular", sx: { borderRadius: 1 } })) : ((0, jsx_runtime_1.jsx)(NFT_style_1.PreviewAvatar, { src: imageUrl })), (0, jsx_runtime_1.jsxs)(material_1.Box, { ml: 2, children: [isLoading ? ((0, jsx_runtime_1.jsx)(material_1.Skeleton, { width: 144, height: 21, variant: "text" })) : ((0, jsx_runtime_1.jsx)(material_1.Typography, { fontSize: 14, color: "text.secondary", children: collectonName })), isLoading ? ((0, jsx_runtime_1.jsx)(material_1.Skeleton, { width: 112, height: 27, variant: "text" })) : ((0, jsx_runtime_1.jsx)(material_1.Typography, { fontSize: 18, fontWeight: 600, children: assetName })), isLoading ? ((0, jsx_runtime_1.jsx)(material_1.Skeleton, { width: 128, height: 21, variant: "text" })) : owner ? ((0, jsx_runtime_1.jsxs)(material_1.Typography, { fontSize: 14, color: "text.secondary", children: [t('swap.ownedBy'), ' ', (0, jsx_runtime_1.jsx)(material_1.Link, { href: owner.url, target: "_blank", underline: "none", color: "primary", children: owner.name })] })) : null] })] }), (0, jsx_runtime_1.jsx)(Token_1.Token, { token: token, isLoading: isLoading, mt: 2 })] }));
|
|
40
28
|
};
|
|
41
29
|
exports.NFT = NFT;
|
|
@@ -11,6 +11,6 @@ export declare const PreviewAvatar: import("@emotion/styled").StyledComponent<{
|
|
|
11
11
|
srcSet?: string | undefined;
|
|
12
12
|
sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
|
|
13
13
|
variant?: "square" | "circular" | "rounded" | undefined;
|
|
14
|
-
} & import("@mui/material/OverridableComponent").CommonProps & Omit<
|
|
14
|
+
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
15
15
|
ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
|
|
16
16
|
}, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "variant" | "alt" | "imgProps" | "sizes" | "src" | "srcSet"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -7,13 +7,13 @@ const material_1 = require("@mui/material");
|
|
|
7
7
|
const react_i18next_1 = require("react-i18next");
|
|
8
8
|
const NotFound = () => {
|
|
9
9
|
const { t } = (0, react_i18next_1.useTranslation)();
|
|
10
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Box,
|
|
10
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
11
11
|
display: 'flex',
|
|
12
12
|
justifyContent: 'center',
|
|
13
13
|
alignItems: 'center',
|
|
14
14
|
flexDirection: 'column',
|
|
15
15
|
flex: 1,
|
|
16
16
|
padding: 3,
|
|
17
|
-
}
|
|
17
|
+
}, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { fontSize: 48, children: (0, jsx_runtime_1.jsx)(icons_material_1.Block, { fontSize: "inherit" }) }), (0, jsx_runtime_1.jsx)(material_1.Typography, { fontSize: 18, fontWeight: 700, children: t('tooltip.notFound.title') }), (0, jsx_runtime_1.jsx)(material_1.Typography, { fontSize: 14, color: "text.secondary", textAlign: "center", mt: 2, children: t('tooltip.notFound.text') })] }));
|
|
18
18
|
};
|
|
19
19
|
exports.NotFound = NotFound;
|
|
@@ -17,10 +17,10 @@ const PoweredBy = () => {
|
|
|
17
17
|
pathname.includes(utils_1.navigationRoutes.toToken)) {
|
|
18
18
|
return null;
|
|
19
19
|
}
|
|
20
|
-
return ((0, jsx_runtime_1.jsx)(material_1.Box,
|
|
20
|
+
return ((0, jsx_runtime_1.jsx)(material_1.Box, { px: 3, py: hiddenUI?.includes(types_1.HiddenUI.PoweredBy) ? 1 : 2, sx: {
|
|
21
21
|
display: 'flex',
|
|
22
22
|
alignItems: 'flex-end',
|
|
23
23
|
justifyContent: 'flex-end',
|
|
24
|
-
}
|
|
24
|
+
}, children: !hiddenUI?.includes(types_1.HiddenUI.PoweredBy) ? ((0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: `v${version_1.version}`, placement: "top", enterDelay: 3000, arrow: true, children: (0, jsx_runtime_1.jsxs)(PoweredBy_style_1.Link, { href: "https://li.fi", target: "_blank", underline: "none", color: "text.primary", children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { color: "text.secondary", fontSize: 12, px: 0.5, children: "Powered by" }), (0, jsx_runtime_1.jsx)(LiFiLogo_1.LiFiLogo, { variant: "full", style: { height: 16, width: 42 } })] }) })) : null }));
|
|
25
25
|
};
|
|
26
26
|
exports.PoweredBy = PoweredBy;
|
|
@@ -7,6 +7,6 @@ export declare const Link: import("@emotion/styled").StyledComponent<Omit<import
|
|
|
7
7
|
TypographyClasses?: (Partial<import("@mui/material").TypographyClasses> & Partial<import("@mui/material").ClassNameMap<never>>) | undefined;
|
|
8
8
|
underline?: "none" | "always" | "hover" | undefined;
|
|
9
9
|
variant?: "button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "subtitle1" | "subtitle2" | "body1" | "body2" | "overline" | "@supports (font-variation-settings: normal)" | undefined;
|
|
10
|
-
} & import("@mui/material/OverridableComponent").CommonProps & Omit<
|
|
10
|
+
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
|
|
11
11
|
ref?: ((instance: HTMLAnchorElement | null) => void) | import("react").RefObject<HTMLAnchorElement> | null | undefined;
|
|
12
12
|
}, keyof import("@mui/material/OverridableComponent").CommonProps | "p" | "slot" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "children" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "sx" | "key" | "download" | "href" | "hrefLang" | "media" | "ping" | "rel" | "target" | "type" | "referrerPolicy" | "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" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "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" | "overflow" | "padding" | "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" | "underline" | "TypographyClasses"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
-
var t = {};
|
|
4
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
-
t[p] = s[p];
|
|
6
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
-
t[p[i]] = s[p[i]];
|
|
10
|
-
}
|
|
11
|
-
return t;
|
|
12
|
-
};
|
|
13
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
3
|
exports.ProgressToNextUpdate = void 0;
|
|
15
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
@@ -20,8 +9,7 @@ const getProgressValue = (updatedAt, timeToUpdate) => updatedAt
|
|
|
20
9
|
? Math.min(100, ((Date.now() - updatedAt) / timeToUpdate) * 100)
|
|
21
10
|
: 0;
|
|
22
11
|
const getSecondsToUpdate = (updatedAt, timeToUpdate) => Math.max(Math.round((timeToUpdate - (Date.now() - updatedAt)) / 1000), 0);
|
|
23
|
-
const ProgressToNextUpdate = (
|
|
24
|
-
var { updatedAt, timeToUpdate, isLoading, onClick } = _a, other = __rest(_a, ["updatedAt", "timeToUpdate", "isLoading", "onClick"]);
|
|
12
|
+
const ProgressToNextUpdate = ({ updatedAt, timeToUpdate, isLoading, onClick, ...other }) => {
|
|
25
13
|
const { t } = (0, react_i18next_1.useTranslation)();
|
|
26
14
|
const [value, setValue] = (0, react_1.useState)(() => getProgressValue(updatedAt, timeToUpdate));
|
|
27
15
|
(0, react_1.useEffect)(() => {
|
|
@@ -40,15 +28,15 @@ const ProgressToNextUpdate = (_a) => {
|
|
|
40
28
|
setValue(0);
|
|
41
29
|
}
|
|
42
30
|
}, [isLoading]);
|
|
43
|
-
return ((0, jsx_runtime_1.jsx)(material_1.IconButton,
|
|
31
|
+
return ((0, jsx_runtime_1.jsx)(material_1.IconButton, { onClick: onClick, disabled: isLoading, ...other, children: (0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: t('tooltip.progressToNextUpdate', {
|
|
44
32
|
value: getSecondsToUpdate(updatedAt, timeToUpdate),
|
|
45
|
-
}), placement: "top", enterDelay: 400, arrow: true
|
|
33
|
+
}), placement: "top", enterDelay: 400, arrow: true, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
46
34
|
display: 'grid',
|
|
47
35
|
position: 'relative',
|
|
48
36
|
placeItems: 'center',
|
|
49
37
|
width: 24,
|
|
50
38
|
height: 24,
|
|
51
|
-
}
|
|
39
|
+
}, children: [(0, jsx_runtime_1.jsx)(material_1.CircularProgress, { variant: "determinate", size: 24, value: 100, sx: (theme) => ({
|
|
52
40
|
position: 'absolute',
|
|
53
41
|
color: theme.palette.mode === 'light'
|
|
54
42
|
? theme.palette.grey[300]
|
|
@@ -58,6 +46,6 @@ const ProgressToNextUpdate = (_a) => {
|
|
|
58
46
|
color: theme.palette.mode === 'light'
|
|
59
47
|
? theme.palette.primary.main
|
|
60
48
|
: theme.palette.primary.light,
|
|
61
|
-
}) })] })
|
|
49
|
+
}) })] }) }) }));
|
|
62
50
|
};
|
|
63
51
|
exports.ProgressToNextUpdate = ProgressToNextUpdate;
|
|
@@ -21,6 +21,6 @@ const ReverseTokensButton = ({ vertical, }) => {
|
|
|
21
21
|
setValue(providers_1.SwapFormKey.ToChain, fromChain, { shouldTouch: true });
|
|
22
22
|
setValue(providers_1.SwapFormKey.ToToken, fromToken, { shouldTouch: true });
|
|
23
23
|
};
|
|
24
|
-
return ((0, jsx_runtime_1.jsx)(ReverseTokensButton_style_1.IconButton,
|
|
24
|
+
return ((0, jsx_runtime_1.jsx)(ReverseTokensButton_style_1.IconButton, { onClick: handleClick, size: "small", children: vertical ? (0, jsx_runtime_1.jsx)(icons_material_1.SwapVert, {}) : (0, jsx_runtime_1.jsx)(icons_material_1.SwapHoriz, {}) }));
|
|
25
25
|
};
|
|
26
26
|
exports.ReverseTokensButton = ReverseTokensButton;
|
|
@@ -24,6 +24,6 @@ export declare const IconButton: import("@emotion/styled").StyledComponent<{
|
|
|
24
24
|
tabIndex?: number | undefined;
|
|
25
25
|
TouchRippleProps?: Partial<import("@mui/material/ButtonBase/TouchRipple").TouchRippleProps> | undefined;
|
|
26
26
|
touchRippleRef?: import("react").Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions> | undefined;
|
|
27
|
-
}, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<
|
|
27
|
+
}, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
28
28
|
ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
|
|
29
29
|
}, keyof import("@mui/material/OverridableComponent").CommonProps | "tabIndex" | "color" | "children" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "size" | "edge"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
package/cjs/components/Select.js
CHANGED
|
@@ -20,8 +20,8 @@ const SelectChainAndToken = (props) => {
|
|
|
20
20
|
],
|
|
21
21
|
});
|
|
22
22
|
const disabledReverse = variant === 'refuel' ||
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
disabledUI?.includes(types_1.DisabledUI.FromToken) ||
|
|
24
|
+
disabledUI?.includes(types_1.DisabledUI.ToToken);
|
|
25
25
|
const nftVariant = variant === 'nft';
|
|
26
26
|
const isCompact = fromChain &&
|
|
27
27
|
toChain &&
|
|
@@ -29,10 +29,10 @@ const SelectChainAndToken = (props) => {
|
|
|
29
29
|
toToken &&
|
|
30
30
|
!prefersNarrowView &&
|
|
31
31
|
!nftVariant;
|
|
32
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Box,
|
|
32
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: { display: 'flex', flexDirection: isCompact ? 'row' : 'column' }, ...props, children: [(0, jsx_runtime_1.jsx)(SelectTokenButton_1.SelectTokenButton, { formType: "from", compact: isCompact }), !nftVariant ? ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
|
|
33
33
|
display: 'flex',
|
|
34
34
|
justifyContent: 'center',
|
|
35
35
|
alignItems: 'center',
|
|
36
|
-
}, m: !disabledReverse ? -1.125 : 1
|
|
36
|
+
}, m: !disabledReverse ? -1.125 : 1, children: !disabledReverse ? ((0, jsx_runtime_1.jsx)(ReverseTokensButton_1.ReverseTokensButton, { vertical: !isCompact })) : null })) : null, !nftVariant ? ((0, jsx_runtime_1.jsx)(SelectTokenButton_1.SelectTokenButton, { formType: "to", compact: isCompact })) : null] }));
|
|
37
37
|
};
|
|
38
38
|
exports.SelectChainAndToken = SelectChainAndToken;
|