@rango-dev/widget-embedded 0.17.1-next.0 → 0.17.1-next.10
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.helpers.d.ts +1 -3
- 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 +1 -3
- 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/NoResult/NoResult.d.ts +4 -0
- package/dist/components/NoResult/NoResult.d.ts.map +1 -0
- package/dist/components/NoResult/NoResult.helpers.d.ts +4 -0
- package/dist/components/NoResult/NoResult.helpers.d.ts.map +1 -0
- package/dist/components/{NoRoutes/NoRoutes.styles.d.ts → NoResult/NoResult.styles.d.ts} +1 -1
- package/dist/components/{NoRoutes/NoRoutes.styles.d.ts.map → NoResult/NoResult.styles.d.ts.map} +1 -1
- package/dist/components/{NoRoutes/NoRoutes.types.d.ts → NoResult/NoResult.types.d.ts} +3 -3
- package/dist/components/NoResult/NoResult.types.d.ts.map +1 -0
- package/dist/components/NoResult/index.d.ts +2 -0
- package/dist/components/NoResult/index.d.ts.map +1 -0
- package/dist/components/NotificationContent/NotificationContent.d.ts.map +1 -1
- package/dist/components/Quote/Quote.d.ts +4 -0
- package/dist/components/Quote/Quote.d.ts.map +1 -0
- package/dist/components/Quote/Quote.styles.d.ts +1429 -0
- package/dist/components/Quote/Quote.styles.d.ts.map +1 -0
- package/dist/components/Quote/Quote.types.d.ts +22 -0
- package/dist/components/Quote/Quote.types.d.ts.map +1 -0
- package/dist/components/Quote/QuoteSkeleton.d.ts +4 -0
- package/dist/components/Quote/QuoteSkeleton.d.ts.map +1 -0
- package/dist/components/Quote/QuoteSkeleton.styles.d.ts +319 -0
- package/dist/components/Quote/QuoteSkeleton.styles.d.ts.map +1 -0
- package/dist/components/Quote/QuoteSkeleton.types.d.ts +6 -0
- package/dist/components/Quote/QuoteSkeleton.types.d.ts.map +1 -0
- package/dist/components/Quote/QuoteSummary.d.ts +11 -0
- package/dist/components/Quote/QuoteSummary.d.ts.map +1 -0
- package/dist/components/Quote/QuoteSummary.styles.d.ts +158 -0
- package/dist/components/Quote/QuoteSummary.styles.d.ts.map +1 -0
- package/dist/components/Quote/index.d.ts +4 -0
- package/dist/components/Quote/index.d.ts.map +1 -0
- package/dist/components/QuoteWarningsAndErrors/HighValueLossWarningModal.d.ts +11 -0
- package/dist/components/QuoteWarningsAndErrors/HighValueLossWarningModal.d.ts.map +1 -0
- package/dist/components/QuoteWarningsAndErrors/QuoteErrorsModalItem.d.ts +4 -0
- package/dist/components/QuoteWarningsAndErrors/QuoteErrorsModalItem.d.ts.map +1 -0
- package/dist/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.d.ts +4 -0
- package/dist/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.d.ts.map +1 -0
- package/dist/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.helpers.d.ts +9 -0
- package/dist/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.helpers.d.ts.map +1 -0
- package/dist/components/{RouteErrors/RouteErrors.styles.d.ts → QuoteWarningsAndErrors/QuoteWarningsAndErrors.styles.d.ts} +1 -1
- package/dist/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.styles.d.ts.map +1 -0
- package/dist/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.types.d.ts +22 -0
- package/dist/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.types.d.ts.map +1 -0
- package/dist/components/QuoteWarningsAndErrors/SlippageWariningModal.d.ts +11 -0
- package/dist/components/QuoteWarningsAndErrors/SlippageWariningModal.d.ts.map +1 -0
- package/dist/components/QuoteWarningsAndErrors/UnknownPriceWarningModal.d.ts +11 -0
- package/dist/components/QuoteWarningsAndErrors/UnknownPriceWarningModal.d.ts.map +1 -0
- package/dist/components/QuoteWarningsAndErrors/index.d.ts +2 -0
- package/dist/components/QuoteWarningsAndErrors/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 +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 +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 +2 -1
- 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/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 +4 -0
- package/dist/containers/QuoteInfo/QuoteInfo.d.ts.map +1 -0
- package/dist/containers/QuoteInfo/QuoteInfo.styles.d.ts +472 -0
- package/dist/containers/QuoteInfo/QuoteInfo.styles.d.ts.map +1 -0
- package/dist/containers/QuoteInfo/QuoteInfo.types.d.ts +17 -0
- package/dist/containers/QuoteInfo/QuoteInfo.types.d.ts.map +1 -0
- package/dist/containers/QuoteInfo/index.d.ts +2 -0
- package/dist/containers/QuoteInfo/index.d.ts.map +1 -0
- 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.types.d.ts +5 -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/index.d.ts +2 -0
- package/dist/hooks/useConfirmSwap/index.d.ts.map +1 -0
- package/dist/hooks/useConfirmSwap/useConfirmSwap.d.ts +3 -0
- package/dist/hooks/useConfirmSwap/useConfirmSwap.d.ts.map +1 -0
- package/dist/hooks/useConfirmSwap/useConfirmSwap.helpers.d.ts +16 -0
- package/dist/hooks/useConfirmSwap/useConfirmSwap.helpers.d.ts.map +1 -0
- package/dist/hooks/{useConfirmSwap.d.ts → useConfirmSwap/useConfirmSwap.types.d.ts} +5 -7
- package/dist/hooks/useConfirmSwap/useConfirmSwap.types.d.ts.map +1 -0
- package/dist/hooks/{useFetchBestRoute.d.ts → useFetchQuote.d.ts} +3 -3
- package/dist/hooks/useFetchQuote.d.ts.map +1 -0
- package/dist/hooks/useForceAutoConnect.d.ts +2 -0
- package/dist/hooks/useForceAutoConnect.d.ts.map +1 -0
- package/dist/hooks/usePrepareBlockchainList/usePrepareBlockchainList.helpers.d.ts +2 -2
- package/dist/hooks/useSwapInput.d.ts +4 -2
- 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/useWalletList.d.ts.map +1 -1
- package/dist/index.d.ts +10 -4
- 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/Home.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/SettingsPage.d.ts +1 -6
- package/dist/pages/SettingsPage.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 +11 -0
- package/dist/store/AppStore.d.ts.map +1 -0
- package/dist/store/app.d.ts +5 -23
- package/dist/store/app.d.ts.map +1 -1
- package/dist/store/{bestRoute.d.ts → quote.d.ts} +39 -27
- package/dist/store/quote.d.ts.map +1 -0
- package/dist/store/settings.d.ts +3 -2
- package/dist/store/settings.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/wallets.d.ts +5 -4
- 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/quote.d.ts +82 -0
- package/dist/types/quote.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/{routing.d.ts → quote.d.ts} +16 -12
- package/dist/utils/quote.d.ts.map +1 -0
- package/dist/utils/settings.d.ts +3 -2
- package/dist/utils/settings.d.ts.map +1 -1
- package/dist/utils/swap.d.ts +25 -22
- 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 +6 -6
- package/src/QueueManager.tsx +17 -17
- package/src/components/AppRouter.tsx +6 -5
- package/src/components/AppRoutes.tsx +6 -39
- package/src/components/BlockchainList/BlockchainList.tsx +4 -4
- package/src/components/BlockchainsSection/BlockchainsSection.tsx +7 -7
- package/src/components/ConfirmWalletsModal/ConfirmWallets.helpers.ts +2 -64
- package/src/components/ConfirmWalletsModal/ConfirmWalletsModal.tsx +28 -40
- package/src/components/ConfirmWalletsModal/ConfirmWalletsModal.types.ts +1 -3
- package/src/components/ConfirmWalletsModal/WalletList.tsx +6 -5
- package/src/components/ConfirmWalletsModal/WalletList.type.ts +1 -4
- package/src/components/LoadingSwapDetails/LoadingSwapDetails.styles.ts +3 -3
- package/src/components/LoadingSwapDetails/LoadingSwapDetails.tsx +6 -6
- package/src/components/{NoRoutes/NoRoutes.helper.ts → NoResult/NoResult.helpers.ts} +16 -9
- package/src/components/{NoRoutes/NoRoutes.styles.ts → NoResult/NoResult.styles.ts} +2 -0
- package/src/components/{NoRoutes/NoRoutes.tsx → NoResult/NoResult.tsx} +10 -12
- package/src/components/{NoRoutes/NoRoutes.types.ts → NoResult/NoResult.types.ts} +3 -2
- package/src/components/NoResult/index.ts +1 -0
- package/src/components/NotificationContent/NotificationContent.tsx +3 -2
- package/src/components/Quote/Quote.styles.ts +212 -0
- package/src/components/Quote/Quote.tsx +345 -0
- package/src/components/Quote/Quote.types.ts +16 -0
- package/src/components/Quote/QuoteSkeleton.styles.ts +110 -0
- package/src/components/Quote/QuoteSkeleton.tsx +108 -0
- package/src/components/Quote/QuoteSkeleton.types.ts +5 -0
- package/src/components/Quote/QuoteSummary.styles.ts +15 -0
- package/src/components/Quote/QuoteSummary.tsx +46 -0
- package/src/components/Quote/index.ts +3 -0
- package/src/components/QuoteWarningsAndErrors/HighValueLossWarningModal.tsx +107 -0
- package/src/components/{RouteErrors/RouteErrorsModalItem.tsx → QuoteWarningsAndErrors/QuoteErrorsModalItem.tsx} +3 -3
- package/src/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.helpers.ts +67 -0
- package/src/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.tsx +103 -0
- package/src/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.types.ts +24 -0
- package/src/components/QuoteWarningsAndErrors/SlippageWariningModal.tsx +77 -0
- package/src/components/QuoteWarningsAndErrors/UnknownPriceWarningModal.tsx +38 -0
- package/src/components/QuoteWarningsAndErrors/index.ts +1 -0
- package/src/components/SwapDetails/SwapDetails.Placeholder.tsx +1 -1
- package/src/components/SwapDetails/SwapDetails.tsx +18 -22
- package/src/components/SwitchFromAndTo.tsx +2 -2
- package/src/components/TokenList/TokenList.tsx +5 -6
- package/src/components/UpdateUrl.tsx +36 -26
- package/src/components/WidgetEvents.tsx +4 -2
- package/src/constants/errors.ts +8 -10
- package/src/constants/messages.ts +1 -1
- package/src/constants/searchParams.ts +1 -0
- package/src/constants/warnings.ts +7 -7
- package/src/containers/App/App.styles.ts +18 -0
- package/src/containers/App/App.tsx +65 -0
- package/src/containers/App/index.ts +1 -0
- package/src/containers/QuoteInfo/QuoteInfo.styles.ts +15 -0
- package/src/containers/QuoteInfo/QuoteInfo.tsx +97 -0
- package/src/containers/QuoteInfo/QuoteInfo.types.ts +17 -0
- package/src/containers/QuoteInfo/index.ts +1 -0
- package/src/{Wallets.tsx → containers/Wallets/Wallets.tsx} +40 -32
- 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.tsx +36 -0
- package/src/containers/WidgetInfo/WidgetInfo.types.ts +5 -0
- package/src/containers/WidgetInfo/index.ts +1 -0
- package/src/containers/WidgetProvider/WidgetProvider.tsx +19 -0
- package/src/containers/WidgetProvider/WidgetProvider.types.ts +7 -0
- package/src/containers/WidgetProvider/index.ts +1 -0
- package/src/hooks/useConfirmSwap/index.ts +1 -0
- package/src/hooks/useConfirmSwap/useConfirmSwap.helpers.ts +168 -0
- package/src/hooks/useConfirmSwap/useConfirmSwap.ts +136 -0
- package/src/hooks/useConfirmSwap/useConfirmSwap.types.ts +19 -0
- package/src/hooks/{useFetchBestRoute.ts → useFetchQuote.ts} +3 -3
- package/src/hooks/useForceAutoConnect.ts +27 -0
- package/src/hooks/useNavigateBack.ts +3 -3
- package/src/hooks/useSwapInput.ts +58 -23
- package/src/hooks/useSyncStoresWithConfig.ts +22 -19
- package/src/hooks/useWalletList.ts +3 -5
- package/src/index.ts +10 -3
- package/src/pages/ConfirmSwapPage.tsx +58 -235
- package/src/pages/HistoryPage.tsx +1 -1
- package/src/pages/Home.tsx +58 -247
- package/src/pages/LanguagePage.tsx +1 -1
- package/src/pages/LiquiditySourcePage.tsx +23 -32
- package/src/pages/SelectBlockchainPage.tsx +6 -7
- package/src/pages/SelectSwapItemsPage.tsx +5 -5
- package/src/pages/SettingsPage.tsx +9 -13
- package/src/pages/SwapDetailsPage.tsx +3 -3
- package/src/pages/ThemePage.tsx +1 -1
- package/src/pages/WalletsPage.tsx +5 -12
- package/src/store/AppStore.tsx +35 -0
- package/src/store/app.ts +18 -6
- package/src/store/{bestRoute.ts → quote.ts} +68 -60
- package/src/store/settings.ts +7 -4
- package/src/store/slices/config.ts +25 -15
- package/src/store/slices/data.ts +64 -29
- package/src/store/wallets.ts +11 -8
- package/src/types/config.ts +5 -5
- package/src/types/index.ts +1 -1
- package/src/types/quote.ts +107 -0
- package/src/utils/numbers.ts +1 -1
- package/src/utils/quote.ts +338 -0
- package/src/utils/settings.ts +8 -7
- package/src/utils/swap.ts +113 -85
- package/src/utils/wallets.ts +29 -17
- 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/components/NoRoutes/NoRoutes.d.ts +0 -4
- package/dist/components/NoRoutes/NoRoutes.d.ts.map +0 -1
- package/dist/components/NoRoutes/NoRoutes.helper.d.ts +0 -3
- package/dist/components/NoRoutes/NoRoutes.helper.d.ts.map +0 -1
- package/dist/components/NoRoutes/NoRoutes.types.d.ts.map +0 -1
- package/dist/components/NoRoutes/index.d.ts +0 -2
- package/dist/components/NoRoutes/index.d.ts.map +0 -1
- package/dist/components/RouteErrors/RouteErrors.d.ts +0 -4
- package/dist/components/RouteErrors/RouteErrors.d.ts.map +0 -1
- package/dist/components/RouteErrors/RouteErrors.styles.d.ts.map +0 -1
- package/dist/components/RouteErrors/RouteErrors.types.d.ts +0 -24
- package/dist/components/RouteErrors/RouteErrors.types.d.ts.map +0 -1
- package/dist/components/RouteErrors/RouteErrorsModal.d.ts +0 -4
- package/dist/components/RouteErrors/RouteErrorsModal.d.ts.map +0 -1
- package/dist/components/RouteErrors/RouteErrorsModalItem.d.ts +0 -4
- package/dist/components/RouteErrors/RouteErrorsModalItem.d.ts.map +0 -1
- package/dist/components/RouteErrors/index.d.ts +0 -2
- package/dist/components/RouteErrors/index.d.ts.map +0 -1
- package/dist/hooks/useConfirmSwap.d.ts.map +0 -1
- package/dist/hooks/useFetchBestRoute.d.ts.map +0 -1
- package/dist/store/bestRoute.d.ts.map +0 -1
- package/dist/store/meta.d.ts +0 -23
- package/dist/store/meta.d.ts.map +0 -1
- package/dist/types/routing.d.ts +0 -65
- package/dist/types/routing.d.ts.map +0 -1
- package/dist/utils/routing.d.ts.map +0 -1
- package/src/Widget.tsx +0 -119
- package/src/components/NoRoutes/index.ts +0 -1
- package/src/components/RouteErrors/RouteErrors.tsx +0 -79
- package/src/components/RouteErrors/RouteErrors.types.ts +0 -29
- package/src/components/RouteErrors/RouteErrorsModal.tsx +0 -129
- package/src/components/RouteErrors/index.ts +0 -1
- package/src/hooks/useConfirmSwap.ts +0 -303
- package/src/store/meta.ts +0 -39
- package/src/types/routing.ts +0 -77
- package/src/utils/routing.ts +0 -321
- /package/src/components/{RouteErrors/RouteErrors.styles.ts → QuoteWarningsAndErrors/QuoteWarningsAndErrors.styles.ts} +0 -0
|
@@ -18,11 +18,11 @@ import {
|
|
|
18
18
|
import React, { useEffect, useLayoutEffect, useRef, useState } from 'react';
|
|
19
19
|
import { useNavigate } from 'react-router-dom';
|
|
20
20
|
|
|
21
|
-
import {
|
|
21
|
+
import { getQuoteErrorMessage } from '../../constants/errors';
|
|
22
22
|
import { navigationRoutes } from '../../constants/navigationRoutes';
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
23
|
+
import { getQuoteUpdateWarningMessage } from '../../constants/warnings';
|
|
24
|
+
import { useAppStore } from '../../store/AppStore';
|
|
25
|
+
import { useQuoteStore } from '../../store/quote';
|
|
26
26
|
import { useWalletsStore } from '../../store/wallets';
|
|
27
27
|
import { confirmSwapDisabled } from '../../utils/swap';
|
|
28
28
|
|
|
@@ -50,23 +50,24 @@ const NUMBER_OF_WALLETS_TO_DISPLAY = 2;
|
|
|
50
50
|
|
|
51
51
|
export function ConfirmWalletsModal(props: PropTypes) {
|
|
52
52
|
//TODO: move component's logics to a custom hook
|
|
53
|
-
const { open, onClose, onCancel, onCheckBalance,
|
|
54
|
-
const
|
|
53
|
+
const { open, onClose, onCancel, onCheckBalance, loading } = props;
|
|
54
|
+
const config = useAppStore().config;
|
|
55
|
+
const blockchains = useAppStore().blockchains();
|
|
55
56
|
const {
|
|
56
|
-
|
|
57
|
-
setSelectedWallets:
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
quote,
|
|
58
|
+
setSelectedWallets: selectQuoteWallets,
|
|
59
|
+
quoteWalletsConfirmed: quoteWalletsConfirmed,
|
|
60
|
+
setQuoteWalletConfirmed: setQuoteWalletConfirmed,
|
|
60
61
|
customDestination,
|
|
61
62
|
setCustomDestination,
|
|
62
|
-
} =
|
|
63
|
+
} = useQuoteStore();
|
|
63
64
|
const { connectedWallets, selectWallets } = useWalletsStore();
|
|
64
65
|
|
|
65
66
|
const [showMoreWalletFor, setShowMoreWalletFor] = useState('');
|
|
66
67
|
const [balanceWarnings, setBalanceWarnings] = useState<string[]>([]);
|
|
67
68
|
const [error, setError] = useState('');
|
|
68
|
-
const [
|
|
69
|
-
ConfirmSwapWarnings['
|
|
69
|
+
const [quoteWarning, setQuoteWarning] = useState<
|
|
70
|
+
ConfirmSwapWarnings['quoteUpdate'] | null
|
|
70
71
|
>(null);
|
|
71
72
|
const [destination, setDestination] = useState(customDestination);
|
|
72
73
|
const [showCustomDestination, setShowCustomDestination] = useState(
|
|
@@ -74,22 +75,15 @@ export function ConfirmWalletsModal(props: PropTypes) {
|
|
|
74
75
|
);
|
|
75
76
|
const customDestinationRef = useRef<HTMLDivElement | null>(null);
|
|
76
77
|
|
|
77
|
-
const requiredWallets = getRequiredWallets(
|
|
78
|
-
const customDestinationEnabled =
|
|
79
|
-
typeof config?.customDestination === 'undefined'
|
|
80
|
-
? true
|
|
81
|
-
: config.customDestination;
|
|
78
|
+
const requiredWallets = getRequiredWallets(quote);
|
|
82
79
|
|
|
83
80
|
const lastStepToBlockchain = blockchains.find(
|
|
84
81
|
(blockchain) =>
|
|
85
82
|
blockchain.name ===
|
|
86
|
-
|
|
87
|
-
.blockchain
|
|
83
|
+
quote?.result?.swaps[quote?.result?.swaps.length - 1].to.blockchain
|
|
88
84
|
);
|
|
89
85
|
const isWalletRequiredFor = (blockchain: string) =>
|
|
90
|
-
!!
|
|
91
|
-
(swap) => swap.from.blockchain === blockchain
|
|
92
|
-
);
|
|
86
|
+
!!quote?.result?.swaps.find((swap) => swap.from.blockchain === blockchain);
|
|
93
87
|
|
|
94
88
|
const [selectableWallets, setSelectableWallets] = useState<ConnectedWallet[]>(
|
|
95
89
|
connectedWallets.filter((connectedWallet) => {
|
|
@@ -175,16 +169,16 @@ export function ConfirmWalletsModal(props: PropTypes) {
|
|
|
175
169
|
(wallet) => wallet.selected
|
|
176
170
|
);
|
|
177
171
|
selectWallets(lastSelectedWallets);
|
|
178
|
-
|
|
172
|
+
selectQuoteWallets(lastSelectedWallets);
|
|
179
173
|
setCustomDestination(destination);
|
|
180
|
-
|
|
174
|
+
setQuoteWalletConfirmed(true);
|
|
181
175
|
onClose();
|
|
182
176
|
};
|
|
183
177
|
|
|
184
178
|
const onConfirmWallets = async () => {
|
|
185
179
|
setBalanceWarnings([]);
|
|
186
180
|
setError('');
|
|
187
|
-
|
|
181
|
+
setQuoteWarning(null);
|
|
188
182
|
const selectedWallets = connectedWallets.filter((connectedWallet) =>
|
|
189
183
|
selectableWallets.find(
|
|
190
184
|
(selectableWallet) =>
|
|
@@ -201,11 +195,11 @@ export function ConfirmWalletsModal(props: PropTypes) {
|
|
|
201
195
|
if (warnings?.balance?.messages) {
|
|
202
196
|
setBalanceWarnings(warnings.balance.messages);
|
|
203
197
|
}
|
|
204
|
-
if (warnings?.
|
|
205
|
-
|
|
198
|
+
if (warnings?.quoteUpdate) {
|
|
199
|
+
setQuoteWarning(warnings.quoteUpdate);
|
|
206
200
|
}
|
|
207
201
|
if (result.error) {
|
|
208
|
-
setError(
|
|
202
|
+
setError(getQuoteErrorMessage(result.error));
|
|
209
203
|
}
|
|
210
204
|
|
|
211
205
|
if (!result.error && (!warnings?.balance?.messages.length || 0 > 0)) {
|
|
@@ -249,7 +243,7 @@ export function ConfirmWalletsModal(props: PropTypes) {
|
|
|
249
243
|
<Modal
|
|
250
244
|
open={open}
|
|
251
245
|
onClose={() => {
|
|
252
|
-
if (!
|
|
246
|
+
if (!quoteWalletsConfirmed) {
|
|
253
247
|
navigate(navigationRoutes.home, { replace: true });
|
|
254
248
|
}
|
|
255
249
|
onClose();
|
|
@@ -265,7 +259,7 @@ export function ConfirmWalletsModal(props: PropTypes) {
|
|
|
265
259
|
loading,
|
|
266
260
|
showCustomDestination,
|
|
267
261
|
destination,
|
|
268
|
-
|
|
262
|
+
quote,
|
|
269
263
|
selectableWallets,
|
|
270
264
|
lastStepToBlockchain
|
|
271
265
|
)}
|
|
@@ -323,9 +317,6 @@ export function ConfirmWalletsModal(props: PropTypes) {
|
|
|
323
317
|
chain={showMoreWalletFor}
|
|
324
318
|
isSelected={isSelected}
|
|
325
319
|
selectWallet={onChange}
|
|
326
|
-
multiWallets={config?.multiWallets ?? true}
|
|
327
|
-
supportedWallets={config?.wallets ?? []}
|
|
328
|
-
config={config}
|
|
329
320
|
onShowMore={setShowMoreWalletFor.bind(null, showMoreWalletFor)}
|
|
330
321
|
/>
|
|
331
322
|
</div>
|
|
@@ -339,12 +330,12 @@ export function ConfirmWalletsModal(props: PropTypes) {
|
|
|
339
330
|
<Divider size={12} />
|
|
340
331
|
</>
|
|
341
332
|
)}
|
|
342
|
-
{
|
|
333
|
+
{quoteWarning && (
|
|
343
334
|
<>
|
|
344
335
|
<Alert
|
|
345
336
|
variant="alarm"
|
|
346
337
|
type="warning"
|
|
347
|
-
title={
|
|
338
|
+
title={getQuoteUpdateWarningMessage(quoteWarning)}
|
|
348
339
|
/>
|
|
349
340
|
<Divider size={12} />
|
|
350
341
|
</>
|
|
@@ -383,9 +374,6 @@ export function ConfirmWalletsModal(props: PropTypes) {
|
|
|
383
374
|
chain={requiredWallet}
|
|
384
375
|
isSelected={isSelected}
|
|
385
376
|
selectWallet={onChange}
|
|
386
|
-
multiWallets={config?.multiWallets ?? true}
|
|
387
|
-
supportedWallets={config?.wallets ?? []}
|
|
388
|
-
config={config}
|
|
389
377
|
limit={NUMBER_OF_WALLETS_TO_DISPLAY}
|
|
390
378
|
onShowMore={() =>
|
|
391
379
|
setShowMoreWalletFor(blockchain?.name ?? '')
|
|
@@ -393,7 +381,7 @@ export function ConfirmWalletsModal(props: PropTypes) {
|
|
|
393
381
|
/>
|
|
394
382
|
</ListContainer>
|
|
395
383
|
{!isLastWallet && <Divider size={32} />}
|
|
396
|
-
{isLastWallet &&
|
|
384
|
+
{isLastWallet && config?.customDestination && (
|
|
397
385
|
<CustomDestination>
|
|
398
386
|
<CollapsibleRoot
|
|
399
387
|
ref={customDestinationRef}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { ConfirmSwap } from '../../hooks/useConfirmSwap';
|
|
1
|
+
import type { ConfirmSwap } from '../../hooks/useConfirmSwap/useConfirmSwap.types';
|
|
3
2
|
|
|
4
3
|
export type PropTypes = {
|
|
5
4
|
open: boolean;
|
|
6
5
|
onClose: () => void;
|
|
7
6
|
onCancel: () => void;
|
|
8
7
|
onCheckBalance: ConfirmSwap['fetch'];
|
|
9
|
-
config?: WidgetConfig;
|
|
10
8
|
loading: boolean;
|
|
11
9
|
};
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
TIME_TO_CLOSE_MODAL,
|
|
24
24
|
TIME_TO_IGNORE_MODAL,
|
|
25
25
|
} from '../../pages/WalletsPage';
|
|
26
|
-
import {
|
|
26
|
+
import { useAppStore } from '../../store/AppStore';
|
|
27
27
|
import { useWalletsStore } from '../../store/wallets';
|
|
28
28
|
import { getBlockchainDisplayNameFor } from '../../utils/meta';
|
|
29
29
|
import {
|
|
@@ -41,10 +41,11 @@ import {
|
|
|
41
41
|
} from './WalletList.styles';
|
|
42
42
|
|
|
43
43
|
export function WalletList(props: PropTypes) {
|
|
44
|
-
const {
|
|
44
|
+
const { chain, isSelected, selectWallet, limit, onShowMore } = props;
|
|
45
|
+
const { config } = useAppStore();
|
|
45
46
|
|
|
46
47
|
const connectedWallets = useWalletsStore.use.connectedWallets();
|
|
47
|
-
const { blockchains } =
|
|
48
|
+
const { blockchains } = useAppStore();
|
|
48
49
|
const [openWalletStateModal, setOpenWalletStateModal] =
|
|
49
50
|
useState<WalletType>('');
|
|
50
51
|
const [experimentalChainWallet, setExperimentalChainWallet] =
|
|
@@ -137,7 +138,7 @@ export function WalletList(props: PropTypes) {
|
|
|
137
138
|
});
|
|
138
139
|
const conciseAddress = address ? getConciseAddress(address) : '';
|
|
139
140
|
|
|
140
|
-
const experimentalChain = isExperimentalChain(blockchains, chain);
|
|
141
|
+
const experimentalChain = isExperimentalChain(blockchains(), chain);
|
|
141
142
|
|
|
142
143
|
const experimentalChainNotAdded = !connectedWallets.find(
|
|
143
144
|
(connectedWallet) =>
|
|
@@ -180,7 +181,7 @@ export function WalletList(props: PropTypes) {
|
|
|
180
181
|
experimentalChainWallet?.chain
|
|
181
182
|
? getBlockchainDisplayNameFor(
|
|
182
183
|
experimentalChainWallet.chain,
|
|
183
|
-
blockchains
|
|
184
|
+
blockchains()
|
|
184
185
|
)
|
|
185
186
|
: undefined;
|
|
186
187
|
return (
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import type { Wallet
|
|
1
|
+
import type { Wallet } from '../../types';
|
|
2
2
|
|
|
3
3
|
export type PropTypes = {
|
|
4
4
|
chain: string;
|
|
5
|
-
supportedWallets: WidgetConfig['wallets'];
|
|
6
5
|
isSelected: (walletType: string, chain: string) => boolean;
|
|
7
6
|
selectWallet: (wallet: Wallet) => void;
|
|
8
|
-
multiWallets: boolean;
|
|
9
|
-
config?: WidgetConfig;
|
|
10
7
|
limit?: number;
|
|
11
8
|
onShowMore: () => void;
|
|
12
9
|
};
|
|
@@ -10,11 +10,11 @@ export const Container = styled('div', {
|
|
|
10
10
|
display: 'flex',
|
|
11
11
|
},
|
|
12
12
|
|
|
13
|
-
'.
|
|
13
|
+
'.quote-summary': {
|
|
14
14
|
padding: '$15 $0',
|
|
15
15
|
},
|
|
16
16
|
|
|
17
|
-
'.
|
|
17
|
+
'.quote-summary-item': {
|
|
18
18
|
display: 'flex',
|
|
19
19
|
justifyContent: 'space-between',
|
|
20
20
|
alignItems: 'center',
|
|
@@ -26,7 +26,7 @@ export const Container = styled('div', {
|
|
|
26
26
|
alignItems: 'center',
|
|
27
27
|
},
|
|
28
28
|
|
|
29
|
-
'.
|
|
29
|
+
'.quote-summary-separator': {
|
|
30
30
|
width: '0px',
|
|
31
31
|
height: '$16',
|
|
32
32
|
borderLeft: '1px solid $neutral400',
|
|
@@ -6,8 +6,8 @@ import { Container, StepSeparator } from './LoadingSwapDetails.styles';
|
|
|
6
6
|
import { LoadingSwapDetailStep } from './LoadingSwapDetailStep';
|
|
7
7
|
|
|
8
8
|
export function LoadingSwapDetails() {
|
|
9
|
-
const
|
|
10
|
-
<div className="
|
|
9
|
+
const quoteSummary = (
|
|
10
|
+
<div className="quote-summary-item">
|
|
11
11
|
<div className="token-amount">
|
|
12
12
|
<ChainToken loading size="medium" chainImage="" tokenImage="" />
|
|
13
13
|
<Divider size={8} direction="horizontal" />
|
|
@@ -27,10 +27,10 @@ export function LoadingSwapDetails() {
|
|
|
27
27
|
<Skeleton width={60} height={10} variant="rounded" />
|
|
28
28
|
</div>
|
|
29
29
|
|
|
30
|
-
<div className="
|
|
31
|
-
{
|
|
32
|
-
<div className="
|
|
33
|
-
{
|
|
30
|
+
<div className="quote-summary">
|
|
31
|
+
{quoteSummary}
|
|
32
|
+
<div className="quote-summary-separator"></div>
|
|
33
|
+
{quoteSummary}
|
|
34
34
|
</div>
|
|
35
35
|
|
|
36
36
|
<div className="swaps-steps">
|
|
@@ -1,33 +1,40 @@
|
|
|
1
|
-
import type { Info } from './
|
|
1
|
+
import type { Info } from './NoResult.types';
|
|
2
2
|
|
|
3
3
|
import { i18n } from '@lingui/core';
|
|
4
4
|
|
|
5
5
|
import { errorMessages } from '../../constants/errors';
|
|
6
|
+
import {
|
|
7
|
+
type NoResultError,
|
|
8
|
+
QuoteErrorType,
|
|
9
|
+
type QuoteRequestFailed,
|
|
10
|
+
} from '../../types';
|
|
6
11
|
|
|
7
12
|
export function makeInfo(
|
|
8
|
-
|
|
13
|
+
error: NoResultError | QuoteRequestFailed | null,
|
|
9
14
|
disabledLiquiditySources: string[],
|
|
10
|
-
hasError: boolean,
|
|
11
15
|
toggleAllLiquiditySources: (shouldReset: boolean) => void,
|
|
12
|
-
|
|
16
|
+
refetchQuote: () => void
|
|
13
17
|
): Info {
|
|
14
|
-
if (
|
|
18
|
+
if (error?.type === QuoteErrorType.REQUEST_FAILED) {
|
|
15
19
|
return {
|
|
16
20
|
alert: {
|
|
17
21
|
type: 'warning',
|
|
18
22
|
text: errorMessages().genericServerError,
|
|
19
23
|
action: {
|
|
20
|
-
onClick:
|
|
24
|
+
onClick: refetchQuote,
|
|
21
25
|
title: i18n.t('Retry'),
|
|
22
26
|
},
|
|
23
27
|
},
|
|
24
28
|
description: '',
|
|
25
29
|
};
|
|
26
|
-
} else if (
|
|
30
|
+
} else if (
|
|
31
|
+
error?.type === QuoteErrorType.NO_RESULT &&
|
|
32
|
+
error.diagnosisMessage
|
|
33
|
+
) {
|
|
27
34
|
return {
|
|
28
35
|
alert: {
|
|
29
36
|
type: 'error',
|
|
30
|
-
text: diagnosisMessage,
|
|
37
|
+
text: error.diagnosisMessage,
|
|
31
38
|
action: null,
|
|
32
39
|
},
|
|
33
40
|
description: '',
|
|
@@ -47,6 +54,6 @@ export function makeInfo(
|
|
|
47
54
|
}
|
|
48
55
|
return {
|
|
49
56
|
alert: null,
|
|
50
|
-
description: errorMessages().
|
|
57
|
+
description: errorMessages().noResultError.description,
|
|
51
58
|
};
|
|
52
59
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PropTypes } from './
|
|
1
|
+
import type { PropTypes } from './NoResult.types';
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
Alert,
|
|
@@ -11,27 +11,25 @@ import {
|
|
|
11
11
|
import React from 'react';
|
|
12
12
|
|
|
13
13
|
import { errorMessages } from '../../constants/errors';
|
|
14
|
-
import {
|
|
14
|
+
import { useAppStore } from '../../store/AppStore';
|
|
15
15
|
import { useSettingsStore } from '../../store/settings';
|
|
16
16
|
|
|
17
|
-
import { makeInfo } from './
|
|
18
|
-
import { Container, Footer, PrefixIcon } from './
|
|
17
|
+
import { makeInfo } from './NoResult.helpers';
|
|
18
|
+
import { Container, Footer, PrefixIcon } from './NoResult.styles';
|
|
19
19
|
|
|
20
|
-
export function
|
|
21
|
-
const {
|
|
20
|
+
export function NoResult(props: PropTypes) {
|
|
21
|
+
const { fetch, error } = props;
|
|
22
22
|
const disabledLiquiditySources =
|
|
23
23
|
useSettingsStore.use.disabledLiquiditySources();
|
|
24
|
-
const loadingMetaStatus = useMetaStore.use.loadingStatus();
|
|
25
24
|
const toggleAllLiquiditySources =
|
|
26
25
|
useSettingsStore.use.toggleAllLiquiditySources();
|
|
27
26
|
|
|
28
|
-
const
|
|
27
|
+
const swappers = useAppStore().swappers();
|
|
29
28
|
|
|
30
29
|
const info = makeInfo(
|
|
31
|
-
|
|
30
|
+
error,
|
|
32
31
|
disabledLiquiditySources,
|
|
33
|
-
|
|
34
|
-
toggleAllLiquiditySources,
|
|
32
|
+
() => toggleAllLiquiditySources(swappers, true),
|
|
35
33
|
fetch
|
|
36
34
|
);
|
|
37
35
|
|
|
@@ -40,7 +38,7 @@ export function NoRoutes(props: PropTypes) {
|
|
|
40
38
|
<NoRouteIcon size={24} color="gray" />
|
|
41
39
|
<Divider size={4} />
|
|
42
40
|
<Typography variant="title" size="small">
|
|
43
|
-
{errorMessages().
|
|
41
|
+
{errorMessages().noResultError.title}
|
|
44
42
|
</Typography>
|
|
45
43
|
{!!info.description && (
|
|
46
44
|
<Typography
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NoResult } from './NoResult';
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import { useNavigate } from 'react-router-dom';
|
|
12
12
|
|
|
13
|
-
import {
|
|
13
|
+
import { useAppStore } from '../../store/AppStore';
|
|
14
14
|
import { useNotificationStore } from '../../store/notification';
|
|
15
15
|
import { useUiStore } from '../../store/ui';
|
|
16
16
|
|
|
@@ -26,7 +26,8 @@ export function NotificationContent() {
|
|
|
26
26
|
const { getUnreadNotifications } = useNotificationStore();
|
|
27
27
|
|
|
28
28
|
const notifications: Notification[] = getUnreadNotifications();
|
|
29
|
-
const
|
|
29
|
+
const blockchains = useAppStore().blockchains();
|
|
30
|
+
const tokens = useAppStore().tokens();
|
|
30
31
|
const sortedNotification = notifications
|
|
31
32
|
.sort((a, b) => b.creationTime - a.creationTime)
|
|
32
33
|
.slice(0, MAX_NOTIFICATIONS_DISPLAYED);
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import * as Collapsible from '@radix-ui/react-collapsible';
|
|
2
|
+
import { darkTheme, styled } from '@rango-dev/ui';
|
|
3
|
+
|
|
4
|
+
import { CollapsibleContent } from '../ConfirmWalletsModal/ConfirmWallets.styles';
|
|
5
|
+
|
|
6
|
+
export const EXPANDABLE_QUOTE_TRANSITION_DURATION = 300;
|
|
7
|
+
|
|
8
|
+
export const QuoteContainer = styled(Collapsible.Root, {
|
|
9
|
+
display: 'flex',
|
|
10
|
+
flexDirection: 'column',
|
|
11
|
+
alignItems: 'start',
|
|
12
|
+
overflowX: 'auto',
|
|
13
|
+
overflowY: 'hidden',
|
|
14
|
+
width: '100%',
|
|
15
|
+
borderRadius: '$xm',
|
|
16
|
+
variants: {
|
|
17
|
+
recommended: {
|
|
18
|
+
true: {
|
|
19
|
+
$$color: '$colors$info300',
|
|
20
|
+
[`.${darkTheme} &`]: {
|
|
21
|
+
$$color: '$colors$secondary800',
|
|
22
|
+
},
|
|
23
|
+
backgroundColor: '$$color',
|
|
24
|
+
},
|
|
25
|
+
false: {
|
|
26
|
+
$$color: '$colors$neutral400',
|
|
27
|
+
[`.${darkTheme} &`]: {
|
|
28
|
+
$$color: '$colors$neutral200',
|
|
29
|
+
},
|
|
30
|
+
backgroundColor: '$$color',
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
'& .steps-details': {
|
|
35
|
+
padding: '$10 $15',
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
export const SummaryContainer = styled('div', {
|
|
40
|
+
borderRadius: '$xm',
|
|
41
|
+
display: 'flex',
|
|
42
|
+
flexDirection: 'column',
|
|
43
|
+
alignItems: 'start',
|
|
44
|
+
justifyContent: 'space-between',
|
|
45
|
+
color: '$foreground',
|
|
46
|
+
cursor: 'pointer',
|
|
47
|
+
boxSizing: 'border-box',
|
|
48
|
+
position: 'relative',
|
|
49
|
+
variants: {
|
|
50
|
+
recommended: {
|
|
51
|
+
true: {
|
|
52
|
+
$$color: '$colors$info100',
|
|
53
|
+
[`.${darkTheme} &`]: {
|
|
54
|
+
$$color: '$colors$secondary600',
|
|
55
|
+
},
|
|
56
|
+
backgroundColor: '$$color',
|
|
57
|
+
'&:hover': {
|
|
58
|
+
backgroundColor: '$$color',
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
false: {
|
|
62
|
+
$$color: '$colors$neutral200',
|
|
63
|
+
[`.${darkTheme} &`]: {
|
|
64
|
+
$$color: '$colors$neutral500',
|
|
65
|
+
},
|
|
66
|
+
backgroundColor: '$$color',
|
|
67
|
+
'&:hover': {
|
|
68
|
+
backgroundColor: '$$color',
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
basic: { true: { borderTopRightRadius: '0', borderTopLeftRadius: '0' } },
|
|
73
|
+
listItem: {
|
|
74
|
+
true: {},
|
|
75
|
+
false: {},
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
|
|
79
|
+
compoundVariants: [
|
|
80
|
+
{
|
|
81
|
+
listItem: true,
|
|
82
|
+
recommended: true,
|
|
83
|
+
css: {
|
|
84
|
+
'&:hover': {
|
|
85
|
+
$$color: '$colors$secondary200',
|
|
86
|
+
[`.${darkTheme} &`]: {
|
|
87
|
+
$$color: '$colors$secondary700',
|
|
88
|
+
},
|
|
89
|
+
backgroundColor: '$$color',
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
listItem: true,
|
|
95
|
+
recommended: false,
|
|
96
|
+
css: {
|
|
97
|
+
'&:hover': {
|
|
98
|
+
$$color: '$colors$neutral300',
|
|
99
|
+
[`.${darkTheme} &`]: {
|
|
100
|
+
$$color: '$colors$neutral400',
|
|
101
|
+
},
|
|
102
|
+
backgroundColor: '$$color',
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
],
|
|
107
|
+
'& .summary': {
|
|
108
|
+
width: '100%',
|
|
109
|
+
padding: '$15 $15 $10 $15',
|
|
110
|
+
},
|
|
111
|
+
'& .basic-info': {
|
|
112
|
+
paddingTop: '$10',
|
|
113
|
+
display: 'flex',
|
|
114
|
+
alignItems: 'center',
|
|
115
|
+
},
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
export const Chains = styled(Collapsible.Trigger, {
|
|
119
|
+
display: 'flex',
|
|
120
|
+
width: '100%',
|
|
121
|
+
justifyContent: 'space-between',
|
|
122
|
+
alignItems: 'center',
|
|
123
|
+
height: '$36',
|
|
124
|
+
padding: '$10 $15',
|
|
125
|
+
boxSizing: 'border-box',
|
|
126
|
+
cursor: 'pointer',
|
|
127
|
+
border: 'none',
|
|
128
|
+
outline: 'none',
|
|
129
|
+
backgroundColor: 'transparent',
|
|
130
|
+
variants: {
|
|
131
|
+
error: {
|
|
132
|
+
true: {
|
|
133
|
+
[`& ${Image}`]: {
|
|
134
|
+
border: '1px $warning500 solid',
|
|
135
|
+
borderRadius: '100%',
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
false: {
|
|
139
|
+
[`& ${Image}`]: {
|
|
140
|
+
border: '1px transparent solid',
|
|
141
|
+
borderRadius: '100%',
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
recommended: {
|
|
146
|
+
true: {
|
|
147
|
+
$$color: '$colors$info300',
|
|
148
|
+
[`.${darkTheme} &`]: {
|
|
149
|
+
$$color: '$colors$secondary800',
|
|
150
|
+
},
|
|
151
|
+
backgroundColor: '$$color',
|
|
152
|
+
},
|
|
153
|
+
false: {
|
|
154
|
+
$$color: '$colors$neutral400',
|
|
155
|
+
[`.${darkTheme} &`]: {
|
|
156
|
+
$$color: '$colors$neutral200',
|
|
157
|
+
},
|
|
158
|
+
backgroundColor: '$$color',
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
'& div:nth-child(1)': { display: 'flex' },
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
export const Content = styled(CollapsibleContent, {
|
|
166
|
+
width: '100%',
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
export const IconContainer = styled('div', {
|
|
170
|
+
display: 'flex',
|
|
171
|
+
justifyContent: 'center',
|
|
172
|
+
alignItems: 'center',
|
|
173
|
+
padding: '$2',
|
|
174
|
+
transition: `all ${EXPANDABLE_QUOTE_TRANSITION_DURATION}ms ease`,
|
|
175
|
+
variants: {
|
|
176
|
+
orientation: {
|
|
177
|
+
down: {
|
|
178
|
+
transform: 'rotate(0)',
|
|
179
|
+
},
|
|
180
|
+
up: {
|
|
181
|
+
transform: 'rotate(180deg)',
|
|
182
|
+
},
|
|
183
|
+
},
|
|
184
|
+
},
|
|
185
|
+
});
|
|
186
|
+
|
|
187
|
+
export const Separator = styled('div', {
|
|
188
|
+
height: '$12',
|
|
189
|
+
marginLeft: '$10',
|
|
190
|
+
marginRight: '$10',
|
|
191
|
+
borderLeft: '1px solid $foreground',
|
|
192
|
+
});
|
|
193
|
+
|
|
194
|
+
export const HorizontalSeparator = styled('div', {
|
|
195
|
+
display: 'flex',
|
|
196
|
+
justifyContent: 'center',
|
|
197
|
+
margin: '0 $15',
|
|
198
|
+
borderTop: '1px solid',
|
|
199
|
+
$$color: '$colors$neutral300',
|
|
200
|
+
[`.${darkTheme} &`]: {
|
|
201
|
+
$$color: '$colors$neutral400',
|
|
202
|
+
},
|
|
203
|
+
borderColor: '$$color',
|
|
204
|
+
});
|
|
205
|
+
|
|
206
|
+
export const FrameIcon = styled('div', {
|
|
207
|
+
width: '$16',
|
|
208
|
+
height: '$16',
|
|
209
|
+
justifyContent: 'center',
|
|
210
|
+
alignItems: 'center',
|
|
211
|
+
display: 'flex',
|
|
212
|
+
});
|