@lifi/widget 1.32.0 → 1.32.2
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/cjs/AppDrawer.style.d.ts +1 -1
- package/cjs/components/ActiveSwaps/ActiveSwapItem.js +1 -1
- package/cjs/components/ActiveSwaps/ActiveSwaps.style.d.ts +2 -2
- package/cjs/components/ActiveSwaps/ActiveSwaps.style.js +1 -1
- package/cjs/components/Card/Card.d.ts +0 -2
- package/cjs/components/Card/Card.js +2 -8
- package/cjs/components/ChainSelect/ChainSelect.style.d.ts +0 -1
- package/cjs/components/Header/Header.style.d.ts +1 -1
- package/cjs/components/Header/WalletHeader.js +1 -1
- package/cjs/components/ListItemButton.js +1 -1
- package/cjs/components/ReverseTokensButton/ReverseTokensButton.style.d.ts +1 -1
- package/cjs/components/SendToWallet/SendToWallet.style.d.ts +1 -1
- package/cjs/components/Step/StepProcess.style.d.ts +1 -1
- 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 +1 -1
- package/cjs/components/SwapRouteCard/SwapRouteCard.style.d.ts +1 -1
- package/cjs/components/SwapRouteCard/SwapRouteCardSkeleton.js +1 -1
- package/cjs/components/TokenList/TokenList.style.d.ts +1 -1
- package/cjs/components/TokenList/TokenListItem.js +1 -1
- package/cjs/config/theme.js +25 -0
- package/cjs/config/version.d.ts +1 -1
- package/cjs/config/version.js +1 -1
- package/cjs/hooks/useTools.js +1 -2
- package/cjs/i18n/en.json +0 -4
- package/cjs/i18n/it.json +8 -8
- package/cjs/i18n/uk.json +8 -8
- package/cjs/i18n/zh.json +8 -8
- package/cjs/pages/SelectChainPage/SelectChainPage.js +1 -1
- package/cjs/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.js +1 -1
- package/cjs/pages/SelectNativeTokenPage/SelectNativeTokenPage.js +1 -1
- package/cjs/pages/SelectWalletPage/SelectWalletPage.js +1 -1
- package/cjs/pages/SettingsPage/ColorSchemeButtonGroup.style.d.ts +1 -1
- package/cjs/pages/SettingsPage/EnabledToolsButton.js +1 -1
- package/cjs/providers/WidgetProvider/WidgetProvider.js +3 -5
- package/cjs/stores/StoreProvider.js +1 -7
- package/cjs/stores/chains/index.d.ts +1 -2
- package/cjs/stores/chains/index.js +1 -2
- package/cjs/stores/chains/useChainOrder.js +2 -2
- package/cjs/stores/chains/useChainOrderStore.d.ts +3 -0
- package/cjs/stores/chains/{createChainOrderStore.js → useChainOrderStore.js} +3 -4
- package/cjs/stores/routes/types.d.ts +1 -1
- package/cjs/stores/routes/useRecommendedRouteStore.d.ts +10 -2
- package/cjs/stores/routes/useRecommendedRouteStore.js +30 -2
- package/cjs/stores/settings/index.d.ts +1 -1
- package/cjs/stores/settings/index.js +1 -1
- package/cjs/stores/settings/useAppearance.js +2 -2
- package/cjs/stores/settings/useSettings.js +2 -2
- package/cjs/stores/settings/useSettingsStore.d.ts +6 -0
- package/cjs/stores/settings/{createSettingsStore.js → useSettingsStore.js} +20 -4
- package/cjs/utils/colors.d.ts +2 -2
- package/cjs/utils/colors.js +1 -3
- package/components/ActiveSwaps/ActiveSwapItem.js +1 -1
- package/components/ActiveSwaps/ActiveSwaps.style.d.ts +2 -2
- package/components/ActiveSwaps/ActiveSwaps.style.js +1 -1
- package/components/Card/Card.d.ts +0 -2
- package/components/Card/Card.js +2 -8
- package/components/ChainSelect/ChainSelect.style.d.ts +0 -1
- package/components/Header/Header.style.d.ts +1 -1
- package/components/Header/WalletHeader.js +1 -1
- package/components/ListItemButton.js +1 -1
- package/components/ReverseTokensButton/ReverseTokensButton.style.d.ts +1 -1
- package/components/SendToWallet/SendToWallet.style.d.ts +1 -1
- package/components/Step/StepProcess.style.d.ts +1 -1
- package/components/SwapInput/SwapInput.style.d.ts +1 -1
- package/components/SwapInput/SwapInputAdornment.style.d.ts +1 -1
- package/components/SwapRouteCard/SwapRouteCard.js +1 -1
- package/components/SwapRouteCard/SwapRouteCard.style.d.ts +1 -1
- package/components/SwapRouteCard/SwapRouteCardSkeleton.js +1 -1
- package/components/TokenList/TokenList.style.d.ts +1 -1
- package/components/TokenList/TokenListItem.js +1 -1
- package/config/theme.js +25 -0
- package/config/version.d.ts +1 -1
- package/config/version.js +1 -1
- package/hooks/useTools.js +2 -3
- package/i18n/en.json +0 -4
- package/i18n/it.json +8 -8
- package/i18n/uk.json +8 -8
- package/i18n/zh.json +8 -8
- package/package.json +4 -4
- package/pages/SelectChainPage/SelectChainPage.js +1 -1
- package/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.js +1 -1
- package/pages/SelectNativeTokenPage/SelectNativeTokenPage.js +1 -1
- package/pages/SelectWalletPage/SelectWalletPage.js +1 -1
- package/pages/SettingsPage/ColorSchemeButtonGroup.style.d.ts +1 -1
- package/pages/SettingsPage/EnabledToolsButton.js +1 -1
- package/providers/WidgetProvider/WidgetProvider.js +5 -7
- package/stores/StoreProvider.js +2 -8
- package/stores/chains/index.d.ts +1 -2
- package/stores/chains/index.js +1 -2
- package/stores/chains/useChainOrder.js +1 -1
- package/stores/chains/useChainOrderStore.d.ts +3 -0
- package/stores/chains/{createChainOrderStore.js → useChainOrderStore.js} +2 -2
- package/stores/routes/types.d.ts +1 -1
- package/stores/routes/useRecommendedRouteStore.d.ts +10 -2
- package/stores/routes/useRecommendedRouteStore.js +25 -1
- package/stores/settings/index.d.ts +1 -1
- package/stores/settings/index.js +1 -1
- package/stores/settings/useAppearance.js +1 -1
- package/stores/settings/useSettings.js +1 -1
- package/stores/settings/useSettingsStore.d.ts +6 -0
- package/stores/settings/{createSettingsStore.js → useSettingsStore.js} +18 -2
- package/tsconfig.cjs.tsbuildinfo +1 -1
- package/utils/colors.d.ts +2 -2
- package/utils/colors.js +1 -3
- package/cjs/stores/chains/ChainOrderStore.d.ts +0 -9
- package/cjs/stores/chains/ChainOrderStore.js +0 -32
- package/cjs/stores/chains/createChainOrderStore.d.ts +0 -4
- package/cjs/stores/settings/SettingsStore.d.ts +0 -11
- package/cjs/stores/settings/SettingsStore.js +0 -48
- package/cjs/stores/settings/createSettingsStore.d.ts +0 -5
- package/stores/chains/ChainOrderStore.d.ts +0 -9
- package/stores/chains/ChainOrderStore.js +0 -26
- package/stores/chains/createChainOrderStore.d.ts +0 -4
- package/stores/settings/SettingsStore.d.ts +0 -11
- package/stores/settings/SettingsStore.js +0 -41
- package/stores/settings/createSettingsStore.d.ts +0 -5
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" | "success" | "warning" | "error" | "
|
|
5
|
+
color?: "inherit" | "success" | "warning" | "error" | "primary" | "secondary" | "info" | undefined;
|
|
6
6
|
disabled?: boolean | undefined;
|
|
7
7
|
disableElevation?: boolean | undefined;
|
|
8
8
|
disableFocusRipple?: boolean | undefined;
|
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" | "success" | "warning" | "error" | "
|
|
5
|
+
color?: "inherit" | "success" | "warning" | "error" | "primary" | "secondary" | "info" | undefined;
|
|
6
6
|
disabled?: boolean | undefined;
|
|
7
7
|
disableElevation?: boolean | undefined;
|
|
8
8
|
disableFocusRipple?: boolean | undefined;
|
|
@@ -41,7 +41,7 @@ const ActiveSwapItem = ({ routeId, dense }) => {
|
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
43
|
const ListItemComponent = dense ? ActiveSwaps_style_1.ListItem : ActiveSwaps_style_1.ListItemButton;
|
|
44
|
-
return ((0, jsx_runtime_1.jsxs)(ListItemComponent, { onClick: handleClick, dense: true, disableRipple:
|
|
44
|
+
return ((0, jsx_runtime_1.jsxs)(ListItemComponent, { onClick: handleClick, dense: true, disableRipple: dense, children: [(0, jsx_runtime_1.jsx)(material_1.ListItemAvatar, { children: (0, jsx_runtime_1.jsxs)(TokenAvatar_1.TokenAvatarGroup, { total: 2, children: [(0, jsx_runtime_1.jsx)(TokenAvatar_1.TokenAvatar, { token: route.fromToken }), (0, jsx_runtime_1.jsx)(TokenAvatar_1.TokenAvatar, { token: route.toToken })] }) }), (0, jsx_runtime_1.jsx)(material_1.ListItemText, { sx: { margin: 0 }, disableTypography: true, primary: (0, jsx_runtime_1.jsxs)(material_1.Typography, { fontWeight: 500, lineHeight: 1, sx: {
|
|
45
45
|
display: 'flex',
|
|
46
46
|
alignItems: 'center',
|
|
47
47
|
marginLeft: 2,
|
|
@@ -35,11 +35,11 @@ export declare const ListItem: import("@emotion/styled").StyledComponent<{
|
|
|
35
35
|
} | undefined;
|
|
36
36
|
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & {
|
|
37
37
|
ref?: ((instance: HTMLLIElement | null) => void) | import("react").RefObject<HTMLLIElement> | null | undefined;
|
|
38
|
-
}, "button" | "className" | "style" | "classes" | "children" | "disabled" | "sx" | "alignItems" | "autoFocus" | "dense" | "divider" | "components" | "
|
|
38
|
+
}, "button" | "className" | "style" | "classes" | "children" | "disabled" | "sx" | "alignItems" | "autoFocus" | "dense" | "divider" | "components" | "slotProps" | "slots" | "componentsProps" | "selected" | "disableGutters" | "ContainerComponent" | "ContainerProps" | "disablePadding" | "secondaryAction"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
39
39
|
export declare const ShowAllButton: import("@emotion/styled").StyledComponent<{
|
|
40
40
|
children?: import("react").ReactNode;
|
|
41
41
|
classes?: Partial<import("@mui/material").ButtonClasses> | undefined;
|
|
42
|
-
color?: "inherit" | "success" | "warning" | "error" | "
|
|
42
|
+
color?: "inherit" | "success" | "warning" | "error" | "primary" | "secondary" | "info" | undefined;
|
|
43
43
|
disabled?: boolean | undefined;
|
|
44
44
|
disableElevation?: boolean | undefined;
|
|
45
45
|
disableFocusRipple?: boolean | undefined;
|
|
@@ -11,7 +11,7 @@ exports.ListItemButton = (0, styles_1.styled)(material_1.ListItemButton)(({ them
|
|
|
11
11
|
paddingRight: theme.spacing(1.5),
|
|
12
12
|
height: 64,
|
|
13
13
|
'&:hover': {
|
|
14
|
-
backgroundColor: (0, utils_1.getContrastAlphaColor)(theme, '4%'),
|
|
14
|
+
backgroundColor: (0, utils_1.getContrastAlphaColor)(theme.palette.mode, '4%'),
|
|
15
15
|
},
|
|
16
16
|
}));
|
|
17
17
|
exports.ListItem = (0, styles_1.styled)(material_1.ListItem, {
|
|
@@ -4,7 +4,6 @@ type CardVariant = 'default' | 'selected' | 'error';
|
|
|
4
4
|
export type CardProps = {
|
|
5
5
|
variant?: CardVariant;
|
|
6
6
|
selectionColor?: 'primary' | 'secondary';
|
|
7
|
-
dense?: boolean;
|
|
8
7
|
indented?: boolean;
|
|
9
8
|
onClick?: MouseEventHandler<HTMLDivElement>;
|
|
10
9
|
pointerEvents?: 'auto' | 'none';
|
|
@@ -19,7 +18,6 @@ export declare const Card: import("@emotion/styled").StyledComponent<import("@mu
|
|
|
19
18
|
}, "children" | "sx" | "ref" | ("p" | "color" | "border" | "boxShadow" | "fontWeight" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint") | "component"> & import("@mui/system").MUIStyledCommonProps<Theme> & {
|
|
20
19
|
variant?: CardVariant | undefined;
|
|
21
20
|
selectionColor?: "primary" | "secondary" | undefined;
|
|
22
|
-
dense?: boolean | undefined;
|
|
23
21
|
indented?: boolean | undefined;
|
|
24
22
|
onClick?: MouseEventHandler<HTMLDivElement> | undefined;
|
|
25
23
|
pointerEvents?: "none" | "auto" | undefined;
|
|
@@ -12,14 +12,8 @@ const getBackgroundColor = (theme, variant, selectionColor) => variant === 'sele
|
|
|
12
12
|
: (0, styles_1.alpha)(theme.palette.secondary.main, theme.palette.mode === 'light' ? 0.08 : 0.12)
|
|
13
13
|
: theme.palette.background.paper;
|
|
14
14
|
exports.Card = (0, styles_1.styled)(material_1.Box, {
|
|
15
|
-
shouldForwardProp: (prop) => ![
|
|
16
|
-
|
|
17
|
-
'variant',
|
|
18
|
-
'indented',
|
|
19
|
-
'selectionColor',
|
|
20
|
-
'pointerEvents',
|
|
21
|
-
].includes(prop),
|
|
22
|
-
})(({ theme, variant, selectionColor = 'primary', dense, indented, pointerEvents, onClick, }) => {
|
|
15
|
+
shouldForwardProp: (prop) => !['variant', 'indented', 'selectionColor', 'pointerEvents'].includes(prop),
|
|
16
|
+
})(({ theme, variant, selectionColor = 'primary', indented, pointerEvents, onClick, }) => {
|
|
23
17
|
const backgroundColor = getBackgroundColor(theme, variant, selectionColor);
|
|
24
18
|
const backgroundHoverColor = onClick
|
|
25
19
|
? theme.palette.mode === 'light'
|
|
@@ -9,7 +9,6 @@ export declare const ChainCard: import("@emotion/styled").StyledComponent<import
|
|
|
9
9
|
}, "children" | "sx" | "ref" | ("p" | "color" | "border" | "boxShadow" | "fontWeight" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint") | "component"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
10
10
|
variant?: ("default" | "error" | "selected") | undefined;
|
|
11
11
|
selectionColor?: "primary" | "secondary" | undefined;
|
|
12
|
-
dense?: boolean | undefined;
|
|
13
12
|
indented?: boolean | undefined;
|
|
14
13
|
onClick?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
15
14
|
pointerEvents?: "none" | "auto" | undefined;
|
|
@@ -21,7 +21,7 @@ export declare const Container: import("@emotion/styled").StyledComponent<import
|
|
|
21
21
|
export declare const WalletButton: import("@emotion/styled").StyledComponent<{
|
|
22
22
|
children?: import("react").ReactNode;
|
|
23
23
|
classes?: Partial<import("@mui/material").ButtonClasses> | undefined;
|
|
24
|
-
color?: "inherit" | "success" | "warning" | "error" | "
|
|
24
|
+
color?: "inherit" | "success" | "warning" | "error" | "primary" | "secondary" | "info" | undefined;
|
|
25
25
|
disabled?: boolean | undefined;
|
|
26
26
|
disableElevation?: boolean | undefined;
|
|
27
27
|
disableFocusRipple?: boolean | undefined;
|
|
@@ -56,7 +56,7 @@ const ConnectedButton = () => {
|
|
|
56
56
|
};
|
|
57
57
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Header_style_1.WalletButton, { endIcon: (0, jsx_runtime_1.jsx)(icons_material_1.ExpandMore, {}), startIcon: (0, jsx_runtime_1.jsx)(material_1.Avatar, { src: chain?.logoURI, alt: chain?.key, sx: { width: 24, height: 24 }, children: chain?.name[0] }), sx: {
|
|
58
58
|
marginRight: -1.25,
|
|
59
|
-
}, onClick: handleClick, children: walletAddress }), (0, jsx_runtime_1.jsxs)(WalletMenu_1.WalletMenu, { anchorEl: anchorEl, open: Boolean(anchorEl), onClose: handleClose, children: [(0, jsx_runtime_1.jsxs)(material_1.MenuItem, { onClick: handleCopyAddress,
|
|
59
|
+
}, onClick: handleClick, children: walletAddress }), (0, jsx_runtime_1.jsxs)(WalletMenu_1.WalletMenu, { anchorEl: anchorEl, open: Boolean(anchorEl), onClose: handleClose, children: [(0, jsx_runtime_1.jsxs)(material_1.MenuItem, { onClick: handleCopyAddress, children: [(0, jsx_runtime_1.jsx)(icons_material_1.ContentCopy, {}), t(`button.copyAddress`)] }), (0, jsx_runtime_1.jsxs)(material_1.MenuItem, { component: "a", onClick: handleClose, href: `${chain?.metamask.blockExplorerUrls[0]}address/${account.address}`, target: "_blank", children: [(0, jsx_runtime_1.jsx)(icons_material_1.OpenInNewOutlined, {}), t(`button.viewOnExplorer`)] }), (0, jsx_runtime_1.jsx)(material_1.Button, { onClick: handleDisconnect, fullWidth: true, startIcon: (0, jsx_runtime_1.jsx)(icons_material_1.PowerSettingsNewRounded, {}), sx: {
|
|
60
60
|
marginTop: 1,
|
|
61
61
|
}, children: t(`button.disconnect`) })] })] }));
|
|
62
62
|
};
|
|
@@ -9,6 +9,6 @@ exports.ListItemButton = (0, styles_1.styled)(material_1.ListItemButton)(({ them
|
|
|
9
9
|
paddingLeft: theme.spacing(1.5),
|
|
10
10
|
height: 56,
|
|
11
11
|
'&:hover': {
|
|
12
|
-
backgroundColor: (0, utils_1.getContrastAlphaColor)(theme, '4%'),
|
|
12
|
+
backgroundColor: (0, utils_1.getContrastAlphaColor)(theme.palette.mode, '4%'),
|
|
13
13
|
},
|
|
14
14
|
}));
|
|
@@ -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" | "success" | "warning" | "error" | "
|
|
5
|
+
color?: "inherit" | "default" | "success" | "warning" | "error" | "primary" | "secondary" | "info" | undefined;
|
|
6
6
|
disabled?: boolean | undefined;
|
|
7
7
|
disableFocusRipple?: boolean | undefined;
|
|
8
8
|
edge?: false | "end" | "start" | undefined;
|
|
@@ -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?: "success" | "warning" | "error" | "
|
|
5
|
+
color?: "success" | "warning" | "error" | "primary" | "secondary" | "info" | undefined;
|
|
6
6
|
disabled?: boolean | undefined;
|
|
7
7
|
error?: boolean | undefined;
|
|
8
8
|
fullWidth?: boolean | undefined;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
export declare const LinkButton: import("@emotion/styled").StyledComponent<{
|
|
3
3
|
children?: import("react").ReactNode;
|
|
4
4
|
classes?: Partial<import("@mui/material").IconButtonClasses> | undefined;
|
|
5
|
-
color?: "inherit" | "default" | "success" | "warning" | "error" | "
|
|
5
|
+
color?: "inherit" | "default" | "success" | "warning" | "error" | "primary" | "secondary" | "info" | undefined;
|
|
6
6
|
disabled?: boolean | undefined;
|
|
7
7
|
disableFocusRipple?: boolean | undefined;
|
|
8
8
|
edge?: false | "end" | "start" | undefined;
|
|
@@ -4,7 +4,7 @@ export declare const minInputFontSize = 14;
|
|
|
4
4
|
export declare const FormControl: import("@emotion/styled").StyledComponent<{
|
|
5
5
|
children?: import("react").ReactNode;
|
|
6
6
|
classes?: Partial<import("@mui/material").FormControlClasses> | undefined;
|
|
7
|
-
color?: "success" | "warning" | "error" | "
|
|
7
|
+
color?: "success" | "warning" | "error" | "primary" | "secondary" | "info" | undefined;
|
|
8
8
|
disabled?: boolean | undefined;
|
|
9
9
|
error?: boolean | undefined;
|
|
10
10
|
fullWidth?: boolean | undefined;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
export declare const Button: import("@emotion/styled").StyledComponent<{
|
|
3
3
|
children?: import("react").ReactNode;
|
|
4
4
|
classes?: Partial<import("@mui/material").ButtonClasses> | undefined;
|
|
5
|
-
color?: "inherit" | "success" | "warning" | "error" | "
|
|
5
|
+
color?: "inherit" | "success" | "warning" | "error" | "primary" | "secondary" | "info" | undefined;
|
|
6
6
|
disabled?: boolean | undefined;
|
|
7
7
|
disableElevation?: boolean | undefined;
|
|
8
8
|
disableFocusRipple?: boolean | undefined;
|
|
@@ -28,7 +28,7 @@ const SwapRouteCard = ({ route, active, variant = 'default', expanded, ...other
|
|
|
28
28
|
? { ...route.fromToken, amount: route.fromAmount }
|
|
29
29
|
: { ...route.toToken, amount: route.toAmount };
|
|
30
30
|
const cardContent = ((0, jsx_runtime_1.jsxs)(material_1.Box, { flex: 1, children: [widgetVariant !== 'refuel' && !useRecommendedRoute ? ((0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", justifyContent: "space-between", alignItems: "center", mb: 2, children: [(0, jsx_runtime_1.jsx)(SwapRouteCard_style_1.Label, { active: active ?? label !== alternativeTag, children: label }), variant === 'stretched' ? ((0, jsx_runtime_1.jsx)(exports.SwapRouteCardEssentials, { route: route })) : null] })) : null, (0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", justifyContent: "space-between", alignItems: "center", children: [(0, jsx_runtime_1.jsx)(Token_1.Token, { token: token, step: variant === 'stretched' ? route.steps[0] : undefined, disableDescription: variant === 'dense' && widgetVariant !== 'refuel' }), variant === 'stretched' && !expanded ? ((0, jsx_runtime_1.jsx)(SwapRouteCard_style_1.IconButton, { onClick: handleExpand, size: "small", children: cardExpanded ? (0, jsx_runtime_1.jsx)(icons_material_1.ExpandLess, {}) : (0, jsx_runtime_1.jsx)(icons_material_1.ExpandMore, {}) })) : null] }), (0, jsx_runtime_1.jsx)(material_1.Collapse, { timeout: 225, in: cardExpanded, mountOnEnter: true, unmountOnExit: true, children: route.steps.map((step) => ((0, jsx_runtime_1.jsx)(StepActions_1.StepActions, { step: step, mt: 2 }, step.id))) }), variant !== 'stretched' ? ((0, jsx_runtime_1.jsx)(exports.SwapRouteCardEssentials, { route: route, dense: true })) : null] }));
|
|
31
|
-
return widgetVariant === 'refuel' ? (cardContent) : ((0, jsx_runtime_1.jsx)(Card_1.Card, {
|
|
31
|
+
return widgetVariant === 'refuel' ? (cardContent) : ((0, jsx_runtime_1.jsx)(Card_1.Card, { variant: active ? 'selected' : 'default', selectionColor: "secondary", indented: true, ...other, children: cardContent }));
|
|
32
32
|
};
|
|
33
33
|
exports.SwapRouteCard = SwapRouteCard;
|
|
34
34
|
const SwapRouteCardEssentials = ({ route, dense }) => {
|
|
@@ -17,7 +17,7 @@ export declare const Label: import("@emotion/styled").StyledComponent<import("@m
|
|
|
17
17
|
export declare const IconButton: import("@emotion/styled").StyledComponent<{
|
|
18
18
|
children?: import("react").ReactNode;
|
|
19
19
|
classes?: Partial<import("@mui/material").IconButtonClasses> | undefined;
|
|
20
|
-
color?: "inherit" | "default" | "success" | "warning" | "error" | "
|
|
20
|
+
color?: "inherit" | "default" | "success" | "warning" | "error" | "primary" | "secondary" | "info" | undefined;
|
|
21
21
|
disabled?: boolean | undefined;
|
|
22
22
|
disableFocusRipple?: boolean | undefined;
|
|
23
23
|
edge?: false | "end" | "start" | undefined;
|
|
@@ -10,6 +10,6 @@ const SwapRouteCardSkeleton = ({ variant, ...other }) => {
|
|
|
10
10
|
const cardContent = ((0, jsx_runtime_1.jsxs)(material_1.Box, { flex: 1, children: [widgetVariant !== 'refuel' && !useRecommendedRoute ? ((0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", justifyContent: "space-between", alignItems: "center", mb: 2, children: [(0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rectangular", width: 118, height: 24, sx: (theme) => ({
|
|
11
11
|
borderRadius: `${theme.shape.borderRadiusSecondary}px`,
|
|
12
12
|
}) }), variant === 'stretched' ? ((0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", children: [(0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", width: 52, height: 24, sx: { marginRight: 2 } }), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", width: 44, height: 24, sx: { marginRight: 2 } }), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", width: 32, height: 24 })] })) : null] })) : null, (0, jsx_runtime_1.jsxs)(material_1.Box, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", alignItems: "center", children: [(0, jsx_runtime_1.jsx)(material_1.Box, { mr: 2, children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "circular", width: 32, height: 32 }) }), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", width: 96, height: 32 })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { ml: 6, display: "flex", alignItems: "center", children: [(0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", width: 102, height: 16, sx: { borderRadius: 0.5 } }), variant === 'stretched' ? ((0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", width: 72, height: 16, sx: { marginLeft: 1 } })) : null] })] }), variant !== 'stretched' ? ((0, jsx_runtime_1.jsxs)(material_1.Box, { mt: 2, display: "flex", justifyContent: "space-between", children: [(0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", width: 48, height: 24 }), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", width: 48, height: 24 })] })) : null] }));
|
|
13
|
-
return widgetVariant === 'refuel' ? (cardContent) : ((0, jsx_runtime_1.jsx)(Card_1.Card, {
|
|
13
|
+
return widgetVariant === 'refuel' ? (cardContent) : ((0, jsx_runtime_1.jsx)(Card_1.Card, { indented: true, ...other, children: cardContent }));
|
|
14
14
|
};
|
|
15
15
|
exports.SwapRouteCardSkeleton = SwapRouteCardSkeleton;
|
|
@@ -35,4 +35,4 @@ export declare const ListItem: import("@emotion/styled").StyledComponent<{
|
|
|
35
35
|
} | undefined;
|
|
36
36
|
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & {
|
|
37
37
|
ref?: ((instance: HTMLLIElement | null) => void) | import("react").RefObject<HTMLLIElement> | null | undefined;
|
|
38
|
-
}, "button" | "className" | "style" | "classes" | "children" | "disabled" | "sx" | "alignItems" | "autoFocus" | "dense" | "divider" | "components" | "
|
|
38
|
+
}, "button" | "className" | "style" | "classes" | "children" | "disabled" | "sx" | "alignItems" | "autoFocus" | "dense" | "divider" | "components" | "slotProps" | "slots" | "componentsProps" | "selected" | "disableGutters" | "ContainerComponent" | "ContainerProps" | "disablePadding" | "secondaryAction"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -17,7 +17,7 @@ exports.TokenListItem = (0, react_1.memo)(({ onClick, size, start, token, showBa
|
|
|
17
17
|
const TokenListItemButton = ({ onClick, token, showBalance, isBalanceLoading, }) => {
|
|
18
18
|
const { t } = (0, react_i18next_1.useTranslation)();
|
|
19
19
|
const tokenPrice = (0, utils_1.formatTokenPrice)(token.amount, token.priceUSD);
|
|
20
|
-
return ((0, jsx_runtime_1.jsxs)(TokenList_style_1.ListItemButton, { onClick: onClick, dense: true,
|
|
20
|
+
return ((0, jsx_runtime_1.jsxs)(TokenList_style_1.ListItemButton, { onClick: onClick, dense: true, children: [(0, jsx_runtime_1.jsx)(material_1.ListItemAvatar, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, { src: token.logoURI, alt: token.symbol, children: token.symbol[0] }) }), (0, jsx_runtime_1.jsx)(material_1.ListItemText, { primary: token.symbol, secondary: token.name }), showBalance ? (isBalanceLoading ? ((0, jsx_runtime_1.jsx)(exports.TokenAmountSkeleton, {})) : ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: { textAlign: 'right' }, children: [Number(token.amount) ? ((0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body1", noWrap: true, children: t('format.number', {
|
|
21
21
|
value: token.amount,
|
|
22
22
|
}) })) : null, tokenPrice ? ((0, jsx_runtime_1.jsx)(material_1.Typography, { fontWeight: 400, fontSize: 12, color: "text.secondary", "data-price": token.priceUSD, children: t(`format.currency`, {
|
|
23
23
|
value: tokenPrice,
|
package/cjs/config/theme.js
CHANGED
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createTheme = void 0;
|
|
4
4
|
const LoadingButton_1 = require("@mui/lab/LoadingButton");
|
|
5
|
+
const ButtonBase_1 = require("@mui/material/ButtonBase");
|
|
5
6
|
const colors_1 = require("@mui/material/colors");
|
|
6
7
|
const DialogActions_1 = require("@mui/material/DialogActions");
|
|
7
8
|
const styles_1 = require("@mui/material/styles");
|
|
9
|
+
const system_1 = require("@mui/system");
|
|
8
10
|
const palette = {
|
|
9
11
|
primary: {
|
|
10
12
|
main: '#3F49E1',
|
|
@@ -44,6 +46,16 @@ const shape = {
|
|
|
44
46
|
borderRadius: 12,
|
|
45
47
|
borderRadiusSecondary: 8,
|
|
46
48
|
};
|
|
49
|
+
const enterKeyframe = (0, system_1.keyframes) `
|
|
50
|
+
0% {
|
|
51
|
+
transform: scale(0);
|
|
52
|
+
opacity: 0.05;
|
|
53
|
+
}
|
|
54
|
+
100% {
|
|
55
|
+
transform: scale(1);
|
|
56
|
+
opacity: 0.1;
|
|
57
|
+
}
|
|
58
|
+
`;
|
|
47
59
|
const createTheme = (mode, theme = {}) => {
|
|
48
60
|
const primaryMainColor = theme.palette?.primary?.main ??
|
|
49
61
|
palette.primary.main;
|
|
@@ -107,6 +119,19 @@ const createTheme = (mode, theme = {}) => {
|
|
|
107
119
|
},
|
|
108
120
|
},
|
|
109
121
|
},
|
|
122
|
+
MuiButtonBase: {
|
|
123
|
+
styleOverrides: {
|
|
124
|
+
root: {
|
|
125
|
+
[`& .${ButtonBase_1.touchRippleClasses.ripple}.${ButtonBase_1.touchRippleClasses.rippleVisible}`]: {
|
|
126
|
+
animationName: `${enterKeyframe}`,
|
|
127
|
+
},
|
|
128
|
+
[`& .${ButtonBase_1.touchRippleClasses.ripple}.${ButtonBase_1.touchRippleClasses.rippleVisible}`]: {
|
|
129
|
+
opacity: 0.1,
|
|
130
|
+
animationName: `${enterKeyframe}`,
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
},
|
|
110
135
|
MuiButton: {
|
|
111
136
|
defaultProps: {
|
|
112
137
|
disableElevation: true,
|
package/cjs/config/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const name = "@lifi/widget";
|
|
2
|
-
export declare const version = "1.32.
|
|
2
|
+
export declare const version = "1.32.2";
|
package/cjs/config/version.js
CHANGED
package/cjs/hooks/useTools.js
CHANGED
|
@@ -7,7 +7,6 @@ const stores_1 = require("../stores");
|
|
|
7
7
|
const useTools = () => {
|
|
8
8
|
const lifi = (0, providers_1.useLiFi)();
|
|
9
9
|
const { bridges, exchanges } = (0, providers_1.useWidgetConfig)();
|
|
10
|
-
const settingsStoreContext = (0, stores_1.useSettingsStoreContext)();
|
|
11
10
|
const { data } = (0, react_query_1.useQuery)(['tools'], async () => {
|
|
12
11
|
const tools = await lifi.getTools();
|
|
13
12
|
return {
|
|
@@ -16,7 +15,7 @@ const useTools = () => {
|
|
|
16
15
|
};
|
|
17
16
|
}, {
|
|
18
17
|
onSuccess(data) {
|
|
19
|
-
const { initializeTools } =
|
|
18
|
+
const { initializeTools } = stores_1.useSettingsStore.getState();
|
|
20
19
|
initializeTools('Bridges', data.bridges.map((bridge) => bridge.key));
|
|
21
20
|
initializeTools('Exchanges', data.exchanges.map((exchange) => exchange.key));
|
|
22
21
|
},
|
package/cjs/i18n/en.json
CHANGED
|
@@ -56,7 +56,6 @@
|
|
|
56
56
|
"title": "Language"
|
|
57
57
|
},
|
|
58
58
|
"settings": {
|
|
59
|
-
"advancedPreferences": "Advanced preferences",
|
|
60
59
|
"enabledBridges": "Enabled bridges",
|
|
61
60
|
"enabledExchanges": "Enabled exchanges",
|
|
62
61
|
"gasPrice": {
|
|
@@ -65,10 +64,7 @@
|
|
|
65
64
|
"slow": "Slow",
|
|
66
65
|
"title": "Gas price"
|
|
67
66
|
},
|
|
68
|
-
"resetToDefault": "Reset to default",
|
|
69
67
|
"routePriority": "Route priority",
|
|
70
|
-
"selectEnabledBridges": "Select enabled bridges",
|
|
71
|
-
"selectEnabledExchanges": "Select enabled exchanges",
|
|
72
68
|
"showDestinationWallet": "Show destination wallet",
|
|
73
69
|
"slippage": "Slippage"
|
|
74
70
|
},
|
package/cjs/i18n/it.json
CHANGED
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
"contactSupport": "Contatta l'assistenza",
|
|
7
7
|
"continue": "Continua",
|
|
8
8
|
"copyAddress": "Copia indirizzo",
|
|
9
|
-
"viewOnExplorer": "Visualizza sull'Explorer",
|
|
10
9
|
"dark": "Scuro",
|
|
11
10
|
"delete": "Elimina",
|
|
12
11
|
"disconnect": "Disconnetti",
|
|
@@ -19,6 +18,8 @@
|
|
|
19
18
|
"ok": "Ok",
|
|
20
19
|
"okay": "Okay",
|
|
21
20
|
"removeSwap": "Rimuovi lo scambio",
|
|
21
|
+
"reset": "Ripristina",
|
|
22
|
+
"resetSettings": "Ripristina impostazioni",
|
|
22
23
|
"restartSwap": "Riavvia lo scambio",
|
|
23
24
|
"reviewGasSwap": "Rivedi lo scambio di gas",
|
|
24
25
|
"reviewSwap": "Rivedi lo scambio",
|
|
@@ -27,7 +28,8 @@
|
|
|
27
28
|
"startGasSwap": "Inizia lo scambio di gas",
|
|
28
29
|
"startSwap": "Avvia lo scambio",
|
|
29
30
|
"swap": "Scambio",
|
|
30
|
-
"tryAgain": "Riprova"
|
|
31
|
+
"tryAgain": "Riprova",
|
|
32
|
+
"viewOnExplorer": "Visualizza sull'Explorer"
|
|
31
33
|
},
|
|
32
34
|
"format": {
|
|
33
35
|
"currency": "{{value, currency(currency: USD)}}",
|
|
@@ -54,7 +56,6 @@
|
|
|
54
56
|
"title": "Lingua"
|
|
55
57
|
},
|
|
56
58
|
"settings": {
|
|
57
|
-
"advancedPreferences": "Preferenze avanzate",
|
|
58
59
|
"enabledBridges": "Bridge abilitati",
|
|
59
60
|
"enabledExchanges": "Exchange abilitati",
|
|
60
61
|
"gasPrice": {
|
|
@@ -63,10 +64,7 @@
|
|
|
63
64
|
"slow": "Lento",
|
|
64
65
|
"title": "Prezzo gas"
|
|
65
66
|
},
|
|
66
|
-
"resetToDefault": "Ripristina le impostazioni predefinite",
|
|
67
67
|
"routePriority": "Priorità di route",
|
|
68
|
-
"selectEnabledBridges": "Selezionare i bridge abilitati",
|
|
69
|
-
"selectEnabledExchanges": "Seleziona gli exchange abilitati",
|
|
70
68
|
"showDestinationWallet": "Mostra il portafoglio di destinazione",
|
|
71
69
|
"slippage": "Slittamento"
|
|
72
70
|
},
|
|
@@ -201,7 +199,8 @@
|
|
|
201
199
|
"highValueLoss": "Il valore dei token ricevuti è significativamente inferiore ai token scambiati più il costo della transazione.",
|
|
202
200
|
"insufficientFunds": "Non hai abbastanza fondi per eseguire lo scambio.",
|
|
203
201
|
"insufficientGas": "È necessario aggiungere almeno:",
|
|
204
|
-
"rateChanged": "Il tasso di scambio è cambiato. Se procedi, confermi di accettare il nuovo tasso."
|
|
202
|
+
"rateChanged": "Il tasso di scambio è cambiato. Se procedi, confermi di accettare il nuovo tasso.",
|
|
203
|
+
"resetSettings": "Questo porterà al ripristino della priorità di route, slittamento di prezzo, prezzo del gas, bridge abilitati ed exchanges."
|
|
205
204
|
},
|
|
206
205
|
"title": {
|
|
207
206
|
"deleteActiveSwaps": "Cancellare tutti gli scambi attivi?",
|
|
@@ -209,7 +208,8 @@
|
|
|
209
208
|
"deleteSwapHistory": "Cancellare la cronologia degli scambi?",
|
|
210
209
|
"highValueLoss": "Perdita di valore elevato",
|
|
211
210
|
"insufficientGas": "Gas insufficiente",
|
|
212
|
-
"rateChanged": "Tasso cambiato"
|
|
211
|
+
"rateChanged": "Tasso cambiato",
|
|
212
|
+
"resetSettings": "Ripristinare le impostazioni?"
|
|
213
213
|
}
|
|
214
214
|
}
|
|
215
215
|
},
|
package/cjs/i18n/uk.json
CHANGED
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
"contactSupport": "Служба підтримки",
|
|
7
7
|
"continue": "Продовжити",
|
|
8
8
|
"copyAddress": "Скопіювати адресу",
|
|
9
|
-
"viewOnExplorer": "Переглянути в оглядачі",
|
|
10
9
|
"dark": "Темна",
|
|
11
10
|
"delete": "Видалити",
|
|
12
11
|
"disconnect": "Від'єднатись",
|
|
@@ -19,6 +18,8 @@
|
|
|
19
18
|
"ok": "Ок",
|
|
20
19
|
"okay": "Добре",
|
|
21
20
|
"removeSwap": "Видалити своп",
|
|
21
|
+
"reset": "Скинути",
|
|
22
|
+
"resetSettings": "Скинути налаштування",
|
|
22
23
|
"restartSwap": "Перезапустити своп",
|
|
23
24
|
"reviewGasSwap": "Переглянути своп газу",
|
|
24
25
|
"reviewSwap": "Переглянути своп",
|
|
@@ -27,7 +28,8 @@
|
|
|
27
28
|
"startGasSwap": "Почати своп газу",
|
|
28
29
|
"startSwap": "Почати своп",
|
|
29
30
|
"swap": "Своп",
|
|
30
|
-
"tryAgain": "Спробувати ще раз"
|
|
31
|
+
"tryAgain": "Спробувати ще раз",
|
|
32
|
+
"viewOnExplorer": "Переглянути в оглядачі"
|
|
31
33
|
},
|
|
32
34
|
"format": {
|
|
33
35
|
"currency": "{{value, currency(currency: USD)}}",
|
|
@@ -54,7 +56,6 @@
|
|
|
54
56
|
"title": "Мова"
|
|
55
57
|
},
|
|
56
58
|
"settings": {
|
|
57
|
-
"advancedPreferences": "Розширені параметри",
|
|
58
59
|
"enabledBridges": "Увімкнені мости",
|
|
59
60
|
"enabledExchanges": "Увімкнені обмінники",
|
|
60
61
|
"gasPrice": {
|
|
@@ -63,10 +64,7 @@
|
|
|
63
64
|
"slow": "Повільно",
|
|
64
65
|
"title": "Ціна на газ"
|
|
65
66
|
},
|
|
66
|
-
"resetToDefault": "Скинути налаштування",
|
|
67
67
|
"routePriority": "Пріоритет маршруту",
|
|
68
|
-
"selectEnabledBridges": "Виберіть увімкнені мости",
|
|
69
|
-
"selectEnabledExchanges": "Виберіть увімкнені обмінники",
|
|
70
68
|
"showDestinationWallet": "Показати цільовий гаманець",
|
|
71
69
|
"slippage": "Прослизання"
|
|
72
70
|
},
|
|
@@ -201,7 +199,8 @@
|
|
|
201
199
|
"highValueLoss": "Вартість отриманих токенів значно нижча, ніж обмінені токени та вартість транзакції.",
|
|
202
200
|
"insufficientFunds": "У вас недостатньо коштів для здійснення свопу.",
|
|
203
201
|
"insufficientGas": "Потрібно додати хоча б:",
|
|
204
|
-
"rateChanged": "Курс обміну змінився. Продовжуючи своп, ви приймете новий курс."
|
|
202
|
+
"rateChanged": "Курс обміну змінився. Продовжуючи своп, ви приймете новий курс.",
|
|
203
|
+
"resetSettings": "Це скине пріоритет вашого маршруту, прослизання, ціну газу, увімкнені мости та обмінники."
|
|
205
204
|
},
|
|
206
205
|
"title": {
|
|
207
206
|
"deleteActiveSwaps": "Видалити всі активні свопи?",
|
|
@@ -209,7 +208,8 @@
|
|
|
209
208
|
"deleteSwapHistory": "Видалити історію свопів?",
|
|
210
209
|
"highValueLoss": "Висока втрата вартості",
|
|
211
210
|
"insufficientGas": "Недостатня кількість газу",
|
|
212
|
-
"rateChanged": "Курс змінився"
|
|
211
|
+
"rateChanged": "Курс змінився",
|
|
212
|
+
"resetSettings": "Скинути налаштування?"
|
|
213
213
|
}
|
|
214
214
|
}
|
|
215
215
|
},
|
package/cjs/i18n/zh.json
CHANGED
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
"contactSupport": "联系我们",
|
|
7
7
|
"continue": "继续",
|
|
8
8
|
"copyAddress": "复制地址",
|
|
9
|
-
"viewOnExplorer": "在区块链浏览器上查看",
|
|
10
9
|
"dark": "深色模式",
|
|
11
10
|
"delete": "删除",
|
|
12
11
|
"disconnect": "断开连接",
|
|
@@ -19,6 +18,8 @@
|
|
|
19
18
|
"ok": "确认",
|
|
20
19
|
"okay": "确认",
|
|
21
20
|
"removeSwap": "删除该兑换",
|
|
21
|
+
"reset": "重置",
|
|
22
|
+
"resetSettings": "恢复默认设置",
|
|
22
23
|
"restartSwap": "重新兑换",
|
|
23
24
|
"reviewGasSwap": "查看燃气费兑换",
|
|
24
25
|
"reviewSwap": "查看该兑换",
|
|
@@ -27,7 +28,8 @@
|
|
|
27
28
|
"startGasSwap": "开始兑换燃气费",
|
|
28
29
|
"startSwap": "开始兑换",
|
|
29
30
|
"swap": "兑换",
|
|
30
|
-
"tryAgain": "重试"
|
|
31
|
+
"tryAgain": "重试",
|
|
32
|
+
"viewOnExplorer": "在区块链浏览器上查看"
|
|
31
33
|
},
|
|
32
34
|
"format": {
|
|
33
35
|
"currency": "{{value, currency(currency: USD)}}",
|
|
@@ -54,7 +56,6 @@
|
|
|
54
56
|
"title": "语言"
|
|
55
57
|
},
|
|
56
58
|
"settings": {
|
|
57
|
-
"advancedPreferences": "偏好设置",
|
|
58
59
|
"enabledBridges": "已选中的跨链桥",
|
|
59
60
|
"enabledExchanges": "已选中的交易所",
|
|
60
61
|
"gasPrice": {
|
|
@@ -63,10 +64,7 @@
|
|
|
63
64
|
"slow": "缓慢",
|
|
64
65
|
"title": "燃气费"
|
|
65
66
|
},
|
|
66
|
-
"resetToDefault": "重置为默认值",
|
|
67
67
|
"routePriority": "路由优先级",
|
|
68
|
-
"selectEnabledBridges": "选择要使用的跨链桥",
|
|
69
|
-
"selectEnabledExchanges": "选择要使用的交易所",
|
|
70
68
|
"showDestinationWallet": "显示收款钱包",
|
|
71
69
|
"slippage": "滑点"
|
|
72
70
|
},
|
|
@@ -201,7 +199,8 @@
|
|
|
201
199
|
"highValueLoss": "收到的代币的价值明显低于要被兑换的代币和交易成本。",
|
|
202
200
|
"insufficientFunds": "你没有足够的资金来执行这笔兑换。",
|
|
203
201
|
"insufficientGas": "你至少需要:",
|
|
204
|
-
"rateChanged": "兑换比例已经改变,如果继续兑换,您将接受新的兑换比例。"
|
|
202
|
+
"rateChanged": "兑换比例已经改变,如果继续兑换,您将接受新的兑换比例。",
|
|
203
|
+
"resetSettings": "这将重置您的路由优先级,滑点,燃气费,选中的跨链桥和链上交易所。"
|
|
205
204
|
},
|
|
206
205
|
"title": {
|
|
207
206
|
"deleteActiveSwaps": "确定要清空正在进行的兑换记录?",
|
|
@@ -209,7 +208,8 @@
|
|
|
209
208
|
"deleteSwapHistory": "确定要清空兑换记录?",
|
|
210
209
|
"highValueLoss": "大额资金损失",
|
|
211
210
|
"insufficientGas": "燃料费不足",
|
|
212
|
-
"rateChanged": "兑换比例变动"
|
|
211
|
+
"rateChanged": "兑换比例变动",
|
|
212
|
+
"resetSettings": "确定要恢复默认设置吗?"
|
|
213
213
|
}
|
|
214
214
|
}
|
|
215
215
|
},
|
|
@@ -24,6 +24,6 @@ const SelectChainPage = ({ formType, selectNativeToken, }) => {
|
|
|
24
24
|
return ((0, jsx_runtime_1.jsx)(material_1.Container, { disableGutters: true, children: (0, jsx_runtime_1.jsx)(material_1.List, { sx: {
|
|
25
25
|
paddingLeft: 1.5,
|
|
26
26
|
paddingRight: 1.5,
|
|
27
|
-
}, children: chains?.map((chain) => ((0, jsx_runtime_1.jsxs)(ListItemButton_1.ListItemButton, { onClick: () => handleClick(chain),
|
|
27
|
+
}, children: chains?.map((chain) => ((0, jsx_runtime_1.jsxs)(ListItemButton_1.ListItemButton, { onClick: () => handleClick(chain), children: [(0, jsx_runtime_1.jsx)(material_1.ListItemAvatar, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, { src: chain.logoURI, alt: chain.name, children: chain.name[0] }) }), (0, jsx_runtime_1.jsx)(ListItemText_1.ListItemText, { primary: chain.name })] }, chain.id))) }) }));
|
|
28
28
|
};
|
|
29
29
|
exports.SelectChainPage = SelectChainPage;
|
|
@@ -46,6 +46,6 @@ const SelectEnabledToolsPage = ({ type }) => {
|
|
|
46
46
|
return ((0, jsx_runtime_1.jsx)(material_1.Container, { disableGutters: true, children: (0, jsx_runtime_1.jsx)(material_1.List, { sx: {
|
|
47
47
|
paddingLeft: 1.5,
|
|
48
48
|
paddingRight: 1.5,
|
|
49
|
-
}, children: tools?.[typeKey].map((tool) => ((0, jsx_runtime_1.jsxs)(SelectEnabledToolsPage_style_1.ListItemButton, { onClick: () => handleClick(tool.key),
|
|
49
|
+
}, children: tools?.[typeKey].map((tool) => ((0, jsx_runtime_1.jsxs)(SelectEnabledToolsPage_style_1.ListItemButton, { onClick: () => handleClick(tool.key), children: [(0, jsx_runtime_1.jsx)(material_1.ListItemAvatar, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, { src: tool.logoURI, alt: tool.name, children: tool.name[0] }) }), (0, jsx_runtime_1.jsx)(ListItemText_1.ListItemText, { primary: tool.name }), enabledTools?.includes(tool.key) ? ((0, jsx_runtime_1.jsx)(icons_material_1.CheckBox, { color: "primary" })) : ((0, jsx_runtime_1.jsx)(icons_material_1.CheckBoxOutlineBlankOutlined, {}))] }, tool.name))) }) }));
|
|
50
50
|
};
|
|
51
51
|
exports.SelectEnabledToolsPage = SelectEnabledToolsPage;
|
|
@@ -17,6 +17,6 @@ const SelectNativeTokenPage = ({ formType, }) => {
|
|
|
17
17
|
return ((0, jsx_runtime_1.jsx)(material_1.Container, { disableGutters: true, children: (0, jsx_runtime_1.jsx)(material_1.List, { sx: {
|
|
18
18
|
paddingLeft: 1.5,
|
|
19
19
|
paddingRight: 1.5,
|
|
20
|
-
}, children: chains?.map((chain) => ((0, jsx_runtime_1.jsxs)(ListItemButton_1.ListItemButton, { onClick: () => selectToken(chain.nativeToken.address, chain.id),
|
|
20
|
+
}, children: chains?.map((chain) => ((0, jsx_runtime_1.jsxs)(ListItemButton_1.ListItemButton, { onClick: () => selectToken(chain.nativeToken.address, chain.id), children: [(0, jsx_runtime_1.jsx)(material_1.ListItemAvatar, { children: (0, jsx_runtime_1.jsx)(TokenAvatar_1.TokenAvatar, { token: chain.nativeToken, chain: chain }) }), (0, jsx_runtime_1.jsx)(ListItemText_1.ListItemText, { primary: chain.nativeToken.symbol, secondary: t('swap.onChain', { chainName: chain.name }) })] }, chain.id))) }) }));
|
|
21
21
|
};
|
|
22
22
|
exports.SelectNativeTokenPage = SelectNativeTokenPage;
|
|
@@ -40,7 +40,7 @@ const SelectWalletPage = () => {
|
|
|
40
40
|
return ((0, jsx_runtime_1.jsxs)(material_1.Container, { disableGutters: true, children: [(0, jsx_runtime_1.jsx)(material_1.List, { sx: {
|
|
41
41
|
paddingLeft: 1.5,
|
|
42
42
|
paddingRight: 1.5,
|
|
43
|
-
}, children: wallet_management_1.supportedWallets.map((wallet) => ((0, jsx_runtime_1.jsxs)(ListItemButton_1.ListItemButton, { onClick: () => handleConnect(wallet),
|
|
43
|
+
}, children: wallet_management_1.supportedWallets.map((wallet) => ((0, jsx_runtime_1.jsxs)(ListItemButton_1.ListItemButton, { onClick: () => handleConnect(wallet), children: [(0, jsx_runtime_1.jsx)(material_1.ListItemAvatar, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, { src: wallet.icon.src || wallet.icon, alt: wallet.name, children: wallet.name[0] }) }), (0, jsx_runtime_1.jsx)(ListItemText_1.ListItemText, { primary: wallet.name })] }, wallet.name))) }), (0, jsx_runtime_1.jsxs)(Dialog_1.Dialog, { open: walletIdentity.show, onClose: closeDialog, children: [(0, jsx_runtime_1.jsx)(material_1.DialogContent, { children: (0, jsx_runtime_1.jsx)(material_1.DialogContentText, { children: t('wallet.extensionNotFound', {
|
|
44
44
|
name: walletIdentity.wallet?.name,
|
|
45
45
|
}) }) }), (0, jsx_runtime_1.jsx)(material_1.DialogActions, { children: (0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", onClick: closeDialog, autoFocus: true, children: t('button.ok') }) })] })] }));
|
|
46
46
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
export declare const ToggleButton: import("@emotion/styled").StyledComponent<{
|
|
3
3
|
children?: import("react").ReactNode;
|
|
4
4
|
classes?: Partial<import("@mui/material").ToggleButtonClasses> | undefined;
|
|
5
|
-
color?: "success" | "warning" | "error" | "
|
|
5
|
+
color?: "success" | "warning" | "error" | "primary" | "secondary" | "info" | "standard" | undefined;
|
|
6
6
|
disabled?: boolean | undefined;
|
|
7
7
|
disableFocusRipple?: boolean | undefined;
|
|
8
8
|
fullWidth?: boolean | undefined;
|