@rango-dev/widget-embedded 0.17.1-next.9 → 0.19.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 +4 -0
- package/dist/QueueManager.d.ts +1 -2
- package/dist/QueueManager.d.ts.map +1 -1
- package/dist/Wallets.d.ts +0 -1
- package/dist/Wallets.d.ts.map +1 -1
- package/dist/Widget.d.ts +1 -1
- package/dist/Widget.d.ts.map +1 -1
- package/dist/components/AppRouter.d.ts +2 -0
- package/dist/components/AppRouter.d.ts.map +1 -1
- package/dist/components/AppRoutes.d.ts +6 -1
- package/dist/components/AppRoutes.d.ts.map +1 -1
- package/dist/components/ConfirmWalletsModal/ConfirmWallets.helpers.d.ts +3 -1
- package/dist/components/ConfirmWalletsModal/ConfirmWallets.helpers.d.ts.map +1 -1
- package/dist/components/ConfirmWalletsModal/ConfirmWallets.styles.d.ts +1 -1
- package/dist/components/ConfirmWalletsModal/ConfirmWalletsModal.d.ts.map +1 -1
- package/dist/components/ConfirmWalletsModal/ConfirmWalletsModal.types.d.ts +3 -1
- package/dist/components/ConfirmWalletsModal/ConfirmWalletsModal.types.d.ts.map +1 -1
- package/dist/components/ConfirmWalletsModal/WalletList.d.ts.map +1 -1
- package/dist/components/ConfirmWalletsModal/WalletList.type.d.ts +4 -1
- package/dist/components/ConfirmWalletsModal/WalletList.type.d.ts.map +1 -1
- package/dist/components/NoRoutes/NoRoutes.d.ts +4 -0
- package/dist/components/NoRoutes/NoRoutes.d.ts.map +1 -0
- package/dist/components/NoRoutes/NoRoutes.helper.d.ts +3 -0
- package/dist/components/NoRoutes/NoRoutes.helper.d.ts.map +1 -0
- package/dist/components/{NoResult/NoResult.styles.d.ts → NoRoutes/NoRoutes.styles.d.ts} +1 -1
- package/dist/components/{NoResult/NoResult.styles.d.ts.map → NoRoutes/NoRoutes.styles.d.ts.map} +1 -1
- package/dist/components/{NoResult/NoResult.types.d.ts → NoRoutes/NoRoutes.types.d.ts} +3 -3
- package/dist/components/NoRoutes/NoRoutes.types.d.ts.map +1 -0
- package/dist/components/NoRoutes/index.d.ts +2 -0
- package/dist/components/NoRoutes/index.d.ts.map +1 -0
- package/dist/components/NotificationContent/NotificationContent.d.ts.map +1 -1
- package/dist/components/RouteErrors/RouteErrors.d.ts +4 -0
- package/dist/components/RouteErrors/RouteErrors.d.ts.map +1 -0
- package/dist/components/{QuoteWarningsAndErrors/QuoteWarningsAndErrors.styles.d.ts → RouteErrors/RouteErrors.styles.d.ts} +1 -1
- package/dist/components/RouteErrors/RouteErrors.styles.d.ts.map +1 -0
- package/dist/components/RouteErrors/RouteErrors.types.d.ts +24 -0
- package/dist/components/RouteErrors/RouteErrors.types.d.ts.map +1 -0
- package/dist/components/RouteErrors/RouteErrorsModal.d.ts +4 -0
- package/dist/components/RouteErrors/RouteErrorsModal.d.ts.map +1 -0
- package/dist/components/RouteErrors/RouteErrorsModalItem.d.ts +4 -0
- package/dist/components/RouteErrors/RouteErrorsModalItem.d.ts.map +1 -0
- package/dist/components/RouteErrors/index.d.ts +2 -0
- package/dist/components/RouteErrors/index.d.ts.map +1 -0
- package/dist/components/SwapDetails/SwapDetails.d.ts.map +1 -1
- package/dist/components/TokenList/TokenList.d.ts.map +1 -1
- package/dist/components/UpdateUrl.d.ts +6 -1
- package/dist/components/UpdateUrl.d.ts.map +1 -1
- package/dist/components/WidgetEvents.d.ts.map +1 -1
- package/dist/constants/errors.d.ts +4 -4
- package/dist/constants/errors.d.ts.map +1 -1
- package/dist/constants/messages.d.ts +1 -1
- package/dist/constants/searchParams.d.ts +1 -2
- package/dist/constants/searchParams.d.ts.map +1 -1
- package/dist/constants/warnings.d.ts +2 -2
- package/dist/constants/warnings.d.ts.map +1 -1
- package/dist/hooks/{useConfirmSwap/useConfirmSwap.types.d.ts → useConfirmSwap.d.ts} +7 -5
- package/dist/hooks/useConfirmSwap.d.ts.map +1 -0
- package/dist/hooks/{useFetchQuote.d.ts → useFetchBestRoute.d.ts} +3 -3
- package/dist/hooks/useFetchBestRoute.d.ts.map +1 -0
- package/dist/hooks/usePrepareBlockchainList/usePrepareBlockchainList.helpers.d.ts +2 -2
- package/dist/hooks/useSwapInput.d.ts +2 -4
- package/dist/hooks/useSwapInput.d.ts.map +1 -1
- package/dist/hooks/useSyncStoresWithConfig.d.ts +2 -1
- package/dist/hooks/useSyncStoresWithConfig.d.ts.map +1 -1
- package/dist/hooks/useWalletList.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +4 -4
- package/dist/pages/ConfirmSwapPage.d.ts +6 -1
- package/dist/pages/ConfirmSwapPage.d.ts.map +1 -1
- package/dist/pages/Home.d.ts.map +1 -1
- package/dist/pages/LiquiditySourcePage.d.ts +2 -1
- package/dist/pages/LiquiditySourcePage.d.ts.map +1 -1
- package/dist/pages/SelectBlockchainPage.d.ts.map +1 -1
- package/dist/pages/SettingsPage.d.ts +6 -1
- package/dist/pages/SettingsPage.d.ts.map +1 -1
- package/dist/pages/WalletsPage.d.ts +8 -1
- package/dist/pages/WalletsPage.d.ts.map +1 -1
- package/dist/store/app.d.ts +23 -5
- package/dist/store/app.d.ts.map +1 -1
- package/dist/store/{quote.d.ts → bestRoute.d.ts} +27 -39
- package/dist/store/bestRoute.d.ts.map +1 -0
- package/dist/store/meta.d.ts +23 -0
- package/dist/store/meta.d.ts.map +1 -0
- package/dist/store/settings.d.ts +2 -3
- package/dist/store/settings.d.ts.map +1 -1
- package/dist/store/slices/config.d.ts +2 -3
- package/dist/store/slices/config.d.ts.map +1 -1
- package/dist/store/slices/data.d.ts +0 -3
- package/dist/store/slices/data.d.ts.map +1 -1
- package/dist/store/wallets.d.ts +4 -5
- package/dist/store/wallets.d.ts.map +1 -1
- package/dist/types/config.d.ts +5 -5
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/routing.d.ts +65 -0
- package/dist/types/routing.d.ts.map +1 -0
- package/dist/utils/numbers.d.ts +1 -1
- package/dist/utils/numbers.d.ts.map +1 -1
- package/dist/utils/{quote.d.ts → routing.d.ts} +12 -16
- package/dist/utils/routing.d.ts.map +1 -0
- package/dist/utils/settings.d.ts +2 -3
- package/dist/utils/settings.d.ts.map +1 -1
- package/dist/utils/swap.d.ts +22 -25
- package/dist/utils/swap.d.ts.map +1 -1
- package/dist/utils/wallets.d.ts +2 -2
- package/dist/utils/wallets.d.ts.map +1 -1
- package/package.json +8 -8
- package/src/QueueManager.tsx +14 -14
- package/src/Wallets.tsx +15 -35
- package/src/Widget.tsx +24 -11
- package/src/components/AppRouter.tsx +5 -6
- package/src/components/AppRoutes.tsx +39 -6
- package/src/components/BlockchainList/BlockchainList.tsx +4 -4
- package/src/components/BlockchainsSection/BlockchainsSection.tsx +7 -7
- package/src/components/ConfirmWalletsModal/ConfirmWallets.helpers.ts +64 -2
- package/src/components/ConfirmWalletsModal/ConfirmWalletsModal.tsx +40 -28
- package/src/components/ConfirmWalletsModal/ConfirmWalletsModal.types.ts +3 -1
- package/src/components/ConfirmWalletsModal/WalletList.tsx +5 -6
- package/src/components/ConfirmWalletsModal/WalletList.type.ts +4 -1
- package/src/components/LoadingSwapDetails/LoadingSwapDetails.styles.ts +3 -3
- package/src/components/LoadingSwapDetails/LoadingSwapDetails.tsx +6 -6
- package/src/components/{NoResult/NoResult.helpers.ts → NoRoutes/NoRoutes.helper.ts} +9 -16
- package/src/components/{NoResult/NoResult.styles.ts → NoRoutes/NoRoutes.styles.ts} +0 -2
- package/src/components/{NoResult/NoResult.tsx → NoRoutes/NoRoutes.tsx} +12 -10
- package/src/components/{NoResult/NoResult.types.ts → NoRoutes/NoRoutes.types.ts} +2 -3
- package/src/components/NoRoutes/index.ts +1 -0
- package/src/components/NotificationContent/NotificationContent.tsx +2 -3
- package/src/components/RouteErrors/RouteErrors.tsx +79 -0
- package/src/components/RouteErrors/RouteErrors.types.ts +29 -0
- package/src/components/RouteErrors/RouteErrorsModal.tsx +129 -0
- package/src/components/{QuoteWarningsAndErrors/QuoteErrorsModalItem.tsx → RouteErrors/RouteErrorsModalItem.tsx} +3 -3
- package/src/components/RouteErrors/index.ts +1 -0
- package/src/components/SwapDetails/SwapDetails.Placeholder.tsx +1 -1
- package/src/components/SwapDetails/SwapDetails.tsx +22 -18
- package/src/components/SwitchFromAndTo.tsx +2 -2
- package/src/components/TokenList/TokenList.tsx +6 -5
- package/src/components/UpdateUrl.tsx +26 -36
- package/src/components/WidgetEvents.tsx +2 -4
- package/src/constants/errors.ts +10 -8
- package/src/constants/messages.ts +1 -1
- package/src/constants/searchParams.ts +0 -1
- package/src/constants/warnings.ts +7 -7
- package/src/hooks/useConfirmSwap.ts +303 -0
- package/src/hooks/{useFetchQuote.ts → useFetchBestRoute.ts} +3 -3
- package/src/hooks/useNavigateBack.ts +3 -3
- package/src/hooks/useSwapInput.ts +23 -58
- package/src/hooks/useSyncStoresWithConfig.ts +19 -22
- package/src/hooks/useWalletList.ts +5 -3
- package/src/pages/ConfirmSwapPage.tsx +235 -58
- package/src/pages/HistoryPage.tsx +1 -1
- package/src/pages/Home.tsx +247 -58
- package/src/pages/LanguagePage.tsx +1 -1
- package/src/pages/LiquiditySourcePage.tsx +32 -23
- package/src/pages/SelectBlockchainPage.tsx +7 -6
- package/src/pages/SelectSwapItemsPage.tsx +5 -5
- package/src/pages/SettingsPage.tsx +13 -9
- package/src/pages/SwapDetailsPage.tsx +3 -3
- package/src/pages/ThemePage.tsx +1 -1
- package/src/pages/WalletsPage.tsx +12 -5
- package/src/store/app.ts +6 -18
- package/src/store/{quote.ts → bestRoute.ts} +60 -68
- package/src/store/meta.ts +39 -0
- package/src/store/settings.ts +4 -7
- package/src/store/slices/config.ts +15 -25
- package/src/store/slices/data.ts +29 -64
- package/src/store/wallets.ts +8 -11
- package/src/types/config.ts +5 -5
- package/src/types/index.ts +1 -1
- package/src/types/routing.ts +77 -0
- package/src/utils/numbers.ts +1 -1
- package/src/utils/routing.ts +321 -0
- package/src/utils/settings.ts +7 -8
- package/src/utils/swap.ts +85 -113
- package/src/utils/wallets.ts +17 -29
- package/dist/components/NoResult/NoResult.d.ts +0 -4
- package/dist/components/NoResult/NoResult.d.ts.map +0 -1
- package/dist/components/NoResult/NoResult.helpers.d.ts +0 -4
- package/dist/components/NoResult/NoResult.helpers.d.ts.map +0 -1
- package/dist/components/NoResult/NoResult.types.d.ts.map +0 -1
- package/dist/components/NoResult/index.d.ts +0 -2
- package/dist/components/NoResult/index.d.ts.map +0 -1
- package/dist/components/Quote/Quote.d.ts +0 -4
- package/dist/components/Quote/Quote.d.ts.map +0 -1
- package/dist/components/Quote/Quote.styles.d.ts +0 -1429
- package/dist/components/Quote/Quote.styles.d.ts.map +0 -1
- package/dist/components/Quote/Quote.types.d.ts +0 -22
- package/dist/components/Quote/Quote.types.d.ts.map +0 -1
- package/dist/components/Quote/QuoteSkeleton.d.ts +0 -4
- package/dist/components/Quote/QuoteSkeleton.d.ts.map +0 -1
- package/dist/components/Quote/QuoteSkeleton.styles.d.ts +0 -319
- package/dist/components/Quote/QuoteSkeleton.styles.d.ts.map +0 -1
- package/dist/components/Quote/QuoteSkeleton.types.d.ts +0 -6
- package/dist/components/Quote/QuoteSkeleton.types.d.ts.map +0 -1
- package/dist/components/Quote/QuoteSummary.d.ts +0 -11
- package/dist/components/Quote/QuoteSummary.d.ts.map +0 -1
- package/dist/components/Quote/QuoteSummary.styles.d.ts +0 -158
- package/dist/components/Quote/QuoteSummary.styles.d.ts.map +0 -1
- package/dist/components/Quote/index.d.ts +0 -4
- package/dist/components/Quote/index.d.ts.map +0 -1
- package/dist/components/QuoteWarningsAndErrors/HighValueLossWarningModal.d.ts +0 -11
- package/dist/components/QuoteWarningsAndErrors/HighValueLossWarningModal.d.ts.map +0 -1
- package/dist/components/QuoteWarningsAndErrors/QuoteErrorsModalItem.d.ts +0 -4
- package/dist/components/QuoteWarningsAndErrors/QuoteErrorsModalItem.d.ts.map +0 -1
- package/dist/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.d.ts +0 -4
- package/dist/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.d.ts.map +0 -1
- package/dist/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.helpers.d.ts +0 -9
- package/dist/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.helpers.d.ts.map +0 -1
- package/dist/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.styles.d.ts.map +0 -1
- package/dist/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.types.d.ts +0 -22
- package/dist/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.types.d.ts.map +0 -1
- package/dist/components/QuoteWarningsAndErrors/SlippageWariningModal.d.ts +0 -11
- package/dist/components/QuoteWarningsAndErrors/SlippageWariningModal.d.ts.map +0 -1
- package/dist/components/QuoteWarningsAndErrors/UnknownPriceWarningModal.d.ts +0 -11
- package/dist/components/QuoteWarningsAndErrors/UnknownPriceWarningModal.d.ts.map +0 -1
- package/dist/components/QuoteWarningsAndErrors/index.d.ts +0 -2
- package/dist/components/QuoteWarningsAndErrors/index.d.ts.map +0 -1
- package/dist/containers/QuoteInfo/QuoteInfo.d.ts +0 -4
- package/dist/containers/QuoteInfo/QuoteInfo.d.ts.map +0 -1
- package/dist/containers/QuoteInfo/QuoteInfo.styles.d.ts +0 -472
- package/dist/containers/QuoteInfo/QuoteInfo.styles.d.ts.map +0 -1
- package/dist/containers/QuoteInfo/QuoteInfo.types.d.ts +0 -17
- package/dist/containers/QuoteInfo/QuoteInfo.types.d.ts.map +0 -1
- package/dist/containers/QuoteInfo/index.d.ts +0 -2
- package/dist/containers/QuoteInfo/index.d.ts.map +0 -1
- package/dist/hooks/useConfirmSwap/index.d.ts +0 -2
- package/dist/hooks/useConfirmSwap/index.d.ts.map +0 -1
- package/dist/hooks/useConfirmSwap/useConfirmSwap.d.ts +0 -3
- package/dist/hooks/useConfirmSwap/useConfirmSwap.d.ts.map +0 -1
- package/dist/hooks/useConfirmSwap/useConfirmSwap.helpers.d.ts +0 -16
- package/dist/hooks/useConfirmSwap/useConfirmSwap.helpers.d.ts.map +0 -1
- package/dist/hooks/useConfirmSwap/useConfirmSwap.types.d.ts.map +0 -1
- package/dist/hooks/useFetchQuote.d.ts.map +0 -1
- package/dist/hooks/useForceAutoConnect.d.ts +0 -2
- package/dist/hooks/useForceAutoConnect.d.ts.map +0 -1
- package/dist/store/AppStore.d.ts +0 -11
- package/dist/store/AppStore.d.ts.map +0 -1
- package/dist/store/quote.d.ts.map +0 -1
- package/dist/types/quote.d.ts +0 -82
- package/dist/types/quote.d.ts.map +0 -1
- package/dist/utils/quote.d.ts.map +0 -1
- package/src/components/NoResult/index.ts +0 -1
- package/src/components/Quote/Quote.styles.ts +0 -212
- package/src/components/Quote/Quote.tsx +0 -345
- package/src/components/Quote/Quote.types.ts +0 -16
- package/src/components/Quote/QuoteSkeleton.styles.ts +0 -110
- package/src/components/Quote/QuoteSkeleton.tsx +0 -108
- package/src/components/Quote/QuoteSkeleton.types.ts +0 -5
- package/src/components/Quote/QuoteSummary.styles.ts +0 -15
- package/src/components/Quote/QuoteSummary.tsx +0 -46
- package/src/components/Quote/index.ts +0 -3
- package/src/components/QuoteWarningsAndErrors/HighValueLossWarningModal.tsx +0 -107
- package/src/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.helpers.ts +0 -67
- package/src/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.tsx +0 -103
- package/src/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.types.ts +0 -24
- package/src/components/QuoteWarningsAndErrors/SlippageWariningModal.tsx +0 -77
- package/src/components/QuoteWarningsAndErrors/UnknownPriceWarningModal.tsx +0 -38
- package/src/components/QuoteWarningsAndErrors/index.ts +0 -1
- package/src/containers/QuoteInfo/QuoteInfo.styles.ts +0 -15
- package/src/containers/QuoteInfo/QuoteInfo.tsx +0 -97
- package/src/containers/QuoteInfo/QuoteInfo.types.ts +0 -17
- package/src/containers/QuoteInfo/index.ts +0 -1
- package/src/hooks/useConfirmSwap/index.ts +0 -1
- package/src/hooks/useConfirmSwap/useConfirmSwap.helpers.ts +0 -168
- package/src/hooks/useConfirmSwap/useConfirmSwap.ts +0 -136
- package/src/hooks/useConfirmSwap/useConfirmSwap.types.ts +0 -19
- package/src/hooks/useForceAutoConnect.ts +0 -27
- package/src/store/AppStore.tsx +0 -35
- package/src/types/quote.ts +0 -107
- package/src/utils/quote.ts +0 -338
- /package/src/components/{QuoteWarningsAndErrors/QuoteWarningsAndErrors.styles.ts → RouteErrors/RouteErrors.styles.ts} +0 -0
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import type { PropTypes } from './QuoteSkeleton.types';
|
|
2
|
-
|
|
3
|
-
import { ChainToken, Divider, NextIcon, Skeleton } from '@rango-dev/ui';
|
|
4
|
-
import React from 'react';
|
|
5
|
-
|
|
6
|
-
import { Container, StepSeparator } from './QuoteSkeleton.styles';
|
|
7
|
-
|
|
8
|
-
function StepSkeleton(props: { separator?: boolean }) {
|
|
9
|
-
const { separator = true } = props;
|
|
10
|
-
return (
|
|
11
|
-
<>
|
|
12
|
-
<div className="step__title">
|
|
13
|
-
<Skeleton height={22} width={22} variant="circular" />
|
|
14
|
-
<Divider direction="horizontal" size={8} />
|
|
15
|
-
<Skeleton height={15} width={148} variant="rounded" />
|
|
16
|
-
</div>
|
|
17
|
-
<div className="step__content">
|
|
18
|
-
<StepSeparator hideSeparator={!separator} />
|
|
19
|
-
<div className="step__tokens">
|
|
20
|
-
<div className="step__token-info">
|
|
21
|
-
<ChainToken size="small" loading chainImage="" tokenImage="" />
|
|
22
|
-
<Divider direction="horizontal" size={8} />
|
|
23
|
-
<Skeleton height={12} width={76} variant="rounded" />
|
|
24
|
-
</div>
|
|
25
|
-
<div className="step__icon-container">
|
|
26
|
-
<NextIcon color="gray" size={16} />
|
|
27
|
-
</div>
|
|
28
|
-
<div className="step__token-info">
|
|
29
|
-
<ChainToken size="small" loading chainImage="" tokenImage="" />
|
|
30
|
-
<Divider direction="horizontal" size={8} />
|
|
31
|
-
<Skeleton height={12} width={76} variant="rounded" />
|
|
32
|
-
</div>
|
|
33
|
-
</div>
|
|
34
|
-
</div>
|
|
35
|
-
</>
|
|
36
|
-
);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export function QuoteSkeleton(props: PropTypes) {
|
|
40
|
-
const { type, expanded, tag = false } = props;
|
|
41
|
-
const quoteSummary = (
|
|
42
|
-
<div className="quote-summary">
|
|
43
|
-
<div className="token-amount">
|
|
44
|
-
<ChainToken loading size="medium" chainImage="" tokenImage="" />
|
|
45
|
-
<Divider size={8} direction="horizontal" />
|
|
46
|
-
<div className="token-amount__label">
|
|
47
|
-
<Skeleton height={10} width={60} variant="rounded" />
|
|
48
|
-
<Divider size={4} />
|
|
49
|
-
<Skeleton height={15} width={148} variant="rounded" />
|
|
50
|
-
</div>
|
|
51
|
-
</div>
|
|
52
|
-
<Skeleton height={12} width={64} variant="rounded" />
|
|
53
|
-
</div>
|
|
54
|
-
);
|
|
55
|
-
|
|
56
|
-
return (
|
|
57
|
-
<Container>
|
|
58
|
-
<div className="cost-and-tag">
|
|
59
|
-
<div className="cost">
|
|
60
|
-
<Skeleton width={60} height={10} variant="rounded" />
|
|
61
|
-
<Divider size={4} direction="horizontal" />
|
|
62
|
-
<Skeleton width={60} height={10} variant="rounded" />
|
|
63
|
-
<Divider size={4} direction="horizontal" />
|
|
64
|
-
<Skeleton width={60} height={10} variant="rounded" />
|
|
65
|
-
</div>
|
|
66
|
-
{tag && <Skeleton height={22} width={100} variant="rounded" />}
|
|
67
|
-
</div>
|
|
68
|
-
{type === 'basic' && (
|
|
69
|
-
<div className="basic-summary">
|
|
70
|
-
<Skeleton height={15} width={148} variant="rounded" />
|
|
71
|
-
</div>
|
|
72
|
-
)}
|
|
73
|
-
{type === 'list-item' && (
|
|
74
|
-
<div className="output">
|
|
75
|
-
<div className="output__token-info">
|
|
76
|
-
<ChainToken loading size="medium" chainImage="" tokenImage="" />
|
|
77
|
-
<Divider direction="horizontal" size={4} />
|
|
78
|
-
<Skeleton height={15} width={150} variant="rounded" />
|
|
79
|
-
</div>
|
|
80
|
-
<Divider size={4} />
|
|
81
|
-
<Skeleton height={10} width={184} variant="rounded" />
|
|
82
|
-
</div>
|
|
83
|
-
)}
|
|
84
|
-
{type === 'swap-preview' && (
|
|
85
|
-
<>
|
|
86
|
-
<Divider size={4} />
|
|
87
|
-
<div className="swap-preview">
|
|
88
|
-
{quoteSummary}
|
|
89
|
-
<div className="quote-summary__separator" />
|
|
90
|
-
{quoteSummary}
|
|
91
|
-
</div>
|
|
92
|
-
</>
|
|
93
|
-
)}
|
|
94
|
-
<div className="chains">
|
|
95
|
-
<Skeleton height={15} width={321} variant="rounded" />
|
|
96
|
-
</div>
|
|
97
|
-
|
|
98
|
-
{expanded && (
|
|
99
|
-
<div className="steps">
|
|
100
|
-
<Divider size={20} />
|
|
101
|
-
<StepSkeleton />
|
|
102
|
-
<StepSkeleton />
|
|
103
|
-
<StepSkeleton separator={false} />
|
|
104
|
-
</div>
|
|
105
|
-
)}
|
|
106
|
-
</Container>
|
|
107
|
-
);
|
|
108
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { styled } from '@rango-dev/ui';
|
|
2
|
-
|
|
3
|
-
export const Container = styled('div', {
|
|
4
|
-
position: 'relative',
|
|
5
|
-
display: 'flex',
|
|
6
|
-
flexDirection: 'column',
|
|
7
|
-
width: '100%',
|
|
8
|
-
'& .separator': {
|
|
9
|
-
height: '14px',
|
|
10
|
-
marginLeft: '14px',
|
|
11
|
-
position: 'absolute',
|
|
12
|
-
borderLeft: '1px solid $foreground',
|
|
13
|
-
top: '42%',
|
|
14
|
-
},
|
|
15
|
-
});
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import type { PriceImpactWarningLevel, Step } from '@rango-dev/ui';
|
|
2
|
-
|
|
3
|
-
import { TokenAmount } from '@rango-dev/ui';
|
|
4
|
-
import React from 'react';
|
|
5
|
-
|
|
6
|
-
import { Container } from './QuoteSummary.styles';
|
|
7
|
-
|
|
8
|
-
type PropTypes = {
|
|
9
|
-
from: Step['from'];
|
|
10
|
-
to: Step['to'];
|
|
11
|
-
percentageChange?: string | null;
|
|
12
|
-
warningLevel: PriceImpactWarningLevel;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export function QuoteSummary(props: PropTypes) {
|
|
16
|
-
const { from, to, percentageChange, warningLevel } = props;
|
|
17
|
-
return (
|
|
18
|
-
<Container>
|
|
19
|
-
<TokenAmount
|
|
20
|
-
direction="horizontal"
|
|
21
|
-
label="Swap input"
|
|
22
|
-
type="input"
|
|
23
|
-
price={{ value: from.price.value, usdValue: from.price.usdValue }}
|
|
24
|
-
token={{
|
|
25
|
-
displayName: from.token.displayName,
|
|
26
|
-
image: from.token.image,
|
|
27
|
-
}}
|
|
28
|
-
chain={{ image: from.chain.image }}
|
|
29
|
-
/>
|
|
30
|
-
<div className="separator" />
|
|
31
|
-
<TokenAmount
|
|
32
|
-
direction="horizontal"
|
|
33
|
-
label="Estimated output"
|
|
34
|
-
type="output"
|
|
35
|
-
price={{ value: to.price.value, usdValue: to.price.usdValue }}
|
|
36
|
-
token={{
|
|
37
|
-
displayName: to.token.displayName,
|
|
38
|
-
image: to.token.image,
|
|
39
|
-
}}
|
|
40
|
-
chain={{ image: to.chain.image }}
|
|
41
|
-
percentageChange={percentageChange}
|
|
42
|
-
warningLevel={warningLevel}
|
|
43
|
-
/>
|
|
44
|
-
</Container>
|
|
45
|
-
);
|
|
46
|
-
}
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import type { HighValueLossWarning } from '../../types';
|
|
2
|
-
|
|
3
|
-
import { i18n } from '@lingui/core';
|
|
4
|
-
import {
|
|
5
|
-
Button,
|
|
6
|
-
Divider,
|
|
7
|
-
MessageBox,
|
|
8
|
-
Modal,
|
|
9
|
-
Typography,
|
|
10
|
-
WarningIcon,
|
|
11
|
-
} from '@rango-dev/ui';
|
|
12
|
-
import React from 'react';
|
|
13
|
-
|
|
14
|
-
import { errorMessages } from '../../constants/errors';
|
|
15
|
-
import {
|
|
16
|
-
GAS_FEE_MAX_DECIMALS,
|
|
17
|
-
GAS_FEE_MIN_DECIMALS,
|
|
18
|
-
PERCENTAGE_CHANGE_MAX_DECIMALS,
|
|
19
|
-
PERCENTAGE_CHANGE_MIN_DECIMALS,
|
|
20
|
-
USD_VALUE_MAX_DECIMALS,
|
|
21
|
-
USD_VALUE_MIN_DECIMALS,
|
|
22
|
-
} from '../../constants/routing';
|
|
23
|
-
import { getContainer } from '../../utils/common';
|
|
24
|
-
import { numberToString } from '../../utils/numbers';
|
|
25
|
-
|
|
26
|
-
import { QuoteErrorsModalItem } from './QuoteErrorsModalItem';
|
|
27
|
-
import { Flex } from './QuoteWarningsAndErrors.styles';
|
|
28
|
-
|
|
29
|
-
type Props = {
|
|
30
|
-
open: boolean;
|
|
31
|
-
onClose: () => void;
|
|
32
|
-
onConfirm: () => void;
|
|
33
|
-
warning: HighValueLossWarning;
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
export function HighValueLossWarningModal(props: Props) {
|
|
37
|
-
const { open, onClose, onConfirm, warning } = props;
|
|
38
|
-
const type = warning.warningLevel === 'high' ? 'error' : 'warning';
|
|
39
|
-
const highValueLossData = [
|
|
40
|
-
{
|
|
41
|
-
title: i18n.t('Swapping'),
|
|
42
|
-
value: numberToString(
|
|
43
|
-
warning.inputUsdValue,
|
|
44
|
-
USD_VALUE_MIN_DECIMALS,
|
|
45
|
-
USD_VALUE_MAX_DECIMALS
|
|
46
|
-
),
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
title: i18n.t('Gas cost'),
|
|
50
|
-
value: numberToString(
|
|
51
|
-
warning.totalFee,
|
|
52
|
-
GAS_FEE_MIN_DECIMALS,
|
|
53
|
-
GAS_FEE_MAX_DECIMALS
|
|
54
|
-
),
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
title: i18n.t('Receiving'),
|
|
58
|
-
value: numberToString(
|
|
59
|
-
warning.outputUsdValue,
|
|
60
|
-
USD_VALUE_MIN_DECIMALS,
|
|
61
|
-
USD_VALUE_MAX_DECIMALS
|
|
62
|
-
),
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
title: i18n.t('Price impact'),
|
|
66
|
-
value: numberToString(
|
|
67
|
-
warning.priceImpact,
|
|
68
|
-
PERCENTAGE_CHANGE_MIN_DECIMALS,
|
|
69
|
-
PERCENTAGE_CHANGE_MAX_DECIMALS
|
|
70
|
-
),
|
|
71
|
-
valueColor: `${type}500`,
|
|
72
|
-
},
|
|
73
|
-
];
|
|
74
|
-
|
|
75
|
-
return (
|
|
76
|
-
<Modal open={open} onClose={onClose} container={getContainer()}>
|
|
77
|
-
<MessageBox
|
|
78
|
-
type={type}
|
|
79
|
-
title={errorMessages().highValueLossError.impactTitle}
|
|
80
|
-
description={errorMessages().highValueLossError.description}
|
|
81
|
-
/>
|
|
82
|
-
|
|
83
|
-
<Flex>
|
|
84
|
-
<Divider size={20} />
|
|
85
|
-
<Typography size="small" variant="title">
|
|
86
|
-
{i18n.t('Details')}
|
|
87
|
-
</Typography>
|
|
88
|
-
<Flex>
|
|
89
|
-
{highValueLossData.map((item, index) => {
|
|
90
|
-
const key = index;
|
|
91
|
-
return <QuoteErrorsModalItem key={key} {...item} />;
|
|
92
|
-
})}
|
|
93
|
-
</Flex>
|
|
94
|
-
</Flex>
|
|
95
|
-
|
|
96
|
-
<Divider size={32} />
|
|
97
|
-
<Button
|
|
98
|
-
type="primary"
|
|
99
|
-
size="large"
|
|
100
|
-
prefix={<WarningIcon />}
|
|
101
|
-
fullWidth
|
|
102
|
-
onClick={onConfirm}>
|
|
103
|
-
{errorMessages().highValueLossError.confirmMessage}
|
|
104
|
-
</Button>
|
|
105
|
-
</Modal>
|
|
106
|
-
);
|
|
107
|
-
}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
BridgeLimitError,
|
|
3
|
-
InsufficientSlippageError,
|
|
4
|
-
QuoteWarning,
|
|
5
|
-
} from '../../types';
|
|
6
|
-
|
|
7
|
-
import { i18n } from '@lingui/core';
|
|
8
|
-
|
|
9
|
-
import { errorMessages } from '../../constants/errors';
|
|
10
|
-
import { QuoteErrorType, QuoteWarningType } from '../../types';
|
|
11
|
-
import { getPriceImpactLevel } from '../../utils/quote';
|
|
12
|
-
|
|
13
|
-
type AlertInfo = {
|
|
14
|
-
alertType: 'error' | 'warning';
|
|
15
|
-
title: string;
|
|
16
|
-
action: 'show-info' | 'change-settings' | null;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export function makeAlerts(
|
|
20
|
-
warning: QuoteWarning | null,
|
|
21
|
-
error: BridgeLimitError | InsufficientSlippageError | null
|
|
22
|
-
): AlertInfo | null {
|
|
23
|
-
const alertInfo: AlertInfo = {
|
|
24
|
-
alertType: 'warning',
|
|
25
|
-
title: '',
|
|
26
|
-
action: 'show-info',
|
|
27
|
-
};
|
|
28
|
-
if (warning) {
|
|
29
|
-
if (warning.type === QuoteWarningType.HIGH_VALUE_LOSS) {
|
|
30
|
-
const warningLevel = getPriceImpactLevel(warning.priceImpact);
|
|
31
|
-
if (warningLevel === 'high') {
|
|
32
|
-
alertInfo.alertType = 'error';
|
|
33
|
-
}
|
|
34
|
-
alertInfo.title = errorMessages().highValueLossError.title;
|
|
35
|
-
}
|
|
36
|
-
if (warning.type === QuoteWarningType.UNKNOWN_PRICE) {
|
|
37
|
-
alertInfo.title = errorMessages().unknownPriceError.title;
|
|
38
|
-
}
|
|
39
|
-
if (warning.type === QuoteWarningType.INSUFFICIENT_SLIPPAGE) {
|
|
40
|
-
alertInfo.title = i18n.t({
|
|
41
|
-
id: 'minimum required slippage for this route: {minRequiredSlippage}',
|
|
42
|
-
values: {
|
|
43
|
-
minRequiredSlippage: warning.minRequiredSlippage,
|
|
44
|
-
},
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
if (warning.type === QuoteWarningType.HIGH_SLIPPAGE) {
|
|
48
|
-
alertInfo.title = i18n.t('Caution, your slippage is high');
|
|
49
|
-
}
|
|
50
|
-
return alertInfo;
|
|
51
|
-
}
|
|
52
|
-
if (error) {
|
|
53
|
-
alertInfo.alertType = 'error';
|
|
54
|
-
if (error.type === QuoteErrorType.BRIDGE_LIMIT) {
|
|
55
|
-
alertInfo.title = error.recommendation;
|
|
56
|
-
alertInfo.action = null;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
if (error.type === QuoteErrorType.INSUFFICIENT_SLIPPAGE) {
|
|
60
|
-
alertInfo.title = '';
|
|
61
|
-
alertInfo.action = 'change-settings';
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
return alertInfo;
|
|
65
|
-
}
|
|
66
|
-
return null;
|
|
67
|
-
}
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import type { PropTypes } from './QuoteWarningsAndErrors.types';
|
|
2
|
-
|
|
3
|
-
import { i18n } from '@lingui/core';
|
|
4
|
-
import { Alert, Button, InfoIcon } from '@rango-dev/ui';
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import { useNavigate } from 'react-router-dom';
|
|
7
|
-
|
|
8
|
-
import { navigationRoutes } from '../../constants/navigationRoutes';
|
|
9
|
-
import { QuoteErrorType, QuoteWarningType } from '../../types';
|
|
10
|
-
import { NoResult } from '../NoResult';
|
|
11
|
-
|
|
12
|
-
import { HighValueLossWarningModal } from './HighValueLossWarningModal';
|
|
13
|
-
import { makeAlerts } from './QuoteWarningsAndErrors.helpers';
|
|
14
|
-
import { Action, Alerts } from './QuoteWarningsAndErrors.styles';
|
|
15
|
-
import { SlippageWarningModal } from './SlippageWariningModal';
|
|
16
|
-
import { UnknownPriceWarningModal } from './UnknownPriceWarningModal';
|
|
17
|
-
|
|
18
|
-
export function QuoteWarningsAndErrors(props: PropTypes) {
|
|
19
|
-
const {
|
|
20
|
-
warning,
|
|
21
|
-
error,
|
|
22
|
-
refetchQuote,
|
|
23
|
-
showWarningModal,
|
|
24
|
-
onOpenWarningModal,
|
|
25
|
-
onCloseWarningModal,
|
|
26
|
-
onConfirmWarningModal,
|
|
27
|
-
} = props;
|
|
28
|
-
|
|
29
|
-
const navigate = useNavigate();
|
|
30
|
-
|
|
31
|
-
const warningModalHandlers = {
|
|
32
|
-
open: showWarningModal,
|
|
33
|
-
onClose: onCloseWarningModal,
|
|
34
|
-
onConfirm: onConfirmWarningModal,
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
const showNoResultMessage =
|
|
38
|
-
error?.type === QuoteErrorType.NO_RESULT ||
|
|
39
|
-
error?.type === QuoteErrorType.REQUEST_FAILED;
|
|
40
|
-
|
|
41
|
-
const alertInfo = makeAlerts(
|
|
42
|
-
warning,
|
|
43
|
-
error?.type === QuoteErrorType.BRIDGE_LIMIT ||
|
|
44
|
-
error?.type === QuoteErrorType.INSUFFICIENT_SLIPPAGE
|
|
45
|
-
? error
|
|
46
|
-
: null
|
|
47
|
-
);
|
|
48
|
-
|
|
49
|
-
const showAlerts = !!alertInfo;
|
|
50
|
-
|
|
51
|
-
return (
|
|
52
|
-
<>
|
|
53
|
-
{showNoResultMessage && <NoResult error={error} fetch={refetchQuote} />}
|
|
54
|
-
|
|
55
|
-
{showAlerts && (
|
|
56
|
-
<Alerts>
|
|
57
|
-
<Alert
|
|
58
|
-
title={alertInfo.title}
|
|
59
|
-
type={alertInfo.alertType}
|
|
60
|
-
variant="alarm"
|
|
61
|
-
action={
|
|
62
|
-
alertInfo.action === 'show-info' ? (
|
|
63
|
-
<Action onClick={onOpenWarningModal}>
|
|
64
|
-
<InfoIcon size={12} color="gray" />
|
|
65
|
-
</Action>
|
|
66
|
-
) : (
|
|
67
|
-
<Button
|
|
68
|
-
size="xsmall"
|
|
69
|
-
type={'error'}
|
|
70
|
-
onClick={() => navigate(navigationRoutes.settings)}>
|
|
71
|
-
{i18n.t('Change Settings')}
|
|
72
|
-
</Button>
|
|
73
|
-
)
|
|
74
|
-
}
|
|
75
|
-
/>
|
|
76
|
-
</Alerts>
|
|
77
|
-
)}
|
|
78
|
-
|
|
79
|
-
{warning && (
|
|
80
|
-
<>
|
|
81
|
-
{warning.type === QuoteWarningType.HIGH_VALUE_LOSS && (
|
|
82
|
-
<HighValueLossWarningModal
|
|
83
|
-
{...warningModalHandlers}
|
|
84
|
-
warning={warning}
|
|
85
|
-
/>
|
|
86
|
-
)}
|
|
87
|
-
|
|
88
|
-
{(warning.type === QuoteWarningType.HIGH_SLIPPAGE ||
|
|
89
|
-
warning.type === QuoteWarningType.INSUFFICIENT_SLIPPAGE) && (
|
|
90
|
-
<SlippageWarningModal {...warningModalHandlers} warning={warning} />
|
|
91
|
-
)}
|
|
92
|
-
|
|
93
|
-
{warning.type === QuoteWarningType.UNKNOWN_PRICE && (
|
|
94
|
-
<UnknownPriceWarningModal
|
|
95
|
-
{...warningModalHandlers}
|
|
96
|
-
warning={warning}
|
|
97
|
-
/>
|
|
98
|
-
)}
|
|
99
|
-
</>
|
|
100
|
-
)}
|
|
101
|
-
</>
|
|
102
|
-
);
|
|
103
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { QuoteError, QuoteWarning } from '../../types';
|
|
2
|
-
|
|
3
|
-
export interface PropTypes {
|
|
4
|
-
loading: boolean;
|
|
5
|
-
error: QuoteError | null;
|
|
6
|
-
warning: QuoteWarning | null;
|
|
7
|
-
showWarningModal: boolean;
|
|
8
|
-
refetchQuote: () => void;
|
|
9
|
-
onOpenWarningModal: () => void;
|
|
10
|
-
onCloseWarningModal: () => void;
|
|
11
|
-
onConfirmWarningModal: () => void;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
type ModalPropTypesKeys = keyof Omit<PropTypes, 'extraSpace' | 'loading'>;
|
|
15
|
-
|
|
16
|
-
export type ModalPropTypes = Pick<PropTypes, ModalPropTypesKeys> & {
|
|
17
|
-
open: boolean;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export interface ModalContentData {
|
|
21
|
-
title: string;
|
|
22
|
-
value: string;
|
|
23
|
-
valueColor?: string;
|
|
24
|
-
}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
HighSlippageWarning,
|
|
3
|
-
InsufficientSlippageWarning,
|
|
4
|
-
} from '../../types';
|
|
5
|
-
|
|
6
|
-
import { i18n } from '@lingui/core';
|
|
7
|
-
import { Button, Divider, MessageBox, Modal, Typography } from '@rango-dev/ui';
|
|
8
|
-
import React from 'react';
|
|
9
|
-
import { useNavigate } from 'react-router-dom';
|
|
10
|
-
|
|
11
|
-
import { navigationRoutes } from '../../constants/navigationRoutes';
|
|
12
|
-
import { useSettingsStore } from '../../store/settings';
|
|
13
|
-
import { QuoteWarningType } from '../../types';
|
|
14
|
-
import { getContainer } from '../../utils/common';
|
|
15
|
-
|
|
16
|
-
type PropsTypes = {
|
|
17
|
-
open: boolean;
|
|
18
|
-
onClose: () => void;
|
|
19
|
-
onConfirm: () => void;
|
|
20
|
-
warning: InsufficientSlippageWarning | HighSlippageWarning;
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export function SlippageWarningModal(props: PropsTypes) {
|
|
24
|
-
const { customSlippage, slippage } = useSettingsStore();
|
|
25
|
-
const { open, onClose, onConfirm, warning } = props;
|
|
26
|
-
const navigate = useNavigate();
|
|
27
|
-
const userSlippage = customSlippage ?? slippage;
|
|
28
|
-
return (
|
|
29
|
-
<Modal
|
|
30
|
-
anchor="bottom"
|
|
31
|
-
open={open}
|
|
32
|
-
prefix={
|
|
33
|
-
<Button
|
|
34
|
-
size="small"
|
|
35
|
-
variant="ghost"
|
|
36
|
-
onClick={() => navigate('/' + navigationRoutes.settings)}>
|
|
37
|
-
<Typography variant="label" size="medium" color="$neutral900">
|
|
38
|
-
{i18n.t('Change settings')}
|
|
39
|
-
</Typography>
|
|
40
|
-
</Button>
|
|
41
|
-
}
|
|
42
|
-
container={getContainer()}
|
|
43
|
-
onClose={onClose}>
|
|
44
|
-
<MessageBox
|
|
45
|
-
type="warning"
|
|
46
|
-
title={
|
|
47
|
-
warning.type === QuoteWarningType.HIGH_SLIPPAGE
|
|
48
|
-
? i18n.t('High slippage')
|
|
49
|
-
: i18n.t('Low slippage')
|
|
50
|
-
}
|
|
51
|
-
description={
|
|
52
|
-
warning.type === QuoteWarningType.HIGH_SLIPPAGE
|
|
53
|
-
? i18n.t({
|
|
54
|
-
id: ' Caution, your slippage is high (={userSlippage}). Your trade may be front run.',
|
|
55
|
-
values: { userSlippage },
|
|
56
|
-
})
|
|
57
|
-
: i18n.t({
|
|
58
|
-
id: 'We recommend you to increase slippage to at least {minRequiredSlippage} for this route.',
|
|
59
|
-
values: {
|
|
60
|
-
minRequiredSlippage: warning.minRequiredSlippage,
|
|
61
|
-
},
|
|
62
|
-
})
|
|
63
|
-
}>
|
|
64
|
-
<Divider size={18} />
|
|
65
|
-
<Divider size={32} />
|
|
66
|
-
<Button
|
|
67
|
-
size="large"
|
|
68
|
-
type="primary"
|
|
69
|
-
variant="contained"
|
|
70
|
-
fullWidth
|
|
71
|
-
onClick={onConfirm}>
|
|
72
|
-
{i18n.t('Confirm anyway')}
|
|
73
|
-
</Button>
|
|
74
|
-
</MessageBox>
|
|
75
|
-
</Modal>
|
|
76
|
-
);
|
|
77
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import type { UnknownPriceWarning } from '../../types';
|
|
2
|
-
|
|
3
|
-
import { Button, Divider, MessageBox, Modal, WarningIcon } from '@rango-dev/ui';
|
|
4
|
-
import React from 'react';
|
|
5
|
-
|
|
6
|
-
import { errorMessages } from '../../constants/errors';
|
|
7
|
-
import { getContainer } from '../../utils/common';
|
|
8
|
-
|
|
9
|
-
type Props = {
|
|
10
|
-
open: boolean;
|
|
11
|
-
onClose: () => void;
|
|
12
|
-
onConfirm: () => void;
|
|
13
|
-
warning: UnknownPriceWarning;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export function UnknownPriceWarningModal(props: Props) {
|
|
17
|
-
const { open, onClose, onConfirm } = props;
|
|
18
|
-
|
|
19
|
-
return (
|
|
20
|
-
<Modal open={open} onClose={onClose} container={getContainer()}>
|
|
21
|
-
<MessageBox
|
|
22
|
-
type="warning"
|
|
23
|
-
title={errorMessages().unknownPriceError.impactTitle}
|
|
24
|
-
description={errorMessages().unknownPriceError.description}
|
|
25
|
-
/>
|
|
26
|
-
|
|
27
|
-
<Divider size={32} />
|
|
28
|
-
<Button
|
|
29
|
-
type="primary"
|
|
30
|
-
size="large"
|
|
31
|
-
prefix={<WarningIcon />}
|
|
32
|
-
fullWidth
|
|
33
|
-
onClick={onConfirm}>
|
|
34
|
-
{errorMessages().unknownPriceError.confirmMessage}
|
|
35
|
-
</Button>
|
|
36
|
-
</Modal>
|
|
37
|
-
);
|
|
38
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { QuoteWarningsAndErrors } from './QuoteWarningsAndErrors';
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { styled } from '@rango-dev/ui';
|
|
2
|
-
|
|
3
|
-
export const QuoteContainer = styled('div', {
|
|
4
|
-
width: '100%',
|
|
5
|
-
paddingTop: '$2',
|
|
6
|
-
});
|
|
7
|
-
|
|
8
|
-
export const FooterStepAlarm = styled('div', {
|
|
9
|
-
paddingBottom: '$15',
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
export const FooterAlert = styled('div', {
|
|
13
|
-
width: '100%',
|
|
14
|
-
display: 'flex',
|
|
15
|
-
});
|