@rango-dev/widget-embedded 0.17.1-next.8 → 0.18.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 +116 -0
- package/dist/QueueManager.d.ts +3 -1
- package/dist/QueueManager.d.ts.map +1 -1
- package/dist/components/AppRouter.d.ts.map +1 -1
- package/dist/components/AppRoutes.d.ts.map +1 -1
- package/dist/components/BlockchainsSection/BlockchainsSection.d.ts.map +1 -1
- package/dist/components/BlockchainsSection/BlockchainsSection.styles.d.ts +1 -1
- package/dist/components/BlockchainsSection/BlockchainsSection.styles.d.ts.map +1 -1
- package/dist/components/ConfirmWalletsModal/ConfirmWallets.styles.d.ts +690 -61
- package/dist/components/ConfirmWalletsModal/ConfirmWallets.styles.d.ts.map +1 -1
- package/dist/components/ConfirmWalletsModal/ConfirmWalletsModal.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.styles.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/LoadingSwapDetails/LoadingSwapDetails.d.ts.map +1 -1
- package/dist/components/LoadingSwapDetails/LoadingSwapDetails.styles.d.ts +1727 -0
- package/dist/components/LoadingSwapDetails/LoadingSwapDetails.styles.d.ts.map +1 -1
- package/dist/components/NoResult/NoResult.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 +793 -5
- 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/Quote/QuoteSummary.styles.d.ts +157 -0
- package/dist/components/Quote/QuoteSummary.styles.d.ts.map +1 -1
- package/dist/components/Quote/index.d.ts +0 -1
- package/dist/components/Quote/index.d.ts.map +1 -1
- package/dist/components/QuoteSkeleton/QuoteSkeleton.d.ts.map +1 -0
- package/dist/components/{Quote → QuoteSkeleton}/QuoteSkeleton.styles.d.ts +314 -0
- package/dist/components/QuoteSkeleton/QuoteSkeleton.styles.d.ts.map +1 -0
- package/dist/components/QuoteSkeleton/QuoteSkeleton.types.d.ts.map +1 -0
- package/dist/components/QuoteSkeleton/QuoteSummarySkeleton.d.ts +4 -0
- package/dist/components/QuoteSkeleton/QuoteSummarySkeleton.d.ts.map +1 -0
- package/dist/components/QuoteSkeleton/QuoteSummarySkeleton.styles.d.ts +1571 -0
- package/dist/components/QuoteSkeleton/QuoteSummarySkeleton.styles.d.ts.map +1 -0
- package/dist/components/QuoteSkeleton/QuoteSummarySkeleton.types.d.ts +6 -0
- package/dist/components/QuoteSkeleton/QuoteSummarySkeleton.types.d.ts.map +1 -0
- package/dist/components/QuoteSkeleton/StepSkeleton.d.ts +4 -0
- package/dist/components/QuoteSkeleton/StepSkeleton.d.ts.map +1 -0
- package/dist/components/QuoteSkeleton/StepSkeleton.styles.d.ts +786 -0
- package/dist/components/QuoteSkeleton/StepSkeleton.styles.d.ts.map +1 -0
- package/dist/components/QuoteSkeleton/StepSkeleton.types.d.ts +4 -0
- package/dist/components/QuoteSkeleton/StepSkeleton.types.d.ts.map +1 -0
- package/dist/components/QuoteSkeleton/index.d.ts +4 -0
- package/dist/components/QuoteSkeleton/index.d.ts.map +1 -0
- 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/Slippage/Slippage.styles.d.ts +158 -0
- package/dist/components/Slippage/Slippage.styles.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/SwapDetails/SwapDetails.styles.d.ts +628 -0
- package/dist/components/SwapDetails/SwapDetails.styles.d.ts.map +1 -1
- package/dist/components/SwapDetailsModal/SwapDetailsCompleteModal.d.ts.map +1 -1
- package/dist/components/SwapDetailsModal/SwapDetailsModal.WalletState.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 +157 -0
- 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 +1100 -1
- package/dist/components/TokenList/TokenList.styles.d.ts.map +1 -1
- package/dist/components/TokenList/TokenList.types.d.ts +4 -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.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.map +1 -1
- package/dist/hooks/useTheme.d.ts +1 -1
- package/dist/hooks/useTheme.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.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.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.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.map +1 -1
- package/dist/store/AppStore.d.ts +37 -1
- package/dist/store/AppStore.d.ts.map +1 -1
- package/dist/store/app.d.ts +39 -2
- 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 +9 -9
- package/dist/store/quote.d.ts.map +1 -1
- package/dist/store/slices/config.d.ts.map +1 -1
- package/dist/store/slices/data.d.ts +2 -2
- 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 +9 -5
- package/dist/store/wallets.d.ts.map +1 -1
- package/dist/types/config.d.ts +36 -3
- 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 +4 -1
- package/dist/utils/settings.d.ts.map +1 -1
- package/dist/utils/swap.d.ts +13 -5
- 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 -8
- package/dist/utils/wallets.d.ts.map +1 -1
- package/package.json +12 -10
- package/src/QueueManager.tsx +4 -3
- package/src/components/AppRouter.tsx +5 -27
- package/src/components/AppRoutes.tsx +54 -33
- package/src/components/BlockchainList/BlockchainList.styles.ts +2 -2
- package/src/components/BlockchainsSection/BlockchainsSection.styles.ts +1 -1
- package/src/components/BlockchainsSection/BlockchainsSection.tsx +19 -10
- package/src/components/ConfirmWalletsModal/ConfirmWallets.styles.ts +29 -10
- package/src/components/ConfirmWalletsModal/ConfirmWalletsModal.tsx +15 -7
- package/src/components/ConfirmWalletsModal/WalletList.tsx +3 -3
- package/src/components/HeaderButtons/HomeButtons.tsx +28 -18
- package/src/components/Layout/Layout.styles.ts +2 -0
- package/src/components/Layout/Layout.tsx +20 -7
- package/src/components/Layout/Layout.types.ts +2 -2
- package/src/components/LoadingSwapDetails/LoadingSwapDetails.styles.ts +65 -61
- package/src/components/LoadingSwapDetails/LoadingSwapDetails.tsx +28 -34
- package/src/components/NoResult/NoResult.helpers.ts +12 -12
- package/src/components/NoResult/NoResult.tsx +2 -5
- package/src/components/NotificationContent/NotificationContent.tsx +2 -1
- package/src/components/Quote/Quote.styles.ts +49 -12
- package/src/components/Quote/Quote.tsx +107 -38
- package/src/components/Quote/Quote.types.ts +0 -1
- package/src/components/Quote/QuoteSummary.styles.ts +9 -8
- package/src/components/Quote/QuoteSummary.tsx +2 -2
- package/src/components/Quote/index.ts +0 -1
- package/src/components/QuoteSkeleton/QuoteSkeleton.styles.ts +42 -0
- package/src/components/QuoteSkeleton/QuoteSkeleton.tsx +30 -0
- package/src/components/QuoteSkeleton/QuoteSummarySkeleton.styles.ts +57 -0
- package/src/components/QuoteSkeleton/QuoteSummarySkeleton.tsx +76 -0
- package/src/components/QuoteSkeleton/QuoteSummarySkeleton.types.ts +6 -0
- package/src/components/QuoteSkeleton/StepSkeleton.styles.ts +33 -0
- package/src/components/QuoteSkeleton/StepSkeleton.tsx +44 -0
- package/src/components/QuoteSkeleton/StepSkeleton.types.ts +1 -0
- package/src/components/QuoteSkeleton/index.ts +3 -0
- 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.styles.ts +15 -5
- package/src/components/Slippage/Slippage.tsx +11 -10
- package/src/components/SwapDetails/SwapDetails.Placeholder.tsx +5 -8
- package/src/components/SwapDetails/SwapDetails.helpers.tsx +1 -1
- package/src/components/SwapDetails/SwapDetails.styles.ts +36 -33
- package/src/components/SwapDetails/SwapDetails.tsx +28 -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.WalletState.tsx +14 -8
- 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 +10 -1
- package/src/components/SwapsGroup/SwapsGroup.tsx +3 -5
- package/src/components/TokenList/TokenList.helpers.ts +2 -2
- package/src/components/TokenList/TokenList.styles.ts +74 -38
- package/src/components/TokenList/TokenList.tsx +30 -20
- package/src/components/TokenList/TokenList.types.ts +4 -10
- package/src/components/TokenList/index.ts +0 -1
- package/src/components/UpdateUrl.tsx +4 -5
- 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 +46 -44
- package/src/containers/QuoteInfo/QuoteInfo.types.ts +3 -0
- package/src/{Wallets.tsx → containers/Wallets/Wallets.tsx} +25 -31
- 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 +21 -20
- 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 +86 -28
- package/src/hooks/useSyncStoresWithConfig.ts +18 -5
- package/src/hooks/useTheme.ts +4 -5
- package/src/index.ts +53 -5
- package/src/pages/ConfirmSwapPage.tsx +61 -33
- package/src/pages/HistoryPage.tsx +2 -7
- package/src/pages/Home.tsx +55 -81
- package/src/pages/LanguagePage.tsx +0 -5
- package/src/pages/LiquiditySourcePage.tsx +3 -7
- package/src/pages/SelectBlockchainPage.tsx +26 -18
- package/src/pages/SelectSwapItemsPage.tsx +13 -26
- package/src/pages/SettingsPage.tsx +26 -17
- package/src/pages/SwapDetailsPage.tsx +3 -4
- package/src/pages/ThemePage.tsx +2 -7
- package/src/pages/WalletsPage.tsx +5 -8
- package/src/services/httpService.ts +1 -1
- package/src/store/AppStore.tsx +7 -1
- package/src/store/app.ts +31 -5
- package/src/store/quote.ts +3 -4
- package/src/store/slices/config.ts +1 -0
- package/src/store/slices/data.ts +10 -6
- package/src/store/slices/settings.ts +168 -0
- package/src/store/wallets.ts +57 -29
- package/src/types/config.ts +48 -3
- 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 +11 -5
- package/src/utils/swap.ts +46 -40
- package/src/utils/time.ts +1 -1
- package/src/utils/wallets.ts +127 -144
- package/dist/Wallets.d.ts +0 -18
- 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/LoadingSwapDetails/LoadingSwapDetailStep.d.ts +0 -4
- package/dist/components/LoadingSwapDetails/LoadingSwapDetailStep.d.ts.map +0 -1
- package/dist/components/LoadingSwapDetails/LoadingSwapDetails.types.d.ts +0 -4
- package/dist/components/LoadingSwapDetails/LoadingSwapDetails.types.d.ts.map +0 -1
- package/dist/components/Quote/QuoteSkeleton.d.ts.map +0 -1
- package/dist/components/Quote/QuoteSkeleton.styles.d.ts.map +0 -1
- package/dist/components/Quote/QuoteSkeleton.types.d.ts.map +0 -1
- package/dist/store/settings.d.ts +0 -82
- package/dist/store/settings.d.ts.map +0 -1
- package/src/Widget.tsx +0 -106
- package/src/components/LoadingSwapDetails/LoadingSwapDetailStep.tsx +0 -41
- package/src/components/LoadingSwapDetails/LoadingSwapDetails.types.ts +0 -3
- package/src/components/Quote/QuoteSkeleton.styles.ts +0 -110
- package/src/components/Quote/QuoteSkeleton.tsx +0 -108
- package/src/store/settings.ts +0 -161
- /package/dist/components/{Quote → QuoteSkeleton}/QuoteSkeleton.d.ts +0 -0
- /package/dist/components/{Quote → QuoteSkeleton}/QuoteSkeleton.types.d.ts +0 -0
- /package/src/components/{Quote → QuoteSkeleton}/QuoteSkeleton.types.ts +0 -0
|
@@ -19,15 +19,16 @@ import React, { useEffect, useLayoutEffect, useRef, useState } from 'react';
|
|
|
19
19
|
import { useNavigate } from 'react-router-dom';
|
|
20
20
|
|
|
21
21
|
import { getQuoteErrorMessage } from '../../constants/errors';
|
|
22
|
-
import { navigationRoutes } from '../../constants/navigationRoutes';
|
|
23
22
|
import { getQuoteUpdateWarningMessage } from '../../constants/warnings';
|
|
24
23
|
import { useAppStore } from '../../store/AppStore';
|
|
25
24
|
import { useQuoteStore } from '../../store/quote';
|
|
26
25
|
import { useWalletsStore } from '../../store/wallets';
|
|
26
|
+
import { getBlockchainShortNameFor } from '../../utils/meta';
|
|
27
27
|
import { confirmSwapDisabled } from '../../utils/swap';
|
|
28
28
|
|
|
29
29
|
import { getRequiredWallets, isValidAddress } from './ConfirmWallets.helpers';
|
|
30
30
|
import {
|
|
31
|
+
alarmsStyles,
|
|
31
32
|
CollapsibleContent,
|
|
32
33
|
CollapsibleRoot,
|
|
33
34
|
ConfirmButton,
|
|
@@ -43,6 +44,7 @@ import {
|
|
|
43
44
|
Trigger,
|
|
44
45
|
Wallets,
|
|
45
46
|
WalletsContainer,
|
|
47
|
+
walletsListStyles,
|
|
46
48
|
} from './ConfirmWallets.styles';
|
|
47
49
|
import { WalletList } from './WalletList';
|
|
48
50
|
|
|
@@ -244,7 +246,8 @@ export function ConfirmWalletsModal(props: PropTypes) {
|
|
|
244
246
|
open={open}
|
|
245
247
|
onClose={() => {
|
|
246
248
|
if (!quoteWalletsConfirmed) {
|
|
247
|
-
|
|
249
|
+
const home = '../';
|
|
250
|
+
navigate(home, { replace: true });
|
|
248
251
|
}
|
|
249
252
|
onClose();
|
|
250
253
|
}}
|
|
@@ -285,7 +288,12 @@ export function ConfirmWalletsModal(props: PropTypes) {
|
|
|
285
288
|
<Typography variant="headline" size="small">
|
|
286
289
|
{i18n.t({
|
|
287
290
|
id: 'Your {blockchainName} wallets',
|
|
288
|
-
values: {
|
|
291
|
+
values: {
|
|
292
|
+
blockchainName: getBlockchainShortNameFor(
|
|
293
|
+
showMoreWalletFor,
|
|
294
|
+
blockchains
|
|
295
|
+
),
|
|
296
|
+
},
|
|
289
297
|
})}
|
|
290
298
|
</Typography>
|
|
291
299
|
</ShowMoreHeader>
|
|
@@ -312,7 +320,7 @@ export function ConfirmWalletsModal(props: PropTypes) {
|
|
|
312
320
|
</Modal>
|
|
313
321
|
{showMoreWalletFor && (
|
|
314
322
|
<WalletsContainer>
|
|
315
|
-
<div className=
|
|
323
|
+
<div className={walletsListStyles()}>
|
|
316
324
|
<WalletList
|
|
317
325
|
chain={showMoreWalletFor}
|
|
318
326
|
isSelected={isSelected}
|
|
@@ -355,7 +363,7 @@ export function ConfirmWalletsModal(props: PropTypes) {
|
|
|
355
363
|
<Typography variant="title" size="xmedium">
|
|
356
364
|
{i18n.t({
|
|
357
365
|
id: 'Your {blockchainName} wallets',
|
|
358
|
-
values: { blockchainName: blockchain?.
|
|
366
|
+
values: { blockchainName: blockchain?.shortName },
|
|
359
367
|
})}
|
|
360
368
|
</Typography>
|
|
361
369
|
<Typography
|
|
@@ -364,7 +372,7 @@ export function ConfirmWalletsModal(props: PropTypes) {
|
|
|
364
372
|
size="medium">
|
|
365
373
|
{i18n.t({
|
|
366
374
|
id: 'You need to connect a {blockchainName} wallet.',
|
|
367
|
-
values: { blockchainName: blockchain?.
|
|
375
|
+
values: { blockchainName: blockchain?.shortName },
|
|
368
376
|
})}
|
|
369
377
|
</Typography>
|
|
370
378
|
</Title>
|
|
@@ -452,7 +460,7 @@ export function ConfirmWalletsModal(props: PropTypes) {
|
|
|
452
460
|
</CollapsibleContent>
|
|
453
461
|
</CollapsibleRoot>
|
|
454
462
|
{isAddressMatched && (
|
|
455
|
-
<div className=
|
|
463
|
+
<div className={alarmsStyles()}>
|
|
456
464
|
<Alert
|
|
457
465
|
variant="alarm"
|
|
458
466
|
type="error"
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
} from '../../utils/wallets';
|
|
34
34
|
import { WalletModal } from '../WalletModal';
|
|
35
35
|
|
|
36
|
-
import {
|
|
36
|
+
import { ShowMoreWallets } from './ConfirmWallets.styles';
|
|
37
37
|
import {
|
|
38
38
|
LogoContainer,
|
|
39
39
|
Spinner,
|
|
@@ -292,14 +292,14 @@ export function WalletList(props: PropTypes) {
|
|
|
292
292
|
);
|
|
293
293
|
})}
|
|
294
294
|
{shouldShowMoreWallets && (
|
|
295
|
-
<
|
|
295
|
+
<ShowMoreWallets selected={false} onClick={onShowMore}>
|
|
296
296
|
<Typography variant="label" size="medium">
|
|
297
297
|
{i18n.t('Show more wallets')}
|
|
298
298
|
<Typography variant="label" size="medium" color="$primary">
|
|
299
299
|
+{numberOfSupportedWallets - (limit ?? 0)}
|
|
300
300
|
</Typography>
|
|
301
301
|
</Typography>
|
|
302
|
-
</
|
|
302
|
+
</ShowMoreWallets>
|
|
303
303
|
)}
|
|
304
304
|
</>
|
|
305
305
|
);
|
|
@@ -11,7 +11,9 @@ import {
|
|
|
11
11
|
} from '@rango-dev/ui';
|
|
12
12
|
import React from 'react';
|
|
13
13
|
|
|
14
|
+
import { useAppStore } from '../../store/AppStore';
|
|
14
15
|
import { getContainer } from '../../utils/common';
|
|
16
|
+
import { isFeatureHidden } from '../../utils/settings';
|
|
15
17
|
import { NotificationContent } from '../NotificationContent';
|
|
16
18
|
|
|
17
19
|
import { HeaderButton } from './HeaderButtons.styles';
|
|
@@ -26,6 +28,12 @@ export function HomeButtons(props: HomeButtonsPropTypes) {
|
|
|
26
28
|
onClickNotifications,
|
|
27
29
|
} = props;
|
|
28
30
|
|
|
31
|
+
const {
|
|
32
|
+
config: { features },
|
|
33
|
+
} = useAppStore();
|
|
34
|
+
|
|
35
|
+
const isNotificationsHidden = isFeatureHidden('notification', features);
|
|
36
|
+
|
|
29
37
|
return (
|
|
30
38
|
<>
|
|
31
39
|
<Tooltip
|
|
@@ -41,25 +49,27 @@ export function HomeButtons(props: HomeButtonsPropTypes) {
|
|
|
41
49
|
</HeaderButton>
|
|
42
50
|
</Tooltip>
|
|
43
51
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
side="top"
|
|
47
|
-
content={i18n.t('Notifications')}>
|
|
48
|
-
<Popover
|
|
49
|
-
align="center"
|
|
50
|
-
collisionBoundary={layoutRef}
|
|
51
|
-
collisionPadding={{ right: 20, left: 20 }}
|
|
52
|
+
{!isNotificationsHidden && (
|
|
53
|
+
<Tooltip
|
|
52
54
|
container={getContainer()}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
55
|
+
side="top"
|
|
56
|
+
content={i18n.t('Notifications')}>
|
|
57
|
+
<Popover
|
|
58
|
+
align="center"
|
|
59
|
+
collisionBoundary={layoutRef}
|
|
60
|
+
collisionPadding={{ right: 20, left: 20 }}
|
|
61
|
+
container={getContainer()}
|
|
62
|
+
content={<NotificationContent />}>
|
|
63
|
+
<HeaderButton
|
|
64
|
+
size="small"
|
|
65
|
+
variant="ghost"
|
|
66
|
+
onClick={onClickNotifications}>
|
|
67
|
+
<NotificationsIcon size={18} color="black" />
|
|
68
|
+
<UnreadNotificationsBadge />
|
|
69
|
+
</HeaderButton>
|
|
70
|
+
</Popover>
|
|
71
|
+
</Tooltip>
|
|
72
|
+
)}
|
|
63
73
|
<Tooltip
|
|
64
74
|
container={getContainer()}
|
|
65
75
|
side="top"
|
|
@@ -8,8 +8,10 @@ export const Container = styled('div', {
|
|
|
8
8
|
overflow: 'hidden !important',
|
|
9
9
|
boxShadow: '15px 15px 15px 0px rgba(0, 0, 0, 0.05)',
|
|
10
10
|
width: '95vw',
|
|
11
|
+
minWidth: '300px',
|
|
11
12
|
maxWidth: '390px',
|
|
12
13
|
maxHeight: '700px',
|
|
14
|
+
textAlign: 'left',
|
|
13
15
|
$$color: '$colors$neutral100',
|
|
14
16
|
[`.${darkTheme} &`]: {
|
|
15
17
|
$$color: '$colors$neutral300',
|
|
@@ -3,12 +3,13 @@ import type { PropsWithChildren } from 'react';
|
|
|
3
3
|
|
|
4
4
|
import { BottomLogo, Divider, Header } from '@rango-dev/ui';
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import { useNavigate } from 'react-router-dom';
|
|
7
6
|
|
|
8
|
-
import {
|
|
7
|
+
import { useNavigateBack } from '../../hooks/useNavigateBack';
|
|
8
|
+
import { useAppStore } from '../../store/AppStore';
|
|
9
9
|
import { useUiStore } from '../../store/ui';
|
|
10
10
|
import { useWalletsStore } from '../../store/wallets';
|
|
11
11
|
import { getContainer } from '../../utils/common';
|
|
12
|
+
import { isFeatureHidden } from '../../utils/settings';
|
|
12
13
|
import { BackButton, CancelButton, WalletButton } from '../HeaderButtons';
|
|
13
14
|
|
|
14
15
|
import { Container, Content, Footer } from './Layout.styles';
|
|
@@ -23,25 +24,37 @@ function LayoutComponent(props: PropsWithChildren<PropTypes>, ref: Ref) {
|
|
|
23
24
|
fixedHeight = true,
|
|
24
25
|
} = props;
|
|
25
26
|
const connectedWallets = useWalletsStore.use.connectedWallets();
|
|
27
|
+
const {
|
|
28
|
+
config: { features },
|
|
29
|
+
} = useAppStore();
|
|
30
|
+
|
|
31
|
+
const isConnectWalletHidden = isFeatureHidden(
|
|
32
|
+
'connectWalletButton',
|
|
33
|
+
features
|
|
34
|
+
);
|
|
26
35
|
|
|
27
36
|
const connectWalletsButtonDisabled =
|
|
28
37
|
useUiStore.use.connectWalletsButtonDisabled();
|
|
29
|
-
const
|
|
38
|
+
const navigateBack = useNavigateBack();
|
|
30
39
|
|
|
31
40
|
const onConnectWallet = () => {
|
|
32
|
-
if (!connectWalletsButtonDisabled) {
|
|
33
|
-
|
|
41
|
+
if (!connectWalletsButtonDisabled && header.onWallet) {
|
|
42
|
+
header.onWallet();
|
|
34
43
|
}
|
|
35
44
|
};
|
|
45
|
+
|
|
46
|
+
const showBackButton =
|
|
47
|
+
typeof header.hasBackButton === 'undefined' || header.hasBackButton;
|
|
48
|
+
|
|
36
49
|
return (
|
|
37
50
|
<Container ref={ref} fixedHeight={fixedHeight} id="swap-box">
|
|
38
51
|
<Header
|
|
39
|
-
prefix={<>{
|
|
52
|
+
prefix={<>{showBackButton && <BackButton onClick={navigateBack} />}</>}
|
|
40
53
|
title={header.title}
|
|
41
54
|
suffix={
|
|
42
55
|
<>
|
|
43
56
|
{header.suffix}
|
|
44
|
-
{header.
|
|
57
|
+
{header.onWallet && !isConnectWalletHidden && (
|
|
45
58
|
<WalletButton
|
|
46
59
|
container={getContainer()}
|
|
47
60
|
onClick={onConnectWallet}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export interface PropTypes {
|
|
2
2
|
header: {
|
|
3
3
|
title: string;
|
|
4
|
-
|
|
4
|
+
onWallet?: () => void;
|
|
5
5
|
hasSettings?: boolean;
|
|
6
6
|
suffix?: React.ReactNode;
|
|
7
|
-
|
|
7
|
+
hasBackButton?: boolean;
|
|
8
8
|
onCancel?: () => void;
|
|
9
9
|
};
|
|
10
10
|
hasLogo?: boolean;
|
|
@@ -1,78 +1,82 @@
|
|
|
1
|
-
import { styled } from '@rango-dev/ui';
|
|
1
|
+
import { css, styled } from '@rango-dev/ui';
|
|
2
2
|
|
|
3
3
|
export const Container = styled('div', {
|
|
4
4
|
width: '100%',
|
|
5
5
|
height: '100%',
|
|
6
|
-
padding: '$
|
|
7
|
-
|
|
8
|
-
'.cost': {
|
|
9
|
-
paddingTop: '$15',
|
|
10
|
-
display: 'flex',
|
|
11
|
-
},
|
|
12
|
-
|
|
13
|
-
'.quote-summary': {
|
|
14
|
-
padding: '$15 $0',
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
-
'.quote-summary-item': {
|
|
18
|
-
display: 'flex',
|
|
19
|
-
justifyContent: 'space-between',
|
|
20
|
-
alignItems: 'center',
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
'.token-amount': {
|
|
24
|
-
display: 'flex',
|
|
25
|
-
justifyContent: 'space-between',
|
|
26
|
-
alignItems: 'center',
|
|
27
|
-
},
|
|
28
|
-
|
|
29
|
-
'.quote-summary-separator': {
|
|
30
|
-
width: '0px',
|
|
31
|
-
height: '$16',
|
|
32
|
-
borderLeft: '1px solid $neutral400',
|
|
33
|
-
marginLeft: '13px',
|
|
34
|
-
},
|
|
35
|
-
|
|
36
|
-
'.swaps-steps': {
|
|
37
|
-
paddingBottom: '$10',
|
|
38
|
-
},
|
|
6
|
+
padding: '$10 $20',
|
|
39
7
|
});
|
|
40
8
|
|
|
41
9
|
export const StepContainer = styled('div', {
|
|
42
10
|
backgroundColor: '$neutral100',
|
|
43
11
|
borderRadius: '$xm',
|
|
44
12
|
padding: '$10 $15',
|
|
45
|
-
|
|
46
|
-
'.step-title': {
|
|
47
|
-
display: 'flex',
|
|
48
|
-
justifyContent: 'start',
|
|
49
|
-
alignItems: 'center',
|
|
50
|
-
},
|
|
51
|
-
'.step-tokens': {
|
|
52
|
-
paddingTop: '$5',
|
|
53
|
-
display: 'flex',
|
|
54
|
-
alignItems: 'center',
|
|
55
|
-
},
|
|
56
|
-
'.step-token-info': {
|
|
57
|
-
display: 'flex',
|
|
58
|
-
alignItems: 'center',
|
|
59
|
-
},
|
|
60
|
-
'.step-icon-container': {
|
|
61
|
-
padding: '$4 $6',
|
|
62
|
-
display: 'flex',
|
|
63
|
-
justifyContent: 'center',
|
|
64
|
-
alignItems: 'center',
|
|
65
|
-
},
|
|
66
|
-
|
|
67
|
-
'.extra-info': {
|
|
68
|
-
display: 'flex',
|
|
69
|
-
paddingTop: '$10',
|
|
70
|
-
paddingBottom: '$5',
|
|
71
|
-
},
|
|
72
13
|
});
|
|
14
|
+
|
|
73
15
|
export const StepSeparator = styled('div', {
|
|
74
16
|
width: '0px',
|
|
75
17
|
height: '$20',
|
|
76
18
|
borderLeft: '1px dashed $neutral700',
|
|
77
19
|
marginLeft: '25px',
|
|
78
20
|
});
|
|
21
|
+
|
|
22
|
+
export const quoteSummaryItemStyles = css({
|
|
23
|
+
display: 'flex',
|
|
24
|
+
justifyContent: 'space-between',
|
|
25
|
+
alignItems: 'center',
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
export const tokenAmountStyles = css({
|
|
29
|
+
display: 'flex',
|
|
30
|
+
justifyContent: 'space-between',
|
|
31
|
+
alignItems: 'center',
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
export const costStyles = css({
|
|
35
|
+
paddingTop: '$15',
|
|
36
|
+
display: 'flex',
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
export const quoteSummaryStyles = css({
|
|
40
|
+
padding: '$15 $0',
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
export const quoteSummarySeparatorStyles = css({
|
|
44
|
+
width: '0px',
|
|
45
|
+
height: '$16',
|
|
46
|
+
borderLeft: '1px solid $neutral400',
|
|
47
|
+
marginLeft: '13px',
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
export const swapsStepsStyles = css({
|
|
51
|
+
paddingBottom: '$10',
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
export const stepTitleStyles = css({
|
|
55
|
+
display: 'flex',
|
|
56
|
+
justifyContent: 'start',
|
|
57
|
+
alignItems: 'center',
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
export const stepTokensStyles = css({
|
|
61
|
+
paddingTop: '$5',
|
|
62
|
+
display: 'flex',
|
|
63
|
+
alignItems: 'center',
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
export const stepInfoStyles = css({
|
|
67
|
+
display: 'flex',
|
|
68
|
+
alignItems: 'center',
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
export const stepIconStyles = css({
|
|
72
|
+
padding: '$4 $6',
|
|
73
|
+
display: 'flex',
|
|
74
|
+
justifyContent: 'center',
|
|
75
|
+
alignItems: 'center',
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
export const extraInfoStyles = css({
|
|
79
|
+
display: 'flex',
|
|
80
|
+
paddingTop: '$10',
|
|
81
|
+
paddingBottom: '$5',
|
|
82
|
+
});
|
|
@@ -1,53 +1,47 @@
|
|
|
1
1
|
import { i18n } from '@lingui/core';
|
|
2
|
-
import {
|
|
2
|
+
import { Divider, Skeleton, Typography } from '@rango-dev/ui';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
import { LoadingSwapDetailStep } from './LoadingSwapDetailStep';
|
|
5
|
+
import { QuoteSummarySkeleton, StepSkeleton } from '../QuoteSkeleton';
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
<Skeleton height={15} width={148} variant="rounded" />
|
|
15
|
-
</div>
|
|
16
|
-
<Skeleton height={12} width={64} variant="rounded" />
|
|
17
|
-
</div>
|
|
18
|
-
);
|
|
7
|
+
import {
|
|
8
|
+
Container,
|
|
9
|
+
extraInfoStyles,
|
|
10
|
+
StepContainer,
|
|
11
|
+
StepSeparator,
|
|
12
|
+
} from './LoadingSwapDetails.styles';
|
|
19
13
|
|
|
14
|
+
export function LoadingSwapDetails() {
|
|
20
15
|
return (
|
|
21
16
|
<Container>
|
|
22
|
-
<
|
|
23
|
-
<Skeleton width={60} height={10} variant="rounded" />
|
|
24
|
-
<Divider size={4} direction="horizontal" />
|
|
25
|
-
<Skeleton width={60} height={10} variant="rounded" />
|
|
26
|
-
<Divider size={4} direction="horizontal" />
|
|
27
|
-
<Skeleton width={60} height={10} variant="rounded" />
|
|
28
|
-
</div>
|
|
29
|
-
|
|
30
|
-
<div className="quote-summary">
|
|
31
|
-
{quoteSummary}
|
|
32
|
-
<div className="quote-summary-separator"></div>
|
|
33
|
-
{quoteSummary}
|
|
34
|
-
</div>
|
|
35
|
-
|
|
17
|
+
<QuoteSummarySkeleton type="swap-preview" />
|
|
36
18
|
<div className="swaps-steps">
|
|
37
19
|
<Typography variant="title" size="small">
|
|
38
20
|
{i18n.t('Swaps steps')}
|
|
39
21
|
</Typography>
|
|
40
22
|
</div>
|
|
41
23
|
|
|
42
|
-
|
|
43
|
-
<
|
|
24
|
+
<>
|
|
25
|
+
<StepContainer>
|
|
26
|
+
<StepSkeleton separator={false} />
|
|
27
|
+
<div className={extraInfoStyles()}>
|
|
28
|
+
<Divider direction="horizontal" size={20} />
|
|
29
|
+
<Skeleton height={22} variant="rectangular" />
|
|
30
|
+
</div>
|
|
31
|
+
</StepContainer>
|
|
44
32
|
<StepSeparator />
|
|
45
|
-
<
|
|
33
|
+
<StepContainer>
|
|
34
|
+
<StepSkeleton separator={false} />
|
|
35
|
+
</StepContainer>
|
|
46
36
|
<StepSeparator />
|
|
47
|
-
<
|
|
37
|
+
<StepContainer>
|
|
38
|
+
<StepSkeleton separator={false} />
|
|
39
|
+
</StepContainer>
|
|
48
40
|
<StepSeparator />
|
|
49
|
-
<
|
|
50
|
-
|
|
41
|
+
<StepContainer>
|
|
42
|
+
<StepSkeleton separator={false} />
|
|
43
|
+
</StepContainer>
|
|
44
|
+
</>
|
|
51
45
|
</Container>
|
|
52
46
|
);
|
|
53
47
|
}
|
|
@@ -27,18 +27,6 @@ export function makeInfo(
|
|
|
27
27
|
},
|
|
28
28
|
description: '',
|
|
29
29
|
};
|
|
30
|
-
} else if (
|
|
31
|
-
error?.type === QuoteErrorType.NO_RESULT &&
|
|
32
|
-
error.diagnosisMessage
|
|
33
|
-
) {
|
|
34
|
-
return {
|
|
35
|
-
alert: {
|
|
36
|
-
type: 'error',
|
|
37
|
-
text: error.diagnosisMessage,
|
|
38
|
-
action: null,
|
|
39
|
-
},
|
|
40
|
-
description: '',
|
|
41
|
-
};
|
|
42
30
|
} else if (disabledLiquiditySources.length) {
|
|
43
31
|
return {
|
|
44
32
|
alert: {
|
|
@@ -51,6 +39,18 @@ export function makeInfo(
|
|
|
51
39
|
},
|
|
52
40
|
description: errorMessages().liquiditySourcesError.description,
|
|
53
41
|
};
|
|
42
|
+
} else if (
|
|
43
|
+
error?.type === QuoteErrorType.NO_RESULT &&
|
|
44
|
+
error.diagnosisMessage
|
|
45
|
+
) {
|
|
46
|
+
return {
|
|
47
|
+
alert: {
|
|
48
|
+
type: 'error',
|
|
49
|
+
text: error.diagnosisMessage,
|
|
50
|
+
action: null,
|
|
51
|
+
},
|
|
52
|
+
description: '',
|
|
53
|
+
};
|
|
54
54
|
}
|
|
55
55
|
return {
|
|
56
56
|
alert: null,
|
|
@@ -12,17 +12,14 @@ import React from 'react';
|
|
|
12
12
|
|
|
13
13
|
import { errorMessages } from '../../constants/errors';
|
|
14
14
|
import { useAppStore } from '../../store/AppStore';
|
|
15
|
-
import { useSettingsStore } from '../../store/settings';
|
|
16
15
|
|
|
17
16
|
import { makeInfo } from './NoResult.helpers';
|
|
18
17
|
import { Container, Footer, PrefixIcon } from './NoResult.styles';
|
|
19
18
|
|
|
20
19
|
export function NoResult(props: PropTypes) {
|
|
21
20
|
const { fetch, error } = props;
|
|
22
|
-
const disabledLiquiditySources =
|
|
23
|
-
|
|
24
|
-
const toggleAllLiquiditySources =
|
|
25
|
-
useSettingsStore.use.toggleAllLiquiditySources();
|
|
21
|
+
const disabledLiquiditySources = useAppStore().disabledLiquiditySources;
|
|
22
|
+
const toggleAllLiquiditySources = useAppStore().toggleAllLiquiditySources;
|
|
26
23
|
|
|
27
24
|
const swappers = useAppStore().swappers();
|
|
28
25
|
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import { useNavigate } from 'react-router-dom';
|
|
12
12
|
|
|
13
|
+
import { navigationRoutes } from '../../constants/navigationRoutes';
|
|
13
14
|
import { useAppStore } from '../../store/AppStore';
|
|
14
15
|
import { useNotificationStore } from '../../store/notification';
|
|
15
16
|
import { useUiStore } from '../../store/ui';
|
|
@@ -34,7 +35,7 @@ export function NotificationContent() {
|
|
|
34
35
|
|
|
35
36
|
const handleOnClick = (requestId: Notification['requestId']) => {
|
|
36
37
|
setSelectedSwap(requestId);
|
|
37
|
-
navigate(
|
|
38
|
+
navigate(`${navigationRoutes.swaps}/${requestId}`);
|
|
38
39
|
};
|
|
39
40
|
|
|
40
41
|
return (
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as Collapsible from '@radix-ui/react-collapsible';
|
|
2
|
-
import { darkTheme, styled } from '@rango-dev/ui';
|
|
2
|
+
import { css, darkTheme, Image, styled, Typography } 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: {
|
|
@@ -31,9 +32,10 @@ export const QuoteContainer = styled(Collapsible.Root, {
|
|
|
31
32
|
},
|
|
32
33
|
},
|
|
33
34
|
},
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
export const stepsDetailsStyles = css({
|
|
38
|
+
padding: '$10 $15',
|
|
37
39
|
});
|
|
38
40
|
|
|
39
41
|
export const SummaryContainer = styled('div', {
|
|
@@ -104,14 +106,23 @@ export const SummaryContainer = styled('div', {
|
|
|
104
106
|
},
|
|
105
107
|
},
|
|
106
108
|
],
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
export const summaryStyles = css({
|
|
112
|
+
padding: '$15 $15 $10 $15',
|
|
113
|
+
cursor: 'default',
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
export const basicInfoStyles = css({
|
|
117
|
+
paddingTop: '$10',
|
|
118
|
+
display: 'flex',
|
|
119
|
+
alignItems: 'center',
|
|
120
|
+
'.usd-value': {
|
|
121
|
+
$$color: '$colors$neutral600',
|
|
122
|
+
[`.${darkTheme} &`]: {
|
|
123
|
+
$$color: '$colors$neutral700',
|
|
124
|
+
},
|
|
125
|
+
color: '$$color',
|
|
115
126
|
},
|
|
116
127
|
});
|
|
117
128
|
|
|
@@ -162,8 +173,27 @@ export const Chains = styled(Collapsible.Trigger, {
|
|
|
162
173
|
'& div:nth-child(1)': { display: 'flex' },
|
|
163
174
|
});
|
|
164
175
|
|
|
176
|
+
export const ChainImageContainer = styled('div', {
|
|
177
|
+
width: '18px',
|
|
178
|
+
height: '18px',
|
|
179
|
+
borderRadius: '100%',
|
|
180
|
+
border: '1.5px transparent solid',
|
|
181
|
+
display: 'flex',
|
|
182
|
+
justifyContent: 'center',
|
|
183
|
+
alignItems: 'center',
|
|
184
|
+
variants: {
|
|
185
|
+
state: {
|
|
186
|
+
error: {
|
|
187
|
+
borderColor: '$error500',
|
|
188
|
+
},
|
|
189
|
+
warning: { borderColor: '$warning500' },
|
|
190
|
+
},
|
|
191
|
+
},
|
|
192
|
+
});
|
|
193
|
+
|
|
165
194
|
export const Content = styled(CollapsibleContent, {
|
|
166
195
|
width: '100%',
|
|
196
|
+
background: 'inherit',
|
|
167
197
|
});
|
|
168
198
|
|
|
169
199
|
export const IconContainer = styled('div', {
|
|
@@ -210,3 +240,10 @@ export const FrameIcon = styled('div', {
|
|
|
210
240
|
alignItems: 'center',
|
|
211
241
|
display: 'flex',
|
|
212
242
|
});
|
|
243
|
+
|
|
244
|
+
export const BasicInfoOutput = styled(Typography, {
|
|
245
|
+
width: '100%',
|
|
246
|
+
overflow: 'hidden',
|
|
247
|
+
textOverflow: 'ellipsis',
|
|
248
|
+
letterSpacing: 0.4,
|
|
249
|
+
});
|