@rango-dev/widget-embedded 0.17.1-next.3 → 0.17.1-next.30
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/dist/QueueManager.d.ts +5 -2
- package/dist/QueueManager.d.ts.map +1 -1
- package/dist/components/AppRouter.d.ts +0 -2
- package/dist/components/AppRouter.d.ts.map +1 -1
- package/dist/components/AppRoutes.d.ts +1 -6
- package/dist/components/AppRoutes.d.ts.map +1 -1
- package/dist/components/ConfirmWalletsModal/ConfirmWallets.styles.d.ts +56 -56
- package/dist/components/ConfirmWalletsModal/ConfirmWalletsModal.d.ts.map +1 -1
- package/dist/components/ConfirmWalletsModal/ConfirmWalletsModal.types.d.ts +0 -2
- 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 +1 -4
- package/dist/components/ConfirmWalletsModal/WalletList.type.d.ts.map +1 -1
- package/dist/components/HeaderButtons/HomeButtons.d.ts.map +1 -1
- package/dist/components/Layout/Layout.d.ts.map +1 -1
- package/dist/components/Layout/Layout.types.d.ts +2 -2
- package/dist/components/Layout/Layout.types.d.ts.map +1 -1
- package/dist/components/NotificationContent/NotificationContent.d.ts.map +1 -1
- package/dist/components/Quote/Quote.d.ts.map +1 -1
- package/dist/components/Quote/Quote.styles.d.ts +159 -0
- package/dist/components/Quote/Quote.styles.d.ts.map +1 -1
- package/dist/components/Quote/Quote.types.d.ts +0 -1
- package/dist/components/Quote/Quote.types.d.ts.map +1 -1
- package/dist/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.d.ts.map +1 -1
- package/dist/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.helpers.d.ts.map +1 -1
- package/dist/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.styles.d.ts.map +1 -1
- package/dist/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.types.d.ts +1 -0
- package/dist/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.types.d.ts.map +1 -1
- package/dist/components/Slippage/Slippage.d.ts.map +1 -1
- package/dist/components/SwapDetails/SwapDetails.Placeholder.d.ts.map +1 -1
- package/dist/components/SwapDetails/SwapDetails.d.ts.map +1 -1
- package/dist/components/SwapDetails/SwapDetails.helpers.d.ts +1 -1
- package/dist/components/SwapDetails/SwapDetails.helpers.d.ts.map +1 -1
- package/dist/components/SwapDetailsModal/SwapDetailsCompleteModal.d.ts.map +1 -1
- package/dist/components/SwapDetailsModal/SwapDetailsModal.helpers.d.ts +1 -1
- package/dist/components/SwapDetailsModal/SwapDetailsModal.helpers.d.ts.map +1 -1
- package/dist/components/SwapDetailsModal/SwapDetailsModal.types.d.ts +1 -1
- package/dist/components/SwapDetailsModal/SwapDetailsModal.types.d.ts.map +1 -1
- package/dist/components/SwapsGroup/SwapsGroup.d.ts.map +1 -1
- package/dist/components/SwapsGroup/SwapsGroup.styles.d.ts.map +1 -1
- package/dist/components/TokenList/TokenList.d.ts.map +1 -1
- package/dist/components/TokenList/TokenList.helpers.d.ts +2 -2
- package/dist/components/TokenList/TokenList.helpers.d.ts.map +1 -1
- package/dist/components/TokenList/TokenList.styles.d.ts.map +1 -1
- package/dist/components/TokenList/TokenList.types.d.ts +3 -9
- package/dist/components/TokenList/TokenList.types.d.ts.map +1 -1
- package/dist/components/TokenList/index.d.ts +0 -1
- package/dist/components/TokenList/index.d.ts.map +1 -1
- package/dist/components/UpdateUrl.d.ts +1 -6
- package/dist/components/UpdateUrl.d.ts.map +1 -1
- package/dist/components/WidgetEvents.d.ts.map +1 -1
- package/dist/constants/errors.d.ts.map +1 -1
- package/dist/constants/index.d.ts +1 -0
- package/dist/constants/index.d.ts.map +1 -1
- package/dist/constants/navigationRoutes.d.ts +1 -2
- package/dist/constants/navigationRoutes.d.ts.map +1 -1
- package/dist/constants/searchParams.d.ts +2 -1
- package/dist/constants/searchParams.d.ts.map +1 -1
- package/dist/containers/App/App.d.ts +3 -0
- package/dist/containers/App/App.d.ts.map +1 -0
- package/dist/containers/App/App.styles.d.ts +158 -0
- package/dist/containers/App/App.styles.d.ts.map +1 -0
- package/dist/containers/App/index.d.ts +2 -0
- package/dist/containers/App/index.d.ts.map +1 -0
- package/dist/containers/QuoteInfo/QuoteInfo.d.ts.map +1 -1
- package/dist/containers/QuoteInfo/QuoteInfo.styles.d.ts +316 -0
- package/dist/containers/QuoteInfo/QuoteInfo.styles.d.ts.map +1 -1
- package/dist/containers/QuoteInfo/QuoteInfo.types.d.ts +3 -0
- package/dist/containers/QuoteInfo/QuoteInfo.types.d.ts.map +1 -1
- package/dist/containers/Wallets/Wallets.d.ts +6 -0
- package/dist/containers/Wallets/Wallets.d.ts.map +1 -0
- package/dist/containers/Wallets/Wallets.types.d.ts +11 -0
- package/dist/containers/Wallets/Wallets.types.d.ts.map +1 -0
- package/dist/containers/Wallets/index.d.ts +2 -0
- package/dist/containers/Wallets/index.d.ts.map +1 -0
- package/dist/containers/Widget/Widget.d.ts +5 -0
- package/dist/containers/Widget/Widget.d.ts.map +1 -0
- package/dist/containers/Widget/Widget.types.d.ts +5 -0
- package/dist/containers/Widget/Widget.types.d.ts.map +1 -0
- package/dist/containers/Widget/index.d.ts +3 -0
- package/dist/containers/Widget/index.d.ts.map +1 -0
- package/dist/containers/WidgetInfo/WidgetInfo.d.ts +6 -0
- package/dist/containers/WidgetInfo/WidgetInfo.d.ts.map +1 -0
- package/dist/containers/WidgetInfo/WidgetInfo.helpers.d.ts +20 -0
- package/dist/containers/WidgetInfo/WidgetInfo.helpers.d.ts.map +1 -0
- package/dist/containers/WidgetInfo/WidgetInfo.types.d.ts +21 -0
- package/dist/containers/WidgetInfo/WidgetInfo.types.d.ts.map +1 -0
- package/dist/containers/WidgetInfo/index.d.ts +2 -0
- package/dist/containers/WidgetInfo/index.d.ts.map +1 -0
- package/dist/containers/WidgetProvider/WidgetProvider.d.ts +5 -0
- package/dist/containers/WidgetProvider/WidgetProvider.d.ts.map +1 -0
- package/dist/containers/WidgetProvider/WidgetProvider.types.d.ts +7 -0
- package/dist/containers/WidgetProvider/WidgetProvider.types.d.ts.map +1 -0
- package/dist/containers/WidgetProvider/index.d.ts +2 -0
- package/dist/containers/WidgetProvider/index.d.ts.map +1 -0
- package/dist/hooks/useConfirmSwap/useConfirmSwap.d.ts.map +1 -1
- package/dist/hooks/useConfirmSwap/useConfirmSwap.helpers.d.ts +6 -3
- package/dist/hooks/useConfirmSwap/useConfirmSwap.helpers.d.ts.map +1 -1
- package/dist/hooks/useConfirmSwap/useConfirmSwap.types.d.ts +1 -1
- package/dist/hooks/useConfirmSwap/useConfirmSwap.types.d.ts.map +1 -1
- package/dist/hooks/useForceAutoConnect.d.ts +2 -0
- package/dist/hooks/useForceAutoConnect.d.ts.map +1 -0
- package/dist/hooks/useLanguage.d.ts +1 -1
- package/dist/hooks/useLanguage.d.ts.map +1 -1
- package/dist/hooks/useNavigateBack.d.ts +1 -3
- package/dist/hooks/useNavigateBack.d.ts.map +1 -1
- package/dist/hooks/usePrepareBlockchainList/usePrepareBlockchainList.constants.d.ts +1 -1
- package/dist/hooks/usePrepareBlockchainList/usePrepareBlockchainList.d.ts +2 -2
- package/dist/hooks/usePrepareBlockchainList/usePrepareBlockchainList.d.ts.map +1 -1
- package/dist/hooks/usePrepareBlockchainList/usePrepareBlockchainList.helpers.d.ts +3 -5
- package/dist/hooks/usePrepareBlockchainList/usePrepareBlockchainList.helpers.d.ts.map +1 -1
- package/dist/hooks/usePrepareBlockchainList/usePrepareBlockchainList.mock.d.ts +1 -0
- package/dist/hooks/usePrepareBlockchainList/usePrepareBlockchainList.mock.d.ts.map +1 -1
- package/dist/hooks/usePrepareBlockchainList/usePrepareBlockchainList.types.d.ts +5 -1
- package/dist/hooks/usePrepareBlockchainList/usePrepareBlockchainList.types.d.ts.map +1 -1
- package/dist/hooks/useSwapInput.d.ts.map +1 -1
- package/dist/hooks/useSyncStoresWithConfig.d.ts +1 -2
- package/dist/hooks/useSyncStoresWithConfig.d.ts.map +1 -1
- package/dist/hooks/useTheme.d.ts +1 -1
- package/dist/hooks/useTheme.d.ts.map +1 -1
- package/dist/hooks/useWalletList.d.ts.map +1 -1
- package/dist/index.d.ts +20 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +4 -4
- package/dist/pages/ConfirmSwapPage.d.ts +1 -6
- package/dist/pages/ConfirmSwapPage.d.ts.map +1 -1
- package/dist/pages/HistoryPage.d.ts.map +1 -1
- package/dist/pages/Home.d.ts.map +1 -1
- package/dist/pages/LanguagePage.d.ts.map +1 -1
- package/dist/pages/LiquiditySourcePage.d.ts +1 -2
- package/dist/pages/LiquiditySourcePage.d.ts.map +1 -1
- package/dist/pages/SelectBlockchainPage.d.ts.map +1 -1
- package/dist/pages/SelectSwapItemsPage.d.ts.map +1 -1
- package/dist/pages/SettingsPage.d.ts +1 -6
- package/dist/pages/SettingsPage.d.ts.map +1 -1
- package/dist/pages/SwapDetailsPage.d.ts.map +1 -1
- package/dist/pages/ThemePage.d.ts.map +1 -1
- package/dist/pages/WalletsPage.d.ts +1 -8
- package/dist/pages/WalletsPage.d.ts.map +1 -1
- package/dist/store/AppStore.d.ts +47 -0
- package/dist/store/AppStore.d.ts.map +1 -0
- package/dist/store/app.d.ts +41 -22
- package/dist/store/app.d.ts.map +1 -1
- package/dist/store/notification.d.ts +4 -3
- package/dist/store/notification.d.ts.map +1 -1
- package/dist/store/quote.d.ts +23 -16
- package/dist/store/quote.d.ts.map +1 -1
- package/dist/store/slices/config.d.ts +3 -2
- package/dist/store/slices/config.d.ts.map +1 -1
- package/dist/store/slices/data.d.ts +3 -0
- package/dist/store/slices/data.d.ts.map +1 -1
- package/dist/store/slices/settings.d.ts +39 -0
- package/dist/store/slices/settings.d.ts.map +1 -0
- package/dist/store/ui.d.ts +2 -1
- package/dist/store/ui.d.ts.map +1 -1
- package/dist/store/wallets.d.ts +14 -9
- package/dist/store/wallets.d.ts.map +1 -1
- package/dist/types/config.d.ts +38 -5
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/swap.d.ts +4 -14
- package/dist/types/swap.d.ts.map +1 -1
- package/dist/types/wallets.d.ts +15 -1
- package/dist/types/wallets.d.ts.map +1 -1
- package/dist/utils/colors.d.ts.map +1 -1
- package/dist/utils/configs.d.ts +1 -0
- package/dist/utils/configs.d.ts.map +1 -1
- package/dist/utils/meta.d.ts +2 -1
- package/dist/utils/meta.d.ts.map +1 -1
- package/dist/utils/providers.d.ts +2 -2
- package/dist/utils/providers.d.ts.map +1 -1
- package/dist/utils/queue.d.ts +2 -2
- package/dist/utils/queue.d.ts.map +1 -1
- package/dist/utils/quote.d.ts +1 -1
- package/dist/utils/quote.d.ts.map +1 -1
- package/dist/utils/settings.d.ts +6 -2
- package/dist/utils/settings.d.ts.map +1 -1
- package/dist/utils/swap.d.ts +16 -7
- package/dist/utils/swap.d.ts.map +1 -1
- package/dist/utils/time.d.ts +1 -1
- package/dist/utils/time.d.ts.map +1 -1
- package/dist/utils/wallets.d.ts +7 -9
- package/dist/utils/wallets.d.ts.map +1 -1
- package/package.json +12 -10
- package/src/QueueManager.tsx +18 -17
- package/src/components/AppRouter.tsx +8 -32
- package/src/components/AppRoutes.tsx +57 -69
- package/src/components/BlockchainList/BlockchainList.tsx +4 -4
- package/src/components/BlockchainsSection/BlockchainsSection.tsx +4 -4
- package/src/components/ConfirmWalletsModal/ConfirmWalletsModal.tsx +16 -19
- package/src/components/ConfirmWalletsModal/ConfirmWalletsModal.types.ts +0 -2
- package/src/components/ConfirmWalletsModal/WalletList.tsx +6 -5
- package/src/components/ConfirmWalletsModal/WalletList.type.ts +1 -4
- package/src/components/HeaderButtons/HomeButtons.tsx +28 -18
- package/src/components/Layout/Layout.tsx +20 -7
- package/src/components/Layout/Layout.types.ts +2 -2
- package/src/components/NoResult/NoResult.helpers.ts +12 -12
- package/src/components/NoResult/NoResult.tsx +6 -6
- package/src/components/NotificationContent/NotificationContent.tsx +5 -3
- package/src/components/Quote/Quote.styles.ts +28 -1
- package/src/components/Quote/Quote.tsx +100 -34
- package/src/components/Quote/Quote.types.ts +0 -1
- package/src/components/Quote/QuoteSkeleton.tsx +1 -1
- package/src/components/QuoteWarningsAndErrors/QuoteErrorsModalItem.tsx +1 -1
- package/src/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.helpers.ts +11 -4
- package/src/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.styles.ts +8 -1
- package/src/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.tsx +13 -13
- package/src/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.types.ts +1 -0
- package/src/components/QuoteWarningsAndErrors/SlippageWariningModal.tsx +3 -3
- package/src/components/Slippage/Slippage.tsx +3 -5
- package/src/components/SwapDetails/SwapDetails.Placeholder.tsx +0 -4
- package/src/components/SwapDetails/SwapDetails.helpers.tsx +1 -1
- package/src/components/SwapDetails/SwapDetails.tsx +19 -39
- package/src/components/SwapDetailsAlerts/SwapDetailsAlerts.Warning.tsx +1 -1
- package/src/components/SwapDetailsModal/SwapDetailsCompleteModal.tsx +4 -3
- package/src/components/SwapDetailsModal/SwapDetailsModal.Cancel.tsx +2 -2
- package/src/components/SwapDetailsModal/SwapDetailsModal.helpers.tsx +1 -1
- package/src/components/SwapDetailsModal/SwapDetailsModal.tsx +1 -1
- package/src/components/SwapDetailsModal/SwapDetailsModal.types.ts +1 -1
- package/src/components/SwapsGroup/SwapsGroup.styles.ts +8 -1
- package/src/components/SwapsGroup/SwapsGroup.tsx +0 -2
- package/src/components/TokenList/TokenList.helpers.ts +2 -2
- package/src/components/TokenList/TokenList.styles.ts +14 -2
- package/src/components/TokenList/TokenList.tsx +16 -19
- package/src/components/TokenList/TokenList.types.ts +3 -10
- package/src/components/TokenList/index.ts +0 -1
- package/src/components/UpdateUrl.tsx +23 -18
- package/src/components/WidgetEvents.tsx +4 -2
- package/src/constants/errors.ts +9 -5
- package/src/constants/index.ts +1 -0
- package/src/constants/navigationRoutes.ts +7 -8
- package/src/constants/searchParams.ts +1 -0
- package/src/containers/App/App.styles.ts +18 -0
- package/src/containers/App/App.tsx +52 -0
- package/src/containers/App/index.ts +1 -0
- package/src/containers/QuoteInfo/QuoteInfo.styles.ts +17 -1
- package/src/containers/QuoteInfo/QuoteInfo.tsx +44 -43
- package/src/containers/QuoteInfo/QuoteInfo.types.ts +3 -0
- package/src/{Wallets.tsx → containers/Wallets/Wallets.tsx} +48 -34
- package/src/containers/Wallets/Wallets.types.ts +12 -0
- package/src/containers/Wallets/index.ts +1 -0
- package/src/containers/Widget/Widget.tsx +19 -0
- package/src/containers/Widget/Widget.types.ts +5 -0
- package/src/containers/Widget/index.ts +2 -0
- package/src/containers/WidgetInfo/WidgetInfo.helpers.ts +64 -0
- package/src/containers/WidgetInfo/WidgetInfo.tsx +62 -0
- package/src/containers/WidgetInfo/WidgetInfo.types.ts +21 -0
- package/src/containers/WidgetInfo/index.ts +1 -0
- package/src/containers/WidgetProvider/WidgetProvider.tsx +28 -0
- package/src/containers/WidgetProvider/WidgetProvider.types.ts +7 -0
- package/src/containers/WidgetProvider/index.ts +1 -0
- package/src/hooks/useConfirmSwap/useConfirmSwap.helpers.ts +15 -11
- package/src/hooks/useConfirmSwap/useConfirmSwap.ts +25 -24
- package/src/hooks/useConfirmSwap/useConfirmSwap.types.ts +1 -1
- package/src/hooks/useForceAutoConnect.ts +27 -0
- package/src/hooks/useLanguage.ts +4 -5
- package/src/hooks/useNavigateBack.ts +3 -52
- package/src/hooks/usePrepareBlockchainList/usePrepareBlockchainList.constants.ts +1 -1
- package/src/hooks/usePrepareBlockchainList/usePrepareBlockchainList.helpers.ts +37 -7
- package/src/hooks/usePrepareBlockchainList/usePrepareBlockchainList.mock.ts +60 -0
- package/src/hooks/usePrepareBlockchainList/usePrepareBlockchainList.test.ts +78 -3
- package/src/hooks/usePrepareBlockchainList/usePrepareBlockchainList.ts +15 -6
- package/src/hooks/usePrepareBlockchainList/usePrepareBlockchainList.types.ts +6 -1
- package/src/hooks/useSwapInput.ts +89 -30
- package/src/hooks/useSyncStoresWithConfig.ts +38 -22
- package/src/hooks/useTheme.ts +4 -5
- package/src/hooks/useWalletList.ts +3 -5
- package/src/index.ts +53 -5
- package/src/pages/ConfirmSwapPage.tsx +39 -24
- package/src/pages/HistoryPage.tsx +2 -7
- package/src/pages/Home.tsx +58 -88
- package/src/pages/LanguagePage.tsx +0 -5
- package/src/pages/LiquiditySourcePage.tsx +24 -37
- package/src/pages/SelectBlockchainPage.tsx +28 -21
- package/src/pages/SelectSwapItemsPage.tsx +10 -27
- package/src/pages/SettingsPage.tsx +28 -24
- package/src/pages/SwapDetailsPage.tsx +6 -7
- package/src/pages/ThemePage.tsx +2 -7
- package/src/pages/WalletsPage.tsx +4 -15
- package/src/services/httpService.ts +1 -1
- package/src/store/AppStore.tsx +41 -0
- package/src/store/app.ts +44 -6
- package/src/store/quote.ts +29 -26
- package/src/store/slices/config.ts +25 -15
- package/src/store/slices/data.ts +64 -29
- package/src/store/slices/settings.ts +168 -0
- package/src/store/wallets.ts +68 -37
- package/src/types/config.ts +50 -5
- package/src/types/swap.ts +4 -13
- package/src/types/wallets.ts +18 -1
- package/src/utils/colors.ts +2 -1
- package/src/utils/configs.ts +2 -1
- package/src/utils/date.ts +1 -1
- package/src/utils/meta.ts +8 -1
- package/src/utils/providers.ts +8 -5
- package/src/utils/queue.ts +2 -2
- package/src/utils/quote.ts +7 -7
- package/src/utils/settings.ts +17 -10
- package/src/utils/swap.ts +59 -55
- package/src/utils/time.ts +1 -1
- package/src/utils/wallets.ts +107 -149
- package/dist/Wallets.d.ts +0 -17
- package/dist/Wallets.d.ts.map +0 -1
- package/dist/Widget.d.ts +0 -9
- package/dist/Widget.d.ts.map +0 -1
- package/dist/store/meta.d.ts +0 -23
- package/dist/store/meta.d.ts.map +0 -1
- package/dist/store/settings.d.ts +0 -81
- package/dist/store/settings.d.ts.map +0 -1
- package/src/Widget.tsx +0 -119
- package/src/store/meta.ts +0 -39
- package/src/store/settings.ts +0 -158
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as Collapsible from '@radix-ui/react-collapsible';
|
|
2
|
-
import { darkTheme, styled } from '@rango-dev/ui';
|
|
2
|
+
import { darkTheme, Image, styled } from '@rango-dev/ui';
|
|
3
3
|
|
|
4
4
|
import { CollapsibleContent } from '../ConfirmWalletsModal/ConfirmWallets.styles';
|
|
5
5
|
|
|
@@ -13,6 +13,7 @@ export const QuoteContainer = styled(Collapsible.Root, {
|
|
|
13
13
|
overflowY: 'hidden',
|
|
14
14
|
width: '100%',
|
|
15
15
|
borderRadius: '$xm',
|
|
16
|
+
cursor: 'default',
|
|
16
17
|
variants: {
|
|
17
18
|
recommended: {
|
|
18
19
|
true: {
|
|
@@ -107,11 +108,19 @@ export const SummaryContainer = styled('div', {
|
|
|
107
108
|
'& .summary': {
|
|
108
109
|
width: '100%',
|
|
109
110
|
padding: '$15 $15 $10 $15',
|
|
111
|
+
cursor: 'default',
|
|
110
112
|
},
|
|
111
113
|
'& .basic-info': {
|
|
112
114
|
paddingTop: '$10',
|
|
113
115
|
display: 'flex',
|
|
114
116
|
alignItems: 'center',
|
|
117
|
+
'.usd-value': {
|
|
118
|
+
$$color: '$colors$neutral600',
|
|
119
|
+
[`.${darkTheme} &`]: {
|
|
120
|
+
$$color: '$colors$neutral700',
|
|
121
|
+
},
|
|
122
|
+
color: '$$color',
|
|
123
|
+
},
|
|
115
124
|
},
|
|
116
125
|
});
|
|
117
126
|
|
|
@@ -162,6 +171,24 @@ export const Chains = styled(Collapsible.Trigger, {
|
|
|
162
171
|
'& div:nth-child(1)': { display: 'flex' },
|
|
163
172
|
});
|
|
164
173
|
|
|
174
|
+
export const ChainImageContainer = styled('div', {
|
|
175
|
+
width: '18px',
|
|
176
|
+
height: '18px',
|
|
177
|
+
borderRadius: '100%',
|
|
178
|
+
border: '1.5px transparent solid',
|
|
179
|
+
display: 'flex',
|
|
180
|
+
justifyContent: 'center',
|
|
181
|
+
alignItems: 'center',
|
|
182
|
+
variants: {
|
|
183
|
+
state: {
|
|
184
|
+
error: {
|
|
185
|
+
borderColor: '$error500',
|
|
186
|
+
},
|
|
187
|
+
warning: { borderColor: '$warning500' },
|
|
188
|
+
},
|
|
189
|
+
},
|
|
190
|
+
});
|
|
191
|
+
|
|
165
192
|
export const Content = styled(CollapsibleContent, {
|
|
166
193
|
width: '100%',
|
|
167
194
|
});
|
|
@@ -25,13 +25,20 @@ import {
|
|
|
25
25
|
PERCENTAGE_CHANGE_MIN_DECIMALS,
|
|
26
26
|
TOKEN_AMOUNT_MAX_DECIMALS,
|
|
27
27
|
TOKEN_AMOUNT_MIN_DECIMALS,
|
|
28
|
+
USD_VALUE_MAX_DECIMALS,
|
|
29
|
+
USD_VALUE_MIN_DECIMALS,
|
|
28
30
|
} from '../../constants/routing';
|
|
29
31
|
import {
|
|
30
32
|
FooterAlert,
|
|
31
33
|
FooterStepAlarm,
|
|
32
34
|
} from '../../containers/QuoteInfo/QuoteInfo.styles';
|
|
33
|
-
import {
|
|
35
|
+
import { useAppStore } from '../../store/AppStore';
|
|
34
36
|
import { QuoteErrorType, QuoteWarningType } from '../../types';
|
|
37
|
+
import { getContainer } from '../../utils/common';
|
|
38
|
+
import {
|
|
39
|
+
getBlockchainShortNameFor,
|
|
40
|
+
getSwapperDisplayName,
|
|
41
|
+
} from '../../utils/meta';
|
|
35
42
|
import {
|
|
36
43
|
numberToString,
|
|
37
44
|
secondsToString,
|
|
@@ -41,6 +48,7 @@ import { getPriceImpact, getPriceImpactLevel } from '../../utils/quote';
|
|
|
41
48
|
import { getTotalFeeInUsd } from '../../utils/swap';
|
|
42
49
|
|
|
43
50
|
import {
|
|
51
|
+
ChainImageContainer,
|
|
44
52
|
Chains,
|
|
45
53
|
Content,
|
|
46
54
|
EXPANDABLE_QUOTE_TRANSITION_DURATION,
|
|
@@ -53,9 +61,6 @@ import {
|
|
|
53
61
|
import { QuoteSummary } from './QuoteSummary';
|
|
54
62
|
|
|
55
63
|
export function Quote(props: QuoteProps) {
|
|
56
|
-
const {
|
|
57
|
-
meta: { tokens },
|
|
58
|
-
} = useMetaStore();
|
|
59
64
|
const {
|
|
60
65
|
quote,
|
|
61
66
|
input,
|
|
@@ -65,19 +70,39 @@ export function Quote(props: QuoteProps) {
|
|
|
65
70
|
type,
|
|
66
71
|
recommended = true,
|
|
67
72
|
} = props;
|
|
73
|
+
const tokens = useAppStore().tokens();
|
|
74
|
+
const blockchains = useAppStore().blockchains();
|
|
75
|
+
const swappers = useAppStore().swappers();
|
|
68
76
|
|
|
69
77
|
const [expanded, setExpanded] = useState(props.expanded);
|
|
70
78
|
const quoteRef = useRef<HTMLButtonElement | null>(null);
|
|
79
|
+
const prevExpanded = useRef(expanded);
|
|
71
80
|
const totalFee = numberToString(
|
|
72
81
|
getTotalFeeInUsd(quote.result?.swaps ?? [], tokens),
|
|
73
82
|
GAS_FEE_MIN_DECIMALS,
|
|
74
83
|
GAS_FEE_MAX_DECIMALS
|
|
75
84
|
);
|
|
76
85
|
const totalTime = secondsToString(totalArrivalTime(quote.result?.swaps));
|
|
77
|
-
|
|
86
|
+
const roundedInput = numberToString(
|
|
87
|
+
input.value,
|
|
88
|
+
TOKEN_AMOUNT_MIN_DECIMALS,
|
|
89
|
+
TOKEN_AMOUNT_MAX_DECIMALS
|
|
90
|
+
);
|
|
91
|
+
const roundedOutput = numberToString(
|
|
92
|
+
output.value,
|
|
93
|
+
TOKEN_AMOUNT_MIN_DECIMALS,
|
|
94
|
+
TOKEN_AMOUNT_MAX_DECIMALS
|
|
95
|
+
);
|
|
96
|
+
const roundedOutputUsdValue = output.usdValue
|
|
97
|
+
? numberToString(
|
|
98
|
+
output.usdValue,
|
|
99
|
+
USD_VALUE_MIN_DECIMALS,
|
|
100
|
+
USD_VALUE_MAX_DECIMALS
|
|
101
|
+
)
|
|
102
|
+
: '';
|
|
78
103
|
const priceImpact = getPriceImpact(input.usdValue, output.usdValue ?? null);
|
|
79
104
|
const percentageChange = numberToString(
|
|
80
|
-
|
|
105
|
+
priceImpact,
|
|
81
106
|
PERCENTAGE_CHANGE_MIN_DECIMALS,
|
|
82
107
|
PERCENTAGE_CHANGE_MAX_DECIMALS
|
|
83
108
|
);
|
|
@@ -89,8 +114,8 @@ export function Quote(props: QuoteProps) {
|
|
|
89
114
|
const stepHasError =
|
|
90
115
|
(error?.type === QuoteErrorType.BRIDGE_LIMIT &&
|
|
91
116
|
error.swap.swapperId === swap.swapperId) ||
|
|
92
|
-
(
|
|
93
|
-
|
|
117
|
+
(error?.type === QuoteErrorType.INSUFFICIENT_SLIPPAGE &&
|
|
118
|
+
error.recommendedSlippages?.has(index));
|
|
94
119
|
const stepHasWarning =
|
|
95
120
|
warning?.type === QuoteWarningType.INSUFFICIENT_SLIPPAGE &&
|
|
96
121
|
warning.recommendedSlippages?.has(index);
|
|
@@ -102,11 +127,17 @@ export function Quote(props: QuoteProps) {
|
|
|
102
127
|
}
|
|
103
128
|
|
|
104
129
|
return {
|
|
105
|
-
swapper: {
|
|
130
|
+
swapper: {
|
|
131
|
+
displayName: getSwapperDisplayName(swap.swapperId, swappers),
|
|
132
|
+
image: swap.swapperLogo,
|
|
133
|
+
},
|
|
106
134
|
from: {
|
|
107
135
|
token: { displayName: swap.from.symbol, image: swap.from.logo },
|
|
108
136
|
chain: {
|
|
109
|
-
displayName:
|
|
137
|
+
displayName: getBlockchainShortNameFor(
|
|
138
|
+
swap.from.blockchain,
|
|
139
|
+
blockchains
|
|
140
|
+
),
|
|
110
141
|
image: swap.from.blockchainLogo,
|
|
111
142
|
},
|
|
112
143
|
price: {
|
|
@@ -117,17 +148,38 @@ export function Quote(props: QuoteProps) {
|
|
|
117
148
|
TOKEN_AMOUNT_MIN_DECIMALS,
|
|
118
149
|
TOKEN_AMOUNT_MAX_DECIMALS
|
|
119
150
|
)
|
|
120
|
-
:
|
|
151
|
+
: numberToString(
|
|
152
|
+
swap.fromAmount,
|
|
153
|
+
TOKEN_AMOUNT_MIN_DECIMALS,
|
|
154
|
+
TOKEN_AMOUNT_MAX_DECIMALS
|
|
155
|
+
),
|
|
156
|
+
usdValue: numberToString(
|
|
157
|
+
(swap.from.usdPrice ?? 0) * parseFloat(swap.fromAmount),
|
|
158
|
+
USD_VALUE_MIN_DECIMALS,
|
|
159
|
+
USD_VALUE_MAX_DECIMALS
|
|
160
|
+
),
|
|
121
161
|
},
|
|
122
162
|
},
|
|
123
163
|
to: {
|
|
124
164
|
token: { displayName: swap.to.symbol, image: swap.to.logo },
|
|
125
165
|
chain: {
|
|
126
|
-
displayName:
|
|
166
|
+
displayName: getBlockchainShortNameFor(
|
|
167
|
+
swap.to.blockchain,
|
|
168
|
+
blockchains
|
|
169
|
+
),
|
|
127
170
|
image: swap.to.blockchainLogo,
|
|
128
171
|
},
|
|
129
172
|
price: {
|
|
130
|
-
value:
|
|
173
|
+
value: numberToString(
|
|
174
|
+
swap.toAmount,
|
|
175
|
+
TOKEN_AMOUNT_MIN_DECIMALS,
|
|
176
|
+
TOKEN_AMOUNT_MAX_DECIMALS
|
|
177
|
+
),
|
|
178
|
+
usdValue: numberToString(
|
|
179
|
+
(swap.to.usdPrice ?? 0) * parseFloat(swap.toAmount),
|
|
180
|
+
USD_VALUE_MIN_DECIMALS,
|
|
181
|
+
USD_VALUE_MAX_DECIMALS
|
|
182
|
+
),
|
|
131
183
|
},
|
|
132
184
|
},
|
|
133
185
|
state: stepState,
|
|
@@ -185,7 +237,7 @@ export function Quote(props: QuoteProps) {
|
|
|
185
237
|
variant="body"
|
|
186
238
|
color="neutral900">
|
|
187
239
|
{i18n.t({
|
|
188
|
-
id: '
|
|
240
|
+
id: 'Minimum required slippage is {minRequiredSlippage}',
|
|
189
241
|
values: {
|
|
190
242
|
...(error?.type ===
|
|
191
243
|
QuoteErrorType.INSUFFICIENT_SLIPPAGE && {
|
|
@@ -211,14 +263,16 @@ export function Quote(props: QuoteProps) {
|
|
|
211
263
|
};
|
|
212
264
|
const steps = getQuoteSteps(quote.result?.swaps ?? []);
|
|
213
265
|
const numberOfSteps = steps.length;
|
|
266
|
+
const tooltipContainer = getContainer();
|
|
214
267
|
|
|
215
268
|
useLayoutEffect(() => {
|
|
216
|
-
if (expanded && quoteRef.current) {
|
|
269
|
+
if (expanded && !prevExpanded.current && quoteRef.current) {
|
|
217
270
|
setTimeout(() => {
|
|
218
271
|
quoteRef?.current?.scrollIntoView({ behavior: 'smooth' });
|
|
219
272
|
}, EXPANDABLE_QUOTE_TRANSITION_DURATION);
|
|
220
273
|
}
|
|
221
|
-
|
|
274
|
+
prevExpanded.current = expanded;
|
|
275
|
+
}, [expanded, prevExpanded]);
|
|
222
276
|
|
|
223
277
|
return (
|
|
224
278
|
<>
|
|
@@ -237,16 +291,18 @@ export function Quote(props: QuoteProps) {
|
|
|
237
291
|
size="small"
|
|
238
292
|
variant="body"
|
|
239
293
|
style={{ letterSpacing: 0.4 }}>
|
|
240
|
-
{`${
|
|
241
|
-
|
|
242
|
-
} ${
|
|
294
|
+
{`${roundedInput} ${
|
|
295
|
+
steps[0].from.token.displayName
|
|
296
|
+
} = ${roundedOutput} ${
|
|
297
|
+
steps[steps.length - 1].to.token.displayName
|
|
298
|
+
}`}
|
|
243
299
|
</Typography>
|
|
244
300
|
<Typography
|
|
245
301
|
color="$neutral600"
|
|
246
302
|
ml={2}
|
|
247
303
|
size="xsmall"
|
|
248
304
|
variant="body">
|
|
249
|
-
{`($${
|
|
305
|
+
{`($${roundedOutputUsdValue})`}
|
|
250
306
|
</Typography>
|
|
251
307
|
</div>
|
|
252
308
|
)}
|
|
@@ -254,7 +310,7 @@ export function Quote(props: QuoteProps) {
|
|
|
254
310
|
<TokenAmount
|
|
255
311
|
type="output"
|
|
256
312
|
direction="vertical"
|
|
257
|
-
price={{ value:
|
|
313
|
+
price={{ value: roundedOutput, usdValue: roundedOutputUsdValue }}
|
|
258
314
|
token={{
|
|
259
315
|
displayName: steps[numberOfSteps - 1].to.token.displayName,
|
|
260
316
|
image: steps[numberOfSteps - 1].to.token.image,
|
|
@@ -283,38 +339,48 @@ export function Quote(props: QuoteProps) {
|
|
|
283
339
|
<Chains
|
|
284
340
|
ref={(ref) => (quoteRef.current = ref)}
|
|
285
341
|
recommended={recommended}
|
|
286
|
-
onClick={
|
|
342
|
+
onClick={() => setExpanded((prevState) => !prevState)}>
|
|
287
343
|
<div>
|
|
288
344
|
{steps.map((step, index) => {
|
|
289
345
|
const key = `item-${index}`;
|
|
346
|
+
const arrow = (
|
|
347
|
+
<IconContainer>
|
|
348
|
+
<ChevronRightIcon
|
|
349
|
+
size={12}
|
|
350
|
+
color="black"
|
|
351
|
+
{...(step.state && {
|
|
352
|
+
color: step.state === 'error' ? 'error' : 'warning',
|
|
353
|
+
})}
|
|
354
|
+
/>
|
|
355
|
+
</IconContainer>
|
|
356
|
+
);
|
|
290
357
|
return (
|
|
291
358
|
<React.Fragment key={key}>
|
|
292
359
|
<Tooltip
|
|
293
|
-
container={
|
|
360
|
+
container={tooltipContainer}
|
|
294
361
|
side="bottom"
|
|
295
362
|
sideOffset={4}
|
|
296
363
|
content={step.from.chain.displayName}>
|
|
297
|
-
<
|
|
364
|
+
<ChainImageContainer
|
|
365
|
+
state={step.state || steps[index - 1]?.state}>
|
|
366
|
+
<Image src={step.from.chain.image} size={16} />
|
|
367
|
+
</ChainImageContainer>
|
|
298
368
|
</Tooltip>
|
|
299
369
|
{index === numberOfSteps - 1 && (
|
|
300
370
|
<>
|
|
301
|
-
|
|
302
|
-
<ChevronRightIcon size={12} color="black" />
|
|
303
|
-
</IconContainer>
|
|
371
|
+
{arrow}
|
|
304
372
|
<Tooltip
|
|
305
|
-
container={
|
|
373
|
+
container={tooltipContainer}
|
|
306
374
|
side="bottom"
|
|
307
375
|
sideOffset={4}
|
|
308
376
|
content={step.to.chain.displayName}>
|
|
309
|
-
<
|
|
377
|
+
<ChainImageContainer state={step.state}>
|
|
378
|
+
<Image src={step.to.chain.image} size={16} />
|
|
379
|
+
</ChainImageContainer>
|
|
310
380
|
</Tooltip>
|
|
311
381
|
</>
|
|
312
382
|
)}
|
|
313
|
-
{index !== numberOfSteps - 1 &&
|
|
314
|
-
<IconContainer>
|
|
315
|
-
<ChevronRightIcon size={12} color="black" />
|
|
316
|
-
</IconContainer>
|
|
317
|
-
)}
|
|
383
|
+
{index !== numberOfSteps - 1 && <>{arrow}</>}
|
|
318
384
|
</React.Fragment>
|
|
319
385
|
);
|
|
320
386
|
})}
|
|
@@ -10,7 +10,7 @@ export function QuoteErrorsModalItem(props: ModalContentData) {
|
|
|
10
10
|
|
|
11
11
|
return (
|
|
12
12
|
<Item>
|
|
13
|
-
<Typography size="medium" variant="label"
|
|
13
|
+
<Typography size="medium" variant="label" className="_title">
|
|
14
14
|
{title}
|
|
15
15
|
</Typography>
|
|
16
16
|
<Typography
|
|
@@ -31,6 +31,7 @@ export function makeAlerts(
|
|
|
31
31
|
if (warningLevel === 'high') {
|
|
32
32
|
alertInfo.alertType = 'error';
|
|
33
33
|
}
|
|
34
|
+
alertInfo.action = null;
|
|
34
35
|
alertInfo.title = errorMessages().highValueLossError.title;
|
|
35
36
|
}
|
|
36
37
|
if (warning.type === QuoteWarningType.UNKNOWN_PRICE) {
|
|
@@ -38,14 +39,15 @@ export function makeAlerts(
|
|
|
38
39
|
}
|
|
39
40
|
if (warning.type === QuoteWarningType.INSUFFICIENT_SLIPPAGE) {
|
|
40
41
|
alertInfo.title = i18n.t({
|
|
41
|
-
id: '
|
|
42
|
+
id: 'We recommend you to increase slippage to at least {minRequiredSlippage} for this route.',
|
|
42
43
|
values: {
|
|
43
44
|
minRequiredSlippage: warning.minRequiredSlippage,
|
|
44
45
|
},
|
|
45
46
|
});
|
|
47
|
+
alertInfo.action = 'change-settings';
|
|
46
48
|
}
|
|
47
49
|
if (warning.type === QuoteWarningType.HIGH_SLIPPAGE) {
|
|
48
|
-
alertInfo.title = i18n.t('Caution, your slippage is high');
|
|
50
|
+
alertInfo.title = i18n.t('Caution, your slippage is high.');
|
|
49
51
|
}
|
|
50
52
|
return alertInfo;
|
|
51
53
|
}
|
|
@@ -53,11 +55,16 @@ export function makeAlerts(
|
|
|
53
55
|
alertInfo.alertType = 'error';
|
|
54
56
|
if (error.type === QuoteErrorType.BRIDGE_LIMIT) {
|
|
55
57
|
alertInfo.title = error.recommendation;
|
|
56
|
-
alertInfo.action =
|
|
58
|
+
alertInfo.action = 'show-info';
|
|
57
59
|
}
|
|
58
60
|
|
|
59
61
|
if (error.type === QuoteErrorType.INSUFFICIENT_SLIPPAGE) {
|
|
60
|
-
alertInfo.title =
|
|
62
|
+
alertInfo.title = i18n.t({
|
|
63
|
+
id: 'You need to increase slippage to at least {minRequiredSlippage} for this route.',
|
|
64
|
+
values: {
|
|
65
|
+
minRequiredSlippage: error.minRequiredSlippage,
|
|
66
|
+
},
|
|
67
|
+
});
|
|
61
68
|
alertInfo.action = 'change-settings';
|
|
62
69
|
}
|
|
63
70
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { styled } from '@rango-dev/ui';
|
|
1
|
+
import { darkTheme, styled } from '@rango-dev/ui';
|
|
2
2
|
|
|
3
3
|
export const Alerts = styled('div', {
|
|
4
4
|
width: '100%',
|
|
@@ -19,6 +19,13 @@ export const Item = styled('div', {
|
|
|
19
19
|
justifyContent: 'space-between',
|
|
20
20
|
alignItems: 'center',
|
|
21
21
|
width: '100%',
|
|
22
|
+
'._title': {
|
|
23
|
+
$$color: '$colors$neutral600',
|
|
24
|
+
[`.${darkTheme} &`]: {
|
|
25
|
+
$$color: '$colors$neutral700',
|
|
26
|
+
},
|
|
27
|
+
color: '$$color',
|
|
28
|
+
},
|
|
22
29
|
});
|
|
23
30
|
|
|
24
31
|
export const Action = styled('div', {
|
|
@@ -3,9 +3,7 @@ import type { PropTypes } from './QuoteWarningsAndErrors.types';
|
|
|
3
3
|
import { i18n } from '@lingui/core';
|
|
4
4
|
import { Alert, Button, InfoIcon } from '@rango-dev/ui';
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import { useNavigate } from 'react-router-dom';
|
|
7
6
|
|
|
8
|
-
import { navigationRoutes } from '../../constants/navigationRoutes';
|
|
9
7
|
import { QuoteErrorType, QuoteWarningType } from '../../types';
|
|
10
8
|
import { NoResult } from '../NoResult';
|
|
11
9
|
|
|
@@ -24,10 +22,9 @@ export function QuoteWarningsAndErrors(props: PropTypes) {
|
|
|
24
22
|
onOpenWarningModal,
|
|
25
23
|
onCloseWarningModal,
|
|
26
24
|
onConfirmWarningModal,
|
|
25
|
+
onChangeSettings,
|
|
27
26
|
} = props;
|
|
28
27
|
|
|
29
|
-
const navigate = useNavigate();
|
|
30
|
-
|
|
31
28
|
const warningModalHandlers = {
|
|
32
29
|
open: showWarningModal,
|
|
33
30
|
onClose: onCloseWarningModal,
|
|
@@ -58,20 +55,23 @@ export function QuoteWarningsAndErrors(props: PropTypes) {
|
|
|
58
55
|
title={alertInfo.title}
|
|
59
56
|
type={alertInfo.alertType}
|
|
60
57
|
variant="alarm"
|
|
61
|
-
action
|
|
62
|
-
|
|
58
|
+
{...(alertInfo.action === 'show-info' && {
|
|
59
|
+
action: (
|
|
63
60
|
<Action onClick={onOpenWarningModal}>
|
|
64
61
|
<InfoIcon size={12} color="gray" />
|
|
65
62
|
</Action>
|
|
66
|
-
)
|
|
63
|
+
),
|
|
64
|
+
})}
|
|
65
|
+
{...(alertInfo.action === 'change-settings' && {
|
|
66
|
+
action: (
|
|
67
67
|
<Button
|
|
68
|
-
size="
|
|
69
|
-
type={
|
|
70
|
-
onClick={
|
|
71
|
-
{i18n.t('Change
|
|
68
|
+
size="xxsmall"
|
|
69
|
+
type={alertInfo.alertType}
|
|
70
|
+
onClick={onChangeSettings}>
|
|
71
|
+
{i18n.t('Change')}
|
|
72
72
|
</Button>
|
|
73
|
-
)
|
|
74
|
-
}
|
|
73
|
+
),
|
|
74
|
+
})}
|
|
75
75
|
/>
|
|
76
76
|
</Alerts>
|
|
77
77
|
)}
|
|
@@ -9,7 +9,7 @@ import React from 'react';
|
|
|
9
9
|
import { useNavigate } from 'react-router-dom';
|
|
10
10
|
|
|
11
11
|
import { navigationRoutes } from '../../constants/navigationRoutes';
|
|
12
|
-
import {
|
|
12
|
+
import { useAppStore } from '../../store/AppStore';
|
|
13
13
|
import { QuoteWarningType } from '../../types';
|
|
14
14
|
import { getContainer } from '../../utils/common';
|
|
15
15
|
|
|
@@ -21,7 +21,7 @@ type PropsTypes = {
|
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
export function SlippageWarningModal(props: PropsTypes) {
|
|
24
|
-
const { customSlippage, slippage } =
|
|
24
|
+
const { customSlippage, slippage } = useAppStore();
|
|
25
25
|
const { open, onClose, onConfirm, warning } = props;
|
|
26
26
|
const navigate = useNavigate();
|
|
27
27
|
const userSlippage = customSlippage ?? slippage;
|
|
@@ -33,7 +33,7 @@ export function SlippageWarningModal(props: PropsTypes) {
|
|
|
33
33
|
<Button
|
|
34
34
|
size="small"
|
|
35
35
|
variant="ghost"
|
|
36
|
-
onClick={() => navigate('
|
|
36
|
+
onClick={() => navigate('../' + navigationRoutes.settings)}>
|
|
37
37
|
<Typography variant="label" size="medium" color="$neutral900">
|
|
38
38
|
{i18n.t('Change settings')}
|
|
39
39
|
</Typography>
|
|
@@ -14,17 +14,15 @@ import {
|
|
|
14
14
|
MIN_SLIPPGAE,
|
|
15
15
|
SLIPPAGES,
|
|
16
16
|
} from '../../constants/swapSettings';
|
|
17
|
-
import {
|
|
17
|
+
import { useAppStore } from '../../store/AppStore';
|
|
18
18
|
import { getContainer } from '../../utils/common';
|
|
19
19
|
|
|
20
20
|
import { BaseContainer, Head, SlippageChipsContainer } from './Slippage.styles';
|
|
21
21
|
import { SlippageTooltipContent } from './SlippageTooltipContent';
|
|
22
22
|
|
|
23
23
|
export function Slippage() {
|
|
24
|
-
const slippage =
|
|
25
|
-
|
|
26
|
-
const customSlippage = useSettingsStore.use.customSlippage();
|
|
27
|
-
const setCustomSlippage = useSettingsStore.use.setCustomSlippage();
|
|
24
|
+
const { slippage, setSlippage, customSlippage, setCustomSlippage } =
|
|
25
|
+
useAppStore();
|
|
28
26
|
|
|
29
27
|
return (
|
|
30
28
|
<BaseContainer>
|
|
@@ -10,8 +10,6 @@ import {
|
|
|
10
10
|
} from '@rango-dev/ui';
|
|
11
11
|
import React from 'react';
|
|
12
12
|
|
|
13
|
-
import { navigationRoutes } from '../../constants/navigationRoutes';
|
|
14
|
-
import { useNavigateBack } from '../../hooks/useNavigateBack';
|
|
15
13
|
import { SuffixContainer } from '../HeaderButtons/HeaderButtons.styles';
|
|
16
14
|
import { Layout } from '../Layout';
|
|
17
15
|
import { LoadingSwapDetails } from '../LoadingSwapDetails';
|
|
@@ -24,14 +22,12 @@ import {
|
|
|
24
22
|
|
|
25
23
|
export function SwapDetailsPlaceholder(props: SwapDetailsPlaceholderPropTypes) {
|
|
26
24
|
const { requestId, showSkeleton } = props;
|
|
27
|
-
const { navigateBackFrom } = useNavigateBack();
|
|
28
25
|
|
|
29
26
|
return (
|
|
30
27
|
<Layout
|
|
31
28
|
noPadding
|
|
32
29
|
header={{
|
|
33
30
|
title: i18n.t('Swap and Bridge'),
|
|
34
|
-
onBack: () => navigateBackFrom(navigationRoutes.swapDetails),
|
|
35
31
|
suffix: <SuffixContainer />,
|
|
36
32
|
}}>
|
|
37
33
|
{showSkeleton && (
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { GetStep } from '../SwapDetailsAlerts';
|
|
2
|
-
import type { PendingSwapStep } from '@rango-dev/queue-manager-rango-preset';
|
|
3
2
|
import type { Step, StepDetailsProps } from '@rango-dev/ui';
|
|
3
|
+
import type { PendingSwapStep } from 'rango-types';
|
|
4
4
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|