@lifi/widget 3.0.0-alpha.11 → 3.0.0-alpha.13
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.tsx +30 -14
- package/AppDrawer.tsx +82 -91
- package/AppDrawerContext.ts +9 -0
- package/_cjs/App.js +16 -3
- package/_cjs/App.js.map +1 -1
- package/_cjs/AppDrawer.d.ts +4 -2
- package/_cjs/AppDrawer.js +20 -18
- package/_cjs/AppDrawer.js.map +1 -1
- package/_cjs/AppDrawerContext.d.ts +6 -0
- package/_cjs/AppDrawerContext.js +8 -0
- package/_cjs/AppDrawerContext.js.map +1 -0
- package/_cjs/components/ActiveTransactions/ActiveTransactions.js +1 -3
- package/_cjs/components/ActiveTransactions/ActiveTransactions.js.map +1 -1
- package/_cjs/components/AmountInput/AmountInput.js +9 -10
- package/_cjs/components/AmountInput/AmountInput.js.map +1 -1
- package/_cjs/components/AmountInput/AmountInput.style.d.ts +3 -0
- package/_cjs/components/AmountInput/AmountInput.style.js +9 -4
- package/_cjs/components/AmountInput/AmountInput.style.js.map +1 -1
- package/_cjs/components/AmountInput/AmountInputAdornment.style.d.ts +4 -1
- package/_cjs/components/AmountInput/AmountInputAdornment.style.js +7 -2
- package/_cjs/components/AmountInput/AmountInputAdornment.style.js.map +1 -1
- package/_cjs/components/AmountInput/AmountInputEndAdornment.js +2 -2
- package/_cjs/components/AmountInput/AmountInputEndAdornment.js.map +1 -1
- package/_cjs/components/AmountInput/AmountInputStartAdornment.js +2 -2
- package/_cjs/components/AmountInput/AmountInputStartAdornment.js.map +1 -1
- package/_cjs/components/AmountInput/{FormPriceHelperText.d.ts → PriceFormHelperText.d.ts} +2 -2
- package/_cjs/components/AmountInput/{FormPriceHelperText.js → PriceFormHelperText.js} +16 -10
- package/_cjs/components/AmountInput/PriceFormHelperText.js.map +1 -0
- package/_cjs/components/BaseTransactionButton/BaseTransactionButton.js +6 -6
- package/_cjs/components/BaseTransactionButton/BaseTransactionButton.js.map +1 -1
- package/_cjs/components/Card/CardHeader.js +6 -5
- package/_cjs/components/Card/CardHeader.js.map +1 -1
- package/_cjs/components/Card/CardTitle.js +3 -4
- package/_cjs/components/Card/CardTitle.js.map +1 -1
- package/_cjs/components/ChainSelect/ChainSelect.js +7 -5
- package/_cjs/components/ChainSelect/ChainSelect.js.map +1 -1
- package/_cjs/components/ChainSelect/useChainSelect.d.ts +1 -1
- package/_cjs/components/ChainSelect/useChainSelect.js +3 -3
- package/_cjs/components/ChainSelect/useChainSelect.js.map +1 -1
- package/_cjs/components/Header/CloseDrawerButton.d.ts +1 -0
- package/_cjs/components/Header/CloseDrawerButton.js +16 -0
- package/_cjs/components/Header/CloseDrawerButton.js.map +1 -0
- package/_cjs/components/Header/EVMDisconnectIconButton.d.ts +4 -0
- package/_cjs/components/Header/EVMDisconnectIconButton.js +16 -0
- package/_cjs/components/Header/EVMDisconnectIconButton.js.map +1 -0
- package/_cjs/components/Header/Header.js +1 -6
- package/_cjs/components/Header/Header.js.map +1 -1
- package/_cjs/components/Header/Header.style.js +10 -4
- package/_cjs/components/Header/Header.style.js.map +1 -1
- package/_cjs/components/Header/NavigationHeader.d.ts +0 -1
- package/_cjs/components/Header/NavigationHeader.js +7 -11
- package/_cjs/components/Header/NavigationHeader.js.map +1 -1
- package/_cjs/components/Header/SVMDisconnectIconButton.d.ts +1 -0
- package/_cjs/components/Header/SVMDisconnectIconButton.js +16 -0
- package/_cjs/components/Header/SVMDisconnectIconButton.js.map +1 -0
- package/_cjs/components/Header/SettingsButton.style.js +18 -21
- package/_cjs/components/Header/SettingsButton.style.js.map +1 -1
- package/_cjs/components/Header/TransactionHistoryButton.d.ts +1 -0
- package/_cjs/components/Header/TransactionHistoryButton.js +17 -0
- package/_cjs/components/Header/TransactionHistoryButton.js.map +1 -0
- package/_cjs/components/Header/WalletHeader.d.ts +1 -0
- package/_cjs/components/Header/WalletHeader.js +25 -9
- package/_cjs/components/Header/WalletHeader.js.map +1 -1
- package/_cjs/components/Header/WalletMenu.js +8 -24
- package/_cjs/components/Header/WalletMenu.js.map +1 -1
- package/_cjs/components/Insurance/InsuranceCard.js +1 -8
- package/_cjs/components/Insurance/InsuranceCard.js.map +1 -1
- package/_cjs/components/PageContainer.d.ts +9 -0
- package/_cjs/components/PageContainer.js +13 -0
- package/_cjs/components/PageContainer.js.map +1 -0
- package/_cjs/components/ReverseTokensButton/ReverseTokensButton.js +10 -9
- package/_cjs/components/ReverseTokensButton/ReverseTokensButton.js.map +1 -1
- package/_cjs/components/ReverseTokensButton/ReverseTokensButton.style.js +3 -0
- package/_cjs/components/ReverseTokensButton/ReverseTokensButton.style.js.map +1 -1
- package/_cjs/components/RouteCard/RouteCard.js +6 -6
- package/_cjs/components/RouteCard/RouteCard.js.map +1 -1
- package/_cjs/components/RouteCard/RouteCard.style.d.ts +3 -0
- package/_cjs/components/RouteCard/RouteCard.style.js +7 -2
- package/_cjs/components/RouteCard/RouteCard.style.js.map +1 -1
- package/_cjs/components/RouteCard/RouteCardEssentials.js +12 -10
- package/_cjs/components/RouteCard/RouteCardEssentials.js.map +1 -1
- package/_cjs/components/RouteCard/RouteCardEssentialsExpanded.d.ts +3 -0
- package/_cjs/components/RouteCard/RouteCardEssentialsExpanded.js +32 -0
- package/_cjs/components/RouteCard/RouteCardEssentialsExpanded.js.map +1 -0
- package/_cjs/components/RouteCard/RouteCardSkeleton.js +2 -1
- package/_cjs/components/RouteCard/RouteCardSkeleton.js.map +1 -1
- package/_cjs/components/RouteCard/types.d.ts +6 -2
- package/_cjs/components/Routes/Routes.js +1 -1
- package/_cjs/components/Routes/Routes.js.map +1 -1
- package/_cjs/components/Routes/RoutesExpanded.js +2 -1
- package/_cjs/components/Routes/RoutesExpanded.js.map +1 -1
- package/_cjs/components/SelectTokenButton/SelectTokenButton.js +8 -2
- package/_cjs/components/SelectTokenButton/SelectTokenButton.js.map +1 -1
- package/_cjs/components/SelectTokenButton/SelectTokenButton.style.js +6 -7
- package/_cjs/components/SelectTokenButton/SelectTokenButton.style.js.map +1 -1
- package/_cjs/components/SmallAvatar.js +4 -4
- package/_cjs/components/Step/CircularProgress.js +5 -5
- package/_cjs/components/Step/CircularProgress.js.map +1 -1
- package/_cjs/components/Step/CircularProgress.style.js +3 -4
- package/_cjs/components/Step/CircularProgress.style.js.map +1 -1
- package/_cjs/components/Step/DestinationWalletAddress.js +2 -2
- package/_cjs/components/Step/DestinationWalletAddress.js.map +1 -1
- package/_cjs/components/Step/Step.js +1 -2
- package/_cjs/components/Step/Step.js.map +1 -1
- package/_cjs/components/Step/StepProcess.js +1 -1
- package/_cjs/components/Step/StepProcess.js.map +1 -1
- package/_cjs/components/Step/StepTimer.js +9 -8
- package/_cjs/components/Step/StepTimer.js.map +1 -1
- package/_cjs/components/StepActions/StepActions.js +15 -18
- package/_cjs/components/StepActions/StepActions.js.map +1 -1
- package/_cjs/components/StepActions/StepActions.style.d.ts +8 -1
- package/_cjs/components/StepActions/StepActions.style.js +27 -17
- package/_cjs/components/StepActions/StepActions.style.js.map +1 -1
- package/_cjs/components/{Step/GasStepProcess.d.ts → StepActions/StepFeeBreakdown.d.ts} +1 -1
- package/_cjs/components/StepActions/StepFeeBreakdown.js +45 -0
- package/_cjs/components/StepActions/StepFeeBreakdown.js.map +1 -0
- package/_cjs/components/StepActions/StepFees.d.ts +6 -0
- package/_cjs/components/StepActions/StepFees.js +28 -0
- package/_cjs/components/StepActions/StepFees.js.map +1 -0
- package/_cjs/components/Token/Token.d.ts +6 -5
- package/_cjs/components/Token/Token.js +31 -15
- package/_cjs/components/Token/Token.js.map +1 -1
- package/_cjs/components/Token/Token.style.d.ts +1 -4
- package/_cjs/components/Token/Token.style.js +6 -21
- package/_cjs/components/Token/Token.style.js.map +1 -1
- package/_cjs/components/TokenAvatar/TokenAvatar.d.ts +3 -0
- package/_cjs/components/TokenAvatar/TokenAvatar.js +7 -3
- package/_cjs/components/TokenAvatar/TokenAvatar.js.map +1 -1
- package/_cjs/components/TokenAvatar/TokenAvatar.style.js +23 -13
- package/_cjs/components/TokenAvatar/TokenAvatar.style.js.map +1 -1
- package/_cjs/components/TokenList/TokenList.js +3 -4
- package/_cjs/components/TokenList/TokenList.js.map +1 -1
- package/_cjs/components/TokenList/TokenList.style.js +7 -5
- package/_cjs/components/TokenList/TokenList.style.js.map +1 -1
- package/_cjs/components/TokenList/TokenListItem.js +7 -4
- package/_cjs/components/TokenList/TokenListItem.js.map +1 -1
- package/_cjs/components/TokenList/VirtualizedTokenList.js +4 -2
- package/_cjs/components/TokenList/VirtualizedTokenList.js.map +1 -1
- package/_cjs/components/TokenList/types.d.ts +3 -4
- package/_cjs/components/TokenList/useTokenSelect.js +6 -4
- package/_cjs/components/TokenList/useTokenSelect.js.map +1 -1
- package/_cjs/config/queryClient.js +0 -1
- package/_cjs/config/queryClient.js.map +1 -1
- package/_cjs/config/theme.js +2 -9
- package/_cjs/config/theme.js.map +1 -1
- package/_cjs/config/version.d.ts +1 -1
- package/_cjs/config/version.js +1 -1
- package/_cjs/config/walletConnect.d.ts +1 -0
- package/_cjs/config/walletConnect.js +5 -0
- package/_cjs/config/walletConnect.js.map +1 -0
- package/_cjs/hooks/useAccount.d.ts +4 -1
- package/_cjs/hooks/useAccount.js +5 -16
- package/_cjs/hooks/useAccount.js.map +1 -1
- package/_cjs/hooks/useAvailableChains.js +12 -6
- package/_cjs/hooks/useAvailableChains.js.map +1 -1
- package/_cjs/hooks/useChains.d.ts +2 -1
- package/_cjs/hooks/useChains.js +7 -3
- package/_cjs/hooks/useChains.js.map +1 -1
- package/_cjs/hooks/useDebouncedWatch.d.ts +1 -2
- package/_cjs/hooks/useDebouncedWatch.js +1 -1
- package/_cjs/hooks/useDebouncedWatch.js.map +1 -1
- package/_cjs/hooks/useFromTokenSufficiency.js +8 -7
- package/_cjs/hooks/useFromTokenSufficiency.js.map +1 -1
- package/_cjs/hooks/useGasRecommendation.d.ts +1 -1
- package/_cjs/hooks/useGasRecommendation.js.map +1 -1
- package/_cjs/hooks/useGasRefuel.js +2 -2
- package/_cjs/hooks/useGasRefuel.js.map +1 -1
- package/_cjs/hooks/useGasSufficiency.js +7 -6
- package/_cjs/hooks/useGasSufficiency.js.map +1 -1
- package/_cjs/hooks/useRouteExecution.js +5 -5
- package/_cjs/hooks/useRouteExecution.js.map +1 -1
- package/_cjs/hooks/useRoutes.d.ts +1 -1
- package/_cjs/hooks/useRoutes.js +22 -15
- package/_cjs/hooks/useRoutes.js.map +1 -1
- package/_cjs/hooks/useTokenAddressBalance.d.ts +2 -1
- package/_cjs/hooks/useTokenAddressBalance.js +2 -1
- package/_cjs/hooks/useTokenAddressBalance.js.map +1 -1
- package/_cjs/hooks/useTokenBalance.d.ts +1 -1
- package/_cjs/hooks/useTokenBalance.js +8 -19
- package/_cjs/hooks/useTokenBalance.js.map +1 -1
- package/_cjs/hooks/useTokenBalances.d.ts +2 -1
- package/_cjs/hooks/useTokenBalances.js +1 -0
- package/_cjs/hooks/useTokenBalances.js.map +1 -1
- package/_cjs/hooks/useTools.js +3 -2
- package/_cjs/hooks/useTools.js.map +1 -1
- package/_cjs/hooks/useTransactionHistory.d.ts +2 -2
- package/_cjs/hooks/useTransactionHistory.js +32 -23
- package/_cjs/hooks/useTransactionHistory.js.map +1 -1
- package/_cjs/i18n/en.json +10 -6
- package/_cjs/pages/ActiveTransactionsPage/ActiveTransactionsPage.js +3 -4
- package/_cjs/pages/ActiveTransactionsPage/ActiveTransactionsPage.js.map +1 -1
- package/_cjs/pages/LanguagesPage/LanguagesPage.js +2 -1
- package/_cjs/pages/LanguagesPage/LanguagesPage.js.map +1 -1
- package/_cjs/pages/MainPage/MainPage.js +2 -2
- package/_cjs/pages/MainPage/MainPage.js.map +1 -1
- package/_cjs/pages/RoutesPage/RoutesPage.js +2 -2
- package/_cjs/pages/RoutesPage/RoutesPage.js.map +1 -1
- package/_cjs/pages/SelectChainPage/SelectChainPage.js +2 -1
- package/_cjs/pages/SelectChainPage/SelectChainPage.js.map +1 -1
- package/_cjs/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.js +2 -1
- package/_cjs/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.js.map +1 -1
- package/_cjs/pages/SelectNativeTokenPage/SelectNativeTokenPage.js +2 -1
- package/_cjs/pages/SelectNativeTokenPage/SelectNativeTokenPage.js.map +1 -1
- package/_cjs/pages/SelectTokenPage/SearchTokenInput.js +2 -2
- package/_cjs/pages/SelectTokenPage/SearchTokenInput.js.map +1 -1
- package/_cjs/pages/SelectTokenPage/SelectTokenPage.js +2 -1
- package/_cjs/pages/SelectTokenPage/SelectTokenPage.js.map +1 -1
- package/_cjs/pages/SelectWalletPage/SelectWalletPage.js +2 -1
- package/_cjs/pages/SelectWalletPage/SelectWalletPage.js.map +1 -1
- package/_cjs/pages/SettingsPage/ResetSettingsButton.js +1 -1
- package/_cjs/pages/SettingsPage/ResetSettingsButton.js.map +1 -1
- package/_cjs/pages/SettingsPage/SettingsCard/SettingCard.js +1 -1
- package/_cjs/pages/SettingsPage/SettingsCard/SettingCard.style.js +7 -6
- package/_cjs/pages/SettingsPage/SettingsCard/SettingCard.style.js.map +1 -1
- package/_cjs/pages/SettingsPage/SettingsPage.js +6 -6
- package/_cjs/pages/SettingsPage/SettingsPage.js.map +1 -1
- package/_cjs/pages/SettingsPage/SlippageSettings/SlippageSettings.js +6 -7
- package/_cjs/pages/SettingsPage/SlippageSettings/SlippageSettings.js.map +1 -1
- package/_cjs/pages/SettingsPage/SlippageSettings/SlippageSettings.style.js +1 -1
- package/_cjs/pages/SettingsPage/SlippageSettings/SlippageSettings.style.js.map +1 -1
- package/_cjs/pages/TransactionDetailsPage/TransactionDetailsPage.js +2 -2
- package/_cjs/pages/TransactionDetailsPage/TransactionDetailsPage.js.map +1 -1
- package/_cjs/pages/TransactionDetailsPage/TransactionDetailsSkeleton.js +6 -14
- package/_cjs/pages/TransactionDetailsPage/TransactionDetailsSkeleton.js.map +1 -1
- package/_cjs/pages/TransactionHistoryPage/TransactionHistoryItem.js +1 -1
- package/_cjs/pages/TransactionHistoryPage/TransactionHistoryItem.js.map +1 -1
- package/_cjs/pages/TransactionHistoryPage/TransactionHistoryPage.js +3 -2
- package/_cjs/pages/TransactionHistoryPage/TransactionHistoryPage.js.map +1 -1
- package/_cjs/pages/TransactionHistoryPage/TransactionHistorySkeleton.d.ts +1 -1
- package/_cjs/pages/TransactionHistoryPage/TransactionHistorySkeleton.js +4 -9
- package/_cjs/pages/TransactionHistoryPage/TransactionHistorySkeleton.js.map +1 -1
- package/_cjs/pages/TransactionPage/StatusBottomSheet.js +13 -9
- package/_cjs/pages/TransactionPage/StatusBottomSheet.js.map +1 -1
- package/_cjs/pages/TransactionPage/TransactionPage.js +2 -2
- package/_cjs/pages/TransactionPage/TransactionPage.js.map +1 -1
- package/_cjs/providers/I18nProvider/I18nProvider.js +2 -1
- package/_cjs/providers/I18nProvider/I18nProvider.js.map +1 -1
- package/_cjs/providers/WalletProvider/EVMBaseProvider.d.ts +2 -0
- package/_cjs/providers/WalletProvider/EVMBaseProvider.js +91 -0
- package/_cjs/providers/WalletProvider/EVMBaseProvider.js.map +1 -0
- package/_cjs/providers/WalletProvider/EVMExternalContext.d.ts +2 -0
- package/_cjs/providers/WalletProvider/EVMExternalContext.js +6 -0
- package/_cjs/providers/WalletProvider/EVMExternalContext.js.map +1 -0
- package/_cjs/providers/WalletProvider/EVMProvider.d.ts +1 -1
- package/_cjs/providers/WalletProvider/EVMProvider.js +13 -70
- package/_cjs/providers/WalletProvider/EVMProvider.js.map +1 -1
- package/_cjs/providers/WalletProvider/SDKProviders.js +15 -7
- package/_cjs/providers/WalletProvider/SDKProviders.js.map +1 -1
- package/_cjs/providers/WalletProvider/SVMBaseProvider.d.ts +2 -0
- package/_cjs/providers/WalletProvider/{SolanaProvider.js → SVMBaseProvider.js} +4 -14
- package/_cjs/providers/WalletProvider/SVMBaseProvider.js.map +1 -0
- package/_cjs/providers/WalletProvider/SVMExternalContext.d.ts +2 -0
- package/_cjs/providers/WalletProvider/SVMExternalContext.js +6 -0
- package/_cjs/providers/WalletProvider/SVMExternalContext.js.map +1 -0
- package/_cjs/providers/WalletProvider/SVMProvider.d.ts +3 -0
- package/_cjs/providers/WalletProvider/SVMProvider.js +23 -0
- package/_cjs/providers/WalletProvider/SVMProvider.js.map +1 -0
- package/_cjs/providers/WalletProvider/WalletProvider.js +2 -2
- package/_cjs/providers/WalletProvider/WalletProvider.js.map +1 -1
- package/_cjs/providers/WalletProvider/index.d.ts +1 -0
- package/_cjs/providers/WalletProvider/index.js +1 -0
- package/_cjs/providers/WalletProvider/index.js.map +1 -1
- package/_cjs/providers/WalletProvider/useHasExternalWalletProvider.d.ts +7 -0
- package/_cjs/providers/WalletProvider/useHasExternalWalletProvider.js +27 -0
- package/_cjs/providers/WalletProvider/useHasExternalWalletProvider.js.map +1 -0
- package/_cjs/providers/WidgetProvider/WidgetProvider.js.map +1 -1
- package/_cjs/providers/WidgetProvider/index.d.ts +1 -2
- package/_cjs/providers/WidgetProvider/index.js +1 -2
- package/_cjs/providers/WidgetProvider/index.js.map +1 -1
- package/_cjs/stores/StoreProvider.js +3 -3
- package/_cjs/stores/StoreProvider.js.map +1 -1
- package/_cjs/stores/chains/ChainOrderStore.js +19 -16
- package/_cjs/stores/chains/ChainOrderStore.js.map +1 -1
- package/_cjs/stores/chains/createChainOrderStore.js +34 -15
- package/_cjs/stores/chains/createChainOrderStore.js.map +1 -1
- package/_cjs/stores/chains/types.d.ts +11 -4
- package/_cjs/stores/chains/useChainOrder.d.ts +2 -1
- package/_cjs/stores/chains/useChainOrder.js +2 -2
- package/_cjs/stores/chains/useChainOrder.js.map +1 -1
- package/_cjs/stores/form/FormStore.d.ts +1 -1
- package/_cjs/stores/form/FormStore.js +10 -15
- package/_cjs/stores/form/FormStore.js.map +1 -1
- package/_cjs/stores/form/FormUpdater.d.ts +3 -3
- package/_cjs/stores/form/FormUpdater.js +6 -7
- package/_cjs/stores/form/FormUpdater.js.map +1 -1
- package/_cjs/stores/form/URLSearchParamsBuilder.js +3 -2
- package/_cjs/stores/form/URLSearchParamsBuilder.js.map +1 -1
- package/_cjs/stores/form/createFormStore.d.ts +1 -1
- package/_cjs/stores/form/createFormStore.js +121 -115
- package/_cjs/stores/form/createFormStore.js.map +1 -1
- package/_cjs/stores/form/types.d.ts +21 -35
- package/_cjs/stores/form/types.js +1 -16
- package/_cjs/stores/form/types.js.map +1 -1
- package/_cjs/stores/form/useFieldActions.js +9 -10
- package/_cjs/stores/form/useFieldActions.js.map +1 -1
- package/_cjs/stores/form/useFieldController.d.ts +1 -1
- package/_cjs/stores/form/useFieldValues.d.ts +2 -2
- package/_cjs/stores/form/useFieldValues.js +3 -2
- package/_cjs/stores/form/useFieldValues.js.map +1 -1
- package/_cjs/stores/form/useTouchedFields.d.ts +14 -1
- package/_cjs/stores/form/useValidationActions.js +7 -11
- package/_cjs/stores/form/useValidationActions.js.map +1 -1
- package/_cjs/stores/routes/useExecutingRoutesIds.d.ts +1 -1
- package/_cjs/stores/routes/useExecutingRoutesIds.js +5 -2
- package/_cjs/stores/routes/useExecutingRoutesIds.js.map +1 -1
- package/_cjs/stores/settings/useSettingsStore.d.ts +1 -0
- package/_cjs/stores/settings/useSettingsStore.js +3 -2
- package/_cjs/stores/settings/useSettingsStore.js.map +1 -1
- package/_cjs/types/widget.d.ts +26 -23
- package/_cjs/types/widget.js +1 -0
- package/_cjs/types/widget.js.map +1 -1
- package/_cjs/utils/converters.js +12 -6
- package/_cjs/utils/converters.js.map +1 -1
- package/_cjs/utils/fees.d.ts +9 -0
- package/_cjs/{components/RouteCard/utils.js → utils/fees.js} +15 -8
- package/_cjs/utils/fees.js.map +1 -0
- package/_cjs/utils/index.d.ts +2 -0
- package/_cjs/utils/index.js +2 -0
- package/_cjs/utils/index.js.map +1 -1
- package/_cjs/utils/item.d.ts +2 -0
- package/_cjs/{providers/WidgetProvider/utils.js → utils/item.js} +1 -1
- package/_cjs/utils/item.js.map +1 -0
- package/_esm/App.js +16 -3
- package/_esm/App.js.map +1 -1
- package/_esm/AppDrawer.d.ts +4 -2
- package/_esm/AppDrawer.js +21 -19
- package/_esm/AppDrawer.js.map +1 -1
- package/_esm/AppDrawerContext.d.ts +6 -0
- package/_esm/AppDrawerContext.js +4 -0
- package/_esm/AppDrawerContext.js.map +1 -0
- package/_esm/components/ActiveTransactions/ActiveTransactions.js +1 -3
- package/_esm/components/ActiveTransactions/ActiveTransactions.js.map +1 -1
- package/_esm/components/AmountInput/AmountInput.js +8 -9
- package/_esm/components/AmountInput/AmountInput.js.map +1 -1
- package/_esm/components/AmountInput/AmountInput.style.d.ts +3 -0
- package/_esm/components/AmountInput/AmountInput.style.js +9 -4
- package/_esm/components/AmountInput/AmountInput.style.js.map +1 -1
- package/_esm/components/AmountInput/AmountInputAdornment.style.d.ts +4 -1
- package/_esm/components/AmountInput/AmountInputAdornment.style.js +7 -2
- package/_esm/components/AmountInput/AmountInputAdornment.style.js.map +1 -1
- package/_esm/components/AmountInput/AmountInputEndAdornment.js +4 -4
- package/_esm/components/AmountInput/AmountInputEndAdornment.js.map +1 -1
- package/_esm/components/AmountInput/AmountInputStartAdornment.js +2 -2
- package/_esm/components/AmountInput/AmountInputStartAdornment.js.map +1 -1
- package/_esm/components/AmountInput/{FormPriceHelperText.d.ts → PriceFormHelperText.d.ts} +2 -2
- package/_esm/components/AmountInput/{FormPriceHelperText.js → PriceFormHelperText.js} +13 -7
- package/_esm/components/AmountInput/PriceFormHelperText.js.map +1 -0
- package/_esm/components/BaseTransactionButton/BaseTransactionButton.js +6 -6
- package/_esm/components/BaseTransactionButton/BaseTransactionButton.js.map +1 -1
- package/_esm/components/Card/CardHeader.js +6 -5
- package/_esm/components/Card/CardHeader.js.map +1 -1
- package/_esm/components/Card/CardTitle.js +3 -4
- package/_esm/components/Card/CardTitle.js.map +1 -1
- package/_esm/components/ChainSelect/ChainSelect.js +8 -6
- package/_esm/components/ChainSelect/ChainSelect.js.map +1 -1
- package/_esm/components/ChainSelect/useChainSelect.d.ts +1 -1
- package/_esm/components/ChainSelect/useChainSelect.js +4 -4
- package/_esm/components/ChainSelect/useChainSelect.js.map +1 -1
- package/_esm/components/Header/CloseDrawerButton.d.ts +1 -0
- package/_esm/components/Header/CloseDrawerButton.js +12 -0
- package/_esm/components/Header/CloseDrawerButton.js.map +1 -0
- package/_esm/components/Header/EVMDisconnectIconButton.d.ts +4 -0
- package/_esm/components/Header/EVMDisconnectIconButton.js +12 -0
- package/_esm/components/Header/EVMDisconnectIconButton.js.map +1 -0
- package/_esm/components/Header/Header.js +1 -6
- package/_esm/components/Header/Header.js.map +1 -1
- package/_esm/components/Header/Header.style.js +10 -4
- package/_esm/components/Header/Header.style.js.map +1 -1
- package/_esm/components/Header/NavigationHeader.d.ts +0 -1
- package/_esm/components/Header/NavigationHeader.js +8 -11
- package/_esm/components/Header/NavigationHeader.js.map +1 -1
- package/_esm/components/Header/SVMDisconnectIconButton.d.ts +1 -0
- package/_esm/components/Header/SVMDisconnectIconButton.js +12 -0
- package/_esm/components/Header/SVMDisconnectIconButton.js.map +1 -0
- package/_esm/components/Header/SettingsButton.style.js +18 -21
- package/_esm/components/Header/SettingsButton.style.js.map +1 -1
- package/_esm/components/Header/TransactionHistoryButton.d.ts +1 -0
- package/_esm/components/Header/TransactionHistoryButton.js +13 -0
- package/_esm/components/Header/TransactionHistoryButton.js.map +1 -0
- package/_esm/components/Header/WalletHeader.d.ts +1 -0
- package/_esm/components/Header/WalletHeader.js +24 -9
- package/_esm/components/Header/WalletHeader.js.map +1 -1
- package/_esm/components/Header/WalletMenu.js +7 -23
- package/_esm/components/Header/WalletMenu.js.map +1 -1
- package/_esm/components/Insurance/InsuranceCard.js +2 -9
- package/_esm/components/Insurance/InsuranceCard.js.map +1 -1
- package/_esm/components/PageContainer.d.ts +9 -0
- package/_esm/components/PageContainer.js +10 -0
- package/_esm/components/PageContainer.js.map +1 -0
- package/_esm/components/ReverseTokensButton/ReverseTokensButton.js +10 -9
- package/_esm/components/ReverseTokensButton/ReverseTokensButton.js.map +1 -1
- package/_esm/components/ReverseTokensButton/ReverseTokensButton.style.js +3 -0
- package/_esm/components/ReverseTokensButton/ReverseTokensButton.style.js.map +1 -1
- package/_esm/components/RouteCard/RouteCard.js +6 -6
- package/_esm/components/RouteCard/RouteCard.js.map +1 -1
- package/_esm/components/RouteCard/RouteCard.style.d.ts +3 -0
- package/_esm/components/RouteCard/RouteCard.style.js +7 -2
- package/_esm/components/RouteCard/RouteCard.style.js.map +1 -1
- package/_esm/components/RouteCard/RouteCardEssentials.js +12 -10
- package/_esm/components/RouteCard/RouteCardEssentials.js.map +1 -1
- package/_esm/components/RouteCard/RouteCardEssentialsExpanded.d.ts +3 -0
- package/_esm/components/RouteCard/RouteCardEssentialsExpanded.js +28 -0
- package/_esm/components/RouteCard/RouteCardEssentialsExpanded.js.map +1 -0
- package/_esm/components/RouteCard/RouteCardSkeleton.js +2 -1
- package/_esm/components/RouteCard/RouteCardSkeleton.js.map +1 -1
- package/_esm/components/RouteCard/types.d.ts +6 -2
- package/_esm/components/Routes/Routes.js +1 -1
- package/_esm/components/Routes/Routes.js.map +1 -1
- package/_esm/components/Routes/RoutesExpanded.js +2 -1
- package/_esm/components/Routes/RoutesExpanded.js.map +1 -1
- package/_esm/components/SelectTokenButton/SelectTokenButton.js +9 -3
- package/_esm/components/SelectTokenButton/SelectTokenButton.js.map +1 -1
- package/_esm/components/SelectTokenButton/SelectTokenButton.style.js +6 -7
- package/_esm/components/SelectTokenButton/SelectTokenButton.style.js.map +1 -1
- package/_esm/components/SmallAvatar.js +4 -4
- package/_esm/components/Step/CircularProgress.js +5 -5
- package/_esm/components/Step/CircularProgress.js.map +1 -1
- package/_esm/components/Step/CircularProgress.style.js +3 -4
- package/_esm/components/Step/CircularProgress.style.js.map +1 -1
- package/_esm/components/Step/DestinationWalletAddress.js +2 -2
- package/_esm/components/Step/DestinationWalletAddress.js.map +1 -1
- package/_esm/components/Step/Step.js +1 -2
- package/_esm/components/Step/Step.js.map +1 -1
- package/_esm/components/Step/StepProcess.js +1 -1
- package/_esm/components/Step/StepProcess.js.map +1 -1
- package/_esm/components/Step/StepTimer.js +9 -8
- package/_esm/components/Step/StepTimer.js.map +1 -1
- package/_esm/components/StepActions/StepActions.js +16 -19
- package/_esm/components/StepActions/StepActions.js.map +1 -1
- package/_esm/components/StepActions/StepActions.style.d.ts +8 -1
- package/_esm/components/StepActions/StepActions.style.js +27 -17
- package/_esm/components/StepActions/StepActions.style.js.map +1 -1
- package/_esm/components/{Step/GasStepProcess.d.ts → StepActions/StepFeeBreakdown.d.ts} +1 -1
- package/_esm/components/StepActions/StepFeeBreakdown.js +41 -0
- package/_esm/components/StepActions/StepFeeBreakdown.js.map +1 -0
- package/_esm/components/StepActions/StepFees.d.ts +6 -0
- package/_esm/components/StepActions/StepFees.js +24 -0
- package/_esm/components/StepActions/StepFees.js.map +1 -0
- package/_esm/components/Token/Token.d.ts +6 -5
- package/_esm/components/Token/Token.js +31 -16
- package/_esm/components/Token/Token.js.map +1 -1
- package/_esm/components/Token/Token.style.d.ts +1 -4
- package/_esm/components/Token/Token.style.js +6 -21
- package/_esm/components/Token/Token.style.js.map +1 -1
- package/_esm/components/TokenAvatar/TokenAvatar.d.ts +3 -0
- package/_esm/components/TokenAvatar/TokenAvatar.js +5 -2
- package/_esm/components/TokenAvatar/TokenAvatar.js.map +1 -1
- package/_esm/components/TokenAvatar/TokenAvatar.style.js +23 -13
- package/_esm/components/TokenAvatar/TokenAvatar.style.js.map +1 -1
- package/_esm/components/TokenList/TokenList.js +4 -5
- package/_esm/components/TokenList/TokenList.js.map +1 -1
- package/_esm/components/TokenList/TokenList.style.js +7 -5
- package/_esm/components/TokenList/TokenList.style.js.map +1 -1
- package/_esm/components/TokenList/TokenListItem.js +7 -4
- package/_esm/components/TokenList/TokenListItem.js.map +1 -1
- package/_esm/components/TokenList/VirtualizedTokenList.js +4 -2
- package/_esm/components/TokenList/VirtualizedTokenList.js.map +1 -1
- package/_esm/components/TokenList/types.d.ts +3 -4
- package/_esm/components/TokenList/useTokenSelect.js +7 -5
- package/_esm/components/TokenList/useTokenSelect.js.map +1 -1
- package/_esm/config/queryClient.js +0 -1
- package/_esm/config/queryClient.js.map +1 -1
- package/_esm/config/theme.js +2 -9
- package/_esm/config/theme.js.map +1 -1
- package/_esm/config/version.d.ts +1 -1
- package/_esm/config/version.js +1 -1
- package/_esm/config/walletConnect.d.ts +1 -0
- package/_esm/config/walletConnect.js +2 -0
- package/_esm/config/walletConnect.js.map +1 -0
- package/_esm/hooks/useAccount.d.ts +4 -1
- package/_esm/hooks/useAccount.js +5 -15
- package/_esm/hooks/useAccount.js.map +1 -1
- package/_esm/hooks/useAvailableChains.js +12 -6
- package/_esm/hooks/useAvailableChains.js.map +1 -1
- package/_esm/hooks/useChains.d.ts +2 -1
- package/_esm/hooks/useChains.js +8 -4
- package/_esm/hooks/useChains.js.map +1 -1
- package/_esm/hooks/useDebouncedWatch.d.ts +1 -2
- package/_esm/hooks/useDebouncedWatch.js +1 -1
- package/_esm/hooks/useDebouncedWatch.js.map +1 -1
- package/_esm/hooks/useFromTokenSufficiency.js +8 -7
- package/_esm/hooks/useFromTokenSufficiency.js.map +1 -1
- package/_esm/hooks/useGasRecommendation.d.ts +1 -1
- package/_esm/hooks/useGasRecommendation.js.map +1 -1
- package/_esm/hooks/useGasRefuel.js +2 -2
- package/_esm/hooks/useGasRefuel.js.map +1 -1
- package/_esm/hooks/useGasSufficiency.js +7 -6
- package/_esm/hooks/useGasSufficiency.js.map +1 -1
- package/_esm/hooks/useRouteExecution.js +5 -5
- package/_esm/hooks/useRouteExecution.js.map +1 -1
- package/_esm/hooks/useRoutes.d.ts +1 -1
- package/_esm/hooks/useRoutes.js +23 -16
- package/_esm/hooks/useRoutes.js.map +1 -1
- package/_esm/hooks/useTokenAddressBalance.d.ts +2 -1
- package/_esm/hooks/useTokenAddressBalance.js +2 -1
- package/_esm/hooks/useTokenAddressBalance.js.map +1 -1
- package/_esm/hooks/useTokenBalance.d.ts +1 -1
- package/_esm/hooks/useTokenBalance.js +8 -19
- package/_esm/hooks/useTokenBalance.js.map +1 -1
- package/_esm/hooks/useTokenBalances.d.ts +2 -1
- package/_esm/hooks/useTokenBalances.js +1 -0
- package/_esm/hooks/useTokenBalances.js.map +1 -1
- package/_esm/hooks/useTools.js +2 -1
- package/_esm/hooks/useTools.js.map +1 -1
- package/_esm/hooks/useTransactionHistory.d.ts +2 -2
- package/_esm/hooks/useTransactionHistory.js +33 -24
- package/_esm/hooks/useTransactionHistory.js.map +1 -1
- package/_esm/i18n/en.json +10 -6
- package/_esm/pages/ActiveTransactionsPage/ActiveTransactionsPage.js +4 -5
- package/_esm/pages/ActiveTransactionsPage/ActiveTransactionsPage.js.map +1 -1
- package/_esm/pages/LanguagesPage/LanguagesPage.js +3 -2
- package/_esm/pages/LanguagesPage/LanguagesPage.js.map +1 -1
- package/_esm/pages/MainPage/MainPage.js +2 -2
- package/_esm/pages/MainPage/MainPage.js.map +1 -1
- package/_esm/pages/RoutesPage/RoutesPage.js +2 -2
- package/_esm/pages/RoutesPage/RoutesPage.js.map +1 -1
- package/_esm/pages/SelectChainPage/SelectChainPage.js +3 -2
- package/_esm/pages/SelectChainPage/SelectChainPage.js.map +1 -1
- package/_esm/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.js +3 -2
- package/_esm/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.js.map +1 -1
- package/_esm/pages/SelectNativeTokenPage/SelectNativeTokenPage.js +3 -2
- package/_esm/pages/SelectNativeTokenPage/SelectNativeTokenPage.js.map +1 -1
- package/_esm/pages/SelectTokenPage/SearchTokenInput.js +2 -2
- package/_esm/pages/SelectTokenPage/SearchTokenInput.js.map +1 -1
- package/_esm/pages/SelectTokenPage/SelectTokenPage.js +3 -2
- package/_esm/pages/SelectTokenPage/SelectTokenPage.js.map +1 -1
- package/_esm/pages/SelectWalletPage/SelectWalletPage.js +3 -2
- package/_esm/pages/SelectWalletPage/SelectWalletPage.js.map +1 -1
- package/_esm/pages/SettingsPage/ResetSettingsButton.js +1 -1
- package/_esm/pages/SettingsPage/ResetSettingsButton.js.map +1 -1
- package/_esm/pages/SettingsPage/SettingsCard/SettingCard.js +1 -1
- package/_esm/pages/SettingsPage/SettingsCard/SettingCard.style.js +7 -6
- package/_esm/pages/SettingsPage/SettingsCard/SettingCard.style.js.map +1 -1
- package/_esm/pages/SettingsPage/SettingsPage.js +6 -6
- package/_esm/pages/SettingsPage/SettingsPage.js.map +1 -1
- package/_esm/pages/SettingsPage/SlippageSettings/SlippageSettings.js +7 -8
- package/_esm/pages/SettingsPage/SlippageSettings/SlippageSettings.js.map +1 -1
- package/_esm/pages/SettingsPage/SlippageSettings/SlippageSettings.style.js +1 -1
- package/_esm/pages/SettingsPage/SlippageSettings/SlippageSettings.style.js.map +1 -1
- package/_esm/pages/TransactionDetailsPage/TransactionDetailsPage.js +2 -2
- package/_esm/pages/TransactionDetailsPage/TransactionDetailsPage.js.map +1 -1
- package/_esm/pages/TransactionDetailsPage/TransactionDetailsSkeleton.js +7 -15
- package/_esm/pages/TransactionDetailsPage/TransactionDetailsSkeleton.js.map +1 -1
- package/_esm/pages/TransactionHistoryPage/TransactionHistoryItem.js +1 -1
- package/_esm/pages/TransactionHistoryPage/TransactionHistoryItem.js.map +1 -1
- package/_esm/pages/TransactionHistoryPage/TransactionHistoryPage.js +5 -4
- package/_esm/pages/TransactionHistoryPage/TransactionHistoryPage.js.map +1 -1
- package/_esm/pages/TransactionHistoryPage/TransactionHistorySkeleton.d.ts +1 -1
- package/_esm/pages/TransactionHistoryPage/TransactionHistorySkeleton.js +3 -8
- package/_esm/pages/TransactionHistoryPage/TransactionHistorySkeleton.js.map +1 -1
- package/_esm/pages/TransactionPage/StatusBottomSheet.js +13 -9
- package/_esm/pages/TransactionPage/StatusBottomSheet.js.map +1 -1
- package/_esm/pages/TransactionPage/TransactionPage.js +2 -2
- package/_esm/pages/TransactionPage/TransactionPage.js.map +1 -1
- package/_esm/providers/I18nProvider/I18nProvider.js +3 -2
- package/_esm/providers/I18nProvider/I18nProvider.js.map +1 -1
- package/_esm/providers/WalletProvider/EVMBaseProvider.d.ts +2 -0
- package/_esm/providers/WalletProvider/EVMBaseProvider.js +87 -0
- package/_esm/providers/WalletProvider/EVMBaseProvider.js.map +1 -0
- package/_esm/providers/WalletProvider/EVMExternalContext.d.ts +2 -0
- package/_esm/providers/WalletProvider/EVMExternalContext.js +3 -0
- package/_esm/providers/WalletProvider/EVMExternalContext.js.map +1 -0
- package/_esm/providers/WalletProvider/EVMProvider.d.ts +1 -1
- package/_esm/providers/WalletProvider/EVMProvider.js +13 -70
- package/_esm/providers/WalletProvider/EVMProvider.js.map +1 -1
- package/_esm/providers/WalletProvider/SDKProviders.js +15 -7
- package/_esm/providers/WalletProvider/SDKProviders.js.map +1 -1
- package/_esm/providers/WalletProvider/SVMBaseProvider.d.ts +2 -0
- package/_esm/providers/WalletProvider/{SolanaProvider.js → SVMBaseProvider.js} +3 -12
- package/_esm/providers/WalletProvider/SVMBaseProvider.js.map +1 -0
- package/_esm/providers/WalletProvider/SVMExternalContext.d.ts +2 -0
- package/_esm/providers/WalletProvider/SVMExternalContext.js +3 -0
- package/_esm/providers/WalletProvider/SVMExternalContext.js.map +1 -0
- package/_esm/providers/WalletProvider/SVMProvider.d.ts +3 -0
- package/_esm/providers/WalletProvider/SVMProvider.js +18 -0
- package/_esm/providers/WalletProvider/SVMProvider.js.map +1 -0
- package/_esm/providers/WalletProvider/WalletProvider.js +2 -2
- package/_esm/providers/WalletProvider/WalletProvider.js.map +1 -1
- package/_esm/providers/WalletProvider/index.d.ts +1 -0
- package/_esm/providers/WalletProvider/index.js +1 -0
- package/_esm/providers/WalletProvider/index.js.map +1 -1
- package/_esm/providers/WalletProvider/useHasExternalWalletProvider.d.ts +7 -0
- package/_esm/providers/WalletProvider/useHasExternalWalletProvider.js +23 -0
- package/_esm/providers/WalletProvider/useHasExternalWalletProvider.js.map +1 -0
- package/_esm/providers/WidgetProvider/WidgetProvider.js.map +1 -1
- package/_esm/providers/WidgetProvider/index.d.ts +1 -2
- package/_esm/providers/WidgetProvider/index.js +1 -2
- package/_esm/providers/WidgetProvider/index.js.map +1 -1
- package/_esm/stores/StoreProvider.js +3 -3
- package/_esm/stores/StoreProvider.js.map +1 -1
- package/_esm/stores/chains/ChainOrderStore.js +18 -15
- package/_esm/stores/chains/ChainOrderStore.js.map +1 -1
- package/_esm/stores/chains/createChainOrderStore.js +34 -15
- package/_esm/stores/chains/createChainOrderStore.js.map +1 -1
- package/_esm/stores/chains/types.d.ts +11 -4
- package/_esm/stores/chains/useChainOrder.d.ts +2 -1
- package/_esm/stores/chains/useChainOrder.js +2 -2
- package/_esm/stores/chains/useChainOrder.js.map +1 -1
- package/_esm/stores/form/FormStore.d.ts +1 -1
- package/_esm/stores/form/FormStore.js +12 -17
- package/_esm/stores/form/FormStore.js.map +1 -1
- package/_esm/stores/form/FormUpdater.d.ts +3 -3
- package/_esm/stores/form/FormUpdater.js +5 -6
- package/_esm/stores/form/FormUpdater.js.map +1 -1
- package/_esm/stores/form/URLSearchParamsBuilder.js +3 -2
- package/_esm/stores/form/URLSearchParamsBuilder.js.map +1 -1
- package/_esm/stores/form/createFormStore.d.ts +1 -1
- package/_esm/stores/form/createFormStore.js +121 -115
- package/_esm/stores/form/createFormStore.js.map +1 -1
- package/_esm/stores/form/types.d.ts +21 -35
- package/_esm/stores/form/types.js +0 -15
- package/_esm/stores/form/types.js.map +1 -1
- package/_esm/stores/form/useFieldActions.js +9 -10
- package/_esm/stores/form/useFieldActions.js.map +1 -1
- package/_esm/stores/form/useFieldController.d.ts +1 -1
- package/_esm/stores/form/useFieldValues.d.ts +2 -2
- package/_esm/stores/form/useFieldValues.js +3 -2
- package/_esm/stores/form/useFieldValues.js.map +1 -1
- package/_esm/stores/form/useTouchedFields.d.ts +14 -1
- package/_esm/stores/form/useValidationActions.js +7 -11
- package/_esm/stores/form/useValidationActions.js.map +1 -1
- package/_esm/stores/routes/useExecutingRoutesIds.d.ts +1 -1
- package/_esm/stores/routes/useExecutingRoutesIds.js +5 -2
- package/_esm/stores/routes/useExecutingRoutesIds.js.map +1 -1
- package/_esm/stores/settings/useSettingsStore.d.ts +1 -0
- package/_esm/stores/settings/useSettingsStore.js +2 -1
- package/_esm/stores/settings/useSettingsStore.js.map +1 -1
- package/_esm/types/widget.d.ts +26 -23
- package/_esm/types/widget.js +1 -0
- package/_esm/types/widget.js.map +1 -1
- package/_esm/utils/converters.js +12 -6
- package/_esm/utils/converters.js.map +1 -1
- package/_esm/utils/fees.d.ts +9 -0
- package/_esm/{components/RouteCard/utils.js → utils/fees.js} +13 -7
- package/_esm/utils/fees.js.map +1 -0
- package/_esm/utils/index.d.ts +2 -0
- package/_esm/utils/index.js +2 -0
- package/_esm/utils/index.js.map +1 -1
- package/_esm/utils/item.d.ts +2 -0
- package/_esm/{providers/WidgetProvider/utils.js → utils/item.js} +1 -1
- package/_esm/utils/item.js.map +1 -0
- package/components/ActiveTransactions/ActiveTransactions.tsx +1 -3
- package/components/AmountInput/AmountInput.style.tsx +10 -4
- package/components/AmountInput/AmountInput.tsx +33 -28
- package/components/AmountInput/AmountInputAdornment.style.tsx +8 -2
- package/components/AmountInput/AmountInputEndAdornment.tsx +5 -10
- package/components/AmountInput/AmountInputStartAdornment.tsx +3 -3
- package/components/AmountInput/{FormPriceHelperText.tsx → PriceFormHelperText.tsx} +14 -14
- package/components/BaseTransactionButton/BaseTransactionButton.tsx +6 -6
- package/components/Card/CardHeader.tsx +6 -5
- package/components/Card/CardTitle.tsx +3 -4
- package/components/ChainSelect/ChainSelect.tsx +8 -6
- package/components/ChainSelect/useChainSelect.ts +5 -5
- package/components/Header/CloseDrawerButton.tsx +18 -0
- package/components/Header/EVMDisconnectIconButton.tsx +24 -0
- package/components/Header/Header.style.ts +10 -4
- package/components/Header/Header.tsx +1 -8
- package/components/Header/NavigationHeader.tsx +13 -30
- package/components/Header/SVMDisconnectIconButton.tsx +19 -0
- package/components/Header/SettingsButton.style.tsx +18 -22
- package/components/Header/TransactionHistoryButton.tsx +23 -0
- package/components/Header/WalletHeader.tsx +36 -8
- package/components/Header/WalletMenu.tsx +67 -99
- package/components/Insurance/InsuranceCard.tsx +4 -22
- package/components/PageContainer.ts +18 -0
- package/components/ReverseTokensButton/ReverseTokensButton.style.tsx +3 -0
- package/components/ReverseTokensButton/ReverseTokensButton.tsx +20 -10
- package/components/RouteCard/RouteCard.style.ts +8 -2
- package/components/RouteCard/RouteCard.tsx +34 -29
- package/components/RouteCard/RouteCardEssentials.tsx +37 -88
- package/components/RouteCard/RouteCardEssentialsExpanded.tsx +127 -0
- package/components/RouteCard/RouteCardSkeleton.tsx +3 -20
- package/components/RouteCard/types.ts +7 -2
- package/components/Routes/Routes.tsx +1 -1
- package/components/Routes/RoutesExpanded.tsx +22 -25
- package/components/SelectTokenButton/SelectTokenButton.style.tsx +6 -7
- package/components/SelectTokenButton/SelectTokenButton.tsx +19 -7
- package/components/SmallAvatar.tsx +4 -4
- package/components/Step/CircularProgress.style.tsx +3 -4
- package/components/Step/CircularProgress.tsx +5 -5
- package/components/Step/DestinationWalletAddress.tsx +2 -3
- package/components/Step/Step.tsx +0 -2
- package/components/Step/StepProcess.tsx +2 -3
- package/components/Step/StepTimer.tsx +9 -14
- package/components/StepActions/StepActions.style.tsx +31 -20
- package/components/StepActions/StepActions.tsx +52 -43
- package/components/StepActions/StepFeeBreakdown.tsx +107 -0
- package/components/StepActions/StepFees.tsx +44 -0
- package/components/Token/Token.style.tsx +6 -22
- package/components/Token/Token.tsx +136 -66
- package/components/TokenAvatar/TokenAvatar.style.tsx +26 -15
- package/components/TokenAvatar/TokenAvatar.tsx +25 -12
- package/components/TokenList/TokenList.style.tsx +7 -5
- package/components/TokenList/TokenList.tsx +2 -5
- package/components/TokenList/TokenListItem.tsx +11 -8
- package/components/TokenList/VirtualizedTokenList.tsx +3 -2
- package/components/TokenList/types.ts +3 -4
- package/components/TokenList/useTokenSelect.ts +8 -6
- package/config/queryClient.ts +0 -1
- package/config/theme.ts +2 -9
- package/config/version.ts +1 -1
- package/config/walletConnect.ts +1 -0
- package/hooks/useAccount.ts +9 -17
- package/hooks/useAvailableChains.ts +13 -6
- package/hooks/useChains.ts +12 -6
- package/hooks/useDebouncedWatch.ts +6 -5
- package/hooks/useFromTokenSufficiency.ts +18 -9
- package/hooks/useGasRecommendation.ts +1 -1
- package/hooks/useGasRefuel.ts +2 -2
- package/hooks/useGasSufficiency.ts +11 -6
- package/hooks/useRouteExecution.ts +5 -5
- package/hooks/useRoutes.ts +31 -24
- package/hooks/useTokenAddressBalance.ts +2 -1
- package/hooks/useTokenBalance.ts +12 -22
- package/hooks/useTokenBalances.ts +1 -0
- package/hooks/useTools.ts +2 -1
- package/hooks/useTransactionHistory.ts +39 -29
- package/i18n/en.json +10 -6
- package/package.json +15 -15
- package/pages/ActiveTransactionsPage/ActiveTransactionsPage.tsx +4 -6
- package/pages/LanguagesPage/LanguagesPage.tsx +4 -3
- package/pages/MainPage/MainPage.tsx +12 -12
- package/pages/RoutesPage/RoutesPage.tsx +1 -2
- package/pages/SelectChainPage/SelectChainPage.tsx +4 -3
- package/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.tsx +3 -3
- package/pages/SelectNativeTokenPage/SelectNativeTokenPage.tsx +4 -3
- package/pages/SelectTokenPage/SearchTokenInput.tsx +1 -2
- package/pages/SelectTokenPage/SelectTokenPage.tsx +4 -3
- package/pages/SelectWalletPage/SelectWalletPage.tsx +3 -3
- package/pages/SettingsPage/ResetSettingsButton.tsx +1 -1
- package/pages/SettingsPage/SettingsCard/SettingCard.style.tsx +7 -6
- package/pages/SettingsPage/SettingsCard/SettingCard.tsx +1 -1
- package/pages/SettingsPage/SettingsPage.tsx +7 -7
- package/pages/SettingsPage/SlippageSettings/SlippageSettings.style.tsx +3 -2
- package/pages/SettingsPage/SlippageSettings/SlippageSettings.tsx +12 -10
- package/pages/TransactionDetailsPage/TransactionDetailsPage.tsx +3 -3
- package/pages/TransactionDetailsPage/TransactionDetailsSkeleton.tsx +15 -58
- package/pages/TransactionHistoryPage/TransactionHistoryItem.tsx +6 -4
- package/pages/TransactionHistoryPage/TransactionHistoryPage.tsx +8 -7
- package/pages/TransactionHistoryPage/TransactionHistorySkeleton.tsx +7 -47
- package/pages/TransactionPage/StatusBottomSheet.tsx +14 -9
- package/pages/TransactionPage/TransactionPage.tsx +3 -3
- package/providers/I18nProvider/I18nProvider.tsx +3 -2
- package/providers/WalletProvider/EVMBaseProvider.tsx +130 -0
- package/providers/WalletProvider/EVMExternalContext.ts +3 -0
- package/providers/WalletProvider/EVMProvider.tsx +17 -110
- package/providers/WalletProvider/SDKProviders.tsx +21 -11
- package/providers/WalletProvider/{SolanaProvider.tsx → SVMBaseProvider.tsx} +2 -17
- package/providers/WalletProvider/SVMExternalContext.ts +3 -0
- package/providers/WalletProvider/SVMProvider.tsx +27 -0
- package/providers/WalletProvider/WalletProvider.tsx +5 -5
- package/providers/WalletProvider/index.ts +1 -0
- package/providers/WalletProvider/useHasExternalWalletProvider.ts +30 -0
- package/providers/WidgetProvider/WidgetProvider.tsx +2 -2
- package/providers/WidgetProvider/index.ts +1 -2
- package/stores/StoreProvider.tsx +12 -12
- package/stores/chains/ChainOrderStore.tsx +21 -17
- package/stores/chains/createChainOrderStore.ts +34 -15
- package/stores/chains/types.ts +12 -4
- package/stores/chains/useChainOrder.ts +5 -2
- package/stores/form/FormStore.tsx +15 -23
- package/stores/form/FormUpdater.tsx +12 -9
- package/stores/form/URLSearchParamsBuilder.tsx +4 -2
- package/stores/form/createFormStore.ts +21 -15
- package/stores/form/types.ts +25 -39
- package/stores/form/useFieldActions.ts +11 -20
- package/stores/form/useFieldValues.ts +6 -4
- package/stores/form/useValidationActions.ts +9 -17
- package/stores/routes/useExecutingRoutesIds.ts +5 -2
- package/stores/settings/useSettingsStore.ts +3 -1
- package/types/widget.ts +32 -24
- package/utils/converters.ts +12 -6
- package/{components/RouteCard/utils.ts → utils/fees.ts} +43 -37
- package/utils/index.ts +2 -0
- package/{providers/WidgetProvider/utils.ts → utils/item.ts} +3 -7
- package/_cjs/components/AmountInput/FormPriceHelperText.js.map +0 -1
- package/_cjs/components/RouteCard/utils.d.ts +0 -11
- package/_cjs/components/RouteCard/utils.js.map +0 -1
- package/_cjs/components/Step/GasStepProcess.js +0 -25
- package/_cjs/components/Step/GasStepProcess.js.map +0 -1
- package/_cjs/pages/TransactionDetailsPage/TransactionDetailsPage.style.d.ts +0 -4
- package/_cjs/pages/TransactionDetailsPage/TransactionDetailsPage.style.js +0 -9
- package/_cjs/pages/TransactionDetailsPage/TransactionDetailsPage.style.js.map +0 -1
- package/_cjs/pages/TransactionPage/TransactionPage.style.d.ts +0 -4
- package/_cjs/pages/TransactionPage/TransactionPage.style.js +0 -9
- package/_cjs/pages/TransactionPage/TransactionPage.style.js.map +0 -1
- package/_cjs/providers/WalletProvider/SolanaProvider.d.ts +0 -3
- package/_cjs/providers/WalletProvider/SolanaProvider.js.map +0 -1
- package/_cjs/providers/WidgetProvider/utils.d.ts +0 -4
- package/_cjs/providers/WidgetProvider/utils.js.map +0 -1
- package/_esm/components/AmountInput/FormPriceHelperText.js.map +0 -1
- package/_esm/components/RouteCard/utils.d.ts +0 -11
- package/_esm/components/RouteCard/utils.js.map +0 -1
- package/_esm/components/Step/GasStepProcess.js +0 -21
- package/_esm/components/Step/GasStepProcess.js.map +0 -1
- package/_esm/pages/TransactionDetailsPage/TransactionDetailsPage.style.d.ts +0 -4
- package/_esm/pages/TransactionDetailsPage/TransactionDetailsPage.style.js +0 -6
- package/_esm/pages/TransactionDetailsPage/TransactionDetailsPage.style.js.map +0 -1
- package/_esm/pages/TransactionPage/TransactionPage.style.d.ts +0 -4
- package/_esm/pages/TransactionPage/TransactionPage.style.js +0 -6
- package/_esm/pages/TransactionPage/TransactionPage.style.js.map +0 -1
- package/_esm/providers/WalletProvider/SolanaProvider.d.ts +0 -3
- package/_esm/providers/WalletProvider/SolanaProvider.js.map +0 -1
- package/_esm/providers/WidgetProvider/utils.d.ts +0 -4
- package/_esm/providers/WidgetProvider/utils.js.map +0 -1
- package/components/Step/GasStepProcess.tsx +0 -45
- package/pages/TransactionDetailsPage/TransactionDetailsPage.style.tsx +0 -6
- package/pages/TransactionPage/TransactionPage.style.tsx +0 -6
|
@@ -4,7 +4,7 @@ import { Avatar, Box, Skeleton, Tooltip, Typography } from '@mui/material';
|
|
|
4
4
|
import { useEffect } from 'react';
|
|
5
5
|
import { useNavigate } from 'react-router-dom';
|
|
6
6
|
import type { FormTypeProps } from '../../stores';
|
|
7
|
-
import { maxChainToOrder, useFieldValues
|
|
7
|
+
import { FormKeyHelper, maxChainToOrder, useFieldValues } from '../../stores';
|
|
8
8
|
import { navigationRoutes } from '../../utils';
|
|
9
9
|
import { ChainCard, ChainContainer } from './ChainSelect.style';
|
|
10
10
|
import { useChainSelect } from './useChainSelect';
|
|
@@ -23,12 +23,14 @@ export const ChainSelect = ({ formType }: FormTypeProps) => {
|
|
|
23
23
|
const [chainId] = useFieldValues(FormKeyHelper.getChainKey(formType));
|
|
24
24
|
|
|
25
25
|
useEffect(() => {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
if (chainId) {
|
|
27
|
+
const hasChainInOrderedList = chainOrder.includes(chainId);
|
|
28
|
+
// If we don't have a chain in the ordered chain list we should add it.
|
|
29
|
+
if (!hasChainInOrderedList) {
|
|
30
|
+
setChainOrder(chainId, formType);
|
|
31
|
+
}
|
|
30
32
|
}
|
|
31
|
-
}, [chainId, chainOrder, setChainOrder]);
|
|
33
|
+
}, [chainId, chainOrder, formType, setChainOrder]);
|
|
32
34
|
|
|
33
35
|
const showAllChains = () => {
|
|
34
36
|
navigate(navigationRoutes[`${formType}Chain`]);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { EVMChain } from '@lifi/sdk';
|
|
2
2
|
import { useChains, useSwapOnly } from '../../hooks';
|
|
3
|
-
import type { FormType } from '../../stores';
|
|
4
3
|
import { useWidgetConfig } from '../../providers';
|
|
4
|
+
import type { FormType } from '../../stores';
|
|
5
5
|
import {
|
|
6
|
+
FormKeyHelper,
|
|
6
7
|
useChainOrder,
|
|
7
8
|
useFieldActions,
|
|
8
9
|
useFieldController,
|
|
9
|
-
FormKeyHelper,
|
|
10
10
|
} from '../../stores';
|
|
11
11
|
import { RequiredUI } from '../../types';
|
|
12
12
|
|
|
@@ -16,8 +16,8 @@ export const useChainSelect = (formType: FormType) => {
|
|
|
16
16
|
const { onChange, onBlur } = useFieldController({ name: chainKey });
|
|
17
17
|
|
|
18
18
|
const { setFieldValue, getFieldValues } = useFieldActions();
|
|
19
|
-
const { chains, isLoading, getChainById } = useChains();
|
|
20
|
-
const [chainOrder, setChainOrder] = useChainOrder();
|
|
19
|
+
const { chains, isLoading, getChainById } = useChains(formType);
|
|
20
|
+
const [chainOrder, setChainOrder] = useChainOrder(formType);
|
|
21
21
|
const swapOnly = useSwapOnly();
|
|
22
22
|
|
|
23
23
|
const getChains = () => {
|
|
@@ -63,7 +63,7 @@ export const useChainSelect = (formType: FormType) => {
|
|
|
63
63
|
if (!requiredToAddress) {
|
|
64
64
|
setFieldValue('toAddress', '');
|
|
65
65
|
}
|
|
66
|
-
setChainOrder(chainId);
|
|
66
|
+
setChainOrder(chainId, formType);
|
|
67
67
|
};
|
|
68
68
|
|
|
69
69
|
return {
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import CloseIcon from '@mui/icons-material/CloseRounded';
|
|
2
|
+
import { Tooltip } from '@mui/material';
|
|
3
|
+
import IconButton from '@mui/material/IconButton';
|
|
4
|
+
import { useTranslation } from 'react-i18next';
|
|
5
|
+
import { useDrawer } from '../../AppDrawerContext';
|
|
6
|
+
|
|
7
|
+
export const CloseDrawerButton = () => {
|
|
8
|
+
const { t } = useTranslation();
|
|
9
|
+
const { closeDrawer } = useDrawer();
|
|
10
|
+
|
|
11
|
+
return (
|
|
12
|
+
<Tooltip title={t('button.close')} enterDelay={400} arrow>
|
|
13
|
+
<IconButton size="medium" onClick={closeDrawer}>
|
|
14
|
+
<CloseIcon />
|
|
15
|
+
</IconButton>
|
|
16
|
+
</Tooltip>
|
|
17
|
+
);
|
|
18
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import PowerSettingsNewIcon from '@mui/icons-material/PowerSettingsNewRounded';
|
|
2
|
+
import { IconButton } from '@mui/material';
|
|
3
|
+
import type { Connector } from 'wagmi';
|
|
4
|
+
import { useDisconnect } from 'wagmi';
|
|
5
|
+
|
|
6
|
+
export const EVMDisconnectIconButton = ({
|
|
7
|
+
connector,
|
|
8
|
+
}: {
|
|
9
|
+
connector?: Connector;
|
|
10
|
+
}) => {
|
|
11
|
+
const { disconnect } = useDisconnect();
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<IconButton
|
|
15
|
+
size="medium"
|
|
16
|
+
onClick={(e) => {
|
|
17
|
+
e.stopPropagation();
|
|
18
|
+
disconnect({ connector });
|
|
19
|
+
}}
|
|
20
|
+
>
|
|
21
|
+
<PowerSettingsNewIcon />
|
|
22
|
+
</IconButton>
|
|
23
|
+
);
|
|
24
|
+
};
|
|
@@ -55,19 +55,25 @@ export const WalletButton = styled(Button)(({ theme }) => ({
|
|
|
55
55
|
},
|
|
56
56
|
}));
|
|
57
57
|
|
|
58
|
-
export const DrawerWalletContainer = styled(Box)(() => ({
|
|
58
|
+
export const DrawerWalletContainer = styled(Box)(({ theme }) => ({
|
|
59
59
|
width: '100%',
|
|
60
60
|
display: 'flex',
|
|
61
|
-
|
|
61
|
+
justifyContent: 'space-between',
|
|
62
62
|
|
|
63
|
-
'&
|
|
64
|
-
marginLeft:
|
|
63
|
+
'& button:first-of-type': {
|
|
64
|
+
marginLeft: theme.spacing(-1),
|
|
65
|
+
},
|
|
66
|
+
'& button:last-of-type': {
|
|
67
|
+
marginRight: theme.spacing(-1.25),
|
|
65
68
|
},
|
|
66
69
|
}));
|
|
67
70
|
|
|
68
71
|
export const HeaderControlsContainer = styled(Box)(({ theme }) => ({
|
|
69
72
|
display: 'flex',
|
|
70
73
|
gap: theme.spacing(0.5),
|
|
74
|
+
'& button:last-of-type': {
|
|
75
|
+
marginRight: theme.spacing(-1.25),
|
|
76
|
+
},
|
|
71
77
|
}));
|
|
72
78
|
|
|
73
79
|
export const SplitTabs = styled(Tabs)(({ theme }) => ({
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import type { FC, PropsWithChildren } from 'react';
|
|
2
2
|
import { useLocation } from 'react-router-dom';
|
|
3
3
|
import { useDefaultElementId } from '../../hooks';
|
|
4
|
-
import { useWidgetConfig } from '../../providers';
|
|
5
|
-
import { HiddenUI } from '../../types';
|
|
6
4
|
import { ElementId, createElementId, stickyHeaderRoutes } from '../../utils';
|
|
7
5
|
import { Container } from './Header.style';
|
|
8
6
|
import { NavigationHeader } from './NavigationHeader';
|
|
@@ -22,14 +20,9 @@ export const HeaderContainer: FC<PropsWithChildren<{}>> = ({ children }) => {
|
|
|
22
20
|
};
|
|
23
21
|
|
|
24
22
|
export const Header: FC = () => {
|
|
25
|
-
const { walletManagement, subvariant, hiddenUI } = useWidgetConfig();
|
|
26
23
|
return (
|
|
27
24
|
<HeaderContainer>
|
|
28
|
-
|
|
29
|
-
subvariant !== 'split' &&
|
|
30
|
-
!hiddenUI?.includes(HiddenUI.WalletMenu) ? (
|
|
31
|
-
<WalletHeader />
|
|
32
|
-
) : null}
|
|
25
|
+
<WalletHeader />
|
|
33
26
|
<NavigationHeader />
|
|
34
27
|
</HeaderContainer>
|
|
35
28
|
);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import ArrowBackIcon from '@mui/icons-material/ArrowBack';
|
|
2
|
-
import
|
|
3
|
-
import { Box, Tooltip, Typography } from '@mui/material';
|
|
2
|
+
import { Box, Typography } from '@mui/material';
|
|
4
3
|
import IconButton from '@mui/material/IconButton';
|
|
5
4
|
import { useTranslation } from 'react-i18next';
|
|
6
5
|
import { Route, Routes, useLocation } from 'react-router-dom';
|
|
@@ -13,32 +12,18 @@ import {
|
|
|
13
12
|
navigationRoutes,
|
|
14
13
|
navigationRoutesValues,
|
|
15
14
|
} from '../../utils';
|
|
15
|
+
import { CloseDrawerButton } from './CloseDrawerButton';
|
|
16
16
|
import { HeaderAppBar, HeaderControlsContainer } from './Header.style';
|
|
17
17
|
import { NavigationTabs } from './NavigationTabs';
|
|
18
18
|
import { SettingsButton } from './SettingsButton';
|
|
19
|
-
import {
|
|
19
|
+
import { TransactionHistoryButton } from './TransactionHistoryButton';
|
|
20
|
+
import { SplitWalletMenuButton } from './WalletHeader';
|
|
20
21
|
|
|
21
|
-
export const TransactionHistoryButton = () => {
|
|
22
|
-
const { t } = useTranslation();
|
|
23
|
-
const { navigate } = useNavigateBack();
|
|
24
|
-
|
|
25
|
-
return (
|
|
26
|
-
<Tooltip title={t(`header.transactionHistory`)} enterDelay={400} arrow>
|
|
27
|
-
<IconButton
|
|
28
|
-
size="medium"
|
|
29
|
-
edge="start"
|
|
30
|
-
onClick={() => navigate(navigationRoutes.transactionHistory)}
|
|
31
|
-
>
|
|
32
|
-
<ReceiptLongIcon />
|
|
33
|
-
</IconButton>
|
|
34
|
-
</Tooltip>
|
|
35
|
-
);
|
|
36
|
-
};
|
|
37
22
|
export const NavigationHeader: React.FC = () => {
|
|
38
23
|
const { t } = useTranslation();
|
|
39
24
|
const { subvariant, hiddenUI, variant } = useWidgetConfig();
|
|
40
25
|
const { navigateBack } = useNavigateBack();
|
|
41
|
-
const {
|
|
26
|
+
const { isConnected } = useAccount();
|
|
42
27
|
const { element, title } = useHeaderStore((state) => state);
|
|
43
28
|
const { pathname } = useLocation();
|
|
44
29
|
|
|
@@ -115,9 +100,7 @@ export const NavigationHeader: React.FC = () => {
|
|
|
115
100
|
) : null}
|
|
116
101
|
{splitSubvariant ? (
|
|
117
102
|
<Box flex={1}>
|
|
118
|
-
|
|
119
|
-
<WalletMenuButton />
|
|
120
|
-
) : null}
|
|
103
|
+
<SplitWalletMenuButton />
|
|
121
104
|
</Box>
|
|
122
105
|
) : (
|
|
123
106
|
<Typography
|
|
@@ -134,16 +117,16 @@ export const NavigationHeader: React.FC = () => {
|
|
|
134
117
|
<Route
|
|
135
118
|
path={navigationRoutes.home}
|
|
136
119
|
element={
|
|
137
|
-
<HeaderControlsContainer
|
|
138
|
-
|
|
139
|
-
variant === 'drawer' && subvariant === 'split' ? 5 : 0
|
|
140
|
-
}
|
|
141
|
-
>
|
|
142
|
-
{account.isConnected &&
|
|
143
|
-
!hiddenUI?.includes(HiddenUI.History) ? (
|
|
120
|
+
<HeaderControlsContainer>
|
|
121
|
+
{isConnected && !hiddenUI?.includes(HiddenUI.History) ? (
|
|
144
122
|
<TransactionHistoryButton />
|
|
145
123
|
) : null}
|
|
146
124
|
<SettingsButton />
|
|
125
|
+
{variant === 'drawer' &&
|
|
126
|
+
subvariant === 'split' &&
|
|
127
|
+
!hiddenUI?.includes(HiddenUI.DrawerCloseButton) ? (
|
|
128
|
+
<CloseDrawerButton />
|
|
129
|
+
) : null}
|
|
147
130
|
</HeaderControlsContainer>
|
|
148
131
|
}
|
|
149
132
|
/>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import PowerSettingsNewIcon from '@mui/icons-material/PowerSettingsNewRounded';
|
|
2
|
+
import { IconButton } from '@mui/material';
|
|
3
|
+
import { useWallet } from '@solana/wallet-adapter-react';
|
|
4
|
+
|
|
5
|
+
export const SVMDisconnectIconButton = () => {
|
|
6
|
+
const { disconnect } = useWallet();
|
|
7
|
+
|
|
8
|
+
return (
|
|
9
|
+
<IconButton
|
|
10
|
+
size="medium"
|
|
11
|
+
onClick={(e) => {
|
|
12
|
+
e.stopPropagation();
|
|
13
|
+
disconnect();
|
|
14
|
+
}}
|
|
15
|
+
>
|
|
16
|
+
<PowerSettingsNewIcon />
|
|
17
|
+
</IconButton>
|
|
18
|
+
);
|
|
19
|
+
};
|
|
@@ -23,26 +23,22 @@ interface SettingsIconButtonProps {
|
|
|
23
23
|
export const SettingsIconButton = styled(IconButton, {
|
|
24
24
|
shouldForwardProp: (props) => props !== 'variant',
|
|
25
25
|
})<SettingsIconButtonProps>(({ theme, variant }) => {
|
|
26
|
-
|
|
27
|
-
info:
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
backgroundColor:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
return {
|
|
45
|
-
borderRadius: 20,
|
|
46
|
-
...variantStyles[variant ?? 'default'],
|
|
47
|
-
};
|
|
26
|
+
switch (variant) {
|
|
27
|
+
case 'info':
|
|
28
|
+
return {
|
|
29
|
+
backgroundColor: getInfoBackgroundColor(theme),
|
|
30
|
+
'&:hover': {
|
|
31
|
+
backgroundColor: darken(getInfoBackgroundColor(theme), 0.2),
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
case 'warning':
|
|
35
|
+
return {
|
|
36
|
+
backgroundColor: getWarningBackgroundColor(theme),
|
|
37
|
+
'&:hover': {
|
|
38
|
+
backgroundColor: darken(getWarningBackgroundColor(theme), 0.2),
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
default:
|
|
42
|
+
break;
|
|
43
|
+
}
|
|
48
44
|
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import ReceiptLongIcon from '@mui/icons-material/ReceiptLong';
|
|
2
|
+
import { Tooltip } from '@mui/material';
|
|
3
|
+
import IconButton from '@mui/material/IconButton';
|
|
4
|
+
import { useTranslation } from 'react-i18next';
|
|
5
|
+
import { useNavigateBack } from '../../hooks';
|
|
6
|
+
import { navigationRoutes } from '../../utils';
|
|
7
|
+
|
|
8
|
+
export const TransactionHistoryButton = () => {
|
|
9
|
+
const { t } = useTranslation();
|
|
10
|
+
const { navigate } = useNavigateBack();
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<Tooltip title={t(`header.transactionHistory`)} enterDelay={400} arrow>
|
|
14
|
+
<IconButton
|
|
15
|
+
size="medium"
|
|
16
|
+
edge="start"
|
|
17
|
+
onClick={() => navigate(navigationRoutes.transactionHistory)}
|
|
18
|
+
>
|
|
19
|
+
<ReceiptLongIcon />
|
|
20
|
+
</IconButton>
|
|
21
|
+
</Tooltip>
|
|
22
|
+
);
|
|
23
|
+
};
|
|
@@ -1,14 +1,19 @@
|
|
|
1
|
+
import { getWalletIcon } from '@lifi/wallet-management';
|
|
1
2
|
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
|
|
2
3
|
import WalletIcon from '@mui/icons-material/Wallet';
|
|
3
4
|
import { Avatar, Badge } from '@mui/material';
|
|
4
5
|
import { useState } from 'react';
|
|
5
6
|
import { useTranslation } from 'react-i18next';
|
|
6
7
|
import { useLocation, useNavigate } from 'react-router-dom';
|
|
8
|
+
import type { Connector } from 'wagmi';
|
|
7
9
|
import type { Account } from '../../hooks';
|
|
8
10
|
import { useAccount, useChain } from '../../hooks';
|
|
9
11
|
import { useWidgetConfig } from '../../providers';
|
|
12
|
+
import { useHasExternalWalletProvider } from '../../providers/WalletProvider';
|
|
13
|
+
import { HiddenUI } from '../../types';
|
|
10
14
|
import { navigationRoutes, shortenAddress } from '../../utils';
|
|
11
15
|
import { SmallAvatar } from '../SmallAvatar';
|
|
16
|
+
import { CloseDrawerButton } from './CloseDrawerButton';
|
|
12
17
|
import {
|
|
13
18
|
DrawerWalletContainer,
|
|
14
19
|
HeaderAppBar,
|
|
@@ -18,16 +23,28 @@ import { WalletMenu } from './WalletMenu';
|
|
|
18
23
|
import { WalletMenuContainer } from './WalletMenu.style';
|
|
19
24
|
|
|
20
25
|
export const WalletHeader: React.FC = () => {
|
|
21
|
-
|
|
26
|
+
const { subvariant, hiddenUI } = useWidgetConfig();
|
|
27
|
+
const { hasExternalProvider } = useHasExternalWalletProvider();
|
|
28
|
+
return !hasExternalProvider &&
|
|
29
|
+
subvariant !== 'split' &&
|
|
30
|
+
!hiddenUI?.includes(HiddenUI.WalletMenu) ? (
|
|
22
31
|
<HeaderAppBar elevation={0} sx={{ justifyContent: 'flex-end' }}>
|
|
23
32
|
<WalletMenuButton />
|
|
24
33
|
</HeaderAppBar>
|
|
25
|
-
);
|
|
34
|
+
) : null;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export const SplitWalletMenuButton: React.FC = () => {
|
|
38
|
+
const { hiddenUI } = useWidgetConfig();
|
|
39
|
+
const { hasExternalProvider } = useHasExternalWalletProvider();
|
|
40
|
+
return !hasExternalProvider && !hiddenUI?.includes(HiddenUI.WalletMenu) ? (
|
|
41
|
+
<WalletMenuButton />
|
|
42
|
+
) : null;
|
|
26
43
|
};
|
|
27
44
|
|
|
28
45
|
export const WalletMenuButton: React.FC = () => {
|
|
29
46
|
const { account } = useAccount();
|
|
30
|
-
const { variant } = useWidgetConfig();
|
|
47
|
+
const { variant, subvariant, hiddenUI } = useWidgetConfig();
|
|
31
48
|
|
|
32
49
|
if (variant === 'drawer') {
|
|
33
50
|
return (
|
|
@@ -37,6 +54,10 @@ export const WalletMenuButton: React.FC = () => {
|
|
|
37
54
|
) : (
|
|
38
55
|
<ConnectButton />
|
|
39
56
|
)}
|
|
57
|
+
{subvariant !== 'split' &&
|
|
58
|
+
!hiddenUI?.includes(HiddenUI.DrawerCloseButton) ? (
|
|
59
|
+
<CloseDrawerButton />
|
|
60
|
+
) : null}
|
|
40
61
|
</DrawerWalletContainer>
|
|
41
62
|
);
|
|
42
63
|
}
|
|
@@ -50,11 +71,11 @@ export const WalletMenuButton: React.FC = () => {
|
|
|
50
71
|
const ConnectButton = () => {
|
|
51
72
|
const { t } = useTranslation();
|
|
52
73
|
const { pathname } = useLocation();
|
|
53
|
-
const {
|
|
74
|
+
const { walletConfig, subvariant, variant } = useWidgetConfig();
|
|
54
75
|
const navigate = useNavigate();
|
|
55
76
|
const connect = async () => {
|
|
56
|
-
if (
|
|
57
|
-
|
|
77
|
+
if (walletConfig?.onConnect) {
|
|
78
|
+
walletConfig.onConnect();
|
|
58
79
|
return;
|
|
59
80
|
}
|
|
60
81
|
navigate(navigationRoutes.selectWallet);
|
|
@@ -100,7 +121,10 @@ const ConnectedButton = ({ account }: { account: Account }) => {
|
|
|
100
121
|
|
|
101
122
|
const avatar = (
|
|
102
123
|
<Avatar
|
|
103
|
-
src={
|
|
124
|
+
src={
|
|
125
|
+
account.connector?.icon ||
|
|
126
|
+
getWalletIcon((account.connector as Connector)?.id)
|
|
127
|
+
}
|
|
104
128
|
alt={account.connector?.name}
|
|
105
129
|
sx={{ width: 24, height: 24 }}
|
|
106
130
|
>
|
|
@@ -118,7 +142,11 @@ const ConnectedButton = ({ account }: { account: Account }) => {
|
|
|
118
142
|
overlap="circular"
|
|
119
143
|
anchorOrigin={{ vertical: 'bottom', horizontal: 'right' }}
|
|
120
144
|
badgeContent={
|
|
121
|
-
<SmallAvatar
|
|
145
|
+
<SmallAvatar
|
|
146
|
+
src={chain?.logoURI}
|
|
147
|
+
alt={chain?.name}
|
|
148
|
+
sx={{ width: 16, height: 16 }}
|
|
149
|
+
>
|
|
122
150
|
{chain?.name[0]}
|
|
123
151
|
</SmallAvatar>
|
|
124
152
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ChainType } from '@lifi/sdk';
|
|
2
|
+
import { getWalletIcon } from '@lifi/wallet-management';
|
|
2
3
|
import ContentCopyIcon from '@mui/icons-material/ContentCopyRounded';
|
|
3
4
|
import OpenInNewIcon from '@mui/icons-material/OpenInNewRounded';
|
|
4
5
|
import PowerSettingsNewIcon from '@mui/icons-material/PowerSettingsNewRounded';
|
|
@@ -10,14 +11,14 @@ import {
|
|
|
10
11
|
IconButton,
|
|
11
12
|
MenuItem,
|
|
12
13
|
} from '@mui/material';
|
|
13
|
-
import { useWallet } from '@solana/wallet-adapter-react';
|
|
14
14
|
import { useTranslation } from 'react-i18next';
|
|
15
15
|
import { useLocation, useNavigate } from 'react-router-dom';
|
|
16
16
|
import type { Connector } from 'wagmi';
|
|
17
|
-
import { useDisconnect } from 'wagmi';
|
|
18
17
|
import { useAccount, useAvailableChains } from '../../hooks';
|
|
19
18
|
import { navigationRoutes, shortenAddress } from '../../utils';
|
|
20
19
|
import { SmallAvatar } from '../SmallAvatar';
|
|
20
|
+
import { EVMDisconnectIconButton } from './EVMDisconnectIconButton.js';
|
|
21
|
+
import { SVMDisconnectIconButton } from './SVMDisconnectIconButton.js';
|
|
21
22
|
|
|
22
23
|
export const WalletMenu = ({ onClose }: { onClose: () => void }) => {
|
|
23
24
|
const { t } = useTranslation();
|
|
@@ -33,71 +34,70 @@ export const WalletMenu = ({ onClose }: { onClose: () => void }) => {
|
|
|
33
34
|
return (
|
|
34
35
|
<Box>
|
|
35
36
|
<Box display="flex" flexDirection="column">
|
|
36
|
-
{accounts
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
<
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
sx={{ marginRight: 1.5 }}
|
|
71
|
-
>
|
|
72
|
-
{avatar}
|
|
73
|
-
</Badge>
|
|
74
|
-
) : (
|
|
75
|
-
avatar
|
|
76
|
-
)}
|
|
77
|
-
{walletAddress}
|
|
78
|
-
</Box>
|
|
79
|
-
<Box ml={1}>
|
|
80
|
-
<IconButton size="medium" onClick={handleCopyAddress}>
|
|
81
|
-
<ContentCopyIcon />
|
|
82
|
-
</IconButton>
|
|
83
|
-
<IconButton
|
|
84
|
-
size="medium"
|
|
85
|
-
component="a"
|
|
86
|
-
onClick={onClose}
|
|
87
|
-
href={`${chain?.metamask.blockExplorerUrls[0]}address/${account.address}`}
|
|
88
|
-
target="_blank"
|
|
37
|
+
{accounts.map((account) => {
|
|
38
|
+
const chain = getChainById(account.chainId);
|
|
39
|
+
const walletAddress = shortenAddress(account.address);
|
|
40
|
+
const handleCopyAddress = async () => {
|
|
41
|
+
await navigator.clipboard.writeText(account.address ?? '');
|
|
42
|
+
onClose();
|
|
43
|
+
};
|
|
44
|
+
const avatar = (
|
|
45
|
+
<Avatar
|
|
46
|
+
src={
|
|
47
|
+
account.connector?.icon ||
|
|
48
|
+
getWalletIcon((account.connector as Connector)?.id)
|
|
49
|
+
}
|
|
50
|
+
alt={account.connector?.name}
|
|
51
|
+
sx={{
|
|
52
|
+
marginRight: chain?.logoURI ? 0 : 1.5,
|
|
53
|
+
}}
|
|
54
|
+
>
|
|
55
|
+
{account.connector?.name[0]}
|
|
56
|
+
</Avatar>
|
|
57
|
+
);
|
|
58
|
+
return (
|
|
59
|
+
<MenuItem key={account.address}>
|
|
60
|
+
<Box flex={1} display="flex" alignItems="center">
|
|
61
|
+
{chain?.logoURI ? (
|
|
62
|
+
<Badge
|
|
63
|
+
overlap="circular"
|
|
64
|
+
anchorOrigin={{ vertical: 'bottom', horizontal: 'right' }}
|
|
65
|
+
badgeContent={
|
|
66
|
+
<SmallAvatar src={chain?.logoURI} alt={chain?.name}>
|
|
67
|
+
{chain?.name[0]}
|
|
68
|
+
</SmallAvatar>
|
|
69
|
+
}
|
|
70
|
+
sx={{ marginRight: 1.5 }}
|
|
89
71
|
>
|
|
90
|
-
|
|
91
|
-
</
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
72
|
+
{avatar}
|
|
73
|
+
</Badge>
|
|
74
|
+
) : (
|
|
75
|
+
avatar
|
|
76
|
+
)}
|
|
77
|
+
{walletAddress}
|
|
78
|
+
</Box>
|
|
79
|
+
<Box ml={1}>
|
|
80
|
+
<IconButton size="medium" onClick={handleCopyAddress}>
|
|
81
|
+
<ContentCopyIcon />
|
|
82
|
+
</IconButton>
|
|
83
|
+
<IconButton
|
|
84
|
+
size="medium"
|
|
85
|
+
component="a"
|
|
86
|
+
onClick={onClose}
|
|
87
|
+
href={`${chain?.metamask.blockExplorerUrls[0]}address/${account.address}`}
|
|
88
|
+
target="_blank"
|
|
89
|
+
>
|
|
90
|
+
<OpenInNewIcon />
|
|
91
|
+
</IconButton>
|
|
92
|
+
{account.chainType === ChainType.EVM ? (
|
|
93
|
+
<EVMDisconnectIconButton connector={account.connector} />
|
|
94
|
+
) : account.chainType === ChainType.SVM ? (
|
|
95
|
+
<SVMDisconnectIconButton />
|
|
96
|
+
) : null}
|
|
97
|
+
</Box>
|
|
98
|
+
</MenuItem>
|
|
99
|
+
);
|
|
100
|
+
})}
|
|
101
101
|
</Box>
|
|
102
102
|
{!pathname.includes(navigationRoutes.selectWallet) ? (
|
|
103
103
|
<Button
|
|
@@ -108,7 +108,7 @@ export const WalletMenu = ({ onClose }: { onClose: () => void }) => {
|
|
|
108
108
|
marginTop: 1,
|
|
109
109
|
}}
|
|
110
110
|
>
|
|
111
|
-
{accounts.
|
|
111
|
+
{accounts.length > 1
|
|
112
112
|
? t(`button.changeWallet`)
|
|
113
113
|
: t(`button.connectWallet`)}
|
|
114
114
|
</Button>
|
|
@@ -116,35 +116,3 @@ export const WalletMenu = ({ onClose }: { onClose: () => void }) => {
|
|
|
116
116
|
</Box>
|
|
117
117
|
);
|
|
118
118
|
};
|
|
119
|
-
|
|
120
|
-
const EVMDisconnectIconButton = ({ connector }: { connector?: Connector }) => {
|
|
121
|
-
const { disconnect } = useDisconnect();
|
|
122
|
-
|
|
123
|
-
return (
|
|
124
|
-
<IconButton
|
|
125
|
-
size="medium"
|
|
126
|
-
onClick={(e) => {
|
|
127
|
-
e.stopPropagation();
|
|
128
|
-
disconnect({ connector });
|
|
129
|
-
}}
|
|
130
|
-
>
|
|
131
|
-
<PowerSettingsNewIcon />
|
|
132
|
-
</IconButton>
|
|
133
|
-
);
|
|
134
|
-
};
|
|
135
|
-
|
|
136
|
-
const SVMDisconnectIconButton = () => {
|
|
137
|
-
const { disconnect } = useWallet();
|
|
138
|
-
|
|
139
|
-
return (
|
|
140
|
-
<IconButton
|
|
141
|
-
size="medium"
|
|
142
|
-
onClick={(e) => {
|
|
143
|
-
e.stopPropagation();
|
|
144
|
-
disconnect();
|
|
145
|
-
}}
|
|
146
|
-
>
|
|
147
|
-
<PowerSettingsNewIcon />
|
|
148
|
-
</IconButton>
|
|
149
|
-
);
|
|
150
|
-
};
|