@lifi/widget 3.13.2 → 3.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/dist/esm/AppDrawer.style.d.ts +1 -1
- package/dist/esm/components/ActiveTransactions/ActiveTransactions.style.d.ts +1 -1
- package/dist/esm/components/AlertMessage/AlertMessage.d.ts +2 -2
- package/dist/esm/components/AlertMessage/AlertMessage.js +1 -1
- package/dist/esm/components/AlertMessage/AlertMessage.js.map +1 -1
- package/dist/esm/components/AmountInput/AmountInputAdornment.style.d.ts +1 -1
- package/dist/esm/components/AmountInput/PriceFormHelperText.js +7 -4
- package/dist/esm/components/AmountInput/PriceFormHelperText.js.map +1 -1
- package/dist/esm/components/BaseTransactionButton/BaseTransactionButton.js +2 -2
- package/dist/esm/components/BaseTransactionButton/BaseTransactionButton.js.map +1 -1
- package/dist/esm/components/ButtonTertiary.d.ts +1 -1
- package/dist/esm/components/ButtonTertiary.js +4 -5
- package/dist/esm/components/ButtonTertiary.js.map +1 -1
- package/dist/esm/components/Card/CardHeader.d.ts +1 -1
- package/dist/esm/components/Card/CardIconButton.d.ts +1 -1
- package/dist/esm/components/Card/CardLabel.js +0 -1
- package/dist/esm/components/Card/CardLabel.js.map +1 -1
- package/dist/esm/components/FeeBreakdownTooltip.js +3 -4
- package/dist/esm/components/FeeBreakdownTooltip.js.map +1 -1
- package/dist/esm/components/GasMessage/FundsSufficiencyMessage.js +1 -1
- package/dist/esm/components/GasMessage/FundsSufficiencyMessage.js.map +1 -1
- package/dist/esm/components/Header/Header.style.d.ts +1 -1
- package/dist/esm/components/Header/SettingsButton.style.d.ts +1 -1
- package/dist/esm/components/RouteCard/RouteCard.js +8 -3
- package/dist/esm/components/RouteCard/RouteCard.js.map +1 -1
- package/dist/esm/components/RouteCard/getMatchingLabels.d.ts +3 -0
- package/dist/esm/components/RouteCard/getMatchingLabels.js +34 -0
- package/dist/esm/components/RouteCard/getMatchingLabels.js.map +1 -0
- package/dist/esm/components/SelectTokenButton/SelectTokenButton.style.d.ts +1 -1
- package/dist/esm/components/SendToWallet/SendToWallet.style.d.ts +1 -1
- package/dist/esm/components/Skeleton/WidgetSkeleton.style.d.ts +2 -2
- package/dist/esm/components/Step/Step.js +17 -8
- package/dist/esm/components/Step/Step.js.map +1 -1
- package/dist/esm/components/StepActions/StepActions.js +8 -8
- package/dist/esm/components/StepActions/StepActions.js.map +1 -1
- package/dist/esm/components/ToAddressRequiredMessage.js +1 -1
- package/dist/esm/components/ToAddressRequiredMessage.js.map +1 -1
- package/dist/esm/components/Token/Token.js +3 -3
- package/dist/esm/components/Token/Token.js.map +1 -1
- package/dist/esm/components/TokenList/TokenList.style.d.ts +1 -1
- package/dist/esm/components/TokenList/TokenListItem.js +4 -6
- package/dist/esm/components/TokenList/TokenListItem.js.map +1 -1
- package/dist/esm/components/TokenRate/TokenRate.js +5 -7
- package/dist/esm/components/TokenRate/TokenRate.js.map +1 -1
- package/dist/esm/components/TransactionDetails.js +3 -7
- package/dist/esm/components/TransactionDetails.js.map +1 -1
- package/dist/esm/config/version.d.ts +1 -1
- package/dist/esm/config/version.js +1 -1
- package/dist/esm/i18n/en.json +4 -2
- package/dist/esm/pages/SendToWallet/BookmarkAddressSheet.js +1 -2
- package/dist/esm/pages/SendToWallet/BookmarkAddressSheet.js.map +1 -1
- package/dist/esm/pages/SendToWallet/ConfirmAddressSheet.d.ts +1 -0
- package/dist/esm/pages/SendToWallet/ConfirmAddressSheet.js +6 -4
- package/dist/esm/pages/SendToWallet/ConfirmAddressSheet.js.map +1 -1
- package/dist/esm/pages/SendToWallet/SendToWalletPage.js +5 -3
- package/dist/esm/pages/SendToWallet/SendToWalletPage.js.map +1 -1
- package/dist/esm/pages/SendToWallet/SendToWalletPage.style.d.ts +2 -2
- package/dist/esm/pages/TransactionPage/ExchangeRateBottomSheet.js +2 -2
- package/dist/esm/pages/TransactionPage/ExchangeRateBottomSheet.js.map +1 -1
- package/dist/esm/providers/I18nProvider/I18nProvider.js +3 -1
- package/dist/esm/providers/I18nProvider/I18nProvider.js.map +1 -1
- package/dist/esm/stores/routes/useExecutingRoutesIds.js +2 -2
- package/dist/esm/stores/routes/useExecutingRoutesIds.js.map +1 -1
- package/dist/esm/themes/createTheme.js +4 -5
- package/dist/esm/themes/createTheme.js.map +1 -1
- package/dist/esm/types/widget.d.ts +18 -1
- package/dist/esm/types/widget.js.map +1 -1
- package/dist/esm/utils/compactNumberFormatter.d.ts +10 -0
- package/dist/esm/utils/compactNumberFormatter.js +81 -0
- package/dist/esm/utils/compactNumberFormatter.js.map +1 -0
- package/dist/esm/utils/compactNumberFormatter.test.d.ts +1 -0
- package/dist/esm/utils/compactNumberFormatter.test.js +64 -0
- package/dist/esm/utils/compactNumberFormatter.test.js.map +1 -0
- package/dist/esm/utils/converters.js +2 -2
- package/dist/esm/utils/converters.js.map +1 -1
- package/dist/esm/utils/fees.js +2 -3
- package/dist/esm/utils/fees.js.map +1 -1
- package/dist/esm/utils/format.d.ts +1 -10
- package/dist/esm/utils/format.js +8 -47
- package/dist/esm/utils/format.js.map +1 -1
- package/dist/esm/utils/getPriceImpact.js +7 -6
- package/dist/esm/utils/getPriceImpact.js.map +1 -1
- package/dist/esm/utils/percentFormatter.js.map +1 -0
- package/package.json +13 -14
- package/src/components/AlertMessage/AlertMessage.tsx +3 -3
- package/src/components/AmountInput/PriceFormHelperText.tsx +8 -4
- package/src/components/BaseTransactionButton/BaseTransactionButton.tsx +3 -3
- package/src/components/ButtonTertiary.tsx +4 -5
- package/src/components/Card/CardLabel.tsx +0 -1
- package/src/components/FeeBreakdownTooltip.tsx +3 -4
- package/src/components/GasMessage/FundsSufficiencyMessage.tsx +1 -1
- package/src/components/RouteCard/RouteCard.tsx +12 -2
- package/src/components/RouteCard/getMatchingLabels.ts +53 -0
- package/src/components/Step/Step.tsx +23 -12
- package/src/components/StepActions/StepActions.tsx +16 -13
- package/src/components/ToAddressRequiredMessage.tsx +1 -1
- package/src/components/Token/Token.tsx +7 -2
- package/src/components/TokenList/TokenListItem.tsx +9 -9
- package/src/components/TokenRate/TokenRate.tsx +5 -11
- package/src/components/TransactionDetails.tsx +4 -8
- package/src/config/version.ts +1 -1
- package/src/i18n/en.json +4 -2
- package/src/pages/SendToWallet/BookmarkAddressSheet.tsx +2 -3
- package/src/pages/SendToWallet/ConfirmAddressSheet.tsx +28 -6
- package/src/pages/SendToWallet/SendToWalletPage.tsx +8 -2
- package/src/pages/TransactionPage/ExchangeRateBottomSheet.tsx +2 -2
- package/src/providers/I18nProvider/I18nProvider.tsx +3 -1
- package/src/stores/routes/useExecutingRoutesIds.ts +2 -2
- package/src/themes/createTheme.ts +6 -8
- package/src/themes/types.ts +0 -1
- package/src/types/widget.ts +22 -0
- package/src/utils/compactNumberFormatter.test.ts +67 -0
- package/src/utils/compactNumberFormatter.ts +91 -0
- package/src/utils/converters.ts +6 -4
- package/src/utils/fees.ts +6 -4
- package/src/utils/format.ts +14 -60
- package/src/utils/getPriceImpact.ts +15 -6
- package/dist/esm/providers/I18nProvider/percentFormatter.js.map +0 -1
- /package/dist/esm/{providers/I18nProvider → utils}/percentFormatter.d.ts +0 -0
- /package/dist/esm/{providers/I18nProvider → utils}/percentFormatter.js +0 -0
- /package/src/{providers/I18nProvider → utils}/percentFormatter.ts +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [3.14.0](https://github.com/lifinance/widget/compare/v3.13.2...v3.14.0) (2025-01-22)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* add configurable route labels/badges ([#338](https://github.com/lifinance/widget/issues/338)) ([f6fe53e](https://github.com/lifinance/widget/commit/f6fe53e5b1b90003c87651bb82f637b85ce0da37))
|
|
11
|
+
* add more UTXO wallets ([d787698](https://github.com/lifinance/widget/commit/d7876980c839a9f591078a613d28de956e9c0805))
|
|
12
|
+
* add smart contract account info message for destination wallets ([#340](https://github.com/lifinance/widget/issues/340)) ([ba57082](https://github.com/lifinance/widget/commit/ba57082582a9ddfae9ccec7847ade5e1041491ee))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* improve step titles in custom steps ([825856c](https://github.com/lifinance/widget/commit/825856c74d2ba8f32eeb6d4fcde771613776e534))
|
|
18
|
+
* improve token amount formatting ([#339](https://github.com/lifinance/widget/issues/339)) ([a6a3d10](https://github.com/lifinance/widget/commit/a6a3d1094d3403fac5b14797ba652d00a415f5a8))
|
|
19
|
+
|
|
5
20
|
### [3.13.2](https://github.com/lifinance/widget/compare/v3.13.1...v3.13.2) (2024-12-27)
|
|
6
21
|
|
|
7
22
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const CloseButtonLayout: import("@emotion/styled").StyledComponent<import("@mui/material").IconButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent.js").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "color" | "children" | "sx" | "style" | "className" | "tabIndex" | "classes" | "action" | "size" | "disabled" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
1
|
+
export declare const CloseButtonLayout: import("@emotion/styled").StyledComponent<import("@mui/material").IconButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent.js").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "color" | "children" | "sx" | "style" | "className" | "tabIndex" | "classes" | "action" | "size" | "disabled" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "loading" | "loadingIndicator" | "edge"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare const ListItemButton: import("@emotion/styled").StyledComponent<import("@mui/material").ListItemButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent.js").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "alignItems" | "children" | "sx" | "style" | "autoFocus" | "className" | "tabIndex" | "classes" | "divider" | "action" | "dense" | "disabled" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableGutters" | "selected"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
2
2
|
export declare const ListItem: import("@emotion/styled").StyledComponent<import("@mui/material").ListItemOwnProps & import("@mui/material/OverridableComponent.js").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "alignItems" | "children" | "sx" | "style" | "className" | "classes" | "divider" | "slots" | "slotProps" | "componentsProps" | "dense" | "components" | "disableGutters" | "ContainerComponent" | "ContainerProps" | "disablePadding" | "secondaryAction"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
3
|
-
export declare const ShowAllButton: import("@emotion/styled").StyledComponent<import("@mui/material").ButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent.js").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "color" | "children" | "sx" | "style" | "className" | "tabIndex" | "classes" | "variant" | "href" | "action" | "size" | "disabled" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "startIcon"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
3
|
+
export declare const ShowAllButton: import("@emotion/styled").StyledComponent<import("@mui/material").ButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent.js").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "color" | "children" | "sx" | "style" | "className" | "tabIndex" | "classes" | "variant" | "href" | "action" | "size" | "disabled" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "loading" | "loadingIndicator" | "loadingPosition" | "startIcon"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -4,8 +4,8 @@ import type { Severity } from './types.js';
|
|
|
4
4
|
interface AlertMessageProps extends PropsWithChildren<Omit<BoxProps, 'title'>> {
|
|
5
5
|
icon: ReactNode;
|
|
6
6
|
title: ReactNode;
|
|
7
|
-
|
|
7
|
+
multiline?: boolean;
|
|
8
8
|
severity?: Severity;
|
|
9
9
|
}
|
|
10
|
-
export declare const AlertMessage: ({ title, icon, children,
|
|
10
|
+
export declare const AlertMessage: ({ title, icon, children, multiline, severity, ...rest }: AlertMessageProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { AlertMessageCard, AlertMessageCardTitle, } from './AlertMessage.style.js';
|
|
3
|
-
export const AlertMessage = ({ title, icon, children,
|
|
3
|
+
export const AlertMessage = ({ title, icon, children, multiline, severity = 'info', ...rest }) => (_jsxs(AlertMessageCard, { severity: severity, ...rest, children: [_jsxs(AlertMessageCardTitle, { severity: severity, alignItems: multiline ? 'start' : 'center', children: [icon, title] }), children] }));
|
|
4
4
|
//# sourceMappingURL=AlertMessage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlertMessage.js","sourceRoot":"","sources":["../../../../src/components/AlertMessage/AlertMessage.tsx"],"names":[],"mappings":";AAEA,OAAO,EACL,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,yBAAyB,CAAA;AAUhC,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAC3B,KAAK,EACL,IAAI,EACJ,QAAQ,EACR,
|
|
1
|
+
{"version":3,"file":"AlertMessage.js","sourceRoot":"","sources":["../../../../src/components/AlertMessage/AlertMessage.tsx"],"names":[],"mappings":";AAEA,OAAO,EACL,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,yBAAyB,CAAA;AAUhC,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAC3B,KAAK,EACL,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,QAAQ,GAAG,MAAM,EACjB,GAAG,IAAI,EACW,EAAE,EAAE,CAAC,CACvB,MAAC,gBAAgB,IAAC,QAAQ,EAAE,QAAQ,KAAM,IAAI,aAC5C,MAAC,qBAAqB,IACpB,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,aAEzC,IAAI,EACJ,KAAK,IACgB,EACvB,QAAQ,IACQ,CACpB,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const MaxButton: import("@emotion/styled").StyledComponent<import("@mui/material").ButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent.js").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "color" | "children" | "sx" | "style" | "className" | "tabIndex" | "classes" | "variant" | "href" | "action" | "size" | "disabled" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "startIcon"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
1
|
+
export declare const MaxButton: import("@emotion/styled").StyledComponent<import("@mui/material").ButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent.js").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "color" | "children" | "sx" | "style" | "className" | "tabIndex" | "classes" | "variant" | "href" | "action" | "size" | "disabled" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "loading" | "loadingIndicator" | "loadingPosition" | "startIcon"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
2
2
|
export declare const MaxButtonSkeleton: import("@emotion/styled").StyledComponent<import("@mui/material").SkeletonOwnProps & import("@mui/material/OverridableComponent.js").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "width" | "height" | "animation" | "children" | "sx" | "style" | "className" | "classes" | "variant"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -13,7 +13,10 @@ export const PriceFormHelperText = ({ formType }) => {
|
|
|
13
13
|
export const PriceFormHelperTextBase = ({ formType, isLoading, tokenAddress, token }) => {
|
|
14
14
|
const { t } = useTranslation();
|
|
15
15
|
const [amount] = useFieldValues(FormKeyHelper.getAmountKey(formType));
|
|
16
|
-
const
|
|
16
|
+
const tokenAmount = token
|
|
17
|
+
? formatTokenAmount(token.amount, token.decimals)
|
|
18
|
+
: '0';
|
|
19
|
+
const tokenPrice = formatTokenPrice(amount, token?.priceUSD);
|
|
17
20
|
return (_jsxs(FormHelperText, { component: "div", sx: {
|
|
18
21
|
display: 'flex',
|
|
19
22
|
justifyContent: 'space-between',
|
|
@@ -29,15 +32,15 @@ export const PriceFormHelperTextBase = ({ formType, isLoading, tokenAddress, tok
|
|
|
29
32
|
wordBreak: 'break-word',
|
|
30
33
|
overflowWrap: 'break-word',
|
|
31
34
|
}, children: t('format.currency', {
|
|
32
|
-
value:
|
|
35
|
+
value: tokenPrice,
|
|
33
36
|
}) }), isLoading && tokenAddress ? (_jsx(Skeleton, { variant: "text", width: 48, height: 12 })) : token?.amount ? (_jsx(Typography, { sx: {
|
|
34
37
|
fontWeight: 500,
|
|
35
38
|
fontSize: 12,
|
|
36
39
|
color: 'text.secondary',
|
|
37
40
|
lineHeight: 1,
|
|
38
41
|
pl: 0.25,
|
|
39
|
-
}, children: `/ ${t('format.
|
|
40
|
-
value:
|
|
42
|
+
}, title: tokenAmount, children: `/ ${t('format.tokenAmount', {
|
|
43
|
+
value: tokenAmount,
|
|
41
44
|
})}` })) : null] }));
|
|
42
45
|
};
|
|
43
46
|
//# sourceMappingURL=PriceFormHelperText.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PriceFormHelperText.js","sourceRoot":"","sources":["../../../../src/components/AmountInput/PriceFormHelperText.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;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C,KAAK,EACf,EAAE,EAAE;YACF,OAAO,EAAE,MAAM;YACf,cAAc,EAAE,eAAe;YAC/B,MAAM,EAAE,CAAC;YACT,UAAU,EAAE,CAAC;YACb,SAAS,EAAE,IAAI;SAChB,aAED,KAAC,UAAU,IACT,EAAE,EAAE;oBACF,KAAK,EAAE,gBAAgB;oBACvB,UAAU,EAAE,GAAG;oBACf,QAAQ,EAAE,EAAE;oBACZ,UAAU,EAAE,CAAC;oBACb,IAAI,EAAE,CAAC;oBACP,SAAS,EAAE,YAAY;oBACvB,YAAY,EAAE,YAAY;iBAC3B,YAEA,CAAC,CAAC,iBAAiB,EAAE;oBACpB,KAAK,EAAE,UAAU;iBAClB,CAAC,GACS,EACZ,SAAS,IAAI,YAAY,CAAC,CAAC,CAAC,CAC3B,KAAC,QAAQ,IAAC,OAAO,EAAC,MAAM,EAAC,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,GAAI,CACnD,CAAC,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CAClB,KAAC,UAAU,IACT,EAAE,EAAE;oBACF,UAAU,EAAE,GAAG;oBACf,QAAQ,EAAE,EAAE;oBACZ,KAAK,EAAE,gBAAgB;oBACvB,UAAU,EAAE,CAAC;oBACb,EAAE,EAAE,IAAI;iBACT,EACD,KAAK,EAAE,WAAW,YAEjB,KAAK,CAAC,CAAC,oBAAoB,EAAE;oBAC5B,KAAK,EAAE,WAAW;iBACnB,CAAC,EAAE,GACO,CACd,CAAC,CAAC,CAAC,IAAI,IACO,CAClB,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useAccount, useWalletMenu } from '@lifi/wallet-management';
|
|
3
|
-
import {
|
|
3
|
+
import { Button } from '@mui/material';
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
5
|
import { useChain } from '../../hooks/useChain.js';
|
|
6
6
|
import { useWidgetConfig } from '../../providers/WidgetProvider/WidgetProvider.js';
|
|
@@ -31,6 +31,6 @@ export const BaseTransactionButton = ({ onClick, text, disabled, loading, }) =>
|
|
|
31
31
|
}
|
|
32
32
|
return t('button.connectWallet');
|
|
33
33
|
};
|
|
34
|
-
return (_jsx(
|
|
34
|
+
return (_jsx(Button, { variant: "contained", color: "primary", onClick: handleClick, disabled: account.isConnected && disabled, loading: loading, loadingPosition: "center", fullWidth: true, children: getButtonText() }));
|
|
35
35
|
};
|
|
36
36
|
//# sourceMappingURL=BaseTransactionButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseTransactionButton.js","sourceRoot":"","sources":["../../../../src/components/BaseTransactionButton/BaseTransactionButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AACnE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"BaseTransactionButton.js","sourceRoot":"","sources":["../../../../src/components/BaseTransactionButton/BaseTransactionButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,kDAAkD,CAAA;AAClF,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAA;AAGpE,MAAM,CAAC,MAAM,qBAAqB,GAAyC,CAAC,EAC1E,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,OAAO,GACR,EAAE,EAAE;IACH,MAAM,EAAE,CAAC,EAAE,GAAG,cAAc,EAAE,CAAA;IAC9B,MAAM,EAAE,YAAY,EAAE,GAAG,eAAe,EAAE,CAAA;IAC1C,MAAM,EAAE,cAAc,EAAE,GAAG,aAAa,EAAE,CAAA;IAC1C,MAAM,CAAC,WAAW,CAAC,GAAG,cAAc,CAAC,WAAW,CAAC,CAAA;IACjD,MAAM,EAAE,KAAK,EAAE,GAAG,QAAQ,CAAC,WAAW,CAAC,CAAA;IACvC,MAAM,EAAE,OAAO,EAAE,GAAG,UAAU,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAA;IAE/D,MAAM,WAAW,GAAG,KAAK,IAAI,EAAE;QAC7B,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;YACxB,OAAO,EAAE,EAAE,CAAA;QACb,CAAC;aAAM,IAAI,YAAY,EAAE,SAAS,EAAE,CAAC;YACnC,YAAY,CAAC,SAAS,EAAE,CAAA;QAC1B,CAAC;aAAM,CAAC;YACN,cAAc,EAAE,CAAA;QAClB,CAAC;IACH,CAAC,CAAA;IAED,MAAM,aAAa,GAAG,GAAG,EAAE;QACzB,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;YACxB,IAAI,IAAI,EAAE,CAAC;gBACT,OAAO,IAAI,CAAA;YACb,CAAC;QACH,CAAC;QACD,OAAO,CAAC,CAAC,sBAAsB,CAAC,CAAA;IAClC,CAAC,CAAA;IAED,OAAO,CACL,KAAC,MAAM,IACL,OAAO,EAAC,WAAW,EACnB,KAAK,EAAC,SAAS,EACf,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,OAAO,CAAC,WAAW,IAAI,QAAQ,EACzC,OAAO,EAAE,OAAO,EAChB,eAAe,EAAC,QAAQ,EACxB,SAAS,kBAER,aAAa,EAAE,GACT,CACV,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const ButtonTertiary: import("@emotion/styled").StyledComponent<import("@mui/
|
|
1
|
+
export declare const ButtonTertiary: import("@emotion/styled").StyledComponent<import("@mui/material").ButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent.js").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "color" | "children" | "sx" | "style" | "className" | "tabIndex" | "classes" | "variant" | "href" | "action" | "size" | "disabled" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "loading" | "loadingIndicator" | "loadingPosition" | "startIcon"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { styled } from '@mui/material';
|
|
1
|
+
import { Button, buttonClasses, styled } from '@mui/material';
|
|
3
2
|
import { getContrastAlphaColor } from '../utils/colors.js';
|
|
4
|
-
export const ButtonTertiary = styled(
|
|
3
|
+
export const ButtonTertiary = styled(Button)(({ theme }) => ({
|
|
5
4
|
color: theme.palette.text.primary,
|
|
6
5
|
height: 40,
|
|
7
6
|
fontSize: 14,
|
|
@@ -9,10 +8,10 @@ export const ButtonTertiary = styled(LoadingButton)(({ theme }) => ({
|
|
|
9
8
|
'&:hover, &:active': {
|
|
10
9
|
backgroundColor: getContrastAlphaColor(theme, 0.08),
|
|
11
10
|
},
|
|
12
|
-
[`&.${
|
|
11
|
+
[`&.${buttonClasses.loading}:disabled`]: {
|
|
13
12
|
backgroundColor: getContrastAlphaColor(theme, 0.04),
|
|
14
13
|
},
|
|
15
|
-
[`.${
|
|
14
|
+
[`.${buttonClasses.loadingIndicator}`]: {
|
|
16
15
|
color: theme.palette.text.primary,
|
|
17
16
|
},
|
|
18
17
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonTertiary.js","sourceRoot":"","sources":["../../../src/components/ButtonTertiary.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"ButtonTertiary.js","sourceRoot":"","sources":["../../../src/components/ButtonTertiary.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAC7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAA;AAE1D,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;IAC3D,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO;IACjC,MAAM,EAAE,EAAE;IACV,QAAQ,EAAE,EAAE;IACZ,eAAe,EAAE,qBAAqB,CAAC,KAAK,EAAE,IAAI,CAAC;IACnD,mBAAmB,EAAE;QACnB,eAAe,EAAE,qBAAqB,CAAC,KAAK,EAAE,IAAI,CAAC;KACpD;IACD,CAAC,KAAK,aAAa,CAAC,OAAO,WAAW,CAAC,EAAE;QACvC,eAAe,EAAE,qBAAqB,CAAC,KAAK,EAAE,IAAI,CAAC;KACpD;IACD,CAAC,IAAI,aAAa,CAAC,gBAAgB,EAAE,CAAC,EAAE;QACtC,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO;KAClC;CACF,CAAC,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const CardHeader: import("@emotion/styled").StyledComponent<import("@mui/material").CardHeaderOwnProps<"span", "span"> & import("@mui/material/OverridableComponent.js").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "title" | "sx" | "style" | "className" | "classes" | "action" | "disableTypography" | "subheader" | "avatar" | "subheaderTypographyProps" | "titleTypographyProps"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
1
|
+
export declare const CardHeader: import("@emotion/styled").StyledComponent<import("@mui/material").CardHeaderOwnProps<"span", "span"> & import("@mui/material").CardHeaderSlotsAndSlotProps & import("@mui/material/OverridableComponent.js").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "title" | "sx" | "style" | "className" | "classes" | "action" | "slots" | "slotProps" | "disableTypography" | "subheader" | "avatar" | "subheaderTypographyProps" | "titleTypographyProps"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { LinkProps } from '@mui/material';
|
|
2
|
-
export declare const CardIconButton: import("@emotion/styled").StyledComponent<import("@mui/material").IconButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent.js").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "color" | "children" | "sx" | "style" | "className" | "tabIndex" | "classes" | "action" | "size" | "disabled" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
2
|
+
export declare const CardIconButton: import("@emotion/styled").StyledComponent<import("@mui/material").IconButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent.js").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "color" | "children" | "sx" | "style" | "className" | "tabIndex" | "classes" | "action" | "size" | "disabled" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "loading" | "loadingIndicator" | "edge"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
3
3
|
component?: React.ElementType;
|
|
4
4
|
} & Pick<LinkProps, "rel" | "target" | "href">, {}, {}>;
|
|
@@ -12,7 +12,6 @@ export const CardLabel = styled(Box, {
|
|
|
12
12
|
minWidth: 24,
|
|
13
13
|
userSelect: 'none',
|
|
14
14
|
fontSize: '1rem',
|
|
15
|
-
marginRight: theme.spacing(1),
|
|
16
15
|
backgroundColor: blend(theme.palette.background.paper, theme.palette.common.white, 0.16),
|
|
17
16
|
color: theme.palette.text.primary,
|
|
18
17
|
...theme.applyStyles('light', {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardLabel.js","sourceRoot":"","sources":["../../../../src/components/Card/CardLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AACzE,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAA;AAE7C,MAAM,CAAC,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,EAAE;IACnC,iBAAiB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,MAAM;CAC7C,CAAC,CAAsB,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;IACtC,YAAY,EAAE,KAAK,CAAC,KAAK,CAAC,YAAY;IACtC,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,MAAM;IACf,UAAU,EAAE,QAAQ;IACpB,cAAc,EAAE,QAAQ;IACxB,MAAM,EAAE,EAAE;IACV,QAAQ,EAAE,EAAE;IACZ,UAAU,EAAE,MAAM;IAClB,QAAQ,EAAE,MAAM;IAChB,
|
|
1
|
+
{"version":3,"file":"CardLabel.js","sourceRoot":"","sources":["../../../../src/components/Card/CardLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AACzE,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAA;AAE7C,MAA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";
|
|
2
2
|
import { Box, Tooltip, Typography } from '@mui/material';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
|
-
import {
|
|
4
|
+
import { formatTokenAmount } from '../utils/format.js';
|
|
5
5
|
export const FeeBreakdownTooltip = ({ gasCosts, feeCosts, children, }) => {
|
|
6
6
|
const { t } = useTranslation();
|
|
7
7
|
return (_jsx(Tooltip, { title: _jsxs(Box, { children: [gasCosts?.length ? (_jsxs(Box, { children: [t('main.fees.network'), getFeeBreakdownTypography(gasCosts, t)] })) : null, feeCosts?.length ? (_jsxs(Box, { sx: {
|
|
@@ -11,8 +11,7 @@ export const FeeBreakdownTooltip = ({ gasCosts, feeCosts, children, }) => {
|
|
|
11
11
|
export const getFeeBreakdownTypography = (fees, t) => fees.map((fee, index) => (_jsxs(Typography, { color: "inherit", sx: {
|
|
12
12
|
fontSize: 12,
|
|
13
13
|
fontWeight: '500',
|
|
14
|
-
}, children: [t('format.currency', { value: fee.amountUSD }), " (", t('format.
|
|
15
|
-
value:
|
|
16
|
-
maximumFractionDigits: Math.min(fee.token.decimals, 9),
|
|
14
|
+
}, children: [t('format.currency', { value: fee.amountUSD }), " (", t('format.tokenAmount', {
|
|
15
|
+
value: formatTokenAmount(fee.amount, fee.token.decimals),
|
|
17
16
|
}), ' ', fee.token.symbol, ")"] }, `${fee.token.address}${index}`)));
|
|
18
17
|
//# sourceMappingURL=FeeBreakdownTooltip.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeeBreakdownTooltip.js","sourceRoot":"","sources":["../../../src/components/FeeBreakdownTooltip.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAGxD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"FeeBreakdownTooltip.js","sourceRoot":"","sources":["../../../src/components/FeeBreakdownTooltip.tsx"],"names":[],"mappings":";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AAC,oBAAoB,EAAE;YACvB,KAAK,EAAE,iBAAiB,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC;SACzD,CAAC,EAAE,GAAG,EACN,GAAG,CAAC,KAAK,CAAC,MAAM,UAVZ,GAAG,GAAG,CAAC,KAAK,CAAC,OAAO,GAAG,KAAK,EAAE,CAWxB,CACd,CAAC,CAAA"}
|
|
@@ -8,6 +8,6 @@ export const FundsSufficiencyMessage = () => {
|
|
|
8
8
|
return (_jsx(AlertMessage, { severity: "warning", icon: _jsx(WarningRounded, {}), title: _jsx(Typography, { variant: "body2", sx: {
|
|
9
9
|
px: 1,
|
|
10
10
|
color: 'text.primary',
|
|
11
|
-
}, children: t('warning.message.insufficientFunds') }),
|
|
11
|
+
}, children: t('warning.message.insufficientFunds') }), multiline: true }));
|
|
12
12
|
};
|
|
13
13
|
//# sourceMappingURL=FundsSufficiencyMessage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FundsSufficiencyMessage.js","sourceRoot":"","sources":["../../../../src/components/GasMessage/FundsSufficiencyMessage.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAA;AAE9D,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,EAAE;IAC1C,MAAM,EAAE,CAAC,EAAE,GAAG,cAAc,EAAE,CAAA;IAC9B,OAAO,CACL,KAAC,YAAY,IACX,QAAQ,EAAC,SAAS,EAClB,IAAI,EAAE,KAAC,cAAc,KAAG,EACxB,KAAK,EACH,KAAC,UAAU,IACT,OAAO,EAAC,OAAO,EACf,EAAE,EAAE;gBACF,EAAE,EAAE,CAAC;gBACL,KAAK,EAAE,cAAc;aACtB,YAEA,CAAC,CAAC,mCAAmC,CAAC,GAC5B,EAEf,
|
|
1
|
+
{"version":3,"file":"FundsSufficiencyMessage.js","sourceRoot":"","sources":["../../../../src/components/GasMessage/FundsSufficiencyMessage.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAA;AAE9D,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,EAAE;IAC1C,MAAM,EAAE,CAAC,EAAE,GAAG,cAAc,EAAE,CAAA;IAC9B,OAAO,CACL,KAAC,YAAY,IACX,QAAQ,EAAC,SAAS,EAClB,IAAI,EAAE,KAAC,cAAc,KAAG,EACxB,KAAK,EACH,KAAC,UAAU,IACT,OAAO,EAAC,OAAO,EACf,EAAE,EAAE;gBACF,EAAE,EAAE,CAAC;gBACL,KAAK,EAAE,cAAc;aACtB,YAEA,CAAC,CAAC,mCAAmC,CAAC,GAC5B,EAEf,SAAS,SACT,CACH,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -3,7 +3,7 @@ export declare const HeaderAppBar: import("@emotion/styled").StyledComponent<imp
|
|
|
3
3
|
export declare const Container: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
4
4
|
sticky?: boolean;
|
|
5
5
|
}, {}, {}>;
|
|
6
|
-
export declare const WalletButton: import("@emotion/styled").StyledComponent<import("@mui/material").ButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent.js").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "color" | "children" | "sx" | "style" | "className" | "tabIndex" | "classes" | "variant" | "href" | "action" | "size" | "disabled" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "startIcon"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
6
|
+
export declare const WalletButton: import("@emotion/styled").StyledComponent<import("@mui/material").ButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent.js").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "color" | "children" | "sx" | "style" | "className" | "tabIndex" | "classes" | "variant" | "href" | "action" | "size" | "disabled" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "loading" | "loadingIndicator" | "loadingPosition" | "startIcon"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
7
7
|
subvariant?: WidgetSubvariant;
|
|
8
8
|
}, {}, {}>;
|
|
9
9
|
export declare const DrawerWalletContainer: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -2,5 +2,5 @@ export declare const SettingsIconBadge: import("@emotion/styled").StyledComponen
|
|
|
2
2
|
interface SettingsIconButtonProps {
|
|
3
3
|
variant?: 'info' | 'warning';
|
|
4
4
|
}
|
|
5
|
-
export declare const SettingsIconButton: import("@emotion/styled").StyledComponent<import("@mui/material").IconButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent.js").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "color" | "children" | "sx" | "style" | "className" | "tabIndex" | "classes" | "action" | "size" | "disabled" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & SettingsIconButtonProps, {}, {}>;
|
|
5
|
+
export declare const SettingsIconButton: import("@emotion/styled").StyledComponent<import("@mui/material").IconButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent.js").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "color" | "children" | "sx" | "style" | "className" | "tabIndex" | "classes" | "action" | "size" | "disabled" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "loading" | "loadingIndicator" | "edge"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & SettingsIconButtonProps, {}, {}>;
|
|
6
6
|
export {};
|
|
@@ -12,9 +12,10 @@ import { Token } from '../Token/Token.js';
|
|
|
12
12
|
import { TokenContainer } from './RouteCard.style.js';
|
|
13
13
|
import { RouteCardEssentials } from './RouteCardEssentials.js';
|
|
14
14
|
import { RouteCardEssentialsExpanded } from './RouteCardEssentialsExpanded.js';
|
|
15
|
+
import { getMatchingLabels } from './getMatchingLabels.js';
|
|
15
16
|
export const RouteCard = ({ route, active, variant = 'default', expanded: defaulExpanded, ...other }) => {
|
|
16
17
|
const { t } = useTranslation();
|
|
17
|
-
const { subvariant, subvariantOptions } = useWidgetConfig();
|
|
18
|
+
const { subvariant, subvariantOptions, routeLabels } = useWidgetConfig();
|
|
18
19
|
const [cardExpanded, setCardExpanded] = useState(defaulExpanded);
|
|
19
20
|
const handleExpand = (e) => {
|
|
20
21
|
e.stopPropagation();
|
|
@@ -26,14 +27,18 @@ export const RouteCard = ({ route, active, variant = 'default', expanded: defaul
|
|
|
26
27
|
const impactToken = subvariant !== 'custom'
|
|
27
28
|
? { ...route.fromToken, amount: BigInt(route.fromAmount) }
|
|
28
29
|
: undefined;
|
|
30
|
+
const customLabels = getMatchingLabels(route, routeLabels);
|
|
29
31
|
const tags = route.tags?.filter((tag) => tag === 'CHEAPEST' || tag === 'FASTEST');
|
|
30
32
|
const cardContent = (_jsxs(Box, { sx: {
|
|
31
33
|
flex: 1,
|
|
32
|
-
}, children: [subvariant !== 'refuel' &&
|
|
34
|
+
}, children: [subvariant !== 'refuel' &&
|
|
35
|
+
(route.tags?.length || customLabels.length) ? (_jsxs(Box, { sx: {
|
|
33
36
|
display: 'flex',
|
|
34
37
|
alignItems: 'center',
|
|
35
38
|
mb: 2,
|
|
36
|
-
|
|
39
|
+
gap: 1,
|
|
40
|
+
flexWrap: 'wrap',
|
|
41
|
+
}, children: [tags?.length ? (_jsx(CardLabel, { type: active ? 'active' : undefined, children: _jsx(CardLabelTypography, { children: t(`main.tags.${tags[0].toLowerCase()}`) }) })) : null, customLabels.map((label, index) => (_jsx(CardLabel, { sx: label.sx, children: _jsx(CardLabelTypography, { children: label.text }) }, index)))] })) : null, _jsxs(TokenContainer, { children: [_jsx(Token, { token: token, impactToken: impactToken, step: route.steps[0], stepVisible: !cardExpanded }), !defaulExpanded ? (_jsx(CardIconButton, { onClick: handleExpand, size: "small", children: cardExpanded ? (_jsx(ExpandLess, { fontSize: "inherit" })) : (_jsx(ExpandMore, { fontSize: "inherit" })) })) : null] }), _jsxs(Collapse, { timeout: 225, in: cardExpanded, mountOnEnter: true, unmountOnExit: true, children: [route.steps.map((step) => (_jsx(StepActions, { step: step, mt: 2 }, step.id))), _jsx(RouteCardEssentialsExpanded, { route: route })] }), _jsx(RouteCardEssentials, { route: route })] }));
|
|
37
42
|
return subvariant === 'refuel' || variant === 'cardless' ? (cardContent) : (_jsx(Card, { type: active ? 'selected' : 'default', selectionColor: "secondary", indented: true, ...other, children: cardContent }));
|
|
38
43
|
};
|
|
39
44
|
//# sourceMappingURL=RouteCard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RouteCard.js","sourceRoot":"","sources":["../../../../src/components/RouteCard/RouteCard.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAC5D,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAE7C,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChC,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,kDAAkD,CAAA;AAElF,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC1D,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAA;AAC3D,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAA;
|
|
1
|
+
{"version":3,"file":"RouteCard.js","sourceRoot":"","sources":["../../../../src/components/Rou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E,KAAK,GAAI,IACpC,EACX,KAAC,mBAAmB,IAAC,KAAK,EAAE,KAAK,GAAI,IACjC,CACP,CAAA;IAED,OAAO,UAAU,KAAK,QAAQ,IAAI,OAAO,KAAK,UAAU,CAAC,CAAC,CAAC,CACzD,WAAW,CACZ,CAAC,CAAC,CAAC,CACF,KAAC,IAAI,IACH,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,EACrC,cAAc,EAAC,WAAW,EAC1B,QAAQ,WACJ,KAAK,YAER,WAAW,GACP,CACR,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { isItemAllowed } from '../../utils/item.js';
|
|
2
|
+
export const getMatchingLabels = (route, routeLabels) => {
|
|
3
|
+
if (!routeLabels?.length) {
|
|
4
|
+
return [];
|
|
5
|
+
}
|
|
6
|
+
return routeLabels
|
|
7
|
+
.filter((rule) => {
|
|
8
|
+
const conditions = [];
|
|
9
|
+
// Check bridge/exchange matches if specified
|
|
10
|
+
if (rule.bridges || rule.exchanges) {
|
|
11
|
+
const toolNames = route.steps.flatMap((step) => step.includedSteps.map((s) => s.tool));
|
|
12
|
+
conditions.push(toolNames.some((toolName) => isItemAllowed(toolName, rule.bridges) &&
|
|
13
|
+
isItemAllowed(toolName, rule.exchanges)));
|
|
14
|
+
}
|
|
15
|
+
// Check token matches if specified
|
|
16
|
+
if (rule.fromTokenAddress?.length) {
|
|
17
|
+
conditions.push(rule.fromTokenAddress.includes(route.fromToken.address));
|
|
18
|
+
}
|
|
19
|
+
if (rule.toTokenAddress?.length) {
|
|
20
|
+
conditions.push(rule.toTokenAddress.includes(route.toToken.address));
|
|
21
|
+
}
|
|
22
|
+
// Check chain matches if specified
|
|
23
|
+
if (rule.fromChainId?.length) {
|
|
24
|
+
conditions.push(rule.fromChainId.includes(route.fromChainId));
|
|
25
|
+
}
|
|
26
|
+
if (rule.toChainId?.length) {
|
|
27
|
+
conditions.push(rule.toChainId.includes(route.toChainId));
|
|
28
|
+
}
|
|
29
|
+
// Must have at least one condition and all conditions must be true
|
|
30
|
+
return conditions.length && conditions.every(Boolean);
|
|
31
|
+
})
|
|
32
|
+
.map((rule) => rule.label);
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=getMatchingLabels.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getMatchingLabels.js","sourceRoot":"","sources":["../../../../src/components/RouteCard/getMatchingLabels.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAEnD,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,KAAY,EACZ,WAA8B,EAChB,EAAE;IAChB,IAAI,CAAC,WAAW,EAAE,MAAM,EAAE,CAAC;QACzB,OAAO,EAAE,CAAA;IACX,CAAC;IAED,OAAO,WAAW;SACf,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE;QACf,MAAM,UAAU,GAAc,EAAE,CAAA;QAEhC,6CAA6C;QAC7C,IAAI,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACnC,MAAM,SAAS,GAAG,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAC7C,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CACtC,CAAA;YACD,UAAU,CAAC,IAAI,CACb,SAAS,CAAC,IAAI,CACZ,CAAC,QAAQ,EAAE,EAAE,CACX,aAAa,CAAC,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC;gBACrC,aAAa,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,CAC1C,CACF,CAAA;QACH,CAAC;QAED,mCAAmC;QACnC,IAAI,IAAI,CAAC,gBAAgB,EAAE,MAAM,EAAE,CAAC;YAClC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAA;QAC1E,CAAC;QAED,IAAI,IAAI,CAAC,cAAc,EAAE,MAAM,EAAE,CAAC;YAChC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAA;QACtE,CAAC;QAED,mCAAmC;QACnC,IAAI,IAAI,CAAC,WAAW,EAAE,MAAM,EAAE,CAAC;YAC7B,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAA;QAC/D,CAAC;QAED,IAAI,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,CAAC;YAC3B,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAA;QAC3D,CAAC;QAED,mEAAmE;QACnE,OAAO,UAAU,CAAC,MAAM,IAAI,UAAU,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;IACvD,CAAC,CAAC;SACD,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;AAC9B,CAAC,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { FormType } from '../../stores/form/types.js';
|
|
2
|
-
export declare const SelectTokenCardHeader: import("@emotion/styled").StyledComponent<import("@mui/material").CardHeaderOwnProps<"span", "span"> & import("@mui/material/OverridableComponent.js").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "title" | "sx" | "style" | "className" | "classes" | "action" | "disableTypography" | "subheader" | "avatar" | "subheaderTypographyProps" | "titleTypographyProps"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
2
|
+
export declare const SelectTokenCardHeader: import("@emotion/styled").StyledComponent<import("@mui/material").CardHeaderOwnProps<"span", "span"> & import("@mui/material").CardHeaderSlotsAndSlotProps & import("@mui/material/OverridableComponent.js").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "title" | "sx" | "style" | "className" | "classes" | "action" | "slots" | "slotProps" | "disableTypography" | "subheader" | "avatar" | "subheaderTypographyProps" | "titleTypographyProps"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
3
3
|
selected?: boolean;
|
|
4
4
|
compact?: boolean;
|
|
5
5
|
}, {}, {}>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const SendToWalletCardHeader: import("@emotion/styled").StyledComponent<import("@mui/material").CardHeaderOwnProps<"span", "span"> & import("@mui/material/OverridableComponent.js").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "title" | "sx" | "style" | "className" | "classes" | "action" | "disableTypography" | "subheader" | "avatar" | "subheaderTypographyProps" | "titleTypographyProps"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
1
|
+
export declare const SendToWalletCardHeader: import("@emotion/styled").StyledComponent<import("@mui/material").CardHeaderOwnProps<"span", "span"> & import("@mui/material").CardHeaderSlotsAndSlotProps & import("@mui/material/OverridableComponent.js").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "title" | "sx" | "style" | "className" | "classes" | "action" | "slots" | "slotProps" | "disableTypography" | "subheader" | "avatar" | "subheaderTypographyProps" | "titleTypographyProps"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
2
2
|
selected?: boolean;
|
|
3
3
|
}, {}, {}>;
|
|
@@ -5,7 +5,7 @@ export declare const SkeletonAmountContainer: import("@emotion/styled").StyledCo
|
|
|
5
5
|
export declare const SkeletonCard: import("@emotion/styled").StyledComponent<import("@mui/material").CardOwnProps & import("@mui/material/OverridableComponent.js").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "children" | "sx" | "style" | "className" | "classes" | "variant" | "elevation" | "square" | "raised"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
6
6
|
export declare const SkeletonInputCard: import("@emotion/styled").StyledComponent<Pick<import("@mui/material").CardOwnProps & import("@mui/material/OverridableComponent.js").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "children" | "sx" | "style" | "className" | "classes" | "variant" | "elevation" | "square" | "raised"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & import("../Card/Card.js").CardProps, "title" | "theme" | "color" | "content" | "translate" | "children" | "ref" | "sx" | "slot" | "style" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "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-rowindextext" | "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" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onToggle" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture" | "type" | "classes" | "variant" | "elevation" | "component" | "square" | "as" | "raised" | "selectionColor" | "indented"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
7
7
|
export declare const SkeletonReviewButtonContainer: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
8
|
-
export declare const SkeletonReviewButton: import("@emotion/styled").StyledComponent<import("@mui/material").ButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent.js").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "color" | "children" | "sx" | "style" | "className" | "tabIndex" | "classes" | "variant" | "href" | "action" | "size" | "disabled" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "startIcon"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
9
|
-
export declare const SkeletonSendToWalletButton: import("@emotion/styled").StyledComponent<import("@mui/material").ButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent.js").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "color" | "children" | "sx" | "style" | "className" | "tabIndex" | "classes" | "variant" | "href" | "action" | "size" | "disabled" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "startIcon"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
8
|
+
export declare const SkeletonReviewButton: import("@emotion/styled").StyledComponent<import("@mui/material").ButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent.js").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "color" | "children" | "sx" | "style" | "className" | "tabIndex" | "classes" | "variant" | "href" | "action" | "size" | "disabled" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "loading" | "loadingIndicator" | "loadingPosition" | "startIcon"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
9
|
+
export declare const SkeletonSendToWalletButton: import("@emotion/styled").StyledComponent<import("@mui/material").ButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent.js").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "color" | "children" | "sx" | "style" | "className" | "tabIndex" | "classes" | "variant" | "href" | "action" | "size" | "disabled" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "loading" | "loadingIndicator" | "loadingPosition" | "startIcon"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
10
10
|
export declare const SkeletonPoweredByContainer: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
11
11
|
export declare const SkeletonHeaderContainer: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
@@ -17,32 +17,41 @@ export const Step = ({ step, fromToken, toToken, impactToken, toAddress }) => {
|
|
|
17
17
|
const { getAddressLink } = useExplorer();
|
|
18
18
|
const stepHasError = step.execution?.process.some((process) => process.status === 'FAILED');
|
|
19
19
|
const getCardTitle = () => {
|
|
20
|
+
const hasBridgeStep = step.includedSteps.some((step) => step.type === 'cross');
|
|
21
|
+
const hasSwapStep = step.includedSteps.some((step) => step.type === 'swap');
|
|
22
|
+
const hasCustomStep = step.includedSteps.some((step) => step.type === 'custom');
|
|
23
|
+
const isCustomVariant = hasCustomStep && subvariant === 'custom';
|
|
20
24
|
switch (step.type) {
|
|
21
25
|
case 'lifi': {
|
|
22
|
-
const hasBridgeStep = step.includedSteps.some((step) => step.type === 'cross');
|
|
23
|
-
const hasSwapStep = step.includedSteps.some((step) => step.type === 'swap');
|
|
24
26
|
if (hasBridgeStep && hasSwapStep) {
|
|
25
|
-
return
|
|
27
|
+
return isCustomVariant
|
|
26
28
|
? subvariantOptions?.custom === 'deposit'
|
|
27
29
|
? t('main.stepBridgeAndDeposit')
|
|
28
30
|
: t('main.stepBridgeAndBuy')
|
|
29
31
|
: t('main.stepSwapAndBridge');
|
|
30
32
|
}
|
|
31
33
|
if (hasBridgeStep) {
|
|
32
|
-
return
|
|
34
|
+
return isCustomVariant
|
|
33
35
|
? subvariantOptions?.custom === 'deposit'
|
|
34
36
|
? t('main.stepBridgeAndDeposit')
|
|
35
37
|
: t('main.stepBridgeAndBuy')
|
|
36
38
|
: t('main.stepBridge');
|
|
37
39
|
}
|
|
38
|
-
|
|
40
|
+
if (hasSwapStep) {
|
|
41
|
+
return isCustomVariant
|
|
42
|
+
? subvariantOptions?.custom === 'deposit'
|
|
43
|
+
? t('main.stepSwapAndDeposit')
|
|
44
|
+
: t('main.stepSwapAndBuy')
|
|
45
|
+
: t('main.stepSwap');
|
|
46
|
+
}
|
|
47
|
+
return isCustomVariant
|
|
39
48
|
? subvariantOptions?.custom === 'deposit'
|
|
40
|
-
? t('main.
|
|
41
|
-
: t('main.
|
|
49
|
+
? t('main.stepDeposit')
|
|
50
|
+
: t('main.stepBuy')
|
|
42
51
|
: t('main.stepSwap');
|
|
43
52
|
}
|
|
44
53
|
default:
|
|
45
|
-
return
|
|
54
|
+
return isCustomVariant
|
|
46
55
|
? subvariantOptions?.custom === 'deposit'
|
|
47
56
|
? t('main.stepDeposit')
|
|
48
57
|
: t('main.stepBuy')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Step.js","sourceRoot":"","sources":["../../../../src/components/Step/Step.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAA;AACnC,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAA;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAA;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,6CAA6C,CAAA;AACzE,OAAO,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAA;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,kDAAkD,CAAA;AAClF,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAA;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,C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