@lifi/widget 3.0.1 → 3.1.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 +18 -2
- package/README.md +24 -5
- package/_esm/components/Card/CardIconButton.js +1 -0
- package/_esm/components/Card/CardIconButton.js.map +1 -1
- package/_esm/components/Card/CardLabel.d.ts +1 -1
- package/_esm/components/Card/CardLabel.js +8 -12
- package/_esm/components/Card/CardLabel.js.map +1 -1
- package/_esm/components/ChainSelect/ChainSelect.js +1 -1
- package/_esm/components/ChainSelect/ChainSelect.js.map +1 -1
- package/_esm/components/FeeBreakdownTooltip.d.ts +12 -0
- package/_esm/components/FeeBreakdownTooltip.js +13 -0
- package/_esm/components/FeeBreakdownTooltip.js.map +1 -0
- package/_esm/components/Header/CloseDrawerButton.js +1 -1
- package/_esm/components/Header/CloseDrawerButton.js.map +1 -1
- package/_esm/components/Header/SettingsButton.js +1 -1
- package/_esm/components/Header/SettingsButton.js.map +1 -1
- package/_esm/components/Header/TransactionHistoryButton.js +1 -1
- package/_esm/components/Header/TransactionHistoryButton.js.map +1 -1
- package/_esm/components/IconTypography.d.ts +3 -0
- package/_esm/components/IconTypography.js +8 -0
- package/_esm/components/IconTypography.js.map +1 -0
- package/_esm/components/PoweredBy/PoweredBy.js +1 -1
- package/_esm/components/PoweredBy/PoweredBy.js.map +1 -1
- package/_esm/components/ProgressToNextUpdate.js +1 -1
- package/_esm/components/ProgressToNextUpdate.js.map +1 -1
- package/_esm/components/RouteCard/RouteCard.js +7 -16
- package/_esm/components/RouteCard/RouteCard.js.map +1 -1
- package/_esm/components/RouteCard/RouteCard.style.d.ts +0 -3
- package/_esm/components/RouteCard/RouteCard.style.js +1 -7
- package/_esm/components/RouteCard/RouteCard.style.js.map +1 -1
- package/_esm/components/RouteCard/RouteCardEssentials.js +13 -14
- package/_esm/components/RouteCard/RouteCardEssentials.js.map +1 -1
- package/_esm/components/RouteCard/RouteCardEssentialsExpanded.js +4 -20
- package/_esm/components/RouteCard/RouteCardEssentialsExpanded.js.map +1 -1
- package/_esm/components/RouteCard/types.d.ts +1 -6
- package/_esm/components/Routes/RoutesExpanded.js +2 -4
- package/_esm/components/Routes/RoutesExpanded.js.map +1 -1
- package/_esm/components/SendToWallet/SendToWalletExpandButton.js +1 -1
- package/_esm/components/SendToWallet/SendToWalletExpandButton.js.map +1 -1
- package/_esm/components/Step/Step.d.ts +1 -0
- package/_esm/components/Step/Step.js +2 -2
- package/_esm/components/Step/Step.js.map +1 -1
- package/_esm/components/Step/StepList.js +16 -7
- package/_esm/components/Step/StepList.js.map +1 -1
- package/_esm/components/Step/StepTimer.js +3 -3
- package/_esm/components/Step/StepTimer.js.map +1 -1
- package/_esm/components/StepActions/StepActions.js +5 -4
- package/_esm/components/StepActions/StepActions.js.map +1 -1
- package/_esm/components/Token/Token.d.ts +2 -0
- package/_esm/components/Token/Token.js +22 -8
- package/_esm/components/Token/Token.js.map +1 -1
- package/_esm/components/Token/Token.style.js +1 -0
- package/_esm/components/Token/Token.style.js.map +1 -1
- package/_esm/components/TokenRate.d.ts +7 -0
- package/_esm/components/TokenRate.js +41 -0
- package/_esm/components/TokenRate.js.map +1 -0
- package/_esm/components/TransactionDetails.d.ts +7 -0
- package/_esm/components/TransactionDetails.js +46 -0
- package/_esm/components/TransactionDetails.js.map +1 -0
- package/_esm/config/version.d.ts +1 -1
- package/_esm/config/version.js +1 -1
- package/_esm/hooks/timer/useInterval.d.ts +1 -0
- package/_esm/hooks/timer/useInterval.js +18 -0
- package/_esm/hooks/timer/useInterval.js.map +1 -0
- package/_esm/hooks/timer/useTimer.d.ts +18 -0
- package/_esm/hooks/timer/useTimer.js +61 -0
- package/_esm/hooks/timer/useTimer.js.map +1 -0
- package/_esm/hooks/timer/utils.d.ts +11 -0
- package/_esm/hooks/timer/utils.js +46 -0
- package/_esm/hooks/timer/utils.js.map +1 -0
- package/_esm/hooks/useAccount.js +4 -5
- package/_esm/hooks/useAccount.js.map +1 -1
- package/_esm/hooks/useAvailableChains.js +1 -0
- package/_esm/hooks/useAvailableChains.js.map +1 -1
- package/_esm/hooks/useGasRecommendation.js +1 -0
- package/_esm/hooks/useGasRecommendation.js.map +1 -1
- package/_esm/hooks/useRoutes.d.ts +4 -2
- package/_esm/hooks/useRoutes.js +17 -10
- package/_esm/hooks/useRoutes.js.map +1 -1
- package/_esm/hooks/useTokens.js +1 -0
- package/_esm/hooks/useTokens.js.map +1 -1
- package/_esm/hooks/useTools.js +1 -0
- package/_esm/hooks/useTools.js.map +1 -1
- package/_esm/hooks/useTransactionDetails.d.ts +1 -1
- package/_esm/hooks/useTransactionDetails.js +1 -1
- package/_esm/hooks/useTransactionDetails.js.map +1 -1
- package/_esm/hooks/useTransactionHistory.js.map +1 -1
- package/_esm/i18n/en.json +14 -20
- package/_esm/i18n/index.js +15 -15
- package/_esm/i18n/index.js.map +1 -1
- package/_esm/index.d.ts +2 -1
- package/_esm/index.js +1 -4
- package/_esm/index.js.map +1 -1
- package/_esm/pages/MainPage/ReviewButton.js +2 -4
- package/_esm/pages/MainPage/ReviewButton.js.map +1 -1
- package/_esm/pages/RoutesPage/RoutesPage.js +2 -4
- package/_esm/pages/RoutesPage/RoutesPage.js.map +1 -1
- package/_esm/pages/SelectEnabledToolsPage.js +1 -1
- package/_esm/pages/SelectEnabledToolsPage.js.map +1 -1
- package/_esm/pages/SendToWallet/SendToWalletPage.js +1 -1
- package/_esm/pages/SendToWallet/SendToWalletPage.js.map +1 -1
- package/_esm/pages/SettingsPage/ThemeSettings.js +1 -1
- package/_esm/pages/SettingsPage/ThemeSettings.js.map +1 -1
- package/_esm/pages/TransactionDetailsPage/TransactionDetailsPage.js +5 -7
- package/_esm/pages/TransactionDetailsPage/TransactionDetailsPage.js.map +1 -1
- package/_esm/pages/TransactionHistoryPage/TransactionHistoryItem.js +2 -2
- package/_esm/pages/TransactionHistoryPage/TransactionHistoryItem.js.map +1 -1
- package/_esm/pages/TransactionPage/ExchangeRateBottomSheet.js +2 -2
- package/_esm/pages/TransactionPage/ExchangeRateBottomSheet.js.map +1 -1
- package/_esm/pages/TransactionPage/RouteTracker.d.ts +7 -0
- package/_esm/pages/TransactionPage/RouteTracker.js +39 -0
- package/_esm/pages/TransactionPage/RouteTracker.js.map +1 -0
- package/_esm/pages/TransactionPage/StartTransactionButton.d.ts +0 -1
- package/_esm/pages/TransactionPage/StartTransactionButton.js +0 -9
- package/_esm/pages/TransactionPage/StartTransactionButton.js.map +1 -1
- package/_esm/pages/TransactionPage/TransactionPage.js +10 -21
- package/_esm/pages/TransactionPage/TransactionPage.js.map +1 -1
- package/_esm/pages/TransactionPage/types.d.ts +0 -1
- package/_esm/providers/I18nProvider/I18nProvider.js +2 -0
- package/_esm/providers/I18nProvider/I18nProvider.js.map +1 -1
- package/_esm/providers/I18nProvider/currencyExtendedFormatter.d.ts +1 -0
- package/_esm/providers/I18nProvider/currencyExtendedFormatter.js +13 -0
- package/_esm/providers/I18nProvider/currencyExtendedFormatter.js.map +1 -0
- package/_esm/providers/WalletProvider/EVMBaseProvider.js +18 -12
- package/_esm/providers/WalletProvider/EVMBaseProvider.js.map +1 -1
- package/_esm/stores/routes/createRouteExecutionStore.js +2 -2
- package/_esm/stores/routes/createRouteExecutionStore.js.map +1 -1
- package/_esm/stores/routes/types.d.ts +1 -1
- package/_esm/stores/routes/useSetExecutableRoute.d.ts +1 -1
- package/_esm/themes/createTheme.js +6 -0
- package/_esm/themes/createTheme.js.map +1 -1
- package/_esm/types/widget.d.ts +1 -2
- package/_esm/utils/converters.js +5 -13
- package/_esm/utils/converters.js.map +1 -1
- package/_esm/utils/fees.d.ts +3 -3
- package/_esm/utils/fees.js +18 -13
- package/_esm/utils/fees.js.map +1 -1
- package/_esm/utils/format.d.ts +13 -4
- package/_esm/utils/format.js +51 -13
- package/_esm/utils/format.js.map +1 -1
- package/components/Card/CardIconButton.tsx +1 -0
- package/components/Card/CardLabel.tsx +13 -29
- package/components/ChainSelect/ChainSelect.tsx +1 -9
- package/components/FeeBreakdownTooltip.tsx +66 -0
- package/components/Header/CloseDrawerButton.tsx +1 -1
- package/components/Header/SettingsButton.tsx +1 -1
- package/components/Header/TransactionHistoryButton.tsx +1 -1
- package/components/IconTypography.ts +9 -0
- package/components/PoweredBy/PoweredBy.tsx +1 -1
- package/components/ProgressToNextUpdate.tsx +0 -3
- package/components/RouteCard/RouteCard.style.ts +1 -9
- package/components/RouteCard/RouteCard.tsx +15 -71
- package/components/RouteCard/RouteCardEssentials.tsx +52 -81
- package/components/RouteCard/RouteCardEssentialsExpanded.tsx +17 -107
- package/components/RouteCard/types.ts +1 -7
- package/components/Routes/RoutesExpanded.tsx +3 -4
- package/components/SendToWallet/SendToWalletExpandButton.tsx +1 -6
- package/components/Step/Step.tsx +11 -2
- package/components/Step/StepList.tsx +19 -10
- package/components/Step/StepTimer.tsx +9 -6
- package/components/StepActions/StepActions.tsx +11 -14
- package/components/Token/Token.style.tsx +1 -0
- package/components/Token/Token.tsx +49 -9
- package/components/TokenRate.tsx +79 -0
- package/components/TransactionDetails.tsx +182 -0
- package/config/version.ts +1 -1
- package/hooks/timer/useInterval.ts +21 -0
- package/hooks/timer/useTimer.ts +91 -0
- package/hooks/timer/utils.ts +54 -0
- package/hooks/useAccount.ts +8 -5
- package/hooks/useAvailableChains.ts +2 -1
- package/hooks/useGasRecommendation.ts +1 -0
- package/hooks/useRoutes.ts +23 -13
- package/hooks/useTokens.ts +1 -0
- package/hooks/useTools.ts +2 -1
- package/hooks/useTransactionDetails.ts +3 -3
- package/hooks/useTransactionHistory.ts +1 -1
- package/i18n/en.json +14 -20
- package/i18n/index.ts +15 -15
- package/index.ts +2 -5
- package/package.json +15 -16
- package/pages/MainPage/ReviewButton.tsx +2 -4
- package/pages/RoutesPage/RoutesPage.tsx +3 -4
- package/pages/SelectEnabledToolsPage.tsx +1 -1
- package/pages/SendToWallet/SendToWalletPage.tsx +1 -1
- package/pages/SettingsPage/ThemeSettings.tsx +1 -1
- package/pages/TransactionDetailsPage/TransactionDetailsPage.tsx +9 -20
- package/pages/TransactionHistoryPage/TransactionHistoryItem.tsx +3 -5
- package/pages/TransactionPage/ExchangeRateBottomSheet.tsx +0 -2
- package/pages/TransactionPage/RouteTracker.tsx +68 -0
- package/pages/TransactionPage/StartTransactionButton.tsx +0 -24
- package/pages/TransactionPage/TransactionPage.tsx +21 -48
- package/pages/TransactionPage/types.ts +0 -1
- package/providers/I18nProvider/I18nProvider.tsx +6 -0
- package/providers/I18nProvider/currencyExtendedFormatter.ts +15 -0
- package/providers/WalletProvider/EVMBaseProvider.tsx +13 -7
- package/stores/routes/createRouteExecutionStore.ts +2 -2
- package/stores/routes/types.ts +1 -1
- package/themes/createTheme.ts +6 -0
- package/types/widget.ts +1 -2
- package/utils/converters.ts +5 -13
- package/utils/fees.ts +23 -24
- package/utils/format.ts +67 -20
- package/_esm/components/Insurance/Insurance.d.ts +0 -2
- package/_esm/components/Insurance/Insurance.js +0 -8
- package/_esm/components/Insurance/Insurance.js.map +0 -1
- package/_esm/components/Insurance/InsuranceCard.d.ts +0 -2
- package/_esm/components/Insurance/InsuranceCard.js +0 -36
- package/_esm/components/Insurance/InsuranceCard.js.map +0 -1
- package/_esm/components/Insurance/InsuranceCollapsed.d.ts +0 -2
- package/_esm/components/Insurance/InsuranceCollapsed.js +0 -29
- package/_esm/components/Insurance/InsuranceCollapsed.js.map +0 -1
- package/_esm/components/Insurance/types.d.ts +0 -19
- package/_esm/components/Insurance/types.js +0 -2
- package/_esm/components/Insurance/types.js.map +0 -1
- package/_esm/components/StepActions/StepFeeBreakdown.d.ts +0 -4
- package/_esm/components/StepActions/StepFeeBreakdown.js +0 -42
- package/_esm/components/StepActions/StepFeeBreakdown.js.map +0 -1
- package/_esm/icons/InsuraceLogo.d.ts +0 -2
- package/_esm/icons/InsuraceLogo.js +0 -8
- package/_esm/icons/InsuraceLogo.js.map +0 -1
- package/components/Insurance/Insurance.tsx +0 -22
- package/components/Insurance/InsuranceCard.tsx +0 -119
- package/components/Insurance/InsuranceCollapsed.tsx +0 -59
- package/components/Insurance/types.ts +0 -24
- package/components/StepActions/StepFeeBreakdown.tsx +0 -108
- package/icons/InsuraceLogo.tsx +0 -46
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { Route } from '@lifi/sdk';
|
|
2
|
+
import { Box, Tooltip, Typography } from '@mui/material';
|
|
3
|
+
import type { TFunction } from 'i18next';
|
|
4
|
+
import type { ReactElement } from 'react';
|
|
5
|
+
import { useTranslation } from 'react-i18next';
|
|
6
|
+
import { formatUnits } from 'viem';
|
|
7
|
+
import type { FeesBreakdown } from '../utils/fees.js';
|
|
8
|
+
import { getFeeCostsBreakdown, getGasCostsBreakdown } from '../utils/fees.js';
|
|
9
|
+
|
|
10
|
+
export interface FeeBreakdownTooltipProps {
|
|
11
|
+
route: Route;
|
|
12
|
+
gasCosts?: FeesBreakdown[];
|
|
13
|
+
feeCosts?: FeesBreakdown[];
|
|
14
|
+
children: ReactElement<any, any>;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const FeeBreakdownTooltip: React.FC<FeeBreakdownTooltipProps> = ({
|
|
18
|
+
route,
|
|
19
|
+
gasCosts,
|
|
20
|
+
feeCosts,
|
|
21
|
+
children,
|
|
22
|
+
}) => {
|
|
23
|
+
const { t } = useTranslation();
|
|
24
|
+
const _gasCosts = gasCosts ?? getGasCostsBreakdown(route);
|
|
25
|
+
const _feeCosts = feeCosts ?? getFeeCostsBreakdown(route, false);
|
|
26
|
+
return (
|
|
27
|
+
<Tooltip
|
|
28
|
+
title={
|
|
29
|
+
<Box>
|
|
30
|
+
{_gasCosts.length ? (
|
|
31
|
+
<Box>
|
|
32
|
+
{t('main.fees.network')}
|
|
33
|
+
{getFeeBreakdownTypography(_gasCosts, t)}
|
|
34
|
+
</Box>
|
|
35
|
+
) : null}
|
|
36
|
+
{_feeCosts.length ? (
|
|
37
|
+
<Box mt={0.5}>
|
|
38
|
+
{t('main.fees.provider')}
|
|
39
|
+
{getFeeBreakdownTypography(_feeCosts, t)}
|
|
40
|
+
</Box>
|
|
41
|
+
) : null}
|
|
42
|
+
</Box>
|
|
43
|
+
}
|
|
44
|
+
sx={{ cursor: 'help' }}
|
|
45
|
+
>
|
|
46
|
+
{children}
|
|
47
|
+
</Tooltip>
|
|
48
|
+
);
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export const getFeeBreakdownTypography = (
|
|
52
|
+
fees: FeesBreakdown[],
|
|
53
|
+
t: TFunction,
|
|
54
|
+
) =>
|
|
55
|
+
fees.map((fee, index) => (
|
|
56
|
+
<Typography
|
|
57
|
+
fontSize={12}
|
|
58
|
+
fontWeight="500"
|
|
59
|
+
color="inherit"
|
|
60
|
+
key={`${fee.token.address}${index}`}
|
|
61
|
+
>
|
|
62
|
+
{t(`format.currency`, { value: fee.amountUSD })} (
|
|
63
|
+
{parseFloat(formatUnits(fee.amount, fee.token.decimals))?.toFixed(9)}{' '}
|
|
64
|
+
{fee.token.symbol})
|
|
65
|
+
</Typography>
|
|
66
|
+
));
|
|
@@ -21,7 +21,7 @@ export const CloseDrawerButton = ({ header }: CloseDrawerButtonProps) => {
|
|
|
21
21
|
const showInWalletHeader = header === 'wallet' && subvariant !== 'split';
|
|
22
22
|
|
|
23
23
|
return showInNavigationHeader || showInWalletHeader ? (
|
|
24
|
-
<Tooltip title={t('button.close')}
|
|
24
|
+
<Tooltip title={t('button.close')}>
|
|
25
25
|
<IconButton size="medium" onClick={closeDrawer}>
|
|
26
26
|
<CloseRounded />
|
|
27
27
|
</IconButton>
|
|
@@ -27,7 +27,7 @@ export const SettingsButton = () => {
|
|
|
27
27
|
: t(`header.settings`);
|
|
28
28
|
|
|
29
29
|
return (
|
|
30
|
-
<Tooltip title={tooltipMessage}
|
|
30
|
+
<Tooltip title={tooltipMessage}>
|
|
31
31
|
<SettingsIconButton
|
|
32
32
|
size="medium"
|
|
33
33
|
onClick={() => navigate(navigationRoutes.settings)}
|
|
@@ -9,7 +9,7 @@ export const TransactionHistoryButton = () => {
|
|
|
9
9
|
const { navigate } = useNavigateBack();
|
|
10
10
|
|
|
11
11
|
return (
|
|
12
|
-
<Tooltip title={t(`header.transactionHistory`)}
|
|
12
|
+
<Tooltip title={t(`header.transactionHistory`)}>
|
|
13
13
|
<IconButton
|
|
14
14
|
size="medium"
|
|
15
15
|
onClick={() => navigate(navigationRoutes.transactionHistory)}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Typography, alpha, styled } from '@mui/material';
|
|
2
|
+
|
|
3
|
+
export const IconTypography = styled(Typography)(({ theme }) => ({
|
|
4
|
+
color:
|
|
5
|
+
theme.palette.mode === 'light'
|
|
6
|
+
? alpha(theme.palette.common.black, 0.32)
|
|
7
|
+
: alpha(theme.palette.common.white, 0.4),
|
|
8
|
+
lineHeight: 0,
|
|
9
|
+
}));
|
|
@@ -14,7 +14,7 @@ export const PoweredBy: React.FC = () => {
|
|
|
14
14
|
justifyContent: 'flex-end',
|
|
15
15
|
}}
|
|
16
16
|
>
|
|
17
|
-
<Tooltip title={`v${version}`}
|
|
17
|
+
<Tooltip title={`v${version}`} enterDelay={1000}>
|
|
18
18
|
<Link
|
|
19
19
|
href="https://li.fi"
|
|
20
20
|
target="_blank"
|
|
@@ -1,12 +1,4 @@
|
|
|
1
|
-
import { Box,
|
|
2
|
-
|
|
3
|
-
export const IconTypography = styled(Typography)(({ theme }) => ({
|
|
4
|
-
color:
|
|
5
|
-
theme.palette.mode === 'light'
|
|
6
|
-
? alpha(theme.palette.common.black, 0.32)
|
|
7
|
-
: alpha(theme.palette.common.white, 0.4),
|
|
8
|
-
lineHeight: 0,
|
|
9
|
-
}));
|
|
1
|
+
import { Box, styled } from '@mui/material';
|
|
10
2
|
|
|
11
3
|
export const TokenContainer = styled(Box)(({ theme }) => ({
|
|
12
4
|
display: 'flex',
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
import type { TokenAmount } from '@lifi/sdk';
|
|
2
|
-
import { ExpandLess, ExpandMore
|
|
3
|
-
import
|
|
4
|
-
import { Box, Collapse, Tooltip, Typography } from '@mui/material';
|
|
2
|
+
import { ExpandLess, ExpandMore } from '@mui/icons-material';
|
|
3
|
+
import { Box, Collapse } from '@mui/material';
|
|
5
4
|
import type { MouseEventHandler } from 'react';
|
|
6
5
|
import { useState } from 'react';
|
|
7
|
-
import {
|
|
6
|
+
import { useTranslation } from 'react-i18next';
|
|
8
7
|
import { useWidgetConfig } from '../../providers/WidgetProvider/WidgetProvider.js';
|
|
9
|
-
import { formatTokenAmount } from '../../utils/format.js';
|
|
10
8
|
import type { CardProps } from '../Card/Card.js';
|
|
11
9
|
import { Card } from '../Card/Card.js';
|
|
12
10
|
import { CardIconButton } from '../Card/CardIconButton.js';
|
|
13
11
|
import { CardLabel, CardLabelTypography } from '../Card/CardLabel.js';
|
|
14
|
-
import type { InsuredAmount } from '../Insurance/types.js';
|
|
15
12
|
import { StepActions } from '../StepActions/StepActions.js';
|
|
16
13
|
import { Token } from '../Token/Token.js';
|
|
17
14
|
import { TokenContainer } from './RouteCard.style.js';
|
|
@@ -37,12 +34,14 @@ export const RouteCard: React.FC<
|
|
|
37
34
|
setCardExpanded((expanded) => !expanded);
|
|
38
35
|
};
|
|
39
36
|
|
|
40
|
-
const insurable = route.insurance?.state === 'INSURABLE';
|
|
41
|
-
|
|
42
37
|
const token: TokenAmount =
|
|
43
38
|
subvariant === 'custom'
|
|
44
39
|
? { ...route.fromToken, amount: BigInt(route.fromAmount) }
|
|
45
40
|
: { ...route.toToken, amount: BigInt(route.toAmount) };
|
|
41
|
+
const impactToken: TokenAmount | undefined =
|
|
42
|
+
subvariant !== 'custom'
|
|
43
|
+
? { ...route.fromToken, amount: BigInt(route.fromAmount) }
|
|
44
|
+
: undefined;
|
|
46
45
|
|
|
47
46
|
const tags = route.tags?.filter(
|
|
48
47
|
(tag) => tag === 'CHEAPEST' || tag === 'FASTEST',
|
|
@@ -50,7 +49,7 @@ export const RouteCard: React.FC<
|
|
|
50
49
|
|
|
51
50
|
const cardContent = (
|
|
52
51
|
<Box flex={1}>
|
|
53
|
-
{subvariant !== 'refuel' &&
|
|
52
|
+
{subvariant !== 'refuel' && route.tags?.length ? (
|
|
54
53
|
<Box display="flex" alignItems="center" mb={2}>
|
|
55
54
|
{tags?.length ? (
|
|
56
55
|
<CardLabel type={active ? 'active' : undefined}>
|
|
@@ -59,33 +58,22 @@ export const RouteCard: React.FC<
|
|
|
59
58
|
</CardLabelTypography>
|
|
60
59
|
</CardLabel>
|
|
61
60
|
) : null}
|
|
62
|
-
{insurable ? (
|
|
63
|
-
<InsuranceTooltip
|
|
64
|
-
insuredAmount={formatTokenAmount(
|
|
65
|
-
BigInt(route.toAmountMin),
|
|
66
|
-
route.toToken.decimals,
|
|
67
|
-
)}
|
|
68
|
-
insuredTokenSymbol={route.toToken.symbol}
|
|
69
|
-
>
|
|
70
|
-
<CardLabel type={'insurance'}>
|
|
71
|
-
<VerifiedUser fontSize="inherit" />
|
|
72
|
-
<CardLabelTypography type="icon">
|
|
73
|
-
{t(`main.tags.insurable`)}
|
|
74
|
-
</CardLabelTypography>
|
|
75
|
-
</CardLabel>
|
|
76
|
-
</InsuranceTooltip>
|
|
77
|
-
) : null}
|
|
78
61
|
</Box>
|
|
79
62
|
) : null}
|
|
80
63
|
<TokenContainer>
|
|
81
64
|
<Token
|
|
82
65
|
token={token}
|
|
66
|
+
impactToken={impactToken}
|
|
83
67
|
step={route.steps[0]}
|
|
84
68
|
stepVisible={!cardExpanded}
|
|
85
69
|
/>
|
|
86
70
|
{!defaulExpanded ? (
|
|
87
71
|
<CardIconButton onClick={handleExpand} size="small">
|
|
88
|
-
{cardExpanded ?
|
|
72
|
+
{cardExpanded ? (
|
|
73
|
+
<ExpandLess fontSize="inherit" />
|
|
74
|
+
) : (
|
|
75
|
+
<ExpandMore fontSize="inherit" />
|
|
76
|
+
)}
|
|
89
77
|
</CardIconButton>
|
|
90
78
|
) : null}
|
|
91
79
|
</TokenContainer>
|
|
@@ -95,9 +83,7 @@ export const RouteCard: React.FC<
|
|
|
95
83
|
))}
|
|
96
84
|
<RouteCardEssentialsExpanded route={route} />
|
|
97
85
|
</Collapse>
|
|
98
|
-
<
|
|
99
|
-
<RouteCardEssentials route={route} />
|
|
100
|
-
</Collapse>
|
|
86
|
+
<RouteCardEssentials route={route} />
|
|
101
87
|
</Box>
|
|
102
88
|
);
|
|
103
89
|
|
|
@@ -114,45 +100,3 @@ export const RouteCard: React.FC<
|
|
|
114
100
|
</Card>
|
|
115
101
|
);
|
|
116
102
|
};
|
|
117
|
-
|
|
118
|
-
const InsuranceTooltip: React.FC<
|
|
119
|
-
InsuredAmount & Pick<TooltipProps, 'children'>
|
|
120
|
-
> = ({ insuredAmount, insuredTokenSymbol, children }) => {
|
|
121
|
-
const { t } = useTranslation();
|
|
122
|
-
return (
|
|
123
|
-
<Tooltip
|
|
124
|
-
title={
|
|
125
|
-
<Box component="span">
|
|
126
|
-
<Typography fontSize={12} fontWeight="500">
|
|
127
|
-
<Trans
|
|
128
|
-
i18nKey="insurance.insure"
|
|
129
|
-
values={{
|
|
130
|
-
amount: insuredAmount,
|
|
131
|
-
tokenSymbol: insuredTokenSymbol,
|
|
132
|
-
}}
|
|
133
|
-
components={[<strong />]}
|
|
134
|
-
/>
|
|
135
|
-
</Typography>
|
|
136
|
-
<Box
|
|
137
|
-
sx={{
|
|
138
|
-
listStyleType: 'disc',
|
|
139
|
-
pl: 2,
|
|
140
|
-
}}
|
|
141
|
-
>
|
|
142
|
-
<Typography fontSize={12} fontWeight="500" display="list-item">
|
|
143
|
-
{t('insurance.bridgeExploits')}
|
|
144
|
-
</Typography>
|
|
145
|
-
<Typography fontSize={12} fontWeight="500" display="list-item">
|
|
146
|
-
{t('insurance.slippageError')}
|
|
147
|
-
</Typography>
|
|
148
|
-
</Box>
|
|
149
|
-
</Box>
|
|
150
|
-
}
|
|
151
|
-
placement="top"
|
|
152
|
-
enterDelay={400}
|
|
153
|
-
arrow
|
|
154
|
-
>
|
|
155
|
-
{children}
|
|
156
|
-
</Tooltip>
|
|
157
|
-
);
|
|
158
|
-
};
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
import { AccessTimeFilled,
|
|
1
|
+
import { AccessTimeFilled, LocalGasStationRounded } from '@mui/icons-material';
|
|
2
2
|
import { Box, Tooltip, Typography } from '@mui/material';
|
|
3
|
-
import type { TFunction } from 'i18next';
|
|
4
3
|
import { useTranslation } from 'react-i18next';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
} from '
|
|
10
|
-
import { IconTypography } from './RouteCard.style.js';
|
|
11
|
-
import type { FeesBreakdown, RouteCardEssentialsProps } from './types.js';
|
|
4
|
+
import { getFeeCostsBreakdown } from '../../utils/fees.js';
|
|
5
|
+
import { FeeBreakdownTooltip } from '../FeeBreakdownTooltip.js';
|
|
6
|
+
import { IconTypography } from '../IconTypography.js';
|
|
7
|
+
import { TokenRate } from '../TokenRate.js';
|
|
8
|
+
import type { RouteCardEssentialsProps } from './types.js';
|
|
12
9
|
|
|
13
10
|
export const RouteCardEssentials: React.FC<RouteCardEssentialsProps> = ({
|
|
14
11
|
route,
|
|
@@ -19,83 +16,57 @@ export const RouteCardEssentials: React.FC<RouteCardEssentialsProps> = ({
|
|
|
19
16
|
.map((step) => step.estimate.executionDuration)
|
|
20
17
|
.reduce((duration, x) => duration + x, 0) / 60,
|
|
21
18
|
);
|
|
22
|
-
const gasCostUSD = parseFloat(route.gasCostUSD
|
|
23
|
-
const gasCosts = getGasCostsBreakdown(route);
|
|
19
|
+
const gasCostUSD = parseFloat(route.gasCostUSD || '0');
|
|
24
20
|
const feeCosts = getFeeCostsBreakdown(route, false);
|
|
25
21
|
const fees =
|
|
26
22
|
gasCostUSD + feeCosts.reduce((sum, feeCost) => sum + feeCost.amountUSD, 0);
|
|
27
23
|
return (
|
|
28
|
-
<Box
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
24
|
+
<Box
|
|
25
|
+
display="flex"
|
|
26
|
+
alignItems="center"
|
|
27
|
+
justifyContent={'space-between'}
|
|
28
|
+
flex={1}
|
|
29
|
+
mt={2}
|
|
30
|
+
>
|
|
31
|
+
<TokenRate route={route} />
|
|
32
|
+
<Box display="flex" alignItems="center">
|
|
33
|
+
<FeeBreakdownTooltip route={route} feeCosts={feeCosts}>
|
|
34
|
+
<Box display="flex" mr={1.5} alignItems="center">
|
|
35
|
+
<IconTypography mr={0.5} fontSize={16}>
|
|
36
|
+
<LocalGasStationRounded fontSize="inherit" />
|
|
37
|
+
</IconTypography>
|
|
38
|
+
<Typography
|
|
39
|
+
fontSize={14}
|
|
40
|
+
color="text.primary"
|
|
41
|
+
fontWeight="500"
|
|
42
|
+
lineHeight={1}
|
|
43
|
+
>
|
|
44
|
+
{t(`format.currency`, {
|
|
45
|
+
value: fees,
|
|
46
|
+
})}
|
|
47
|
+
</Typography>
|
|
48
|
+
</Box>
|
|
49
|
+
</FeeBreakdownTooltip>
|
|
50
|
+
<Tooltip title={t(`tooltip.estimatedTime`)} sx={{ cursor: 'help' }}>
|
|
51
|
+
<Box display="flex" alignItems="center">
|
|
52
|
+
<IconTypography mr={0.5} fontSize={16}>
|
|
53
|
+
<AccessTimeFilled fontSize="inherit" />
|
|
54
|
+
</IconTypography>
|
|
55
|
+
<Typography
|
|
56
|
+
fontSize={14}
|
|
57
|
+
color="text.primary"
|
|
58
|
+
fontWeight="500"
|
|
59
|
+
lineHeight={1}
|
|
60
|
+
>
|
|
61
|
+
{executionTimeMinutes.toLocaleString(i18n.language, {
|
|
62
|
+
style: 'unit',
|
|
63
|
+
unit: 'minute',
|
|
64
|
+
unitDisplay: 'narrow',
|
|
65
|
+
})}
|
|
66
|
+
</Typography>
|
|
40
67
|
</Box>
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
enterDelay={400}
|
|
44
|
-
arrow
|
|
45
|
-
>
|
|
46
|
-
<Box display="flex" alignItems="center">
|
|
47
|
-
<IconTypography mr={0.5}>
|
|
48
|
-
<MonetizationOn fontSize="small" />
|
|
49
|
-
</IconTypography>
|
|
50
|
-
<Typography
|
|
51
|
-
fontSize={14}
|
|
52
|
-
color="text.primary"
|
|
53
|
-
fontWeight="500"
|
|
54
|
-
lineHeight={1}
|
|
55
|
-
>
|
|
56
|
-
{t(`format.currency`, {
|
|
57
|
-
value: fees,
|
|
58
|
-
})}
|
|
59
|
-
</Typography>
|
|
60
|
-
</Box>
|
|
61
|
-
</Tooltip>
|
|
62
|
-
<Tooltip
|
|
63
|
-
title={t(`tooltip.estimatedTime`)}
|
|
64
|
-
placement="top"
|
|
65
|
-
enterDelay={400}
|
|
66
|
-
arrow
|
|
67
|
-
>
|
|
68
|
-
<Box display="flex" alignItems="center">
|
|
69
|
-
<IconTypography mr={0.5}>
|
|
70
|
-
<AccessTimeFilled fontSize="small" />
|
|
71
|
-
</IconTypography>
|
|
72
|
-
<Typography
|
|
73
|
-
fontSize={14}
|
|
74
|
-
color="text.primary"
|
|
75
|
-
fontWeight="500"
|
|
76
|
-
lineHeight={1}
|
|
77
|
-
>
|
|
78
|
-
{new Intl.NumberFormat(i18n.language, {
|
|
79
|
-
style: 'unit',
|
|
80
|
-
unit: 'minute',
|
|
81
|
-
unitDisplay: 'narrow',
|
|
82
|
-
}).format(executionTimeMinutes)}
|
|
83
|
-
</Typography>
|
|
84
|
-
</Box>
|
|
85
|
-
</Tooltip>
|
|
68
|
+
</Tooltip>
|
|
69
|
+
</Box>
|
|
86
70
|
</Box>
|
|
87
71
|
);
|
|
88
72
|
};
|
|
89
|
-
|
|
90
|
-
const getFeeBreakdownTypography = (fees: FeesBreakdown[], t: TFunction) =>
|
|
91
|
-
fees.map((fee, index) => (
|
|
92
|
-
<Typography
|
|
93
|
-
fontSize={12}
|
|
94
|
-
fontWeight="500"
|
|
95
|
-
key={`${fee.token.address}${index}`}
|
|
96
|
-
>
|
|
97
|
-
{t(`format.currency`, { value: fee.amountUSD })} (
|
|
98
|
-
{parseFloat(formatUnits(fee.amount, fee.token.decimals))?.toFixed(9)}{' '}
|
|
99
|
-
{fee.token.symbol})
|
|
100
|
-
</Typography>
|
|
101
|
-
));
|
|
@@ -1,100 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Layers } from '@mui/icons-material';
|
|
2
2
|
import { Box, Typography } from '@mui/material';
|
|
3
|
-
import type { TFunction } from 'i18next';
|
|
4
3
|
import { useTranslation } from 'react-i18next';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
getFeeCostsBreakdown,
|
|
8
|
-
getGasCostsBreakdown,
|
|
9
|
-
} from '../../utils/fees.js';
|
|
10
|
-
import { IconTypography } from './RouteCard.style.js';
|
|
11
|
-
import type { FeesBreakdown, RouteCardEssentialsProps } from './types.js';
|
|
4
|
+
import { IconTypography } from '../IconTypography.js';
|
|
5
|
+
import type { RouteCardEssentialsProps } from './types.js';
|
|
12
6
|
|
|
13
7
|
export const RouteCardEssentialsExpanded: React.FC<
|
|
14
8
|
RouteCardEssentialsProps
|
|
15
9
|
> = ({ route }) => {
|
|
16
|
-
const { t
|
|
17
|
-
const executionTimeMinutes = Math.ceil(
|
|
18
|
-
route.steps
|
|
19
|
-
.map((step) => step.estimate.executionDuration)
|
|
20
|
-
.reduce((duration, x) => duration + x, 0) / 60,
|
|
21
|
-
);
|
|
22
|
-
const gasCostUSD = parseFloat(route.gasCostUSD ?? '') || 0.01;
|
|
23
|
-
const gasCosts = getGasCostsBreakdown(route);
|
|
24
|
-
const feeCosts = getFeeCostsBreakdown(route, false);
|
|
25
|
-
const fees =
|
|
26
|
-
gasCostUSD + feeCosts.reduce((sum, feeCost) => sum + feeCost.amountUSD, 0);
|
|
10
|
+
const { t } = useTranslation();
|
|
27
11
|
return (
|
|
28
12
|
<Box flex={1} mt={2}>
|
|
29
|
-
<Box>
|
|
30
|
-
<Box display="flex" alignItems="center">
|
|
31
|
-
<IconTypography ml={1} mr={3}>
|
|
32
|
-
<MonetizationOn />
|
|
33
|
-
</IconTypography>
|
|
34
|
-
<Typography
|
|
35
|
-
fontSize={16}
|
|
36
|
-
color="text.primary"
|
|
37
|
-
fontWeight="600"
|
|
38
|
-
lineHeight={1.125}
|
|
39
|
-
>
|
|
40
|
-
{t(`format.currency`, {
|
|
41
|
-
value: fees,
|
|
42
|
-
})}
|
|
43
|
-
</Typography>
|
|
44
|
-
</Box>
|
|
45
|
-
<Box mt={0.5} ml={7}>
|
|
46
|
-
<Typography
|
|
47
|
-
fontSize={12}
|
|
48
|
-
color="text.secondary"
|
|
49
|
-
fontWeight="500"
|
|
50
|
-
lineHeight={1.125}
|
|
51
|
-
>
|
|
52
|
-
{t('main.fees.networkEstimated')}
|
|
53
|
-
</Typography>
|
|
54
|
-
{getFeeBreakdownTypography(gasCosts, t)}
|
|
55
|
-
{feeCosts.length ? (
|
|
56
|
-
<Box mt={0.5}>
|
|
57
|
-
<Typography
|
|
58
|
-
fontSize={12}
|
|
59
|
-
color="text.secondary"
|
|
60
|
-
fontWeight="500"
|
|
61
|
-
lineHeight={1.125}
|
|
62
|
-
>
|
|
63
|
-
{t('main.fees.providerEstimated')}
|
|
64
|
-
</Typography>
|
|
65
|
-
{getFeeBreakdownTypography(feeCosts, t)}
|
|
66
|
-
</Box>
|
|
67
|
-
) : null}
|
|
68
|
-
</Box>
|
|
69
|
-
</Box>
|
|
70
|
-
<Box mt={2}>
|
|
71
|
-
<Box display="flex" alignItems="center">
|
|
72
|
-
<IconTypography ml={1} mr={3}>
|
|
73
|
-
<Layers />
|
|
74
|
-
</IconTypography>
|
|
75
|
-
<Typography
|
|
76
|
-
fontSize={16}
|
|
77
|
-
color="text.primary"
|
|
78
|
-
fontWeight="600"
|
|
79
|
-
lineHeight={1.125}
|
|
80
|
-
>
|
|
81
|
-
{route.steps.length}
|
|
82
|
-
</Typography>
|
|
83
|
-
</Box>
|
|
84
|
-
<Box mt={0.5} ml={7}>
|
|
85
|
-
<Typography
|
|
86
|
-
fontSize={12}
|
|
87
|
-
color="text.secondary"
|
|
88
|
-
fontWeight="500"
|
|
89
|
-
lineHeight={1.125}
|
|
90
|
-
>
|
|
91
|
-
{t(`tooltip.numberOfSteps`)}
|
|
92
|
-
</Typography>
|
|
93
|
-
</Box>
|
|
94
|
-
</Box>
|
|
95
|
-
<Box display="flex" alignItems="center" mt={2}>
|
|
13
|
+
<Box display="flex" alignItems="center">
|
|
96
14
|
<IconTypography ml={1} mr={3}>
|
|
97
|
-
<
|
|
15
|
+
<Layers />
|
|
98
16
|
</IconTypography>
|
|
99
17
|
<Typography
|
|
100
18
|
fontSize={16}
|
|
@@ -102,27 +20,19 @@ export const RouteCardEssentialsExpanded: React.FC<
|
|
|
102
20
|
fontWeight="600"
|
|
103
21
|
lineHeight={1.125}
|
|
104
22
|
>
|
|
105
|
-
{
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
23
|
+
{route.steps.length}
|
|
24
|
+
</Typography>
|
|
25
|
+
</Box>
|
|
26
|
+
<Box mt={0.5} ml={7}>
|
|
27
|
+
<Typography
|
|
28
|
+
fontSize={12}
|
|
29
|
+
color="text.secondary"
|
|
30
|
+
fontWeight="500"
|
|
31
|
+
lineHeight={1.125}
|
|
32
|
+
>
|
|
33
|
+
{t(`tooltip.numberOfSteps`)}
|
|
110
34
|
</Typography>
|
|
111
35
|
</Box>
|
|
112
36
|
</Box>
|
|
113
37
|
);
|
|
114
38
|
};
|
|
115
|
-
|
|
116
|
-
const getFeeBreakdownTypography = (fees: FeesBreakdown[], t: TFunction) =>
|
|
117
|
-
fees.map((fee, index) => (
|
|
118
|
-
<Typography
|
|
119
|
-
fontSize={12}
|
|
120
|
-
fontWeight="500"
|
|
121
|
-
color="text.secondary"
|
|
122
|
-
key={`${fee.token.address}${index}`}
|
|
123
|
-
>
|
|
124
|
-
{t(`format.currency`, { value: fee.amountUSD })} (
|
|
125
|
-
{parseFloat(formatUnits(fee.amount, fee.token.decimals))?.toFixed(9)}{' '}
|
|
126
|
-
{fee.token.symbol})
|
|
127
|
-
</Typography>
|
|
128
|
-
));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Route
|
|
1
|
+
import type { Route } from '@lifi/sdk';
|
|
2
2
|
|
|
3
3
|
export interface RouteCardProps {
|
|
4
4
|
route: Route;
|
|
@@ -14,9 +14,3 @@ export interface RouteCardEssentialsProps {
|
|
|
14
14
|
export interface RouteCardSkeletonProps {
|
|
15
15
|
variant?: 'default' | 'cardless';
|
|
16
16
|
}
|
|
17
|
-
|
|
18
|
-
export interface FeesBreakdown {
|
|
19
|
-
amount: bigint;
|
|
20
|
-
amountUSD: number;
|
|
21
|
-
token: Token;
|
|
22
|
-
}
|
|
@@ -11,7 +11,6 @@ import { useToAddressRequirements } from '../../hooks/useToAddressRequirements.j
|
|
|
11
11
|
import { useWidgetEvents } from '../../hooks/useWidgetEvents.js';
|
|
12
12
|
import { useWidgetConfig } from '../../providers/WidgetProvider/WidgetProvider.js';
|
|
13
13
|
import { useFieldValues } from '../../stores/form/useFieldValues.js';
|
|
14
|
-
import { useSetExecutableRoute } from '../../stores/routes/useSetExecutableRoute.js';
|
|
15
14
|
import { WidgetEvent } from '../../types/events.js';
|
|
16
15
|
import { navigationRoutes } from '../../utils/navigationRoutes.js';
|
|
17
16
|
import { PageContainer } from '../PageContainer.js';
|
|
@@ -59,7 +58,6 @@ export const RoutesExpanded = () => {
|
|
|
59
58
|
export const RoutesExpandedElement = () => {
|
|
60
59
|
const { t } = useTranslation();
|
|
61
60
|
const navigate = useNavigate();
|
|
62
|
-
const setExecutableRoute = useSetExecutableRoute();
|
|
63
61
|
const { subvariant } = useWidgetConfig();
|
|
64
62
|
const routesRef = useRef<Route[]>();
|
|
65
63
|
const emitter = useWidgetEvents();
|
|
@@ -71,15 +69,16 @@ export const RoutesExpandedElement = () => {
|
|
|
71
69
|
isFetched,
|
|
72
70
|
dataUpdatedAt,
|
|
73
71
|
refetchTime,
|
|
74
|
-
refetch,
|
|
75
72
|
fromChain,
|
|
73
|
+
refetch,
|
|
74
|
+
setReviewableRoute,
|
|
76
75
|
} = useRoutes();
|
|
77
76
|
const { account } = useAccount({ chainType: fromChain?.chainType });
|
|
78
77
|
const [toAddress] = useFieldValues('toAddress');
|
|
79
78
|
const { requiredToAddress } = useToAddressRequirements();
|
|
80
79
|
|
|
81
80
|
const handleRouteClick = (route: Route) => {
|
|
82
|
-
|
|
81
|
+
setReviewableRoute(route);
|
|
83
82
|
navigate(navigationRoutes.transactionExecution, {
|
|
84
83
|
state: { routeId: route.id },
|
|
85
84
|
});
|
|
@@ -41,12 +41,7 @@ export const SendToWalletExpandButton: React.FC = () => {
|
|
|
41
41
|
};
|
|
42
42
|
|
|
43
43
|
return (
|
|
44
|
-
<Tooltip
|
|
45
|
-
title={t('main.sendToWallet')}
|
|
46
|
-
placement="bottom-end"
|
|
47
|
-
enterDelay={400}
|
|
48
|
-
arrow
|
|
49
|
-
>
|
|
44
|
+
<Tooltip title={t('main.sendToWallet')} placement="bottom-end">
|
|
50
45
|
<Button
|
|
51
46
|
variant={isActive ? 'contained' : 'text'}
|
|
52
47
|
onClick={handleClick}
|
package/components/Step/Step.tsx
CHANGED
|
@@ -17,8 +17,9 @@ export const Step: React.FC<{
|
|
|
17
17
|
step: LiFiStepExtended;
|
|
18
18
|
fromToken?: TokenAmount;
|
|
19
19
|
toToken?: TokenAmount;
|
|
20
|
+
impactToken?: TokenAmount;
|
|
20
21
|
toAddress?: string;
|
|
21
|
-
}> = ({ step, fromToken, toToken, toAddress }) => {
|
|
22
|
+
}> = ({ step, fromToken, toToken, impactToken, toAddress }) => {
|
|
22
23
|
const { t } = useTranslation();
|
|
23
24
|
const { getChainById } = useAvailableChains();
|
|
24
25
|
const { subvariant } = useWidgetConfig();
|
|
@@ -89,7 +90,15 @@ export const Step: React.FC<{
|
|
|
89
90
|
toAddressLink={toAddressLink}
|
|
90
91
|
/>
|
|
91
92
|
) : null}
|
|
92
|
-
{toToken ?
|
|
93
|
+
{toToken ? (
|
|
94
|
+
<Token
|
|
95
|
+
token={toToken}
|
|
96
|
+
impactToken={impactToken}
|
|
97
|
+
enableImpactTokenTooltip
|
|
98
|
+
px={2}
|
|
99
|
+
py={1}
|
|
100
|
+
/>
|
|
101
|
+
) : null}
|
|
93
102
|
</Box>
|
|
94
103
|
</Card>
|
|
95
104
|
);
|