@lifi/widget 1.21.0 → 1.22.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.
Files changed (218) hide show
  1. package/AppDrawer.style.d.ts +1 -1
  2. package/AppProvider.js +2 -4
  3. package/AppRoutes.js +5 -0
  4. package/cjs/AppDrawer.style.d.ts +1 -1
  5. package/cjs/AppProvider.js +1 -3
  6. package/cjs/AppRoutes.js +5 -0
  7. package/cjs/components/ActiveSwaps/ActiveSwaps.style.d.ts +1 -1
  8. package/cjs/components/BottomSheet/BottomSheet.d.ts +1 -1
  9. package/cjs/components/ChainSelect/ChainSelect.d.ts +0 -1
  10. package/cjs/components/ChainSelect/ChainSelect.js +1 -3
  11. package/cjs/components/ChainSelect/useChainSelect.d.ts +1 -1
  12. package/cjs/components/Header/Header.style.d.ts +34 -1
  13. package/cjs/components/Header/Header.style.js +19 -1
  14. package/cjs/components/Header/NavigationHeader.js +4 -1
  15. package/cjs/components/Header/WalletHeader.js +34 -9
  16. package/cjs/components/Menu.d.ts +1 -0
  17. package/cjs/components/Menu.js +24 -0
  18. package/cjs/components/PoweredBy/PoweredBy.style.d.ts +1 -1
  19. package/cjs/components/ReverseTokensButton/ReverseTokensButton.style.d.ts +1 -1
  20. package/cjs/components/SelectChainAndToken.js +6 -1
  21. package/cjs/components/SelectTokenButton/SelectTokenButton.js +8 -6
  22. package/cjs/components/SelectTokenButton/SelectTokenButton.style.js +2 -1
  23. package/cjs/components/SendToWallet/SendToWallet.js +5 -0
  24. package/cjs/components/SendToWallet/SendToWallet.style.d.ts +1 -1
  25. package/cjs/components/SendToWallet/SendToWalletButton.js +5 -1
  26. package/cjs/components/Step/CircularProgress.d.ts +0 -1
  27. package/cjs/components/Step/StepProcess.style.d.ts +2 -2
  28. package/cjs/components/Step/StepTimer.js +1 -1
  29. package/cjs/components/StepActions/StepActions.js +6 -1
  30. package/cjs/components/SwapInput/FormPriceHelperText.js +4 -4
  31. package/cjs/components/SwapInput/SwapInput.js +5 -2
  32. package/cjs/components/SwapInput/SwapInput.style.d.ts +1 -1
  33. package/cjs/components/SwapInput/SwapInputAdornment.d.ts +0 -1
  34. package/cjs/components/SwapInput/SwapInputAdornment.style.d.ts +1 -1
  35. package/cjs/components/SwapRouteCard/SwapRouteCard.js +5 -3
  36. package/cjs/components/SwapRouteCard/SwapRouteCard.style.d.ts +1 -1
  37. package/cjs/components/SwapRouteCard/SwapRouteCardSkeleton.js +3 -1
  38. package/cjs/components/SwapRoutes/SwapRoutes.js +8 -3
  39. package/cjs/components/SwapRoutes/SwapRoutesExpanded.d.ts +0 -1
  40. package/cjs/components/Token/Token.js +6 -5
  41. package/cjs/components/TokenAvatar/TokenAvatar.d.ts +6 -1
  42. package/cjs/components/TokenAvatar/TokenAvatar.js +10 -3
  43. package/cjs/components/TokenList/TokenList.js +2 -23
  44. package/cjs/components/TokenList/TokenListItem.d.ts +2 -1
  45. package/cjs/components/TokenList/TokenListItem.js +12 -6
  46. package/cjs/components/TokenList/index.d.ts +1 -0
  47. package/cjs/components/TokenList/index.js +1 -0
  48. package/cjs/components/TokenList/types.d.ts +6 -0
  49. package/cjs/components/TokenList/useTokenSelect.d.ts +2 -0
  50. package/cjs/components/TokenList/useTokenSelect.js +33 -0
  51. package/cjs/config/version.d.ts +1 -1
  52. package/cjs/config/version.js +1 -1
  53. package/cjs/hooks/useChain.d.ts +2 -2
  54. package/cjs/hooks/useChains.d.ts +2 -2
  55. package/cjs/hooks/useExpandableVariant.js +3 -5
  56. package/cjs/hooks/useProcessMessage.d.ts +2 -2
  57. package/cjs/hooks/useSwapRoutes.js +11 -7
  58. package/cjs/i18n/de.json +199 -0
  59. package/cjs/i18n/en.json +157 -151
  60. package/cjs/i18n/es.json +199 -0
  61. package/cjs/i18n/fr.json +199 -0
  62. package/cjs/i18n/index.d.ts +8 -200
  63. package/cjs/i18n/index.js +15 -19
  64. package/cjs/i18n/it.json +199 -0
  65. package/cjs/i18n/uk.json +200 -0
  66. package/cjs/i18n/zh.json +199 -0
  67. package/cjs/pages/ActiveSwapsPage/ActiveSwapsPage.d.ts +0 -1
  68. package/cjs/pages/SelectChainPage/SelectChainPage.d.ts +1 -1
  69. package/cjs/pages/SelectChainPage/SelectChainPage.js +2 -5
  70. package/cjs/pages/SelectNativeTokenPage/SelectNativeTokenPage.d.ts +3 -0
  71. package/cjs/pages/SelectNativeTokenPage/SelectNativeTokenPage.js +21 -0
  72. package/cjs/pages/SelectNativeTokenPage/SelectNativeTokenPage.style.d.ts +21 -0
  73. package/cjs/pages/SelectNativeTokenPage/SelectNativeTokenPage.style.js +20 -0
  74. package/cjs/pages/SelectNativeTokenPage/index.d.ts +1 -0
  75. package/cjs/pages/SelectNativeTokenPage/index.js +17 -0
  76. package/cjs/pages/SelectTokenPage/SearchTokenInput.d.ts +0 -1
  77. package/cjs/pages/SelectWalletPage/SelectWalletPage.d.ts +0 -1
  78. package/cjs/pages/SettingsPage/AdvancedPreferences.d.ts +0 -1
  79. package/cjs/pages/SettingsPage/ColorSchemeButtonGroup.style.d.ts +1 -1
  80. package/cjs/pages/SettingsPage/GasPriceSelect.d.ts +0 -1
  81. package/cjs/pages/SettingsPage/LanguageSelect.d.ts +2 -0
  82. package/cjs/pages/SettingsPage/LanguageSelect.js +38 -0
  83. package/cjs/pages/SettingsPage/SettingsPage.d.ts +0 -1
  84. package/cjs/pages/SettingsPage/SettingsPage.js +2 -1
  85. package/cjs/pages/SettingsPage/ShowDestinationWallet.d.ts +1 -2
  86. package/cjs/pages/SettingsPage/ShowDestinationWallet.js +6 -0
  87. package/cjs/pages/SettingsPage/SlippageInput.d.ts +0 -1
  88. package/cjs/pages/SwapDetailsPage/SwapDetailsPage.js +4 -2
  89. package/cjs/pages/SwapHistoryPage/SwapHistoryItem.js +4 -2
  90. package/cjs/pages/SwapPage/StatusBottomSheet.js +3 -3
  91. package/cjs/pages/SwapPage/TokenValueBottomSheet.js +1 -1
  92. package/cjs/providers/I18nProvider/I18nProvider.d.ts +2 -0
  93. package/cjs/providers/I18nProvider/I18nProvider.js +62 -0
  94. package/cjs/providers/I18nProvider/index.d.ts +2 -0
  95. package/cjs/providers/I18nProvider/index.js +18 -0
  96. package/cjs/providers/I18nProvider/types.d.ts +16 -0
  97. package/cjs/providers/I18nProvider/types.js +2 -0
  98. package/cjs/providers/WidgetProvider/utils.d.ts +1 -1
  99. package/cjs/providers/WidgetProvider/utils.js +4 -4
  100. package/cjs/providers/index.d.ts +1 -0
  101. package/cjs/providers/index.js +1 -0
  102. package/cjs/stores/settings/types.d.ts +1 -0
  103. package/cjs/stores/settings/useSettingsStore.d.ts +2 -0
  104. package/cjs/types/widget.d.ts +24 -7
  105. package/cjs/types/widget.js +8 -0
  106. package/cjs/utils/deepMerge.d.ts +1 -0
  107. package/cjs/utils/deepMerge.js +18 -0
  108. package/cjs/utils/index.d.ts +1 -0
  109. package/cjs/utils/index.js +1 -0
  110. package/cjs/utils/navigationRoutes.d.ts +8 -7
  111. package/cjs/utils/navigationRoutes.js +10 -7
  112. package/components/ActiveSwaps/ActiveSwaps.style.d.ts +1 -1
  113. package/components/BottomSheet/BottomSheet.d.ts +1 -1
  114. package/components/ChainSelect/ChainSelect.d.ts +0 -1
  115. package/components/ChainSelect/ChainSelect.js +1 -3
  116. package/components/ChainSelect/useChainSelect.d.ts +1 -1
  117. package/components/Header/Header.style.d.ts +34 -1
  118. package/components/Header/Header.style.js +19 -1
  119. package/components/Header/NavigationHeader.js +4 -1
  120. package/components/Header/WalletHeader.js +37 -12
  121. package/components/Menu.d.ts +1 -0
  122. package/components/Menu.js +21 -0
  123. package/components/PoweredBy/PoweredBy.style.d.ts +1 -1
  124. package/components/ReverseTokensButton/ReverseTokensButton.style.d.ts +1 -1
  125. package/components/SelectChainAndToken.js +7 -2
  126. package/components/SelectTokenButton/SelectTokenButton.js +9 -7
  127. package/components/SelectTokenButton/SelectTokenButton.style.js +2 -1
  128. package/components/SendToWallet/SendToWallet.js +6 -1
  129. package/components/SendToWallet/SendToWallet.style.d.ts +1 -1
  130. package/components/SendToWallet/SendToWalletButton.js +6 -2
  131. package/components/Step/CircularProgress.d.ts +0 -1
  132. package/components/Step/StepProcess.style.d.ts +2 -2
  133. package/components/Step/StepTimer.js +1 -1
  134. package/components/StepActions/StepActions.js +6 -1
  135. package/components/SwapInput/FormPriceHelperText.js +4 -4
  136. package/components/SwapInput/SwapInput.js +6 -3
  137. package/components/SwapInput/SwapInput.style.d.ts +1 -1
  138. package/components/SwapInput/SwapInputAdornment.d.ts +0 -1
  139. package/components/SwapInput/SwapInputAdornment.style.d.ts +1 -1
  140. package/components/SwapRouteCard/SwapRouteCard.js +5 -3
  141. package/components/SwapRouteCard/SwapRouteCard.style.d.ts +1 -1
  142. package/components/SwapRouteCard/SwapRouteCardSkeleton.js +3 -1
  143. package/components/SwapRoutes/SwapRoutes.js +8 -3
  144. package/components/SwapRoutes/SwapRoutesExpanded.d.ts +0 -1
  145. package/components/Token/Token.js +7 -6
  146. package/components/TokenAvatar/TokenAvatar.d.ts +6 -1
  147. package/components/TokenAvatar/TokenAvatar.js +8 -2
  148. package/components/TokenList/TokenList.js +4 -25
  149. package/components/TokenList/TokenListItem.d.ts +2 -1
  150. package/components/TokenList/TokenListItem.js +10 -5
  151. package/components/TokenList/index.d.ts +1 -0
  152. package/components/TokenList/index.js +1 -0
  153. package/components/TokenList/types.d.ts +6 -0
  154. package/components/TokenList/useTokenSelect.d.ts +2 -0
  155. package/components/TokenList/useTokenSelect.js +29 -0
  156. package/config/version.d.ts +1 -1
  157. package/config/version.js +1 -1
  158. package/hooks/useChain.d.ts +2 -2
  159. package/hooks/useChains.d.ts +2 -2
  160. package/hooks/useExpandableVariant.js +3 -5
  161. package/hooks/useProcessMessage.d.ts +2 -2
  162. package/hooks/useSwapRoutes.js +12 -8
  163. package/i18n/de.json +199 -0
  164. package/i18n/en.json +157 -151
  165. package/i18n/es.json +199 -0
  166. package/i18n/fr.json +199 -0
  167. package/i18n/index.d.ts +8 -200
  168. package/i18n/index.js +8 -18
  169. package/i18n/it.json +199 -0
  170. package/i18n/uk.json +200 -0
  171. package/i18n/zh.json +199 -0
  172. package/package.json +18 -17
  173. package/pages/ActiveSwapsPage/ActiveSwapsPage.d.ts +0 -1
  174. package/pages/SelectChainPage/SelectChainPage.d.ts +1 -1
  175. package/pages/SelectChainPage/SelectChainPage.js +2 -5
  176. package/pages/SelectNativeTokenPage/SelectNativeTokenPage.d.ts +3 -0
  177. package/pages/SelectNativeTokenPage/SelectNativeTokenPage.js +17 -0
  178. package/pages/SelectNativeTokenPage/SelectNativeTokenPage.style.d.ts +21 -0
  179. package/pages/SelectNativeTokenPage/SelectNativeTokenPage.style.js +17 -0
  180. package/pages/SelectNativeTokenPage/index.d.ts +1 -0
  181. package/pages/SelectNativeTokenPage/index.js +1 -0
  182. package/pages/SelectTokenPage/SearchTokenInput.d.ts +0 -1
  183. package/pages/SelectWalletPage/SelectWalletPage.d.ts +0 -1
  184. package/pages/SettingsPage/AdvancedPreferences.d.ts +0 -1
  185. package/pages/SettingsPage/ColorSchemeButtonGroup.style.d.ts +1 -1
  186. package/pages/SettingsPage/GasPriceSelect.d.ts +0 -1
  187. package/pages/SettingsPage/LanguageSelect.d.ts +2 -0
  188. package/pages/SettingsPage/LanguageSelect.js +34 -0
  189. package/pages/SettingsPage/SettingsPage.d.ts +0 -1
  190. package/pages/SettingsPage/SettingsPage.js +2 -1
  191. package/pages/SettingsPage/ShowDestinationWallet.d.ts +1 -2
  192. package/pages/SettingsPage/ShowDestinationWallet.js +6 -0
  193. package/pages/SettingsPage/SlippageInput.d.ts +0 -1
  194. package/pages/SwapDetailsPage/SwapDetailsPage.js +4 -2
  195. package/pages/SwapHistoryPage/SwapHistoryItem.js +4 -2
  196. package/pages/SwapPage/StatusBottomSheet.js +3 -3
  197. package/pages/SwapPage/TokenValueBottomSheet.js +1 -1
  198. package/providers/I18nProvider/I18nProvider.d.ts +2 -0
  199. package/providers/I18nProvider/I18nProvider.js +58 -0
  200. package/providers/I18nProvider/index.d.ts +2 -0
  201. package/providers/I18nProvider/index.js +2 -0
  202. package/providers/I18nProvider/types.d.ts +16 -0
  203. package/providers/I18nProvider/types.js +1 -0
  204. package/providers/WidgetProvider/utils.d.ts +1 -1
  205. package/providers/WidgetProvider/utils.js +4 -4
  206. package/providers/index.d.ts +1 -0
  207. package/providers/index.js +1 -0
  208. package/stores/settings/types.d.ts +1 -0
  209. package/stores/settings/useSettingsStore.d.ts +2 -0
  210. package/tsconfig.cjs.tsbuildinfo +1 -1
  211. package/types/widget.d.ts +24 -7
  212. package/types/widget.js +7 -1
  213. package/utils/deepMerge.d.ts +1 -0
  214. package/utils/deepMerge.js +14 -0
  215. package/utils/index.d.ts +1 -0
  216. package/utils/index.js +1 -0
  217. package/utils/navigationRoutes.d.ts +8 -7
  218. package/utils/navigationRoutes.js +10 -7
@@ -2,7 +2,7 @@
2
2
  export declare const DrawerButton: import("@emotion/styled").StyledComponent<{
3
3
  children?: import("react").ReactNode;
4
4
  classes?: Partial<import("@mui/material").ButtonClasses> | undefined;
5
- color?: "inherit" | "primary" | "secondary" | "error" | "warning" | "info" | "success" | undefined;
5
+ color?: "inherit" | "error" | "success" | "warning" | "primary" | "secondary" | "info" | undefined;
6
6
  disabled?: boolean | undefined;
7
7
  disableElevation?: boolean | undefined;
8
8
  disableFocusRipple?: boolean | undefined;
package/AppProvider.js CHANGED
@@ -1,14 +1,12 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { QueryClientProvider } from '@tanstack/react-query';
3
3
  import { Fragment } from 'react';
4
- import { I18nextProvider } from 'react-i18next';
5
4
  import { MemoryRouter, useInRouterContext } from 'react-router-dom';
6
5
  import { queryClient } from './config/queryClient';
7
- import { i18n } from './i18n';
8
- import { SDKProvider, SwapFormProvider, TelemetryProvider, ThemeProvider, WalletProvider, WidgetProvider, } from './providers';
6
+ import { I18nProvider, SDKProvider, SwapFormProvider, TelemetryProvider, ThemeProvider, WalletProvider, WidgetProvider, } from './providers';
9
7
  const QueryProvider = QueryClientProvider;
10
8
  export const AppProvider = ({ children, config, }) => {
11
- return (_jsx(QueryProvider, Object.assign({ client: queryClient }, { children: _jsx(WidgetProvider, Object.assign({ config: config }, { children: _jsx(SDKProvider, { children: _jsx(TelemetryProvider, { children: _jsx(SwapFormProvider, { children: _jsx(ThemeProvider, { children: _jsx(WalletProvider, { children: _jsx(I18nextProvider, Object.assign({ i18n: i18n }, { children: _jsx(AppRouter, { children: children }) })) }) }) }) }) }) })) })));
9
+ return (_jsx(QueryProvider, Object.assign({ client: queryClient }, { children: _jsx(WidgetProvider, Object.assign({ config: config }, { children: _jsx(SDKProvider, { children: _jsx(TelemetryProvider, { children: _jsx(SwapFormProvider, { children: _jsx(ThemeProvider, { children: _jsx(I18nProvider, { children: _jsx(WalletProvider, { children: _jsx(AppRouter, { children: children }) }) }) }) }) }) }) })) })));
12
10
  };
13
11
  export const AppRouter = ({ children }) => {
14
12
  const inRouterContext = useInRouterContext();
package/AppRoutes.js CHANGED
@@ -4,6 +4,7 @@ import { NotFound } from './components/NotFound';
4
4
  import { ActiveSwapsPage } from './pages/ActiveSwapsPage';
5
5
  import { MainPage } from './pages/MainPage';
6
6
  import { SelectChainPage } from './pages/SelectChainPage';
7
+ import { SelectNativeTokenPage } from './pages/SelectNativeTokenPage';
7
8
  import { SelectTokenPage } from './pages/SelectTokenPage';
8
9
  import { SelectWalletPage } from './pages/SelectWalletPage';
9
10
  import { SettingsPage } from './pages/SettingsPage';
@@ -30,6 +31,10 @@ export const AppRoutes = () => {
30
31
  path: navigationRoutes.toToken,
31
32
  element: _jsx(SelectTokenPage, { formType: "to" }),
32
33
  },
34
+ {
35
+ path: navigationRoutes.toTokenNative,
36
+ element: _jsx(SelectNativeTokenPage, { formType: "to" }),
37
+ },
33
38
  ...[
34
39
  navigationRoutes.fromChain,
35
40
  `${navigationRoutes.fromToken}/${navigationRoutes.fromChain}`,
@@ -2,7 +2,7 @@
2
2
  export declare const DrawerButton: import("@emotion/styled").StyledComponent<{
3
3
  children?: import("react").ReactNode;
4
4
  classes?: Partial<import("@mui/material").ButtonClasses> | undefined;
5
- color?: "inherit" | "primary" | "secondary" | "error" | "warning" | "info" | "success" | undefined;
5
+ color?: "inherit" | "error" | "success" | "warning" | "primary" | "secondary" | "info" | undefined;
6
6
  disabled?: boolean | undefined;
7
7
  disableElevation?: boolean | undefined;
8
8
  disableFocusRipple?: boolean | undefined;
@@ -4,14 +4,12 @@ exports.AppRouter = exports.AppProvider = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_query_1 = require("@tanstack/react-query");
6
6
  const react_1 = require("react");
7
- const react_i18next_1 = require("react-i18next");
8
7
  const react_router_dom_1 = require("react-router-dom");
9
8
  const queryClient_1 = require("./config/queryClient");
10
- const i18n_1 = require("./i18n");
11
9
  const providers_1 = require("./providers");
12
10
  const QueryProvider = react_query_1.QueryClientProvider;
13
11
  const AppProvider = ({ children, config, }) => {
14
- return ((0, jsx_runtime_1.jsx)(QueryProvider, Object.assign({ client: queryClient_1.queryClient }, { children: (0, jsx_runtime_1.jsx)(providers_1.WidgetProvider, Object.assign({ config: config }, { children: (0, jsx_runtime_1.jsx)(providers_1.SDKProvider, { children: (0, jsx_runtime_1.jsx)(providers_1.TelemetryProvider, { children: (0, jsx_runtime_1.jsx)(providers_1.SwapFormProvider, { children: (0, jsx_runtime_1.jsx)(providers_1.ThemeProvider, { children: (0, jsx_runtime_1.jsx)(providers_1.WalletProvider, { children: (0, jsx_runtime_1.jsx)(react_i18next_1.I18nextProvider, Object.assign({ i18n: i18n_1.i18n }, { children: (0, jsx_runtime_1.jsx)(exports.AppRouter, { children: children }) })) }) }) }) }) }) })) })));
12
+ return ((0, jsx_runtime_1.jsx)(QueryProvider, Object.assign({ client: queryClient_1.queryClient }, { children: (0, jsx_runtime_1.jsx)(providers_1.WidgetProvider, Object.assign({ config: config }, { children: (0, jsx_runtime_1.jsx)(providers_1.SDKProvider, { children: (0, jsx_runtime_1.jsx)(providers_1.TelemetryProvider, { children: (0, jsx_runtime_1.jsx)(providers_1.SwapFormProvider, { children: (0, jsx_runtime_1.jsx)(providers_1.ThemeProvider, { children: (0, jsx_runtime_1.jsx)(providers_1.I18nProvider, { children: (0, jsx_runtime_1.jsx)(providers_1.WalletProvider, { children: (0, jsx_runtime_1.jsx)(exports.AppRouter, { children: children }) }) }) }) }) }) }) })) })));
15
13
  };
16
14
  exports.AppProvider = AppProvider;
17
15
  const AppRouter = ({ children }) => {
package/cjs/AppRoutes.js CHANGED
@@ -7,6 +7,7 @@ const NotFound_1 = require("./components/NotFound");
7
7
  const ActiveSwapsPage_1 = require("./pages/ActiveSwapsPage");
8
8
  const MainPage_1 = require("./pages/MainPage");
9
9
  const SelectChainPage_1 = require("./pages/SelectChainPage");
10
+ const SelectNativeTokenPage_1 = require("./pages/SelectNativeTokenPage");
10
11
  const SelectTokenPage_1 = require("./pages/SelectTokenPage");
11
12
  const SelectWalletPage_1 = require("./pages/SelectWalletPage");
12
13
  const SettingsPage_1 = require("./pages/SettingsPage");
@@ -33,6 +34,10 @@ const AppRoutes = () => {
33
34
  path: utils_1.navigationRoutes.toToken,
34
35
  element: (0, jsx_runtime_1.jsx)(SelectTokenPage_1.SelectTokenPage, { formType: "to" }),
35
36
  },
37
+ {
38
+ path: utils_1.navigationRoutes.toTokenNative,
39
+ element: (0, jsx_runtime_1.jsx)(SelectNativeTokenPage_1.SelectNativeTokenPage, { formType: "to" }),
40
+ },
36
41
  ...[
37
42
  utils_1.navigationRoutes.fromChain,
38
43
  `${utils_1.navigationRoutes.fromToken}/${utils_1.navigationRoutes.fromChain}`,
@@ -33,7 +33,7 @@ export declare const ListItem: import("@emotion/styled").StyledComponent<{
33
33
  export declare const ShowAllButton: import("@emotion/styled").StyledComponent<{
34
34
  children?: import("react").ReactNode;
35
35
  classes?: Partial<import("@mui/material").ButtonClasses> | undefined;
36
- color?: "inherit" | "primary" | "secondary" | "error" | "warning" | "info" | "success" | undefined;
36
+ color?: "inherit" | "error" | "success" | "warning" | "primary" | "secondary" | "info" | undefined;
37
37
  disabled?: boolean | undefined;
38
38
  disableElevation?: boolean | undefined;
39
39
  disableFocusRipple?: boolean | undefined;
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
2
  import type { BottomSheetBase, BottomSheetProps } from './types';
3
- export declare const BottomSheet: import("react").ForwardRefExoticComponent<Pick<BottomSheetProps, "className" | "style" | "classes" | "slot" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "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" | "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" | "transitionDuration" | "variant" | "open" | "anchor" | "components" | "elementRef" | "componentsProps" | "BackdropComponent" | "BackdropProps" | "closeAfterTransition" | "container" | "disableAutoFocus" | "disableEnforceFocus" | "disableEscapeKeyDown" | "disablePortal" | "disableRestoreFocus" | "disableScrollLock" | "hideBackdrop" | "keepMounted" | "onBackdropClick" | "onClose" | "elevation" | "PaperProps" | "ModalProps" | "SlideProps"> & import("react").RefAttributes<BottomSheetBase>>;
3
+ export declare const BottomSheet: import("react").ForwardRefExoticComponent<Pick<BottomSheetProps, "className" | "style" | "classes" | "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" | "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" | "transitionDuration" | "variant" | "open" | "anchor" | "components" | "elementRef" | "componentsProps" | "BackdropComponent" | "BackdropProps" | "closeAfterTransition" | "container" | "disableAutoFocus" | "disableEnforceFocus" | "disableEscapeKeyDown" | "disablePortal" | "disableRestoreFocus" | "disableScrollLock" | "hideBackdrop" | "keepMounted" | "onBackdropClick" | "onClose" | "slotProps" | "slots" | "elevation" | "PaperProps" | "ModalProps" | "SlideProps"> & import("react").RefAttributes<BottomSheetBase>>;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import type { SwapFormTypeProps } from '../../providers';
3
2
  export declare const ChainSelect: ({ formType }: SwapFormTypeProps) => JSX.Element;
@@ -18,9 +18,7 @@ const ChainSelect = ({ formType }) => {
18
18
  name: [providers_1.SwapFormKeyHelper.getChainKey(formType)],
19
19
  });
20
20
  const showAllChains = () => {
21
- navigate(utils_1.navigationRoutes[`${formType}Chain`], {
22
- state: { formType },
23
- });
21
+ navigate(utils_1.navigationRoutes[`${formType}Chain`]);
24
22
  };
25
23
  const chainsToHide = ((_a = chains === null || chains === void 0 ? void 0 : chains.length) !== null && _a !== void 0 ? _a : 0) - stores_1.maxChainToOrder;
26
24
  return ((0, jsx_runtime_1.jsxs)(ChainSelect_style_1.ChainContainer, { children: [isLoading
@@ -1,7 +1,7 @@
1
1
  import type { EVMChain } from '@lifi/sdk';
2
2
  import type { SwapFormType } from '../../providers';
3
3
  export declare const useChainSelect: (formType: SwapFormType) => {
4
- chains: EVMChain[] | undefined;
4
+ chains: import("@lifi/sdk").ExtendedChain[] | undefined;
5
5
  getChains: () => EVMChain[];
6
6
  setCurrentChain: (chainId: number) => void;
7
7
  isLoading: boolean;
@@ -7,7 +7,7 @@ export declare const HeaderAppBar: import("@emotion/styled").StyledComponent<Omi
7
7
  sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
8
8
  } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, keyof import("react").HTMLAttributes<HTMLElement> | "key"> & {
9
9
  ref?: ((instance: HTMLElement | null) => void) | import("react").RefObject<HTMLElement> | null | undefined;
10
- }, keyof import("@mui/material/OverridableComponent").CommonProps | "slot" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "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" | "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>, {}, {}>;
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" | "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> & {
12
12
  children?: import("react").ReactNode;
13
13
  component?: import("react").ElementType<any> | undefined;
@@ -18,3 +18,36 @@ export declare const Container: import("@emotion/styled").StyledComponent<import
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"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
19
19
  sticky?: boolean | undefined;
20
20
  }, {}, {}>;
21
+ export declare const WalletButton: import("@emotion/styled").StyledComponent<{
22
+ children?: import("react").ReactNode;
23
+ classes?: Partial<import("@mui/material").ButtonClasses> | undefined;
24
+ color?: "inherit" | "error" | "success" | "warning" | "primary" | "secondary" | "info" | undefined;
25
+ disabled?: boolean | undefined;
26
+ disableElevation?: boolean | undefined;
27
+ disableFocusRipple?: boolean | undefined;
28
+ endIcon?: import("react").ReactNode;
29
+ fullWidth?: boolean | undefined;
30
+ href?: string | undefined;
31
+ size?: "small" | "medium" | "large" | undefined;
32
+ startIcon?: import("react").ReactNode;
33
+ sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
34
+ variant?: "text" | "outlined" | "contained" | undefined;
35
+ } & Omit<{
36
+ action?: import("react").Ref<import("@mui/material").ButtonBaseActions> | undefined;
37
+ centerRipple?: boolean | undefined;
38
+ children?: import("react").ReactNode;
39
+ classes?: Partial<import("@mui/material").ButtonBaseClasses> | undefined;
40
+ disabled?: boolean | undefined;
41
+ disableRipple?: boolean | undefined;
42
+ disableTouchRipple?: boolean | undefined;
43
+ focusRipple?: boolean | undefined;
44
+ focusVisibleClassName?: string | undefined;
45
+ LinkComponent?: import("react").ElementType<any> | undefined;
46
+ onFocusVisible?: import("react").FocusEventHandler<any> | undefined;
47
+ sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
48
+ tabIndex?: number | undefined;
49
+ TouchRippleProps?: Partial<import("@mui/material/ButtonBase/TouchRipple").TouchRippleProps> | undefined;
50
+ touchRippleRef?: import("react").Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions> | undefined;
51
+ }, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "key" | keyof import("react").ButtonHTMLAttributes<HTMLButtonElement>> & {
52
+ ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
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>, {}, {}>;
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Container = exports.HeaderAppBar = void 0;
3
+ exports.WalletButton = exports.Container = exports.HeaderAppBar = void 0;
4
4
  const material_1 = require("@mui/material");
5
+ const Button_1 = require("@mui/material/Button");
5
6
  const styles_1 = require("@mui/material/styles");
6
7
  exports.HeaderAppBar = (0, styles_1.styled)(material_1.AppBar)(({ theme }) => ({
7
8
  backgroundColor: 'transparent',
@@ -25,3 +26,20 @@ exports.Container = (0, styles_1.styled)(material_1.Box, {
25
26
  top: 0,
26
27
  zIndex: 1200,
27
28
  }));
29
+ exports.WalletButton = (0, styles_1.styled)(material_1.Button)(({ theme }) => ({
30
+ color: theme.palette.text.primary,
31
+ backgroundColor: 'transparent',
32
+ padding: theme.spacing(1, 1.5),
33
+ maxHeight: 40,
34
+ fontSize: '0.875rem',
35
+ fontWeight: 600,
36
+ borderRadius: theme.shape.borderRadius * 2,
37
+ '&:hover': {
38
+ backgroundColor: theme.palette.mode === 'light'
39
+ ? (0, styles_1.alpha)(theme.palette.common.black, 0.04)
40
+ : (0, styles_1.alpha)(theme.palette.common.white, 0.08),
41
+ },
42
+ [`.${Button_1.buttonClasses.endIcon} > *:nth-of-type(1)`]: {
43
+ fontSize: '24px',
44
+ },
45
+ }));
@@ -33,6 +33,7 @@ const NavigationHeader = () => {
33
33
  case utils_1.navigationRoutes.fromToken:
34
34
  return t(`header.from`);
35
35
  case utils_1.navigationRoutes.toToken:
36
+ case utils_1.navigationRoutes.toTokenNative:
36
37
  return t(`header.to`);
37
38
  case utils_1.navigationRoutes.fromChain:
38
39
  case utils_1.navigationRoutes.toChain:
@@ -49,6 +50,8 @@ const NavigationHeader = () => {
49
50
  return t(`header.swap`);
50
51
  }
51
52
  };
52
- return ((0, jsx_runtime_1.jsxs)(Header_style_1.HeaderAppBar, Object.assign({ elevation: 0 }, { children: [utils_1.backButtonRoutes.includes(path) ? ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ 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, Object.assign({ 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, Object.assign({ title: t(`header.swapHistory`), enterDelay: 400, arrow: true }, { children: (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ size: "medium", edge: "start", onClick: () => navigate(utils_1.navigationRoutes.swapHistory) }, { children: (0, jsx_runtime_1.jsx)(icons_material_1.History, {}) })) }))) : null, (0, jsx_runtime_1.jsx)(material_1.Tooltip, Object.assign({ title: t(`header.settings`), enterDelay: 400, arrow: true }, { children: (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ size: "medium", edge: "end", onClick: () => navigate(utils_1.navigationRoutes.settings) }, { 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 }) })] })] })));
53
+ return ((0, jsx_runtime_1.jsxs)(Header_style_1.HeaderAppBar, Object.assign({ elevation: 0 }, { children: [utils_1.backButtonRoutes.includes(path) ? ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ 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, Object.assign({ 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, Object.assign({ title: t(`header.swapHistory`), enterDelay: 400, arrow: true }, { children: (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ size: "medium", edge: "start", onClick: () => navigate(utils_1.navigationRoutes.swapHistory) }, { children: (0, jsx_runtime_1.jsx)(icons_material_1.History, {}) })) }))) : null, (0, jsx_runtime_1.jsx)(material_1.Tooltip, Object.assign({ title: t(`header.settings`), enterDelay: 400, arrow: true }, { children: (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ size: "medium", onClick: () => navigate(utils_1.navigationRoutes.settings), sx: {
54
+ marginRight: -1.25,
55
+ } }, { 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 }) })] })] })));
53
56
  };
54
57
  exports.NavigationHeader = NavigationHeader;
@@ -13,23 +13,21 @@ exports.WalletHeader = void 0;
13
13
  const jsx_runtime_1 = require("react/jsx-runtime");
14
14
  const icons_material_1 = require("@mui/icons-material");
15
15
  const material_1 = require("@mui/material");
16
+ const react_1 = require("react");
16
17
  const react_i18next_1 = require("react-i18next");
17
18
  const react_router_dom_1 = require("react-router-dom");
19
+ const hooks_1 = require("../../hooks");
18
20
  const providers_1 = require("../../providers");
19
21
  const utils_1 = require("../../utils");
22
+ const Menu_1 = require("../Menu");
20
23
  const Header_style_1 = require("./Header.style");
21
24
  const WalletHeader = () => {
22
- const { t } = (0, react_i18next_1.useTranslation)();
23
- const { account, disconnect } = (0, providers_1.useWallet)();
24
- const walletAddress = (0, utils_1.shortenWalletAddress)(account.address);
25
- return ((0, jsx_runtime_1.jsx)(Header_style_1.HeaderAppBar, Object.assign({ elevation: 0 }, { children: walletAddress ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ sx: {
26
- display: 'flex',
27
- flex: 1,
28
- flexDirection: 'column',
29
- }, mr: 0.5 }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "caption", align: "right" }, { children: t(`header.walletConnected`) })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2", align: "right", fontWeight: "600" }, { children: walletAddress }))] })), (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ size: "medium", edge: "end", onClick: disconnect }, { children: (0, jsx_runtime_1.jsx)(icons_material_1.Logout, {}) }))] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2", align: "right", fontWeight: "600", flex: 1, mr: 0.5 }, { children: t(`header.connectWallet`) })), (0, jsx_runtime_1.jsx)(ConnectButton, {})] })) })));
25
+ const { account } = (0, providers_1.useWallet)();
26
+ return ((0, jsx_runtime_1.jsx)(Header_style_1.HeaderAppBar, Object.assign({ elevation: 0, sx: { justifyContent: 'flex-end' } }, { children: account.isActive ? (0, jsx_runtime_1.jsx)(ConnectedButton, {}) : (0, jsx_runtime_1.jsx)(ConnectButton, {}) })));
30
27
  };
31
28
  exports.WalletHeader = WalletHeader;
32
29
  const ConnectButton = () => {
30
+ const { t } = (0, react_i18next_1.useTranslation)();
33
31
  const { pathname } = (0, react_router_dom_1.useLocation)();
34
32
  const config = (0, providers_1.useWidgetConfig)();
35
33
  const { connect: walletConnect } = (0, providers_1.useWallet)();
@@ -41,5 +39,32 @@ const ConnectButton = () => {
41
39
  }
42
40
  navigate(utils_1.navigationRoutes.selectWallet);
43
41
  });
44
- return ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ size: "medium", edge: "end", onClick: !pathname.includes(utils_1.navigationRoutes.selectWallet) ? connect : undefined }, { children: (0, jsx_runtime_1.jsx)(icons_material_1.WalletOutlined, {}) })));
42
+ return ((0, jsx_runtime_1.jsx)(Header_style_1.WalletButton, Object.assign({ endIcon: (0, jsx_runtime_1.jsx)(icons_material_1.WalletOutlined, {}), onClick: !pathname.includes(utils_1.navigationRoutes.selectWallet) ? connect : undefined, sx: {
43
+ marginRight: -1.25,
44
+ } }, { children: t(`button.connectWallet`) })));
45
+ };
46
+ const ConnectedButton = () => {
47
+ const { t } = (0, react_i18next_1.useTranslation)();
48
+ const { account, disconnect } = (0, providers_1.useWallet)();
49
+ const walletAddress = (0, utils_1.shortenWalletAddress)(account.address);
50
+ const { chain } = (0, hooks_1.useChain)(account.chainId);
51
+ const [anchorEl, setAnchorEl] = (0, react_1.useState)(null);
52
+ const handleClick = (event) => {
53
+ setAnchorEl(event.currentTarget);
54
+ };
55
+ const handleClose = () => {
56
+ setAnchorEl(null);
57
+ };
58
+ const handleDisconnect = () => {
59
+ disconnect();
60
+ handleClose();
61
+ };
62
+ const handleCopyAddress = () => __awaiter(void 0, void 0, void 0, function* () {
63
+ var _a;
64
+ yield navigator.clipboard.writeText((_a = account.address) !== null && _a !== void 0 ? _a : '');
65
+ handleClose();
66
+ });
67
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Header_style_1.WalletButton, Object.assign({ endIcon: (0, jsx_runtime_1.jsx)(icons_material_1.ExpandMore, {}), startIcon: (0, jsx_runtime_1.jsx)(material_1.Avatar, Object.assign({ src: chain === null || chain === void 0 ? void 0 : chain.logoURI, alt: chain === null || chain === void 0 ? void 0 : chain.key, sx: { width: 24, height: 24 } }, { children: chain === null || chain === void 0 ? void 0 : chain.name[0] })), sx: {
68
+ marginRight: -1.25,
69
+ }, onClick: handleClick }, { children: walletAddress })), (0, jsx_runtime_1.jsxs)(Menu_1.Menu, Object.assign({ elevation: 2, anchorEl: anchorEl, open: Boolean(anchorEl), onClose: handleClose }, { children: [(0, jsx_runtime_1.jsxs)(material_1.MenuItem, Object.assign({ onClick: handleCopyAddress, disableRipple: true, dense: true }, { children: [(0, jsx_runtime_1.jsx)(icons_material_1.ContentCopy, {}), t(`button.copyAddress`)] })), (0, jsx_runtime_1.jsxs)(material_1.MenuItem, Object.assign({ onClick: handleDisconnect, disableRipple: true, dense: true }, { children: [(0, jsx_runtime_1.jsx)(icons_material_1.PowerSettingsNew, {}), t(`button.disconnectWallet`)] }))] }))] }));
45
70
  };
@@ -0,0 +1 @@
1
+ export declare const Menu: import("@emotion/styled").StyledComponent<import("@mui/material").MenuProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Menu = void 0;
4
+ const material_1 = require("@mui/material");
5
+ const Menu_1 = require("@mui/material/Menu");
6
+ const MenuItem_1 = require("@mui/material/MenuItem");
7
+ const styles_1 = require("@mui/material/styles");
8
+ const SvgIcon_1 = require("@mui/material/SvgIcon");
9
+ exports.Menu = (0, styles_1.styled)(material_1.Menu)(({ theme }) => ({
10
+ [`& .${Menu_1.menuClasses.paper}`]: {
11
+ borderRadius: theme.shape.borderRadiusSecondary,
12
+ color: theme.palette.text.primary,
13
+ [`& .${Menu_1.menuClasses.list}`]: {
14
+ padding: theme.spacing(0.5, 0),
15
+ },
16
+ [`& .${MenuItem_1.menuItemClasses.root}`]: {
17
+ [`& .${SvgIcon_1.svgIconClasses.root}`]: {
18
+ fontSize: 18,
19
+ color: theme.palette.text.primary,
20
+ marginRight: theme.spacing(1.5),
21
+ },
22
+ },
23
+ },
24
+ }));
@@ -9,4 +9,4 @@ export declare const Link: import("@emotion/styled").StyledComponent<Omit<import
9
9
  variant?: "button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "subtitle1" | "subtitle2" | "body1" | "body2" | "overline" | "@supports (font-variation-settings: normal)" | undefined;
10
10
  } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "key" | keyof import("react").AnchorHTMLAttributes<HTMLAnchorElement>> & {
11
11
  ref?: ((instance: HTMLAnchorElement | null) => void) | import("react").RefObject<HTMLAnchorElement> | null | undefined;
12
- }, keyof import("@mui/material/OverridableComponent").CommonProps | "p" | "slot" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "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" | "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>, {}, {}>;
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" | "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>, {}, {}>;
@@ -2,7 +2,7 @@
2
2
  export declare const IconButton: import("@emotion/styled").StyledComponent<{
3
3
  children?: import("react").ReactNode;
4
4
  classes?: Partial<import("@mui/material").IconButtonClasses> | undefined;
5
- color?: "inherit" | "default" | "primary" | "secondary" | "error" | "warning" | "info" | "success" | undefined;
5
+ color?: "inherit" | "default" | "error" | "success" | "warning" | "primary" | "secondary" | "info" | undefined;
6
6
  disabled?: boolean | undefined;
7
7
  disableFocusRipple?: boolean | undefined;
8
8
  edge?: false | "end" | "start" | undefined;
@@ -7,8 +7,10 @@ const react_hook_form_1 = require("react-hook-form");
7
7
  const ReverseTokensButton_1 = require("../components/ReverseTokensButton");
8
8
  const SelectTokenButton_1 = require("../components/SelectTokenButton");
9
9
  const providers_1 = require("../providers");
10
+ const types_1 = require("../types");
10
11
  const SelectChainAndToken = (props) => {
11
12
  const prefersNarrowView = (0, material_1.useMediaQuery)((theme) => theme.breakpoints.down('sm'));
13
+ const { disabledUI, variant } = (0, providers_1.useWidgetConfig)();
12
14
  const [fromChain, toChain, fromToken, toToken] = (0, react_hook_form_1.useWatch)({
13
15
  name: [
14
16
  providers_1.SwapFormKey.FromChain,
@@ -17,7 +19,10 @@ const SelectChainAndToken = (props) => {
17
19
  providers_1.SwapFormKey.ToToken,
18
20
  ],
19
21
  });
22
+ const disabledReverse = variant === 'refuel' ||
23
+ (disabledUI === null || disabledUI === void 0 ? void 0 : disabledUI.includes(types_1.DisabledUI.FromToken)) ||
24
+ (disabledUI === null || disabledUI === void 0 ? void 0 : disabledUI.includes(types_1.DisabledUI.ToToken));
20
25
  const isCompact = fromChain && toChain && fromToken && toToken && !prefersNarrowView;
21
- return ((0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ sx: { display: 'flex', flexDirection: isCompact ? 'row' : 'column' } }, props, { children: [(0, jsx_runtime_1.jsx)(SelectTokenButton_1.SelectTokenButton, { formType: "from", compact: isCompact }), (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ sx: { display: 'flex', justifyContent: 'center', alignItems: 'center' }, m: -1.25 }, { children: (0, jsx_runtime_1.jsx)(ReverseTokensButton_1.ReverseTokensButton, { vertical: !isCompact }) })), (0, jsx_runtime_1.jsx)(SelectTokenButton_1.SelectTokenButton, { formType: "to", compact: isCompact })] })));
26
+ return ((0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ sx: { display: 'flex', flexDirection: isCompact ? 'row' : 'column' } }, props, { children: [(0, jsx_runtime_1.jsx)(SelectTokenButton_1.SelectTokenButton, { formType: "from", compact: isCompact }), (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ sx: { display: 'flex', justifyContent: 'center', alignItems: 'center' }, m: !disabledReverse ? -1.25 : 1 }, { children: !disabledReverse ? ((0, jsx_runtime_1.jsx)(ReverseTokensButton_1.ReverseTokensButton, { vertical: !isCompact })) : null })), (0, jsx_runtime_1.jsx)(SelectTokenButton_1.SelectTokenButton, { formType: "to", compact: isCompact })] })));
22
27
  };
23
28
  exports.SelectChainAndToken = SelectChainAndToken;
@@ -16,20 +16,22 @@ const SelectTokenButton_style_1 = require("./SelectTokenButton.style");
16
16
  const SelectTokenButton = ({ formType, compact }) => {
17
17
  const { t } = (0, react_i18next_1.useTranslation)();
18
18
  const navigate = (0, react_router_dom_1.useNavigate)();
19
+ const { disabledUI, variant } = (0, providers_1.useWidgetConfig)();
20
+ const tokenKey = providers_1.SwapFormKeyHelper.getTokenKey(formType);
19
21
  const [chainId, tokenAddress] = (0, react_hook_form_1.useWatch)({
20
- name: [
21
- providers_1.SwapFormKeyHelper.getChainKey(formType),
22
- providers_1.SwapFormKeyHelper.getTokenKey(formType),
23
- ],
22
+ name: [providers_1.SwapFormKeyHelper.getChainKey(formType), tokenKey],
24
23
  });
25
24
  const { chain, isLoading: isChainLoading } = (0, hooks_1.useChain)(chainId);
26
25
  const { token, isLoading: isTokenLoading } = (0, hooks_1.useToken)(chainId, tokenAddress);
27
26
  const handleClick = () => {
28
27
  navigate(formType === 'from'
29
28
  ? utils_1.navigationRoutes.fromToken
30
- : utils_1.navigationRoutes.toToken);
29
+ : variant === 'refuel'
30
+ ? utils_1.navigationRoutes.toTokenNative
31
+ : utils_1.navigationRoutes.toToken);
31
32
  };
32
33
  const isSelected = !!(chain && token);
33
- return ((0, jsx_runtime_1.jsxs)(Card_1.Card, Object.assign({ flex: 1, onClick: handleClick }, { children: [(0, jsx_runtime_1.jsx)(Card_1.CardTitle, { children: t(`swap.${formType}`) }), chainId && tokenAddress && (isChainLoading || isTokenLoading) ? ((0, jsx_runtime_1.jsx)(SelectTokenButton_style_1.SelectTokenCardHeader, { avatar: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "circular", width: 32, height: 32 }), title: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", width: 64, height: 24 }), subheader: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", width: 64, height: 16 }), compact: compact })) : ((0, jsx_runtime_1.jsx)(SelectTokenButton_style_1.SelectTokenCardHeader, { avatar: isSelected ? (0, jsx_runtime_1.jsx)(TokenAvatar_1.TokenAvatar, { token: token }) : null, action: !compact ? (0, jsx_runtime_1.jsx)(icons_material_1.KeyboardArrowRight, {}) : null, title: isSelected ? token.symbol : t(`swap.selectChainAndToken`), subheader: isSelected ? `on ${chain.name}` : null, selected: isSelected, compact: compact }))] })));
34
+ const onClick = !(disabledUI === null || disabledUI === void 0 ? void 0 : disabledUI.includes(tokenKey)) ? handleClick : undefined;
35
+ return ((0, jsx_runtime_1.jsxs)(Card_1.Card, Object.assign({ flex: 1, onClick: onClick }, { children: [(0, jsx_runtime_1.jsx)(Card_1.CardTitle, { children: t(`swap.${formType}`) }), chainId && tokenAddress && (isChainLoading || isTokenLoading) ? ((0, jsx_runtime_1.jsx)(SelectTokenButton_style_1.SelectTokenCardHeader, { avatar: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "circular", width: 32, height: 32 }), title: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", width: 64, height: 24 }), subheader: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", width: 64, height: 16 }), compact: compact })) : ((0, jsx_runtime_1.jsx)(SelectTokenButton_style_1.SelectTokenCardHeader, { avatar: isSelected ? (0, jsx_runtime_1.jsx)(TokenAvatar_1.TokenAvatar, { token: token, chain: chain }) : null, action: !compact ? (0, jsx_runtime_1.jsx)(icons_material_1.KeyboardArrowRight, {}) : null, title: isSelected ? token.symbol : t(`swap.selectChainAndToken`), subheader: isSelected ? t(`swap.onChain`, { chainName: chain.name }) : null, selected: isSelected, compact: compact }))] })));
34
36
  };
35
37
  exports.SelectTokenButton = SelectTokenButton;
@@ -15,8 +15,9 @@ exports.SelectTokenCardHeader = (0, styles_1.styled)(Card_1.CardHeader, {
15
15
  textOverflow: 'ellipsis',
16
16
  whiteSpace: 'nowrap',
17
17
  overflow: 'hidden',
18
- width: compact ? 92 : 224,
18
+ width: compact ? (selected ? 92 : 142) : 224,
19
19
  fontWeight: selected ? 500 : 400,
20
+ fontSize: compact && !selected ? '1rem' : '1.125rem',
20
21
  },
21
22
  [`.${CardHeader_1.cardHeaderClasses.subheader}`]: {
22
23
  textOverflow: 'ellipsis',
@@ -17,17 +17,22 @@ const react_1 = require("react");
17
17
  const react_hook_form_1 = require("react-hook-form");
18
18
  const react_i18next_1 = require("react-i18next");
19
19
  const providers_1 = require("../../providers");
20
+ const types_1 = require("../../types");
20
21
  const Card_1 = require("../Card");
21
22
  const SendToWallet_style_1 = require("./SendToWallet.style");
22
23
  const store_1 = require("./store");
23
24
  exports.SendToWallet = (0, react_1.forwardRef)((props, ref) => {
24
25
  const { t } = (0, react_i18next_1.useTranslation)();
26
+ const { disabledUI } = (0, providers_1.useWidgetConfig)();
25
27
  const showSendToWallet = (0, store_1.useSendToWalletStore)((state) => state.showSendToWallet);
26
28
  const { account, provider } = (0, providers_1.useWallet)();
27
29
  const { register, trigger } = (0, react_hook_form_1.useFormContext)();
28
30
  (0, react_1.useEffect)(() => {
29
31
  trigger(providers_1.SwapFormKey.ToAddress);
30
32
  }, [account.chainId, trigger]);
33
+ if (disabledUI === null || disabledUI === void 0 ? void 0 : disabledUI.includes(types_1.DisabledUI.ToAddress)) {
34
+ return null;
35
+ }
31
36
  const { onChange, onBlur, name, ref: inputRef, } = register(providers_1.SwapFormKey.ToAddress, {
32
37
  validate: (value) => __awaiter(void 0, void 0, void 0, function* () {
33
38
  try {
@@ -2,7 +2,7 @@
2
2
  export declare const FormControl: import("@emotion/styled").StyledComponent<{
3
3
  children?: import("react").ReactNode;
4
4
  classes?: Partial<import("@mui/material").FormControlClasses> | undefined;
5
- color?: "primary" | "secondary" | "error" | "warning" | "info" | "success" | undefined;
5
+ color?: "error" | "success" | "warning" | "primary" | "secondary" | "info" | undefined;
6
6
  disabled?: boolean | undefined;
7
7
  error?: boolean | undefined;
8
8
  fullWidth?: boolean | undefined;
@@ -8,14 +8,18 @@ const react_hook_form_1 = require("react-hook-form");
8
8
  const react_i18next_1 = require("react-i18next");
9
9
  const providers_1 = require("../../providers");
10
10
  const stores_1 = require("../../stores");
11
+ const types_1 = require("../../types");
11
12
  const store_1 = require("./store");
12
13
  const SendToWalletButton = () => {
13
14
  const { t } = (0, react_i18next_1.useTranslation)();
15
+ const { disabledUI } = (0, providers_1.useWidgetConfig)();
14
16
  const { account } = (0, providers_1.useWallet)();
15
17
  const { setValue } = (0, react_hook_form_1.useFormContext)();
16
18
  const { showDestinationWallet } = (0, stores_1.useSettings)(['showDestinationWallet']);
17
19
  const { showSendToWallet, toggleSendToWallet } = (0, store_1.useSendToWalletStore)();
18
- if (!showDestinationWallet || !account.isActive) {
20
+ if (!showDestinationWallet ||
21
+ !account.isActive ||
22
+ (disabledUI === null || disabledUI === void 0 ? void 0 : disabledUI.includes(types_1.DisabledUI.ToAddress))) {
19
23
  return null;
20
24
  }
21
25
  const handleClick = () => {