@lifi/widget 1.21.0 → 1.22.1
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/AppDrawer.style.d.ts +1 -1
- package/AppProvider.js +2 -4
- package/AppRoutes.js +4 -0
- package/cjs/AppDrawer.style.d.ts +1 -1
- package/cjs/AppProvider.js +1 -3
- package/cjs/AppRoutes.js +4 -0
- package/cjs/components/ActiveSwaps/ActiveSwaps.style.d.ts +1 -1
- package/cjs/components/BottomSheet/BottomSheet.d.ts +1 -1
- package/cjs/components/ChainSelect/ChainSelect.js +1 -3
- package/cjs/components/ChainSelect/useChainSelect.d.ts +1 -1
- package/cjs/components/Header/Header.style.d.ts +34 -1
- package/cjs/components/Header/Header.style.js +19 -1
- package/cjs/components/Header/NavigationHeader.js +6 -2
- package/cjs/components/Header/WalletHeader.js +34 -9
- package/cjs/components/Menu.d.ts +1 -0
- package/cjs/components/Menu.js +24 -0
- package/cjs/components/PoweredBy/PoweredBy.style.d.ts +1 -1
- package/cjs/components/ReverseTokensButton/ReverseTokensButton.style.d.ts +1 -1
- package/cjs/components/SelectChainAndToken.js +6 -1
- package/cjs/components/SelectTokenButton/SelectTokenButton.js +11 -6
- package/cjs/components/SelectTokenButton/SelectTokenButton.style.js +2 -1
- package/cjs/components/SendToWallet/SendToWallet.js +5 -0
- package/cjs/components/SendToWallet/SendToWallet.style.d.ts +1 -1
- package/cjs/components/SendToWallet/SendToWalletButton.js +5 -1
- package/cjs/components/Step/StepProcess.style.d.ts +2 -2
- package/cjs/components/Step/StepTimer.js +1 -1
- package/cjs/components/StepActions/StepActions.js +6 -1
- package/cjs/components/SwapButton/SwapButton.js +9 -4
- package/cjs/components/SwapInput/FormPriceHelperText.js +4 -4
- package/cjs/components/SwapInput/SwapInput.js +5 -2
- package/cjs/components/SwapInput/SwapInput.style.d.ts +1 -1
- package/cjs/components/SwapInput/SwapInputAdornment.style.d.ts +1 -1
- package/cjs/components/SwapRouteCard/SwapRouteCard.js +5 -3
- package/cjs/components/SwapRouteCard/SwapRouteCard.style.d.ts +1 -1
- package/cjs/components/SwapRouteCard/SwapRouteCardSkeleton.js +3 -1
- package/cjs/components/SwapRoutes/SwapRoutes.js +8 -3
- package/cjs/components/Token/Token.js +6 -5
- package/cjs/components/TokenAvatar/TokenAvatar.d.ts +11 -1
- package/cjs/components/TokenAvatar/TokenAvatar.js +14 -3
- package/cjs/components/TokenList/TokenList.js +2 -23
- package/cjs/components/TokenList/TokenListItem.d.ts +2 -1
- package/cjs/components/TokenList/TokenListItem.js +12 -6
- package/cjs/components/TokenList/index.d.ts +1 -0
- package/cjs/components/TokenList/index.js +1 -0
- package/cjs/components/TokenList/types.d.ts +6 -0
- package/cjs/components/TokenList/useTokenSelect.d.ts +2 -0
- package/cjs/components/TokenList/useTokenSelect.js +33 -0
- package/cjs/config/version.d.ts +1 -1
- package/cjs/config/version.js +1 -1
- package/cjs/hooks/useChain.d.ts +2 -2
- package/cjs/hooks/useChains.d.ts +2 -2
- package/cjs/hooks/useExpandableVariant.js +3 -5
- package/cjs/hooks/useProcessMessage.d.ts +2 -2
- package/cjs/hooks/useSwapRoutes.js +11 -7
- package/cjs/i18n/de.json +199 -0
- package/cjs/i18n/en.json +162 -151
- package/cjs/i18n/es.json +200 -0
- package/cjs/i18n/fr.json +199 -0
- package/cjs/i18n/index.d.ts +8 -200
- package/cjs/i18n/index.js +15 -19
- package/cjs/i18n/it.json +199 -0
- package/cjs/i18n/uk.json +200 -0
- package/cjs/i18n/zh.json +199 -0
- package/cjs/pages/SelectChainPage/SelectChainPage.d.ts +2 -2
- package/cjs/pages/SelectChainPage/SelectChainPage.js +13 -9
- package/cjs/pages/SelectChainPage/types.d.ts +4 -0
- package/cjs/pages/SelectChainPage/types.js +2 -0
- package/cjs/pages/SelectNativeTokenPage/SelectNativeTokenPage.d.ts +3 -0
- package/cjs/pages/SelectNativeTokenPage/SelectNativeTokenPage.js +21 -0
- package/cjs/pages/SelectNativeTokenPage/SelectNativeTokenPage.style.d.ts +21 -0
- package/cjs/pages/SelectNativeTokenPage/SelectNativeTokenPage.style.js +20 -0
- package/cjs/pages/SelectNativeTokenPage/index.d.ts +1 -0
- package/cjs/pages/SelectNativeTokenPage/index.js +17 -0
- package/cjs/pages/SettingsPage/ColorSchemeButtonGroup.style.d.ts +1 -1
- package/cjs/pages/SettingsPage/LanguageSelect.d.ts +2 -0
- package/cjs/pages/SettingsPage/LanguageSelect.js +38 -0
- package/cjs/pages/SettingsPage/SettingsPage.js +2 -1
- package/cjs/pages/SettingsPage/ShowDestinationWallet.d.ts +1 -1
- package/cjs/pages/SettingsPage/ShowDestinationWallet.js +6 -0
- package/cjs/pages/SwapDetailsPage/SwapDetailsPage.js +4 -2
- package/cjs/pages/SwapHistoryPage/SwapHistoryItem.js +4 -2
- package/cjs/pages/SwapPage/StatusBottomSheet.js +3 -3
- package/cjs/pages/SwapPage/SwapPage.js +1 -3
- package/cjs/pages/SwapPage/TokenValueBottomSheet.js +1 -1
- package/cjs/providers/I18nProvider/I18nProvider.d.ts +2 -0
- package/cjs/providers/I18nProvider/I18nProvider.js +62 -0
- package/cjs/providers/I18nProvider/index.d.ts +2 -0
- package/cjs/providers/I18nProvider/index.js +18 -0
- package/cjs/providers/I18nProvider/types.d.ts +16 -0
- package/cjs/providers/I18nProvider/types.js +2 -0
- package/cjs/providers/WidgetProvider/utils.d.ts +1 -1
- package/cjs/providers/WidgetProvider/utils.js +4 -4
- package/cjs/providers/index.d.ts +1 -0
- package/cjs/providers/index.js +1 -0
- package/cjs/stores/settings/types.d.ts +1 -0
- package/cjs/stores/settings/useSettingsStore.d.ts +2 -0
- package/cjs/types/widget.d.ts +24 -7
- package/cjs/types/widget.js +8 -0
- package/cjs/utils/deepMerge.d.ts +1 -0
- package/cjs/utils/deepMerge.js +18 -0
- package/cjs/utils/index.d.ts +1 -0
- package/cjs/utils/index.js +1 -0
- package/cjs/utils/input.js +3 -1
- package/cjs/utils/navigationRoutes.d.ts +8 -7
- package/cjs/utils/navigationRoutes.js +10 -7
- package/components/ActiveSwaps/ActiveSwaps.style.d.ts +1 -1
- package/components/BottomSheet/BottomSheet.d.ts +1 -1
- package/components/ChainSelect/ChainSelect.js +1 -3
- package/components/ChainSelect/useChainSelect.d.ts +1 -1
- package/components/Header/Header.style.d.ts +34 -1
- package/components/Header/Header.style.js +19 -1
- package/components/Header/NavigationHeader.js +7 -3
- package/components/Header/WalletHeader.js +37 -12
- package/components/Menu.d.ts +1 -0
- package/components/Menu.js +21 -0
- package/components/PoweredBy/PoweredBy.style.d.ts +1 -1
- package/components/ReverseTokensButton/ReverseTokensButton.style.d.ts +1 -1
- package/components/SelectChainAndToken.js +7 -2
- package/components/SelectTokenButton/SelectTokenButton.js +12 -7
- package/components/SelectTokenButton/SelectTokenButton.style.js +2 -1
- package/components/SendToWallet/SendToWallet.js +6 -1
- package/components/SendToWallet/SendToWallet.style.d.ts +1 -1
- package/components/SendToWallet/SendToWalletButton.js +6 -2
- package/components/Step/StepProcess.style.d.ts +2 -2
- package/components/Step/StepTimer.js +1 -1
- package/components/StepActions/StepActions.js +6 -1
- package/components/SwapButton/SwapButton.js +9 -4
- package/components/SwapInput/FormPriceHelperText.js +4 -4
- package/components/SwapInput/SwapInput.js +6 -3
- package/components/SwapInput/SwapInput.style.d.ts +1 -1
- package/components/SwapInput/SwapInputAdornment.style.d.ts +1 -1
- package/components/SwapRouteCard/SwapRouteCard.js +5 -3
- package/components/SwapRouteCard/SwapRouteCard.style.d.ts +1 -1
- package/components/SwapRouteCard/SwapRouteCardSkeleton.js +3 -1
- package/components/SwapRoutes/SwapRoutes.js +8 -3
- package/components/Token/Token.js +7 -6
- package/components/TokenAvatar/TokenAvatar.d.ts +11 -1
- package/components/TokenAvatar/TokenAvatar.js +11 -2
- package/components/TokenList/TokenList.js +4 -25
- package/components/TokenList/TokenListItem.d.ts +2 -1
- package/components/TokenList/TokenListItem.js +10 -5
- package/components/TokenList/index.d.ts +1 -0
- package/components/TokenList/index.js +1 -0
- package/components/TokenList/types.d.ts +6 -0
- package/components/TokenList/useTokenSelect.d.ts +2 -0
- package/components/TokenList/useTokenSelect.js +29 -0
- package/config/version.d.ts +1 -1
- package/config/version.js +1 -1
- package/hooks/useChain.d.ts +2 -2
- package/hooks/useChains.d.ts +2 -2
- package/hooks/useExpandableVariant.js +3 -5
- package/hooks/useProcessMessage.d.ts +2 -2
- package/hooks/useSwapRoutes.js +12 -8
- package/i18n/de.json +199 -0
- package/i18n/en.json +162 -151
- package/i18n/es.json +200 -0
- package/i18n/fr.json +199 -0
- package/i18n/index.d.ts +8 -200
- package/i18n/index.js +8 -18
- package/i18n/it.json +199 -0
- package/i18n/uk.json +200 -0
- package/i18n/zh.json +199 -0
- package/package.json +19 -18
- package/pages/SelectChainPage/SelectChainPage.d.ts +2 -2
- package/pages/SelectChainPage/SelectChainPage.js +13 -9
- package/pages/SelectChainPage/types.d.ts +4 -0
- package/pages/SelectChainPage/types.js +1 -0
- package/pages/SelectNativeTokenPage/SelectNativeTokenPage.d.ts +3 -0
- package/pages/SelectNativeTokenPage/SelectNativeTokenPage.js +17 -0
- package/pages/SelectNativeTokenPage/SelectNativeTokenPage.style.d.ts +21 -0
- package/pages/SelectNativeTokenPage/SelectNativeTokenPage.style.js +17 -0
- package/pages/SelectNativeTokenPage/index.d.ts +1 -0
- package/pages/SelectNativeTokenPage/index.js +1 -0
- package/pages/SettingsPage/ColorSchemeButtonGroup.style.d.ts +1 -1
- package/pages/SettingsPage/LanguageSelect.d.ts +2 -0
- package/pages/SettingsPage/LanguageSelect.js +34 -0
- package/pages/SettingsPage/SettingsPage.js +2 -1
- package/pages/SettingsPage/ShowDestinationWallet.d.ts +1 -1
- package/pages/SettingsPage/ShowDestinationWallet.js +6 -0
- package/pages/SwapDetailsPage/SwapDetailsPage.js +4 -2
- package/pages/SwapHistoryPage/SwapHistoryItem.js +4 -2
- package/pages/SwapPage/StatusBottomSheet.js +3 -3
- package/pages/SwapPage/SwapPage.js +1 -3
- package/pages/SwapPage/TokenValueBottomSheet.js +1 -1
- package/providers/I18nProvider/I18nProvider.d.ts +2 -0
- package/providers/I18nProvider/I18nProvider.js +58 -0
- package/providers/I18nProvider/index.d.ts +2 -0
- package/providers/I18nProvider/index.js +2 -0
- package/providers/I18nProvider/types.d.ts +16 -0
- package/providers/I18nProvider/types.js +1 -0
- package/providers/WidgetProvider/utils.d.ts +1 -1
- package/providers/WidgetProvider/utils.js +4 -4
- package/providers/index.d.ts +1 -0
- package/providers/index.js +1 -0
- package/stores/settings/types.d.ts +1 -0
- package/stores/settings/useSettingsStore.d.ts +2 -0
- package/tsconfig.cjs.tsbuildinfo +1 -1
- package/types/widget.d.ts +24 -7
- package/types/widget.js +7 -1
- package/utils/deepMerge.d.ts +1 -0
- package/utils/deepMerge.js +14 -0
- package/utils/index.d.ts +1 -0
- package/utils/index.js +1 -0
- package/utils/input.js +3 -1
- package/utils/navigationRoutes.d.ts +8 -7
- package/utils/navigationRoutes.js +10 -7
package/AppDrawer.style.d.ts
CHANGED
|
@@ -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" | "
|
|
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 {
|
|
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(
|
|
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
|
@@ -30,6 +30,10 @@ export const AppRoutes = () => {
|
|
|
30
30
|
path: navigationRoutes.toToken,
|
|
31
31
|
element: _jsx(SelectTokenPage, { formType: "to" }),
|
|
32
32
|
},
|
|
33
|
+
{
|
|
34
|
+
path: navigationRoutes.toTokenNative,
|
|
35
|
+
element: _jsx(SelectChainPage, { formType: "to", selectNativeToken: true }),
|
|
36
|
+
},
|
|
33
37
|
...[
|
|
34
38
|
navigationRoutes.fromChain,
|
|
35
39
|
`${navigationRoutes.fromToken}/${navigationRoutes.fromChain}`,
|
package/cjs/AppDrawer.style.d.ts
CHANGED
|
@@ -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" | "
|
|
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/cjs/AppProvider.js
CHANGED
|
@@ -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.
|
|
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
|
@@ -33,6 +33,10 @@ const AppRoutes = () => {
|
|
|
33
33
|
path: utils_1.navigationRoutes.toToken,
|
|
34
34
|
element: (0, jsx_runtime_1.jsx)(SelectTokenPage_1.SelectTokenPage, { formType: "to" }),
|
|
35
35
|
},
|
|
36
|
+
{
|
|
37
|
+
path: utils_1.navigationRoutes.toTokenNative,
|
|
38
|
+
element: (0, jsx_runtime_1.jsx)(SelectChainPage_1.SelectChainPage, { formType: "to", selectNativeToken: true }),
|
|
39
|
+
},
|
|
36
40
|
...[
|
|
37
41
|
utils_1.navigationRoutes.fromChain,
|
|
38
42
|
`${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" | "
|
|
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" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "sx" | "key" | "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>>;
|
|
@@ -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:
|
|
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" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "sx" | "ref" | "key" | "position" | "variant" | "square" | "elevation" | "enableColorOnDark"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
11
11
|
export declare const Container: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material").Theme> & {
|
|
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
|
+
}));
|
|
@@ -13,6 +13,7 @@ const Header_style_1 = require("./Header.style");
|
|
|
13
13
|
const useHeaderActionStore_1 = require("./useHeaderActionStore");
|
|
14
14
|
const NavigationHeader = () => {
|
|
15
15
|
const { t } = (0, react_i18next_1.useTranslation)();
|
|
16
|
+
const { variant } = (0, providers_1.useWidgetConfig)();
|
|
16
17
|
const { navigate, navigateBack } = (0, hooks_1.useNavigateBack)();
|
|
17
18
|
const { account } = (0, providers_1.useWallet)();
|
|
18
19
|
const { element } = (0, useHeaderActionStore_1.useHeaderActionStore)();
|
|
@@ -36,6 +37,7 @@ const NavigationHeader = () => {
|
|
|
36
37
|
return t(`header.to`);
|
|
37
38
|
case utils_1.navigationRoutes.fromChain:
|
|
38
39
|
case utils_1.navigationRoutes.toChain:
|
|
40
|
+
case utils_1.navigationRoutes.toTokenNative:
|
|
39
41
|
return t(`header.selectChain`);
|
|
40
42
|
case utils_1.navigationRoutes.swapRoutes:
|
|
41
43
|
return t(`header.routes`);
|
|
@@ -46,9 +48,11 @@ const NavigationHeader = () => {
|
|
|
46
48
|
case utils_1.navigationRoutes.swapDetails:
|
|
47
49
|
return t(`header.swapDetails`);
|
|
48
50
|
default:
|
|
49
|
-
return t(`header.swap`);
|
|
51
|
+
return variant !== 'refuel' ? t(`header.swap`) : t(`header.gas`);
|
|
50
52
|
}
|
|
51
53
|
};
|
|
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",
|
|
54
|
+
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: {
|
|
55
|
+
marginRight: -1.25,
|
|
56
|
+
} }, { 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
57
|
};
|
|
54
58
|
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 {
|
|
23
|
-
|
|
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)(
|
|
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" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "sx" | "key" | "download" | "href" | "hrefLang" | "media" | "ping" | "rel" | "target" | "type" | "referrerPolicy" | "border" | "boxShadow" | "fontWeight" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping" | "underline" | "TypographyClasses"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -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" | "
|
|
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,25 @@ 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
|
-
:
|
|
29
|
+
: variant === 'refuel'
|
|
30
|
+
? utils_1.navigationRoutes.toTokenNative
|
|
31
|
+
: utils_1.navigationRoutes.toToken);
|
|
31
32
|
};
|
|
32
33
|
const isSelected = !!(chain && token);
|
|
33
|
-
|
|
34
|
+
const onClick = !(disabledUI === null || disabledUI === void 0 ? void 0 : disabledUI.includes(tokenKey)) ? handleClick : undefined;
|
|
35
|
+
const defaultTitle = formType === 'to' && variant === 'refuel'
|
|
36
|
+
? t(`header.selectChain`)
|
|
37
|
+
: t(`swap.selectChainAndToken`);
|
|
38
|
+
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 : defaultTitle, subheader: isSelected ? t(`swap.onChain`, { chainName: chain.name }) : null, selected: isSelected, compact: compact }))] })));
|
|
34
39
|
};
|
|
35
40
|
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?: "
|
|
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 ||
|
|
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 = () => {
|