@lifi/widget 3.12.6-beta.0 → 3.13.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/AppProvider.js +9 -2
- package/dist/esm/AppProvider.js.map +1 -1
- package/dist/esm/components/ActiveTransactions/ActiveTransactionItem.js +15 -3
- package/dist/esm/components/ActiveTransactions/ActiveTransactionItem.js.map +1 -1
- package/dist/esm/components/ActiveTransactions/ActiveTransactions.js +4 -1
- package/dist/esm/components/ActiveTransactions/ActiveTransactions.js.map +1 -1
- package/dist/esm/components/ActiveTransactions/ActiveTransactions.style.d.ts +3 -5
- package/dist/esm/components/AlertMessage/AlertMessage.style.js +29 -12
- package/dist/esm/components/AlertMessage/AlertMessage.style.js.map +1 -1
- package/dist/esm/components/AmountInput/PriceFormHelperText.js +13 -2
- package/dist/esm/components/AmountInput/PriceFormHelperText.js.map +1 -1
- package/dist/esm/components/AppContainer.js +34 -21
- package/dist/esm/components/AppContainer.js.map +1 -1
- package/dist/esm/components/Avatar/Avatar.style.d.ts +3 -1
- package/dist/esm/components/Avatar/Avatar.style.js +8 -6
- package/dist/esm/components/Avatar/Avatar.style.js.map +1 -1
- package/dist/esm/components/Card/Card.js +60 -33
- package/dist/esm/components/Card/Card.js.map +1 -1
- package/dist/esm/components/Card/CardLabel.js +46 -29
- package/dist/esm/components/Card/CardLabel.js.map +1 -1
- package/dist/esm/components/Card/CardTitle.js +12 -2
- package/dist/esm/components/Card/CardTitle.js.map +1 -1
- package/dist/esm/components/Card/InputCard.d.ts +1 -1
- package/dist/esm/components/ChainSelect/ChainSelect.js +3 -1
- package/dist/esm/components/ChainSelect/ChainSelect.js.map +1 -1
- package/dist/esm/components/ContractComponent/NFT/NFTBase.js +16 -1
- package/dist/esm/components/ContractComponent/NFT/NFTBase.js.map +1 -1
- package/dist/esm/components/FeeBreakdownTooltip.js +7 -2
- package/dist/esm/components/FeeBreakdownTooltip.js.map +1 -1
- package/dist/esm/components/GasMessage/FundsSufficiencyMessage.js +4 -1
- package/dist/esm/components/GasMessage/FundsSufficiencyMessage.js.map +1 -1
- package/dist/esm/components/GasMessage/GasMessage.style.js +8 -6
- package/dist/esm/components/GasMessage/GasMessage.style.js.map +1 -1
- package/dist/esm/components/GasMessage/GasRefuelMessage.js +11 -1
- package/dist/esm/components/GasMessage/GasRefuelMessage.js.map +1 -1
- package/dist/esm/components/GasMessage/GasSufficiencyMessage.js +9 -1
- package/dist/esm/components/GasMessage/GasSufficiencyMessage.js.map +1 -1
- package/dist/esm/components/Header/NavigationHeader.js +11 -2
- package/dist/esm/components/Header/NavigationHeader.js.map +1 -1
- package/dist/esm/components/Header/WalletMenu.js +12 -3
- package/dist/esm/components/Header/WalletMenu.js.map +1 -1
- package/dist/esm/components/IconTypography.js +4 -3
- package/dist/esm/components/IconTypography.js.map +1 -1
- package/dist/esm/components/ListItem/ListItem.d.ts +2 -4
- package/dist/esm/components/ListItem/ListItemButton.d.ts +1 -1
- package/dist/esm/components/ListItemButton.d.ts +1 -1
- package/dist/esm/components/ListItemButton.js +14 -3
- package/dist/esm/components/ListItemButton.js.map +1 -1
- package/dist/esm/components/NotFound.js +11 -1
- package/dist/esm/components/NotFound.js.map +1 -1
- package/dist/esm/components/PageContainer.js +10 -4
- package/dist/esm/components/PageContainer.js.map +1 -1
- package/dist/esm/components/PoweredBy/PoweredBy.js +14 -2
- package/dist/esm/components/PoweredBy/PoweredBy.js.map +1 -1
- package/dist/esm/components/PoweredBy/PoweredBy.style.d.ts +1 -1
- package/dist/esm/components/ProgressToNextUpdate.js +8 -6
- package/dist/esm/components/ProgressToNextUpdate.js.map +1 -1
- package/dist/esm/components/RouteCard/RouteCard.js +7 -1
- package/dist/esm/components/RouteCard/RouteCard.js.map +1 -1
- package/dist/esm/components/RouteCard/RouteCardEssentials.js +28 -2
- package/dist/esm/components/RouteCard/RouteCardEssentials.js.map +1 -1
- package/dist/esm/components/RouteCard/RouteCardEssentialsExpanded.js +20 -1
- package/dist/esm/components/RouteCard/RouteCardEssentialsExpanded.js.map +1 -1
- package/dist/esm/components/RouteCard/RouteCardSkeleton.js +12 -2
- package/dist/esm/components/RouteCard/RouteCardSkeleton.js.map +1 -1
- package/dist/esm/components/RouteCard/RouteNotFoundCard.js +12 -1
- package/dist/esm/components/RouteCard/RouteNotFoundCard.js.map +1 -1
- package/dist/esm/components/Routes/Routes.js +5 -1
- package/dist/esm/components/Routes/Routes.js.map +1 -1
- package/dist/esm/components/Routes/RoutesExpanded.js +8 -1
- package/dist/esm/components/Routes/RoutesExpanded.js.map +1 -1
- package/dist/esm/components/Select.js +16 -5
- package/dist/esm/components/Select.js.map +1 -1
- package/dist/esm/components/SelectTokenButton/SelectTokenButton.style.js +34 -8
- package/dist/esm/components/SelectTokenButton/SelectTokenButton.style.js.map +1 -1
- package/dist/esm/components/SendToWallet/SendToWallet.style.js +28 -7
- package/dist/esm/components/SendToWallet/SendToWallet.style.js.map +1 -1
- package/dist/esm/components/SendToWallet/SendToWalletButton.js +5 -1
- package/dist/esm/components/SendToWallet/SendToWalletButton.js.map +1 -1
- package/dist/esm/components/SettingsListItemButton.d.ts +1 -1
- package/dist/esm/components/Skeleton/WidgetSkeleton.style.d.ts +1 -1
- package/dist/esm/components/Step/DestinationWalletAddress.js +10 -2
- package/dist/esm/components/Step/DestinationWalletAddress.js.map +1 -1
- package/dist/esm/components/Step/Step.js +3 -1
- package/dist/esm/components/Step/Step.js.map +1 -1
- package/dist/esm/components/Step/StepProcess.js +16 -3
- package/dist/esm/components/Step/StepProcess.js.map +1 -1
- package/dist/esm/components/Step/StepTimer.js +5 -1
- package/dist/esm/components/Step/StepTimer.js.map +1 -1
- package/dist/esm/components/StepActions/StepActions.js +22 -3
- package/dist/esm/components/StepActions/StepActions.js.map +1 -1
- package/dist/esm/components/StepActions/StepActions.style.js +19 -10
- package/dist/esm/components/StepActions/StepActions.style.js.map +1 -1
- package/dist/esm/components/StepActions/StepFees.js +9 -1
- package/dist/esm/components/StepActions/StepFees.js.map +1 -1
- package/dist/esm/components/Switch.js +12 -7
- package/dist/esm/components/Switch.js.map +1 -1
- package/dist/esm/components/Tabs/Tabs.style.d.ts +1 -1
- package/dist/esm/components/Tabs/Tabs.style.js +16 -12
- package/dist/esm/components/Tabs/Tabs.style.js.map +1 -1
- package/dist/esm/components/ToAddressRequiredMessage.js +4 -1
- package/dist/esm/components/ToAddressRequiredMessage.js.map +1 -1
- package/dist/esm/components/Token/Token.js +47 -6
- package/dist/esm/components/Token/Token.js.map +1 -1
- package/dist/esm/components/Token/Token.style.js +14 -7
- package/dist/esm/components/Token/Token.style.js.map +1 -1
- package/dist/esm/components/TokenList/TokenList.style.d.ts +3 -5
- package/dist/esm/components/TokenList/TokenListItem.js +21 -4
- package/dist/esm/components/TokenList/TokenListItem.js.map +1 -1
- package/dist/esm/components/TokenList/VirtualizedTokenList.js +8 -1
- package/dist/esm/components/TokenList/VirtualizedTokenList.js.map +1 -1
- package/dist/esm/components/TransactionDetails.js +52 -6
- 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/config/version.js.map +1 -1
- package/dist/esm/pages/ActiveTransactionsPage/ActiveTransactionsEmpty.js +11 -1
- package/dist/esm/pages/ActiveTransactionsPage/ActiveTransactionsEmpty.js.map +1 -1
- package/dist/esm/pages/MainPage/MainPage.js +5 -1
- package/dist/esm/pages/MainPage/MainPage.js.map +1 -1
- package/dist/esm/pages/SelectTokenPage/SelectTokenPage.js +8 -1
- package/dist/esm/pages/SelectTokenPage/SelectTokenPage.js.map +1 -1
- package/dist/esm/pages/SendToWallet/BookmarkAddressSheet.js +4 -1
- package/dist/esm/pages/SendToWallet/BookmarkAddressSheet.js.map +1 -1
- package/dist/esm/pages/SendToWallet/ConfirmAddressSheet.js +4 -1
- package/dist/esm/pages/SendToWallet/ConfirmAddressSheet.js.map +1 -1
- package/dist/esm/pages/SendToWallet/EmptyListIndicator.js +5 -1
- package/dist/esm/pages/SendToWallet/EmptyListIndicator.js.map +1 -1
- package/dist/esm/pages/SendToWallet/SendToWalletPage.js +7 -1
- package/dist/esm/pages/SendToWallet/SendToWalletPage.js.map +1 -1
- package/dist/esm/pages/SendToWallet/SendToWalletPage.style.d.ts +1 -1
- package/dist/esm/pages/SendToWallet/SendToWalletPage.style.js +6 -6
- package/dist/esm/pages/SendToWallet/SendToWalletPage.style.js.map +1 -1
- package/dist/esm/pages/SettingsPage/ResetSettingsButton.js +9 -2
- package/dist/esm/pages/SettingsPage/ResetSettingsButton.js.map +1 -1
- package/dist/esm/pages/SettingsPage/ResetSettingsButton.style.js.map +1 -1
- package/dist/esm/pages/SettingsPage/SlippageSettings/SlippageSettings.js +7 -2
- package/dist/esm/pages/SettingsPage/SlippageSettings/SlippageSettings.js.map +1 -1
- package/dist/esm/pages/SettingsPage/SlippageSettings/SlippageSettings.style.js +4 -3
- package/dist/esm/pages/SettingsPage/SlippageSettings/SlippageSettings.style.js.map +1 -1
- package/dist/esm/pages/TransactionDetailsPage/TransactionDetailsPage.js +10 -3
- package/dist/esm/pages/TransactionDetailsPage/TransactionDetailsPage.js.map +1 -1
- package/dist/esm/pages/TransactionDetailsPage/TransactionDetailsSkeleton.js +16 -3
- package/dist/esm/pages/TransactionDetailsPage/TransactionDetailsSkeleton.js.map +1 -1
- package/dist/esm/pages/TransactionDetailsPage/TransferIdCard.js +6 -1
- package/dist/esm/pages/TransactionDetailsPage/TransferIdCard.js.map +1 -1
- package/dist/esm/pages/TransactionHistoryPage/TransactionHistoryEmpty.js +11 -1
- package/dist/esm/pages/TransactionHistoryPage/TransactionHistoryEmpty.js.map +1 -1
- package/dist/esm/pages/TransactionHistoryPage/TransactionHistoryItem.js +14 -2
- package/dist/esm/pages/TransactionHistoryPage/TransactionHistoryItem.js.map +1 -1
- package/dist/esm/pages/TransactionHistoryPage/TransactionHistorySkeleton.js +10 -2
- package/dist/esm/pages/TransactionHistoryPage/TransactionHistorySkeleton.js.map +1 -1
- package/dist/esm/pages/TransactionPage/ExchangeRateBottomSheet.js +35 -3
- package/dist/esm/pages/TransactionPage/ExchangeRateBottomSheet.js.map +1 -1
- package/dist/esm/pages/TransactionPage/StatusBottomSheet.js +12 -2
- package/dist/esm/pages/TransactionPage/StatusBottomSheet.js.map +1 -1
- package/dist/esm/pages/TransactionPage/TokenValueBottomSheet.js +45 -1
- package/dist/esm/pages/TransactionPage/TokenValueBottomSheet.js.map +1 -1
- package/dist/esm/pages/TransactionPage/TransactionPage.js +4 -1
- package/dist/esm/pages/TransactionPage/TransactionPage.js.map +1 -1
- package/package.json +18 -18
- package/src/AppProvider.tsx +16 -2
- package/src/components/ActiveTransactions/ActiveTransactionItem.tsx +16 -9
- package/src/components/ActiveTransactions/ActiveTransactions.tsx +7 -1
- package/src/components/AlertMessage/AlertMessage.style.tsx +30 -14
- package/src/components/AmountInput/PriceFormHelperText.tsx +12 -10
- package/src/components/AppContainer.tsx +34 -23
- package/src/components/Avatar/Avatar.style.tsx +8 -8
- package/src/components/Card/Card.tsx +60 -37
- package/src/components/Card/CardLabel.tsx +69 -43
- package/src/components/Card/CardTitle.tsx +12 -2
- package/src/components/ChainSelect/ChainSelect.tsx +7 -1
- package/src/components/ContractComponent/NFT/NFTBase.tsx +33 -6
- package/src/components/FeeBreakdownTooltip.tsx +9 -3
- package/src/components/GasMessage/FundsSufficiencyMessage.tsx +7 -1
- package/src/components/GasMessage/GasMessage.style.ts +8 -8
- package/src/components/GasMessage/GasRefuelMessage.tsx +19 -6
- package/src/components/GasMessage/GasSufficiencyMessage.tsx +21 -3
- package/src/components/Header/NavigationHeader.tsx +23 -5
- package/src/components/Header/WalletMenu.tsx +18 -3
- package/src/components/IconTypography.ts +4 -4
- package/src/components/ListItemButton.tsx +21 -12
- package/src/components/NotFound.tsx +17 -6
- package/src/components/PageContainer.ts +19 -15
- package/src/components/PoweredBy/PoweredBy.tsx +16 -8
- package/src/components/ProgressToNextUpdate.tsx +8 -8
- package/src/components/RouteCard/RouteCard.tsx +12 -2
- package/src/components/RouteCard/RouteCardEssentials.tsx +38 -16
- package/src/components/RouteCard/RouteCardEssentialsExpanded.tsx +30 -11
- package/src/components/RouteCard/RouteCardSkeleton.tsx +19 -3
- package/src/components/RouteCard/RouteNotFoundCard.tsx +18 -7
- package/src/components/Routes/Routes.tsx +10 -2
- package/src/components/Routes/RoutesExpanded.tsx +16 -2
- package/src/components/Select.tsx +16 -6
- package/src/components/SelectTokenButton/SelectTokenButton.style.tsx +34 -8
- package/src/components/SendToWallet/SendToWallet.style.tsx +28 -7
- package/src/components/SendToWallet/SendToWalletButton.tsx +7 -1
- package/src/components/Step/DestinationWalletAddress.tsx +14 -2
- package/src/components/Step/Step.tsx +5 -1
- package/src/components/Step/StepProcess.tsx +18 -9
- package/src/components/Step/StepTimer.tsx +9 -5
- package/src/components/StepActions/StepActions.style.tsx +19 -13
- package/src/components/StepActions/StepActions.tsx +32 -10
- package/src/components/StepActions/StepFees.tsx +9 -4
- package/src/components/Switch.tsx +12 -9
- package/src/components/Tabs/Tabs.style.tsx +16 -16
- package/src/components/ToAddressRequiredMessage.tsx +7 -1
- package/src/components/Token/Token.style.tsx +14 -8
- package/src/components/Token/Token.tsx +75 -12
- package/src/components/TokenList/TokenListItem.tsx +37 -8
- package/src/components/TokenList/VirtualizedTokenList.tsx +8 -6
- package/src/components/TransactionDetails.tsx +75 -17
- package/src/config/version.ts +1 -1
- package/src/pages/ActiveTransactionsPage/ActiveTransactionsEmpty.tsx +17 -6
- package/src/pages/MainPage/MainPage.tsx +7 -1
- package/src/pages/SelectTokenPage/SelectTokenPage.tsx +17 -3
- package/src/pages/SendToWallet/BookmarkAddressSheet.tsx +6 -1
- package/src/pages/SendToWallet/ConfirmAddressSheet.tsx +6 -1
- package/src/pages/SendToWallet/EmptyListIndicator.tsx +7 -1
- package/src/pages/SendToWallet/SendToWalletPage.style.tsx +6 -9
- package/src/pages/SendToWallet/SendToWalletPage.tsx +17 -3
- package/src/pages/SettingsPage/ResetSettingsButton.style.tsx +0 -1
- package/src/pages/SettingsPage/ResetSettingsButton.tsx +18 -3
- package/src/pages/SettingsPage/SlippageSettings/SlippageSettings.style.tsx +4 -5
- package/src/pages/SettingsPage/SlippageSettings/SlippageSettings.tsx +11 -2
- package/src/pages/TransactionDetailsPage/TransactionDetailsPage.tsx +16 -4
- package/src/pages/TransactionDetailsPage/TransactionDetailsSkeleton.tsx +29 -9
- package/src/pages/TransactionDetailsPage/TransferIdCard.tsx +6 -4
- package/src/pages/TransactionHistoryPage/TransactionHistoryEmpty.tsx +17 -6
- package/src/pages/TransactionHistoryPage/TransactionHistoryItem.tsx +24 -6
- package/src/pages/TransactionHistoryPage/TransactionHistorySkeleton.tsx +14 -4
- package/src/pages/TransactionPage/ExchangeRateBottomSheet.tsx +70 -11
- package/src/pages/TransactionPage/StatusBottomSheet.tsx +27 -4
- package/src/pages/TransactionPage/TokenValueBottomSheet.tsx +92 -15
- package/src/pages/TransactionPage/TransactionPage.tsx +6 -1
|
@@ -30,7 +30,12 @@ export const WalletMenu = ({ onClose }: { onClose: () => void }) => {
|
|
|
30
30
|
|
|
31
31
|
return (
|
|
32
32
|
<>
|
|
33
|
-
<Box
|
|
33
|
+
<Box
|
|
34
|
+
sx={{
|
|
35
|
+
display: 'flex',
|
|
36
|
+
flexDirection: 'column',
|
|
37
|
+
}}
|
|
38
|
+
>
|
|
34
39
|
{accounts.map((account) => {
|
|
35
40
|
const chain = getChainById(account.chainId)
|
|
36
41
|
const walletAddress = shortenAddress(account.address)
|
|
@@ -41,7 +46,13 @@ export const WalletMenu = ({ onClose }: { onClose: () => void }) => {
|
|
|
41
46
|
|
|
42
47
|
return (
|
|
43
48
|
<MenuItem key={account.address} disableTouchRipple>
|
|
44
|
-
<Box
|
|
49
|
+
<Box
|
|
50
|
+
sx={{
|
|
51
|
+
flex: 1,
|
|
52
|
+
display: 'flex',
|
|
53
|
+
alignItems: 'center',
|
|
54
|
+
}}
|
|
55
|
+
>
|
|
45
56
|
{chain?.logoURI ? (
|
|
46
57
|
<Badge
|
|
47
58
|
overlap="circular"
|
|
@@ -73,7 +84,11 @@ export const WalletMenu = ({ onClose }: { onClose: () => void }) => {
|
|
|
73
84
|
)}
|
|
74
85
|
{walletAddress}
|
|
75
86
|
</Box>
|
|
76
|
-
<Box
|
|
87
|
+
<Box
|
|
88
|
+
sx={{
|
|
89
|
+
ml: 2,
|
|
90
|
+
}}
|
|
91
|
+
>
|
|
77
92
|
<IconButton size="medium" onClick={handleCopyAddress}>
|
|
78
93
|
<ContentCopyRounded />
|
|
79
94
|
</IconButton>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Box, alpha, styled } from '@mui/material'
|
|
2
2
|
|
|
3
3
|
export const IconTypography = styled(Box)(({ theme }) => ({
|
|
4
|
-
color:
|
|
5
|
-
theme.palette.mode === 'light'
|
|
6
|
-
? alpha(theme.palette.common.black, 0.32)
|
|
7
|
-
: alpha(theme.palette.common.white, 0.4),
|
|
4
|
+
color: alpha(theme.palette.common.white, 0.4),
|
|
8
5
|
lineHeight: 0,
|
|
6
|
+
...theme.applyStyles('light', {
|
|
7
|
+
color: alpha(theme.palette.common.black, 0.32),
|
|
8
|
+
}),
|
|
9
9
|
}))
|
|
@@ -1,17 +1,26 @@
|
|
|
1
1
|
import { ListItemButton as MuiListItemButton, styled } from '@mui/material'
|
|
2
2
|
import { getContrastAlphaColor } from '../utils/colors.js'
|
|
3
3
|
|
|
4
|
-
export const ListItemButton = styled(MuiListItemButton)(
|
|
5
|
-
(
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
export const ListItemButton = styled(MuiListItemButton)(({ theme }) => {
|
|
5
|
+
const backgroundHoverColor = getContrastAlphaColor(theme, 0.04)
|
|
6
|
+
return {
|
|
7
|
+
borderRadius: theme.shape.borderRadius,
|
|
8
|
+
paddingLeft: theme.spacing(1.5),
|
|
9
|
+
height: 56,
|
|
10
|
+
'&:hover': {
|
|
11
|
+
backgroundColor: backgroundHoverColor,
|
|
12
|
+
},
|
|
13
|
+
variants: [
|
|
14
|
+
{
|
|
15
|
+
props: ({ disabled }) => disabled,
|
|
16
|
+
style: {
|
|
17
|
+
opacity: 0.5,
|
|
18
|
+
cursor: 'auto',
|
|
19
|
+
'&:hover': {
|
|
20
|
+
backgroundColor: 'none',
|
|
21
|
+
},
|
|
22
|
+
},
|
|
13
23
|
},
|
|
14
|
-
|
|
15
|
-
}
|
|
24
|
+
],
|
|
16
25
|
}
|
|
17
|
-
)
|
|
26
|
+
})
|
|
@@ -15,17 +15,28 @@ export const NotFound: React.FC = () => {
|
|
|
15
15
|
padding: 3,
|
|
16
16
|
}}
|
|
17
17
|
>
|
|
18
|
-
<Typography
|
|
18
|
+
<Typography
|
|
19
|
+
sx={{
|
|
20
|
+
fontSize: 48,
|
|
21
|
+
}}
|
|
22
|
+
>
|
|
19
23
|
<Block fontSize="inherit" />
|
|
20
24
|
</Typography>
|
|
21
|
-
<Typography
|
|
25
|
+
<Typography
|
|
26
|
+
sx={{
|
|
27
|
+
fontSize: 18,
|
|
28
|
+
fontWeight: 700,
|
|
29
|
+
}}
|
|
30
|
+
>
|
|
22
31
|
{t('tooltip.notFound.title')}
|
|
23
32
|
</Typography>
|
|
24
33
|
<Typography
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
34
|
+
sx={{
|
|
35
|
+
fontSize: 14,
|
|
36
|
+
color: 'text.secondary',
|
|
37
|
+
textAlign: 'center',
|
|
38
|
+
mt: 2,
|
|
39
|
+
}}
|
|
29
40
|
>
|
|
30
41
|
{t('tooltip.notFound.text')}
|
|
31
42
|
</Typography>
|
|
@@ -10,18 +10,22 @@ export interface PageContainerProps extends ContainerProps {
|
|
|
10
10
|
export const PageContainer = styled(Container, {
|
|
11
11
|
shouldForwardProp: (prop) =>
|
|
12
12
|
!['halfGutters', 'topGutters', 'bottomGutters'].includes(prop as string),
|
|
13
|
-
})<PageContainerProps>(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
13
|
+
})<PageContainerProps>(({ theme, halfGutters, topGutters, bottomGutters }) => ({
|
|
14
|
+
display: 'flex',
|
|
15
|
+
flexDirection: 'column',
|
|
16
|
+
flex: 1,
|
|
17
|
+
padding: theme.spacing(
|
|
18
|
+
topGutters ? 1 : 0,
|
|
19
|
+
halfGutters ? 1.5 : 3,
|
|
20
|
+
bottomGutters ? 3 : 0,
|
|
21
|
+
halfGutters ? 1.5 : 3
|
|
22
|
+
),
|
|
23
|
+
variants: [
|
|
24
|
+
{
|
|
25
|
+
props: ({ disableGutters }) => disableGutters,
|
|
26
|
+
style: {
|
|
27
|
+
padding: 0,
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
}))
|
|
@@ -19,10 +19,10 @@ export const PoweredBy: React.FC = () => {
|
|
|
19
19
|
|
|
20
20
|
return (
|
|
21
21
|
<Box
|
|
22
|
-
pt={1}
|
|
23
|
-
pb={2}
|
|
24
|
-
flex={1}
|
|
25
22
|
sx={{
|
|
23
|
+
pt: 1,
|
|
24
|
+
pb: 2,
|
|
25
|
+
flex: 1,
|
|
26
26
|
display: 'flex',
|
|
27
27
|
alignItems: 'flex-end',
|
|
28
28
|
justifyContent: 'flex-end',
|
|
@@ -36,14 +36,22 @@ export const PoweredBy: React.FC = () => {
|
|
|
36
36
|
color="text.primary"
|
|
37
37
|
>
|
|
38
38
|
<Typography
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
sx={{
|
|
40
|
+
color: 'text.secondary',
|
|
41
|
+
fontSize: 12,
|
|
42
|
+
fontWeight: 500,
|
|
43
|
+
px: 0.5,
|
|
44
|
+
}}
|
|
43
45
|
>
|
|
44
46
|
Powered by
|
|
45
47
|
</Typography>
|
|
46
|
-
<Typography
|
|
48
|
+
<Typography
|
|
49
|
+
sx={{
|
|
50
|
+
color: 'text.primary',
|
|
51
|
+
fontSize: 12,
|
|
52
|
+
fontWeight: 600,
|
|
53
|
+
}}
|
|
54
|
+
>
|
|
47
55
|
{poweredByConfig[poweredBy].text}
|
|
48
56
|
</Typography>
|
|
49
57
|
</Link>
|
|
@@ -67,10 +67,10 @@ export const ProgressToNextUpdate: React.FC<
|
|
|
67
67
|
value={100}
|
|
68
68
|
sx={(theme) => ({
|
|
69
69
|
position: 'absolute',
|
|
70
|
-
color:
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
70
|
+
color: theme.palette.grey[800],
|
|
71
|
+
...theme.applyStyles('light', {
|
|
72
|
+
color: theme.palette.grey[300],
|
|
73
|
+
}),
|
|
74
74
|
})}
|
|
75
75
|
/>
|
|
76
76
|
<CircularProgress
|
|
@@ -79,10 +79,10 @@ export const ProgressToNextUpdate: React.FC<
|
|
|
79
79
|
value={value}
|
|
80
80
|
sx={(theme) => ({
|
|
81
81
|
opacity: value === 100 && !isLoading ? 0.5 : 1,
|
|
82
|
-
color:
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
82
|
+
color: theme.palette.primary.light,
|
|
83
|
+
...theme.applyStyles('light', {
|
|
84
|
+
color: theme.palette.primary.main,
|
|
85
|
+
}),
|
|
86
86
|
})}
|
|
87
87
|
/>
|
|
88
88
|
</Box>
|
|
@@ -48,9 +48,19 @@ export const RouteCard: React.FC<
|
|
|
48
48
|
)
|
|
49
49
|
|
|
50
50
|
const cardContent = (
|
|
51
|
-
<Box
|
|
51
|
+
<Box
|
|
52
|
+
sx={{
|
|
53
|
+
flex: 1,
|
|
54
|
+
}}
|
|
55
|
+
>
|
|
52
56
|
{subvariant !== 'refuel' && route.tags?.length ? (
|
|
53
|
-
<Box
|
|
57
|
+
<Box
|
|
58
|
+
sx={{
|
|
59
|
+
display: 'flex',
|
|
60
|
+
alignItems: 'center',
|
|
61
|
+
mb: 2,
|
|
62
|
+
}}
|
|
63
|
+
>
|
|
54
64
|
{tags?.length ? (
|
|
55
65
|
<CardLabel type={active ? 'active' : undefined}>
|
|
56
66
|
<CardLabelTypography>
|
|
@@ -22,25 +22,40 @@ export const RouteCardEssentials: React.FC<RouteCardEssentialsProps> = ({
|
|
|
22
22
|
getAccumulatedFeeCostsBreakdown(route)
|
|
23
23
|
return (
|
|
24
24
|
<Box
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
sx={{
|
|
26
|
+
display: 'flex',
|
|
27
|
+
alignItems: 'center',
|
|
28
|
+
justifyContent: 'space-between',
|
|
29
|
+
flex: 1,
|
|
30
|
+
mt: 2,
|
|
31
|
+
}}
|
|
30
32
|
>
|
|
31
33
|
<TokenRate route={route} />
|
|
32
|
-
<Box
|
|
34
|
+
<Box
|
|
35
|
+
sx={{
|
|
36
|
+
display: 'flex',
|
|
37
|
+
alignItems: 'center',
|
|
38
|
+
}}
|
|
39
|
+
>
|
|
33
40
|
<FeeBreakdownTooltip gasCosts={gasCosts} feeCosts={feeCosts}>
|
|
34
|
-
<Box
|
|
41
|
+
<Box
|
|
42
|
+
sx={{
|
|
43
|
+
display: 'flex',
|
|
44
|
+
mr: 1.5,
|
|
45
|
+
alignItems: 'center',
|
|
46
|
+
}}
|
|
47
|
+
>
|
|
35
48
|
<IconTypography mr={0.5} fontSize={16}>
|
|
36
49
|
<LocalGasStationRounded fontSize="inherit" />
|
|
37
50
|
</IconTypography>
|
|
38
51
|
<Typography
|
|
39
|
-
fontSize={14}
|
|
40
|
-
color="text.primary"
|
|
41
|
-
fontWeight={600}
|
|
42
|
-
lineHeight={1}
|
|
43
52
|
data-value={combinedFeesUSD}
|
|
53
|
+
sx={{
|
|
54
|
+
fontSize: 14,
|
|
55
|
+
color: 'text.primary',
|
|
56
|
+
fontWeight: 600,
|
|
57
|
+
lineHeight: 1,
|
|
58
|
+
}}
|
|
44
59
|
>
|
|
45
60
|
{t('format.currency', {
|
|
46
61
|
value: combinedFeesUSD,
|
|
@@ -49,15 +64,22 @@ export const RouteCardEssentials: React.FC<RouteCardEssentialsProps> = ({
|
|
|
49
64
|
</Box>
|
|
50
65
|
</FeeBreakdownTooltip>
|
|
51
66
|
<Tooltip title={t('tooltip.estimatedTime')} sx={{ cursor: 'help' }}>
|
|
52
|
-
<Box
|
|
67
|
+
<Box
|
|
68
|
+
sx={{
|
|
69
|
+
display: 'flex',
|
|
70
|
+
alignItems: 'center',
|
|
71
|
+
}}
|
|
72
|
+
>
|
|
53
73
|
<IconTypography mr={0.5} fontSize={16}>
|
|
54
74
|
<AccessTimeFilled fontSize="inherit" />
|
|
55
75
|
</IconTypography>
|
|
56
76
|
<Typography
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
77
|
+
sx={{
|
|
78
|
+
fontSize: 14,
|
|
79
|
+
color: 'text.primary',
|
|
80
|
+
fontWeight: 600,
|
|
81
|
+
lineHeight: 1,
|
|
82
|
+
}}
|
|
61
83
|
>
|
|
62
84
|
{(executionTimeSeconds < 60
|
|
63
85
|
? executionTimeSeconds
|
|
@@ -9,26 +9,45 @@ export const RouteCardEssentialsExpanded: React.FC<
|
|
|
9
9
|
> = ({ route }) => {
|
|
10
10
|
const { t } = useTranslation()
|
|
11
11
|
return (
|
|
12
|
-
<Box
|
|
13
|
-
|
|
12
|
+
<Box
|
|
13
|
+
sx={{
|
|
14
|
+
flex: 1,
|
|
15
|
+
mt: 2,
|
|
16
|
+
}}
|
|
17
|
+
>
|
|
18
|
+
<Box
|
|
19
|
+
sx={{
|
|
20
|
+
display: 'flex',
|
|
21
|
+
alignItems: 'center',
|
|
22
|
+
}}
|
|
23
|
+
>
|
|
14
24
|
<IconTypography ml={1} mr={3}>
|
|
15
25
|
<Layers />
|
|
16
26
|
</IconTypography>
|
|
17
27
|
<Typography
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
28
|
+
sx={{
|
|
29
|
+
fontSize: 16,
|
|
30
|
+
color: 'text.primary',
|
|
31
|
+
fontWeight: '600',
|
|
32
|
+
lineHeight: 1.125,
|
|
33
|
+
}}
|
|
22
34
|
>
|
|
23
35
|
{route.steps.length}
|
|
24
36
|
</Typography>
|
|
25
37
|
</Box>
|
|
26
|
-
<Box
|
|
38
|
+
<Box
|
|
39
|
+
sx={{
|
|
40
|
+
mt: 0.5,
|
|
41
|
+
ml: 7,
|
|
42
|
+
}}
|
|
43
|
+
>
|
|
27
44
|
<Typography
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
45
|
+
sx={{
|
|
46
|
+
fontSize: 12,
|
|
47
|
+
color: 'text.secondary',
|
|
48
|
+
fontWeight: '500',
|
|
49
|
+
lineHeight: 1.125,
|
|
50
|
+
}}
|
|
32
51
|
>
|
|
33
52
|
{t('tooltip.numberOfSteps')}
|
|
34
53
|
</Typography>
|
|
@@ -11,9 +11,19 @@ export const RouteCardSkeleton: React.FC<
|
|
|
11
11
|
const { subvariant } = useWidgetConfig()
|
|
12
12
|
|
|
13
13
|
const cardContent = (
|
|
14
|
-
<Box
|
|
14
|
+
<Box
|
|
15
|
+
sx={{
|
|
16
|
+
flex: 1,
|
|
17
|
+
}}
|
|
18
|
+
>
|
|
15
19
|
{subvariant !== 'refuel' && subvariant !== 'custom' ? (
|
|
16
|
-
<Box
|
|
20
|
+
<Box
|
|
21
|
+
sx={{
|
|
22
|
+
display: 'flex',
|
|
23
|
+
alignItems: 'center',
|
|
24
|
+
mb: 2,
|
|
25
|
+
}}
|
|
26
|
+
>
|
|
17
27
|
<Skeleton
|
|
18
28
|
variant="rectangular"
|
|
19
29
|
width={112}
|
|
@@ -25,7 +35,13 @@ export const RouteCardSkeleton: React.FC<
|
|
|
25
35
|
</Box>
|
|
26
36
|
) : null}
|
|
27
37
|
<TokenSkeleton />
|
|
28
|
-
<Box
|
|
38
|
+
<Box
|
|
39
|
+
sx={{
|
|
40
|
+
mt: 2,
|
|
41
|
+
display: 'flex',
|
|
42
|
+
justifyContent: 'space-between',
|
|
43
|
+
}}
|
|
44
|
+
>
|
|
29
45
|
<Skeleton variant="text" width={64} height={20} />
|
|
30
46
|
<Skeleton variant="text" width={56} height={20} />
|
|
31
47
|
</Box>
|
|
@@ -7,25 +7,36 @@ export const RouteNotFoundCard: React.FC = () => {
|
|
|
7
7
|
return (
|
|
8
8
|
<Box
|
|
9
9
|
sx={{
|
|
10
|
+
py: 1.625,
|
|
10
11
|
display: 'flex',
|
|
11
12
|
alignItems: 'center',
|
|
12
13
|
justifyContent: 'center',
|
|
13
14
|
flexDirection: 'column',
|
|
14
15
|
flex: 1,
|
|
15
16
|
}}
|
|
16
|
-
py={1.625}
|
|
17
17
|
>
|
|
18
|
-
<Typography
|
|
18
|
+
<Typography
|
|
19
|
+
sx={{
|
|
20
|
+
fontSize: 48,
|
|
21
|
+
}}
|
|
22
|
+
>
|
|
19
23
|
<Route fontSize="inherit" />
|
|
20
24
|
</Typography>
|
|
21
|
-
<Typography
|
|
25
|
+
<Typography
|
|
26
|
+
sx={{
|
|
27
|
+
fontSize: 18,
|
|
28
|
+
fontWeight: 700,
|
|
29
|
+
}}
|
|
30
|
+
>
|
|
22
31
|
{t('info.title.routeNotFound')}
|
|
23
32
|
</Typography>
|
|
24
33
|
<Typography
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
34
|
+
sx={{
|
|
35
|
+
fontSize: 14,
|
|
36
|
+
color: 'text.secondary',
|
|
37
|
+
textAlign: 'center',
|
|
38
|
+
mt: 2,
|
|
39
|
+
}}
|
|
29
40
|
>
|
|
30
41
|
{t('info.message.routeNotFound')}
|
|
31
42
|
</Typography>
|
|
@@ -64,7 +64,11 @@ export const Routes: React.FC<CardProps> = (props) => {
|
|
|
64
64
|
right: 8,
|
|
65
65
|
}}
|
|
66
66
|
/>
|
|
67
|
-
<Box
|
|
67
|
+
<Box
|
|
68
|
+
sx={{
|
|
69
|
+
p: 2,
|
|
70
|
+
}}
|
|
71
|
+
>
|
|
68
72
|
{isLoading ? (
|
|
69
73
|
<RouteCardSkeleton variant="cardless" />
|
|
70
74
|
) : !currentRoute ? (
|
|
@@ -74,7 +78,11 @@ export const Routes: React.FC<CardProps> = (props) => {
|
|
|
74
78
|
)}
|
|
75
79
|
|
|
76
80
|
<Collapse timeout={225} in={showAll} unmountOnExit mountOnEnter appear>
|
|
77
|
-
<Box
|
|
81
|
+
<Box
|
|
82
|
+
sx={{
|
|
83
|
+
mt: 2,
|
|
84
|
+
}}
|
|
85
|
+
>
|
|
78
86
|
<ButtonTertiary onClick={handleCardClick} fullWidth>
|
|
79
87
|
{t('button.showAll')}
|
|
80
88
|
</ButtonTertiary>
|
|
@@ -136,7 +136,14 @@ export const RoutesExpandedElement = () => {
|
|
|
136
136
|
<Container enableColorScheme minimumHeight={isLoading}>
|
|
137
137
|
<ScrollableContainer>
|
|
138
138
|
<Header>
|
|
139
|
-
<Typography
|
|
139
|
+
<Typography
|
|
140
|
+
noWrap
|
|
141
|
+
sx={{
|
|
142
|
+
fontSize: 18,
|
|
143
|
+
fontWeight: '700',
|
|
144
|
+
flex: 1,
|
|
145
|
+
}}
|
|
146
|
+
>
|
|
140
147
|
{title}
|
|
141
148
|
</Typography>
|
|
142
149
|
<ProgressToNextUpdate
|
|
@@ -148,7 +155,14 @@ export const RoutesExpandedElement = () => {
|
|
|
148
155
|
/>
|
|
149
156
|
</Header>
|
|
150
157
|
<PageContainer>
|
|
151
|
-
<Stack
|
|
158
|
+
<Stack
|
|
159
|
+
direction="column"
|
|
160
|
+
spacing={2}
|
|
161
|
+
sx={{
|
|
162
|
+
flex: 1,
|
|
163
|
+
paddingBottom: 3,
|
|
164
|
+
}}
|
|
165
|
+
>
|
|
152
166
|
{routeNotFound ? (
|
|
153
167
|
<RouteNotFoundCard />
|
|
154
168
|
) : isLoading || (isFetching && !routesRef.current?.length) ? (
|
|
@@ -9,13 +9,10 @@ import {
|
|
|
9
9
|
|
|
10
10
|
export const Select = styled(MuiSelect, {
|
|
11
11
|
shouldForwardProp: (prop) => prop !== 'dense',
|
|
12
|
-
})<{ dense?: boolean }>(({ theme
|
|
13
|
-
backgroundColor:
|
|
14
|
-
theme.palette.mode === 'light'
|
|
15
|
-
? theme.palette.common.white
|
|
16
|
-
: theme.palette.background.paper,
|
|
12
|
+
})<{ dense?: boolean }>(({ theme }) => ({
|
|
13
|
+
backgroundColor: theme.palette.background.paper,
|
|
17
14
|
[`.${inputBaseClasses.input}`]: {
|
|
18
|
-
padding:
|
|
15
|
+
padding: theme.spacing(2),
|
|
19
16
|
display: 'flex',
|
|
20
17
|
alignItems: 'center',
|
|
21
18
|
},
|
|
@@ -29,4 +26,17 @@ export const Select = styled(MuiSelect, {
|
|
|
29
26
|
[`.${outlinedInputClasses.notchedOutline}`]: {
|
|
30
27
|
display: 'none',
|
|
31
28
|
},
|
|
29
|
+
...theme.applyStyles('light', {
|
|
30
|
+
backgroundColor: theme.palette.common.white,
|
|
31
|
+
}),
|
|
32
|
+
variants: [
|
|
33
|
+
{
|
|
34
|
+
props: ({ dense }) => dense,
|
|
35
|
+
style: {
|
|
36
|
+
[`.${inputBaseClasses.input}`]: {
|
|
37
|
+
padding: theme.spacing(1.625, 2, 1.5, 2),
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
],
|
|
32
42
|
}))
|
|
@@ -16,28 +16,54 @@ export const SelectTokenCardHeader = styled(CardHeader, {
|
|
|
16
16
|
({ theme, selected, compact }) => ({
|
|
17
17
|
padding: theme.spacing(2),
|
|
18
18
|
[`.${cardHeaderClasses.title}`]: {
|
|
19
|
-
color:
|
|
20
|
-
? theme.palette.text.primary
|
|
21
|
-
: theme.palette.text.secondary,
|
|
19
|
+
color: theme.palette.text.secondary,
|
|
22
20
|
textOverflow: 'ellipsis',
|
|
23
21
|
whiteSpace: 'nowrap',
|
|
24
22
|
overflow: 'hidden',
|
|
25
|
-
width:
|
|
23
|
+
width: 256,
|
|
26
24
|
fontSize: compact && !selected ? 16 : 18,
|
|
27
|
-
fontWeight:
|
|
25
|
+
fontWeight: 500,
|
|
28
26
|
[theme.breakpoints.down(theme.breakpoints.values.sm)]: {
|
|
29
|
-
width:
|
|
27
|
+
width: 224,
|
|
30
28
|
},
|
|
31
29
|
},
|
|
32
30
|
[`.${cardHeaderClasses.subheader}`]: {
|
|
33
31
|
textOverflow: 'ellipsis',
|
|
34
32
|
whiteSpace: 'nowrap',
|
|
35
33
|
overflow: 'hidden',
|
|
36
|
-
width:
|
|
34
|
+
width: 256,
|
|
37
35
|
[theme.breakpoints.down(theme.breakpoints.values.sm)]: {
|
|
38
|
-
width:
|
|
36
|
+
width: 224,
|
|
39
37
|
},
|
|
40
38
|
},
|
|
39
|
+
variants: [
|
|
40
|
+
{
|
|
41
|
+
props: ({ selected }) => selected,
|
|
42
|
+
style: {
|
|
43
|
+
[`.${cardHeaderClasses.title}`]: {
|
|
44
|
+
color: theme.palette.text.primary,
|
|
45
|
+
fontWeight: 600,
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
props: ({ compact }) => compact,
|
|
51
|
+
style: {
|
|
52
|
+
[`.${cardHeaderClasses.title}`]: {
|
|
53
|
+
width: 96,
|
|
54
|
+
[theme.breakpoints.down(theme.breakpoints.values.sm)]: {
|
|
55
|
+
width: 96,
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
[`.${cardHeaderClasses.subheader}`]: {
|
|
59
|
+
width: 96,
|
|
60
|
+
[theme.breakpoints.down(theme.breakpoints.values.sm)]: {
|
|
61
|
+
width: 96,
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
],
|
|
41
67
|
})
|
|
42
68
|
)
|
|
43
69
|
|