@rango-dev/widget-embedded 0.12.1-next.2 → 0.12.1-next.21
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/Wallets.d.ts +4 -3
- package/dist/Wallets.d.ts.map +1 -1
- package/dist/Widget.d.ts +3 -2
- package/dist/Widget.d.ts.map +1 -1
- package/dist/components/AppRouter.d.ts +3 -2
- package/dist/components/AppRouter.d.ts.map +1 -1
- package/dist/components/AppRoutes.d.ts +1 -1
- package/dist/components/AppRoutes.d.ts.map +1 -1
- package/dist/components/BlockchainList/BlockchainList.d.ts +4 -0
- package/dist/components/BlockchainList/BlockchainList.d.ts.map +1 -0
- package/dist/components/BlockchainList/BlockchainList.helpers.d.ts +4 -0
- package/dist/components/BlockchainList/BlockchainList.helpers.d.ts.map +1 -0
- package/dist/components/BlockchainList/BlockchainList.styles.d.ts +307 -0
- package/dist/components/BlockchainList/BlockchainList.styles.d.ts.map +1 -0
- package/dist/components/BlockchainList/BlockchainList.types.d.ts +8 -0
- package/dist/components/BlockchainList/BlockchainList.types.d.ts.map +1 -0
- package/dist/components/BlockchainList/LoadingBlockchainList.d.ts +3 -0
- package/dist/components/BlockchainList/LoadingBlockchainList.d.ts.map +1 -0
- package/dist/components/BlockchainList/index.d.ts +2 -0
- package/dist/components/BlockchainList/index.d.ts.map +1 -0
- package/dist/components/BlockchainsChip/BlockchainsChip.d.ts +5 -0
- package/dist/components/BlockchainsChip/BlockchainsChip.d.ts.map +1 -0
- package/dist/components/BlockchainsChip/BlockchainsChip.styles.d.ts +156 -0
- package/dist/components/BlockchainsChip/BlockchainsChip.styles.d.ts.map +1 -0
- package/dist/components/BlockchainsChip/BlockchainsChip.types.d.ts +6 -0
- package/dist/components/BlockchainsChip/BlockchainsChip.types.d.ts.map +1 -0
- package/dist/components/BlockchainsChip/index.d.ts +2 -0
- package/dist/components/BlockchainsChip/index.d.ts.map +1 -0
- package/dist/components/BlockchainsSection/BlockchainSection.helpers.d.ts +3 -0
- package/dist/components/BlockchainsSection/BlockchainSection.helpers.d.ts.map +1 -0
- package/dist/components/BlockchainsSection/BlockchainsSection.d.ts +4 -0
- package/dist/components/BlockchainsSection/BlockchainsSection.d.ts.map +1 -0
- package/dist/components/BlockchainsSection/BlockchainsSection.styles.d.ts +154 -0
- package/dist/components/BlockchainsSection/BlockchainsSection.styles.d.ts.map +1 -0
- package/dist/components/BlockchainsSection/BlockchainsSection.types.d.ts +9 -0
- package/dist/components/BlockchainsSection/BlockchainsSection.types.d.ts.map +1 -0
- package/dist/components/BlockchainsSection/index.d.ts +2 -0
- package/dist/components/BlockchainsSection/index.d.ts.map +1 -0
- package/dist/components/ConfirmWalletsModal/ConfirmWallets.helpers.d.ts +6 -0
- package/dist/components/ConfirmWalletsModal/ConfirmWallets.helpers.d.ts.map +1 -0
- package/dist/components/ConfirmWalletsModal/ConfirmWallets.styles.d.ts +2597 -0
- package/dist/components/ConfirmWalletsModal/ConfirmWallets.styles.d.ts.map +1 -0
- package/dist/components/ConfirmWalletsModal/ConfirmWalletsModal.d.ts +4 -0
- package/dist/components/ConfirmWalletsModal/ConfirmWalletsModal.d.ts.map +1 -0
- package/dist/components/ConfirmWalletsModal/ConfirmWalletsModal.types.d.ts +11 -0
- package/dist/components/ConfirmWalletsModal/ConfirmWalletsModal.types.d.ts.map +1 -0
- package/dist/components/ConfirmWalletsModal/WalletList.d.ts +4 -0
- package/dist/components/ConfirmWalletsModal/WalletList.d.ts.map +1 -0
- package/dist/components/ConfirmWalletsModal/WalletList.styles.d.ts +460 -0
- package/dist/components/ConfirmWalletsModal/WalletList.styles.d.ts.map +1 -0
- package/dist/components/ConfirmWalletsModal/WalletList.type.d.ts +12 -0
- package/dist/components/ConfirmWalletsModal/WalletList.type.d.ts.map +1 -0
- package/dist/components/HeaderButtons/BackButton.d.ts +5 -0
- package/dist/components/HeaderButtons/BackButton.d.ts.map +1 -0
- package/dist/components/HeaderButtons/CancelButton.d.ts +5 -0
- package/dist/components/HeaderButtons/CancelButton.d.ts.map +1 -0
- package/dist/components/HeaderButtons/HeaderButtons.styles.d.ts +895 -0
- package/dist/components/HeaderButtons/HeaderButtons.styles.d.ts.map +1 -0
- package/dist/components/HeaderButtons/HeaderButtons.types.d.ts +12 -0
- package/dist/components/HeaderButtons/HeaderButtons.types.d.ts.map +1 -0
- package/dist/components/HeaderButtons/HomeButtons.d.ts +4 -0
- package/dist/components/HeaderButtons/HomeButtons.d.ts.map +1 -0
- package/dist/components/HeaderButtons/UnreadNotificationsBadge.d.ts +3 -0
- package/dist/components/HeaderButtons/UnreadNotificationsBadge.d.ts.map +1 -0
- package/dist/components/HeaderButtons/WalletButton.d.ts +5 -0
- package/dist/components/HeaderButtons/WalletButton.d.ts.map +1 -0
- package/dist/components/HeaderButtons/index.d.ts +5 -0
- package/dist/components/HeaderButtons/index.d.ts.map +1 -0
- package/dist/components/Layout/Layout.d.ts +7 -0
- package/dist/components/Layout/Layout.d.ts.map +1 -0
- package/dist/components/Layout/Layout.styles.d.ts +464 -0
- package/dist/components/Layout/Layout.styles.d.ts.map +1 -0
- package/dist/components/Layout/Layout.types.d.ts +17 -0
- package/dist/components/Layout/Layout.types.d.ts.map +1 -0
- package/dist/components/Layout/index.d.ts +2 -0
- package/dist/components/Layout/index.d.ts.map +1 -0
- package/dist/components/LoadingLiquiditySourceList/LoadingLiquiditySourceList.d.ts +3 -0
- package/dist/components/LoadingLiquiditySourceList/LoadingLiquiditySourceList.d.ts.map +1 -0
- package/dist/components/LoadingLiquiditySourceList/LoadingLiquiditySourceList.styles.d.ts +155 -0
- package/dist/components/LoadingLiquiditySourceList/LoadingLiquiditySourceList.styles.d.ts.map +1 -0
- package/dist/components/LoadingLiquiditySourceList/index.d.ts +2 -0
- package/dist/components/LoadingLiquiditySourceList/index.d.ts.map +1 -0
- package/dist/components/LoadingSwapDetails/LoadingSwapDetailStep.d.ts +4 -0
- package/dist/components/LoadingSwapDetails/LoadingSwapDetailStep.d.ts.map +1 -0
- package/dist/components/LoadingSwapDetails/LoadingSwapDetails.d.ts +3 -0
- package/dist/components/LoadingSwapDetails/LoadingSwapDetails.d.ts.map +1 -0
- package/dist/components/LoadingSwapDetails/LoadingSwapDetails.styles.d.ts +460 -0
- package/dist/components/LoadingSwapDetails/LoadingSwapDetails.styles.d.ts.map +1 -0
- package/dist/components/LoadingSwapDetails/LoadingSwapDetails.types.d.ts +4 -0
- package/dist/components/LoadingSwapDetails/LoadingSwapDetails.types.d.ts.map +1 -0
- package/dist/components/LoadingSwapDetails/index.d.ts +2 -0
- package/dist/components/LoadingSwapDetails/index.d.ts.map +1 -0
- package/dist/components/NoRoutes/NoRoutes.d.ts +4 -0
- package/dist/components/NoRoutes/NoRoutes.d.ts.map +1 -0
- package/dist/components/NoRoutes/NoRoutes.helper.d.ts +3 -0
- package/dist/components/NoRoutes/NoRoutes.helper.d.ts.map +1 -0
- package/dist/components/NoRoutes/NoRoutes.styles.d.ts +460 -0
- package/dist/components/NoRoutes/NoRoutes.styles.d.ts.map +1 -0
- package/dist/components/NoRoutes/NoRoutes.types.d.ts +20 -0
- package/dist/components/NoRoutes/NoRoutes.types.d.ts.map +1 -0
- package/dist/components/NoRoutes/index.d.ts +2 -0
- package/dist/components/NoRoutes/index.d.ts.map +1 -0
- package/dist/components/NotificationContent/NotificationContent.d.ts +3 -0
- package/dist/components/NotificationContent/NotificationContent.d.ts.map +1 -0
- package/dist/components/NotificationContent/NotificationContent.styles.d.ts +613 -0
- package/dist/components/NotificationContent/NotificationContent.styles.d.ts.map +1 -0
- package/dist/components/NotificationContent/NotificationNotFound.d.ts +3 -0
- package/dist/components/NotificationContent/NotificationNotFound.d.ts.map +1 -0
- package/dist/components/NotificationContent/index.d.ts +2 -0
- package/dist/components/NotificationContent/index.d.ts.map +1 -0
- package/dist/components/RouteErrors/RouteErrors.d.ts +4 -0
- package/dist/components/RouteErrors/RouteErrors.d.ts.map +1 -0
- package/dist/components/RouteErrors/RouteErrors.styles.d.ts +613 -0
- package/dist/components/RouteErrors/RouteErrors.styles.d.ts.map +1 -0
- package/dist/components/RouteErrors/RouteErrors.types.d.ts +24 -0
- package/dist/components/RouteErrors/RouteErrors.types.d.ts.map +1 -0
- package/dist/components/RouteErrors/RouteErrorsModal.d.ts +4 -0
- package/dist/components/RouteErrors/RouteErrorsModal.d.ts.map +1 -0
- package/dist/components/RouteErrors/RouteErrorsModalItem.d.ts +4 -0
- package/dist/components/RouteErrors/RouteErrorsModalItem.d.ts.map +1 -0
- package/dist/components/RouteErrors/index.d.ts +2 -0
- package/dist/components/RouteErrors/index.d.ts.map +1 -0
- package/dist/components/SearchInput/SearchInput.d.ts +4 -0
- package/dist/components/SearchInput/SearchInput.d.ts.map +1 -0
- package/dist/components/SearchInput/SearchInput.styles.d.ts +154 -0
- package/dist/components/SearchInput/SearchInput.styles.d.ts.map +1 -0
- package/dist/components/SearchInput/SearchInput.types.d.ts +10 -0
- package/dist/components/SearchInput/SearchInput.types.d.ts.map +1 -0
- package/dist/components/SearchInput/index.d.ts +2 -0
- package/dist/components/SearchInput/index.d.ts.map +1 -0
- package/dist/components/SelectableCategoryList/SelectableCategoryList.d.ts +4 -0
- package/dist/components/SelectableCategoryList/SelectableCategoryList.d.ts.map +1 -0
- package/dist/components/SelectableCategoryList/SelectableCategoryList.helpers.d.ts +4 -0
- package/dist/components/SelectableCategoryList/SelectableCategoryList.helpers.d.ts.map +1 -0
- package/dist/components/SelectableCategoryList/SelectableCategoryList.styles.d.ts +460 -0
- package/dist/components/SelectableCategoryList/SelectableCategoryList.styles.d.ts.map +1 -0
- package/dist/components/SelectableCategoryList/SelectableCategoryList.types.d.ts +12 -0
- package/dist/components/SelectableCategoryList/SelectableCategoryList.types.d.ts.map +1 -0
- package/dist/components/SelectableCategoryList/index.d.ts +2 -0
- package/dist/components/SelectableCategoryList/index.d.ts.map +1 -0
- package/dist/components/SettingsContainer/SettingsContainer.style.d.ts +766 -0
- package/dist/components/SettingsContainer/SettingsContainer.style.d.ts.map +1 -0
- package/dist/components/SettingsContainer/index.d.ts +2 -0
- package/dist/components/SettingsContainer/index.d.ts.map +1 -0
- package/dist/components/Slippage/Slippage.d.ts +3 -0
- package/dist/components/Slippage/Slippage.d.ts.map +1 -0
- package/dist/components/Slippage/Slippage.styles.d.ts +613 -0
- package/dist/components/Slippage/Slippage.styles.d.ts.map +1 -0
- package/dist/components/Slippage/SlippageTooltipContent.d.ts +3 -0
- package/dist/components/Slippage/SlippageTooltipContent.d.ts.map +1 -0
- package/dist/components/Slippage/index.d.ts +2 -0
- package/dist/components/Slippage/index.d.ts.map +1 -0
- package/dist/components/SwapDetails/SwapDetails.Placeholder.d.ts +4 -0
- package/dist/components/SwapDetails/SwapDetails.Placeholder.d.ts.map +1 -0
- package/dist/components/SwapDetails/SwapDetails.d.ts +4 -0
- package/dist/components/SwapDetails/SwapDetails.d.ts.map +1 -0
- package/dist/components/SwapDetails/SwapDetails.helpers.d.ts +8 -0
- package/dist/components/SwapDetails/SwapDetails.helpers.d.ts.map +1 -0
- package/dist/components/SwapDetails/SwapDetails.styles.d.ts +919 -0
- package/dist/components/SwapDetails/SwapDetails.styles.d.ts.map +1 -0
- package/dist/components/SwapDetails/SwapDetails.types.d.ts +12 -0
- package/dist/components/SwapDetails/SwapDetails.types.d.ts.map +1 -0
- package/dist/components/SwapDetails/index.d.ts +2 -0
- package/dist/components/SwapDetails/index.d.ts.map +1 -0
- package/dist/components/SwapDetailsAlerts/SwapDetailsAlerts.Failed.d.ts +4 -0
- package/dist/components/SwapDetailsAlerts/SwapDetailsAlerts.Failed.d.ts.map +1 -0
- package/dist/components/SwapDetailsAlerts/SwapDetailsAlerts.Warning.d.ts +4 -0
- package/dist/components/SwapDetailsAlerts/SwapDetailsAlerts.Warning.d.ts.map +1 -0
- package/dist/components/SwapDetailsAlerts/SwapDetailsAlerts.d.ts +4 -0
- package/dist/components/SwapDetailsAlerts/SwapDetailsAlerts.d.ts.map +1 -0
- package/dist/components/SwapDetailsAlerts/SwapDetailsAlerts.styles.d.ts +154 -0
- package/dist/components/SwapDetailsAlerts/SwapDetailsAlerts.styles.d.ts.map +1 -0
- package/dist/components/SwapDetailsAlerts/SwapDetailsAlerts.types.d.ts +20 -0
- package/dist/components/SwapDetailsAlerts/SwapDetailsAlerts.types.d.ts.map +1 -0
- package/dist/components/SwapDetailsAlerts/index.d.ts +3 -0
- package/dist/components/SwapDetailsAlerts/index.d.ts.map +1 -0
- package/dist/components/SwapDetailsModal/SwapDetailsCompleteModal.d.ts +4 -0
- package/dist/components/SwapDetailsModal/SwapDetailsCompleteModal.d.ts.map +1 -0
- package/dist/components/SwapDetailsModal/SwapDetailsModal.Cancel.d.ts +4 -0
- package/dist/components/SwapDetailsModal/SwapDetailsModal.Cancel.d.ts.map +1 -0
- package/dist/components/SwapDetailsModal/SwapDetailsModal.Delete.d.ts +4 -0
- package/dist/components/SwapDetailsModal/SwapDetailsModal.Delete.d.ts.map +1 -0
- package/dist/components/SwapDetailsModal/SwapDetailsModal.WalletState.d.ts +4 -0
- package/dist/components/SwapDetailsModal/SwapDetailsModal.WalletState.d.ts.map +1 -0
- package/dist/components/SwapDetailsModal/SwapDetailsModal.d.ts +4 -0
- package/dist/components/SwapDetailsModal/SwapDetailsModal.d.ts.map +1 -0
- package/dist/components/SwapDetailsModal/SwapDetailsModal.helpers.d.ts +4 -0
- package/dist/components/SwapDetailsModal/SwapDetailsModal.helpers.d.ts.map +1 -0
- package/dist/components/SwapDetailsModal/SwapDetailsModal.styles.d.ts +154 -0
- package/dist/components/SwapDetailsModal/SwapDetailsModal.styles.d.ts.map +1 -0
- package/dist/components/SwapDetailsModal/SwapDetailsModal.types.d.ts +46 -0
- package/dist/components/SwapDetailsModal/SwapDetailsModal.types.d.ts.map +1 -0
- package/dist/components/SwapDetailsModal/index.d.ts +4 -0
- package/dist/components/SwapDetailsModal/index.d.ts.map +1 -0
- package/dist/components/SwapsGroup/SwapsGroup.d.ts +4 -0
- package/dist/components/SwapsGroup/SwapsGroup.d.ts.map +1 -0
- package/dist/components/SwapsGroup/SwapsGroup.styles.d.ts +613 -0
- package/dist/components/SwapsGroup/SwapsGroup.styles.d.ts.map +1 -0
- package/dist/components/SwapsGroup/SwapsGroup.types.d.ts +12 -0
- package/dist/components/SwapsGroup/SwapsGroup.types.d.ts.map +1 -0
- package/dist/components/SwapsGroup/index.d.ts +2 -0
- package/dist/components/SwapsGroup/index.d.ts.map +1 -0
- package/dist/components/SwitchFromAndTo.d.ts +1 -1
- package/dist/components/SwitchFromAndTo.d.ts.map +1 -1
- package/dist/components/TokenList/LoadingTokenList.d.ts +4 -0
- package/dist/components/TokenList/LoadingTokenList.d.ts.map +1 -0
- package/dist/components/TokenList/TokenList.d.ts +4 -0
- package/dist/components/TokenList/TokenList.d.ts.map +1 -0
- package/dist/components/TokenList/TokenList.helpers.d.ts +3 -0
- package/dist/components/TokenList/TokenList.helpers.d.ts.map +1 -0
- package/dist/components/TokenList/TokenList.styles.d.ts +1532 -0
- package/dist/components/TokenList/TokenList.styles.d.ts.map +1 -0
- package/dist/components/TokenList/TokenList.types.d.ts +41 -0
- package/dist/components/TokenList/TokenList.types.d.ts.map +1 -0
- package/dist/components/TokenList/index.d.ts +3 -0
- package/dist/components/TokenList/index.d.ts.map +1 -0
- package/dist/components/UpdateUrl.d.ts.map +1 -1
- package/dist/components/WalletModal/WalletModal.d.ts +4 -0
- package/dist/components/WalletModal/WalletModal.d.ts.map +1 -0
- package/dist/components/WalletModal/WalletModal.types.d.ts +10 -0
- package/dist/components/WalletModal/WalletModal.types.d.ts.map +1 -0
- package/dist/components/WalletModal/WalletModalContent.d.ts +4 -0
- package/dist/components/WalletModal/WalletModalContent.d.ts.map +1 -0
- package/dist/components/WalletModal/WalletModalContent.styles.d.ts +613 -0
- package/dist/components/WalletModal/WalletModalContent.styles.d.ts.map +1 -0
- package/dist/components/WalletModal/index.d.ts +2 -0
- package/dist/components/WalletModal/index.d.ts.map +1 -0
- package/dist/components/WidgetEvents.d.ts.map +1 -1
- package/dist/constants/errors.d.ts +29 -0
- package/dist/constants/errors.d.ts.map +1 -1
- package/dist/constants/messages.d.ts +7 -0
- package/dist/constants/messages.d.ts.map +1 -0
- package/dist/constants/navigationRoutes.d.ts +8 -4
- package/dist/constants/navigationRoutes.d.ts.map +1 -1
- package/dist/constants/routing.d.ts +13 -0
- package/dist/constants/routing.d.ts.map +1 -0
- package/dist/constants/searchParams.d.ts +2 -2
- package/dist/constants/searchParams.d.ts.map +1 -1
- package/dist/constants/swapSettings.d.ts.map +1 -1
- package/dist/constants/wallets.d.ts +3 -0
- package/dist/constants/wallets.d.ts.map +1 -0
- package/dist/constants/warnings.d.ts +3 -0
- package/dist/constants/warnings.d.ts.map +1 -0
- package/dist/globalStyles.d.ts +1 -1
- package/dist/globalStyles.d.ts.map +1 -1
- package/dist/hooks/useConfirmSwap.d.ts +14 -6
- package/dist/hooks/useConfirmSwap.d.ts.map +1 -1
- package/dist/hooks/useFetchBestRoute.d.ts +9 -0
- package/dist/hooks/useFetchBestRoute.d.ts.map +1 -0
- package/dist/hooks/useNavigateBack.d.ts.map +1 -1
- package/dist/hooks/useSwapInput.d.ts +12 -0
- package/dist/hooks/useSwapInput.d.ts.map +1 -0
- package/dist/hooks/useTheme.d.ts +3 -29
- package/dist/hooks/useTheme.d.ts.map +1 -1
- package/dist/hooks/useWalletList.d.ts +20 -0
- package/dist/hooks/useWalletList.d.ts.map +1 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +4 -4
- package/dist/pages/ConfirmSwapPage.d.ts +6 -3
- 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 +3 -0
- package/dist/pages/LanguagePage.d.ts.map +1 -0
- package/dist/pages/LiquiditySourcePage.d.ts +8 -0
- package/dist/pages/LiquiditySourcePage.d.ts.map +1 -0
- package/dist/pages/SelectBlockchainPage.d.ts +8 -0
- package/dist/pages/SelectBlockchainPage.d.ts.map +1 -0
- package/dist/pages/SelectSwapItemsPage.d.ts +11 -0
- package/dist/pages/SelectSwapItemsPage.d.ts.map +1 -0
- package/dist/pages/SettingsPage.d.ts.map +1 -1
- package/dist/pages/SwapDetailsPage.d.ts.map +1 -1
- package/dist/pages/ThemePage.d.ts +3 -0
- package/dist/pages/ThemePage.d.ts.map +1 -0
- package/dist/pages/WalletsPage.d.ts +4 -2
- package/dist/pages/WalletsPage.d.ts.map +1 -1
- package/dist/store/bestRoute.d.ts +32 -19
- package/dist/store/bestRoute.d.ts.map +1 -1
- package/dist/store/meta.d.ts +10 -3
- package/dist/store/meta.d.ts.map +1 -1
- package/dist/store/notification.d.ts +38 -0
- package/dist/store/notification.d.ts.map +1 -0
- package/dist/store/settings.d.ts +2 -2
- package/dist/store/settings.d.ts.map +1 -1
- package/dist/store/ui.d.ts +0 -2
- package/dist/store/ui.d.ts.map +1 -1
- package/dist/store/wallets.d.ts +14 -12
- package/dist/store/wallets.d.ts.map +1 -1
- package/dist/types/config.d.ts +11 -6
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/notification.d.ts +22 -0
- package/dist/types/notification.d.ts.map +1 -0
- package/dist/types/routing.d.ts +30 -23
- package/dist/types/routing.d.ts.map +1 -1
- package/dist/types/swap.d.ts +8 -1
- package/dist/types/swap.d.ts.map +1 -1
- package/dist/utils/common.d.ts +5 -0
- package/dist/utils/common.d.ts.map +1 -1
- package/dist/utils/configs.d.ts +2 -0
- package/dist/utils/configs.d.ts.map +1 -1
- package/dist/utils/date.d.ts +1 -1
- package/dist/utils/date.d.ts.map +1 -1
- package/dist/utils/meta.d.ts +3 -0
- package/dist/utils/meta.d.ts.map +1 -0
- package/dist/utils/numbers.d.ts +2 -1
- package/dist/utils/numbers.d.ts.map +1 -1
- package/dist/utils/routing.d.ts +10 -7
- package/dist/utils/routing.d.ts.map +1 -1
- package/dist/utils/settings.d.ts +10 -0
- package/dist/utils/settings.d.ts.map +1 -0
- package/dist/utils/swap.d.ts +29 -14
- package/dist/utils/swap.d.ts.map +1 -1
- package/dist/utils/wallets.d.ts +20 -14
- package/dist/utils/wallets.d.ts.map +1 -1
- package/package.json +8 -8
- package/src/Wallets.tsx +23 -17
- package/src/Widget.tsx +88 -28
- package/src/components/AppRouter.tsx +36 -6
- package/src/components/AppRoutes.tsx +54 -19
- package/src/components/BlockchainList/BlockchainList.helpers.ts +37 -0
- package/src/components/BlockchainList/BlockchainList.styles.ts +19 -0
- package/src/components/BlockchainList/BlockchainList.tsx +73 -0
- package/src/components/BlockchainList/BlockchainList.types.ts +8 -0
- package/src/components/BlockchainList/LoadingBlockchainList.tsx +20 -0
- package/src/components/BlockchainList/index.ts +1 -0
- package/src/components/BlockchainsChip/BlockchainsChip.styles.ts +30 -0
- package/src/components/BlockchainsChip/BlockchainsChip.tsx +15 -0
- package/src/components/BlockchainsChip/BlockchainsChip.types.ts +4 -0
- package/src/components/BlockchainsChip/index.ts +1 -0
- package/src/components/BlockchainsSection/BlockchainSection.helpers.ts +20 -0
- package/src/components/BlockchainsSection/BlockchainsSection.styles.ts +7 -0
- package/src/components/BlockchainsSection/BlockchainsSection.tsx +100 -0
- package/src/components/BlockchainsSection/BlockchainsSection.types.ts +9 -0
- package/src/components/BlockchainsSection/index.ts +1 -0
- package/src/components/ConfirmWalletsModal/ConfirmWallets.helpers.ts +86 -0
- package/src/components/ConfirmWalletsModal/ConfirmWallets.styles.ts +169 -0
- package/src/components/ConfirmWalletsModal/ConfirmWalletsModal.tsx +460 -0
- package/src/components/ConfirmWalletsModal/ConfirmWalletsModal.types.ts +11 -0
- package/src/components/ConfirmWalletsModal/WalletList.styles.ts +34 -0
- package/src/components/ConfirmWalletsModal/WalletList.tsx +250 -0
- package/src/components/ConfirmWalletsModal/WalletList.type.ts +12 -0
- package/src/components/HeaderButtons/BackButton.tsx +16 -0
- package/src/components/HeaderButtons/CancelButton.tsx +21 -0
- package/src/components/HeaderButtons/HeaderButtons.styles.ts +40 -0
- package/src/components/HeaderButtons/HeaderButtons.types.ts +11 -0
- package/src/components/HeaderButtons/HomeButtons.tsx +68 -0
- package/src/components/HeaderButtons/UnreadNotificationsBadge.tsx +20 -0
- package/src/components/HeaderButtons/WalletButton.tsx +20 -0
- package/src/components/HeaderButtons/index.ts +4 -0
- package/src/components/Layout/Layout.styles.ts +50 -0
- package/src/components/Layout/Layout.tsx +72 -0
- package/src/components/Layout/Layout.types.ts +20 -0
- package/src/components/Layout/index.ts +1 -0
- package/src/components/LoadingLiquiditySourceList/LoadingLiquiditySourceList.styles.ts +5 -0
- package/src/components/LoadingLiquiditySourceList/LoadingLiquiditySourceList.tsx +23 -0
- package/src/components/LoadingLiquiditySourceList/index.ts +1 -0
- package/src/components/LoadingSwapDetails/LoadingSwapDetailStep.tsx +41 -0
- package/src/components/LoadingSwapDetails/LoadingSwapDetails.styles.ts +78 -0
- package/src/components/LoadingSwapDetails/LoadingSwapDetails.tsx +53 -0
- package/src/components/LoadingSwapDetails/LoadingSwapDetails.types.ts +3 -0
- package/src/components/LoadingSwapDetails/index.ts +1 -0
- package/src/components/NoRoutes/NoRoutes.helper.ts +50 -0
- package/src/components/NoRoutes/NoRoutes.styles.ts +15 -0
- package/src/components/NoRoutes/NoRoutes.tsx +81 -0
- package/src/components/NoRoutes/NoRoutes.types.ts +21 -0
- package/src/components/NoRoutes/index.ts +1 -0
- package/src/components/NotificationContent/NotificationContent.styles.ts +34 -0
- package/src/components/NotificationContent/NotificationContent.tsx +107 -0
- package/src/components/NotificationContent/NotificationNotFound.tsx +17 -0
- package/src/components/NotificationContent/index.ts +1 -0
- package/src/components/RouteErrors/RouteErrors.styles.ts +28 -0
- package/src/components/RouteErrors/RouteErrors.tsx +79 -0
- package/src/components/RouteErrors/RouteErrors.types.ts +29 -0
- package/src/components/RouteErrors/RouteErrorsModal.tsx +128 -0
- package/src/components/RouteErrors/RouteErrorsModalItem.tsx +24 -0
- package/src/components/RouteErrors/index.ts +1 -0
- package/src/components/SearchInput/SearchInput.styles.ts +9 -0
- package/src/components/SearchInput/SearchInput.tsx +51 -0
- package/src/components/SearchInput/SearchInput.types.ts +10 -0
- package/src/components/SearchInput/index.ts +1 -0
- package/src/components/SelectableCategoryList/SelectableCategoryList.helpers.ts +20 -0
- package/src/components/SelectableCategoryList/SelectableCategoryList.styles.ts +21 -0
- package/src/components/SelectableCategoryList/SelectableCategoryList.tsx +79 -0
- package/src/components/SelectableCategoryList/SelectableCategoryList.types.ts +12 -0
- package/src/components/SelectableCategoryList/index.ts +1 -0
- package/src/components/SettingsContainer/SettingsContainer.style.ts +33 -0
- package/src/components/SettingsContainer/index.ts +7 -0
- package/src/components/Slippage/Slippage.styles.ts +24 -0
- package/src/components/Slippage/Slippage.tsx +90 -0
- package/src/components/Slippage/SlippageTooltipContent.tsx +23 -0
- package/src/components/Slippage/index.ts +1 -0
- package/src/components/SwapDetails/SwapDetails.Placeholder.tsx +79 -0
- package/src/components/SwapDetails/SwapDetails.helpers.tsx +85 -0
- package/src/components/SwapDetails/SwapDetails.styles.ts +68 -0
- package/src/components/SwapDetails/SwapDetails.tsx +419 -0
- package/src/components/SwapDetails/SwapDetails.types.ts +12 -0
- package/src/components/SwapDetails/index.ts +1 -0
- package/src/components/SwapDetailsAlerts/SwapDetailsAlerts.Failed.tsx +36 -0
- package/src/components/SwapDetailsAlerts/SwapDetailsAlerts.Warning.tsx +55 -0
- package/src/components/SwapDetailsAlerts/SwapDetailsAlerts.styles.ts +7 -0
- package/src/components/SwapDetailsAlerts/SwapDetailsAlerts.tsx +74 -0
- package/src/components/SwapDetailsAlerts/SwapDetailsAlerts.types.ts +28 -0
- package/src/components/SwapDetailsAlerts/index.ts +2 -0
- package/src/components/SwapDetailsModal/SwapDetailsCompleteModal.tsx +101 -0
- package/src/components/SwapDetailsModal/SwapDetailsModal.Cancel.tsx +34 -0
- package/src/components/SwapDetailsModal/SwapDetailsModal.Delete.tsx +34 -0
- package/src/components/SwapDetailsModal/SwapDetailsModal.WalletState.tsx +31 -0
- package/src/components/SwapDetailsModal/SwapDetailsModal.helpers.tsx +22 -0
- package/src/components/SwapDetailsModal/SwapDetailsModal.styles.ts +6 -0
- package/src/components/SwapDetailsModal/SwapDetailsModal.tsx +45 -0
- package/src/components/SwapDetailsModal/SwapDetailsModal.types.ts +54 -0
- package/src/components/SwapDetailsModal/index.ts +3 -0
- package/src/components/SwapsGroup/SwapsGroup.styles.ts +26 -0
- package/src/components/SwapsGroup/SwapsGroup.tsx +125 -0
- package/src/components/SwapsGroup/SwapsGroup.types.ts +13 -0
- package/src/components/SwapsGroup/index.ts +1 -0
- package/src/components/SwitchFromAndTo.tsx +23 -41
- package/src/components/TokenList/LoadingTokenList.tsx +34 -0
- package/src/components/TokenList/TokenList.helpers.ts +13 -0
- package/src/components/TokenList/TokenList.styles.ts +121 -0
- package/src/components/TokenList/TokenList.tsx +271 -0
- package/src/components/TokenList/TokenList.types.ts +48 -0
- package/src/components/TokenList/index.ts +2 -0
- package/src/components/UpdateUrl.tsx +40 -22
- package/src/components/WalletModal/WalletModal.tsx +20 -0
- package/src/components/WalletModal/WalletModal.types.ts +11 -0
- package/src/components/WalletModal/WalletModalContent.styles.ts +44 -0
- package/src/components/WalletModal/WalletModalContent.tsx +54 -0
- package/src/components/WalletModal/index.ts +1 -0
- package/src/components/WidgetEvents.tsx +37 -5
- package/src/constants/errors.ts +56 -1
- package/src/constants/messages.ts +8 -0
- package/src/constants/navigationRoutes.ts +8 -4
- package/src/constants/routing.ts +17 -0
- package/src/constants/searchParams.ts +2 -2
- package/src/constants/swapSettings.ts +5 -1
- package/src/constants/wallets.ts +3 -0
- package/src/constants/warnings.ts +26 -0
- package/src/globalStyles.ts +1 -4
- package/src/hooks/useConfirmSwap.ts +251 -220
- package/src/hooks/useFetchBestRoute.ts +38 -0
- package/src/hooks/useNavigateBack.ts +25 -9
- package/src/hooks/useSwapInput.ts +116 -0
- package/src/hooks/useTheme.ts +35 -74
- package/src/hooks/useWalletList.ts +125 -0
- package/src/pages/ConfirmSwapPage.tsx +492 -228
- package/src/pages/HistoryPage.tsx +104 -15
- package/src/pages/Home.tsx +392 -110
- package/src/pages/LanguagePage.tsx +83 -0
- package/src/pages/LiquiditySourcePage.tsx +160 -0
- package/src/pages/SelectBlockchainPage.tsx +77 -0
- package/src/pages/SelectSwapItemsPage.tsx +169 -0
- package/src/pages/SettingsPage.tsx +144 -72
- package/src/pages/SwapDetailsPage.tsx +40 -141
- package/src/pages/ThemePage.tsx +96 -0
- package/src/pages/WalletsPage.tsx +73 -124
- package/src/store/bestRoute.ts +85 -180
- package/src/store/meta.ts +23 -3
- package/src/store/notification.ts +77 -0
- package/src/store/settings.ts +20 -13
- package/src/store/ui.ts +1 -5
- package/src/store/wallets.ts +92 -76
- package/src/types/config.ts +12 -7
- package/src/types/notification.ts +33 -0
- package/src/types/routing.ts +29 -28
- package/src/types/swap.ts +9 -1
- package/src/utils/common.ts +53 -3
- package/src/utils/configs.ts +3 -0
- package/src/utils/date.ts +15 -18
- package/src/utils/meta.ts +9 -0
- package/src/utils/numbers.ts +63 -18
- package/src/utils/routing.ts +105 -27
- package/src/utils/settings.ts +57 -0
- package/src/utils/swap.ts +200 -113
- package/src/utils/wallets.ts +165 -116
- package/dist/components/ConfirmSwapErrors.d.ts +0 -4
- package/dist/components/ConfirmSwapErrors.d.ts.map +0 -1
- package/dist/components/ConfirmSwapWarnings.d.ts +0 -3
- package/dist/components/ConfirmSwapWarnings.d.ts.map +0 -1
- package/dist/components/Layout.d.ts +0 -7
- package/dist/components/Layout.d.ts.map +0 -1
- package/dist/pages/LiquiditySourcesPage.d.ts +0 -7
- package/dist/pages/LiquiditySourcesPage.d.ts.map +0 -1
- package/dist/pages/SelectChainPage.d.ts +0 -8
- package/dist/pages/SelectChainPage.d.ts.map +0 -1
- package/dist/pages/SelectTokenPage.d.ts +0 -15
- package/dist/pages/SelectTokenPage.d.ts.map +0 -1
- package/src/components/ConfirmSwapErrors.tsx +0 -34
- package/src/components/ConfirmSwapWarnings.tsx +0 -22
- package/src/components/Layout.tsx +0 -105
- package/src/pages/LiquiditySourcesPage.tsx +0 -63
- package/src/pages/SelectChainPage.tsx +0 -42
- package/src/pages/SelectTokenPage.tsx +0 -64
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import type { ModalPropTypes } from './RouteErrors.types';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
Button,
|
|
5
|
+
Divider,
|
|
6
|
+
MessageBox,
|
|
7
|
+
Modal,
|
|
8
|
+
Typography,
|
|
9
|
+
WarningIcon,
|
|
10
|
+
} from '@rango-dev/ui';
|
|
11
|
+
import React from 'react';
|
|
12
|
+
import { useNavigate } from 'react-router-dom';
|
|
13
|
+
|
|
14
|
+
import { errorMessages } from '../../constants/errors';
|
|
15
|
+
import { navigationRoutes } from '../../constants/navigationRoutes';
|
|
16
|
+
import {
|
|
17
|
+
GAS_FEE_MAX_DECIMALS,
|
|
18
|
+
GAS_FEE_MIN_DECIMALS,
|
|
19
|
+
HIGHT_PRICE_IMPACT,
|
|
20
|
+
PERCENTAGE_CHANGE_MAX_DECIMALS,
|
|
21
|
+
PERCENTAGE_CHANGE_MIN_DECIMALS,
|
|
22
|
+
USD_VALUE_MAX_DECIMALS,
|
|
23
|
+
USD_VALUE_MIN_DECIMALS,
|
|
24
|
+
} from '../../constants/routing';
|
|
25
|
+
import { numberToString } from '../../utils/numbers';
|
|
26
|
+
|
|
27
|
+
import { Flex } from './RouteErrors.styles';
|
|
28
|
+
import { RouteErrorsModalItem } from './RouteErrorsModalItem';
|
|
29
|
+
|
|
30
|
+
export function RouteErrorsModal(props: ModalPropTypes) {
|
|
31
|
+
const {
|
|
32
|
+
highValueLoss,
|
|
33
|
+
open,
|
|
34
|
+
onToggle,
|
|
35
|
+
percentageChange,
|
|
36
|
+
inputUsdValue,
|
|
37
|
+
outputUsdValue,
|
|
38
|
+
totalFeeInUsd,
|
|
39
|
+
} = props;
|
|
40
|
+
const navigate = useNavigate();
|
|
41
|
+
const type =
|
|
42
|
+
highValueLoss && !!percentageChange?.lt(HIGHT_PRICE_IMPACT)
|
|
43
|
+
? 'error'
|
|
44
|
+
: 'warning';
|
|
45
|
+
const highValueLossData = [
|
|
46
|
+
{
|
|
47
|
+
title: 'Swapping',
|
|
48
|
+
value: numberToString(
|
|
49
|
+
inputUsdValue,
|
|
50
|
+
USD_VALUE_MIN_DECIMALS,
|
|
51
|
+
USD_VALUE_MAX_DECIMALS
|
|
52
|
+
),
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
title: 'Gas cost',
|
|
56
|
+
value: numberToString(
|
|
57
|
+
totalFeeInUsd,
|
|
58
|
+
GAS_FEE_MIN_DECIMALS,
|
|
59
|
+
GAS_FEE_MAX_DECIMALS
|
|
60
|
+
),
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
title: 'Receiving',
|
|
64
|
+
value: numberToString(
|
|
65
|
+
outputUsdValue,
|
|
66
|
+
USD_VALUE_MIN_DECIMALS,
|
|
67
|
+
USD_VALUE_MAX_DECIMALS
|
|
68
|
+
),
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
title: 'Price impact',
|
|
72
|
+
value: numberToString(
|
|
73
|
+
percentageChange,
|
|
74
|
+
PERCENTAGE_CHANGE_MIN_DECIMALS,
|
|
75
|
+
PERCENTAGE_CHANGE_MAX_DECIMALS
|
|
76
|
+
),
|
|
77
|
+
valueColor: `${type}500`,
|
|
78
|
+
},
|
|
79
|
+
];
|
|
80
|
+
|
|
81
|
+
return (
|
|
82
|
+
<Modal
|
|
83
|
+
open={open}
|
|
84
|
+
onClose={() => onToggle(false)}
|
|
85
|
+
container={document.getElementById('swap-box') || document.body}>
|
|
86
|
+
{highValueLoss ? (
|
|
87
|
+
<MessageBox
|
|
88
|
+
type={type}
|
|
89
|
+
title={errorMessages.highValueLossError.impactTitle}
|
|
90
|
+
description={errorMessages.highValueLossError.description}
|
|
91
|
+
/>
|
|
92
|
+
) : (
|
|
93
|
+
<MessageBox
|
|
94
|
+
type={type}
|
|
95
|
+
title={errorMessages.unknownPriceError.impactTitle}
|
|
96
|
+
description={errorMessages.unknownPriceError.description}
|
|
97
|
+
/>
|
|
98
|
+
)}
|
|
99
|
+
{highValueLoss && (
|
|
100
|
+
<Flex>
|
|
101
|
+
<Divider size={20} />
|
|
102
|
+
<Typography size="small" variant="title">
|
|
103
|
+
Details
|
|
104
|
+
</Typography>
|
|
105
|
+
<Flex>
|
|
106
|
+
{highValueLossData.map((item, index) => {
|
|
107
|
+
const key = index;
|
|
108
|
+
return <RouteErrorsModalItem key={key} {...item} />;
|
|
109
|
+
})}
|
|
110
|
+
</Flex>
|
|
111
|
+
</Flex>
|
|
112
|
+
)}
|
|
113
|
+
<Divider size={32} />
|
|
114
|
+
<Button
|
|
115
|
+
type="primary"
|
|
116
|
+
size="large"
|
|
117
|
+
prefix={<WarningIcon />}
|
|
118
|
+
fullWidth
|
|
119
|
+
onClick={() => {
|
|
120
|
+
navigate(navigationRoutes.confirmSwap);
|
|
121
|
+
}}>
|
|
122
|
+
{highValueLoss
|
|
123
|
+
? errorMessages.highValueLossError.confirmMessage
|
|
124
|
+
: errorMessages.unknownPriceError.confirmMessage}
|
|
125
|
+
</Button>
|
|
126
|
+
</Modal>
|
|
127
|
+
);
|
|
128
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ModalContentData } from './RouteErrors.types';
|
|
2
|
+
|
|
3
|
+
import { Typography } from '@rango-dev/ui';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
|
|
6
|
+
import { Item } from './RouteErrors.styles';
|
|
7
|
+
|
|
8
|
+
export function RouteErrorsModalItem(props: ModalContentData) {
|
|
9
|
+
const { title, value, valueColor } = props;
|
|
10
|
+
|
|
11
|
+
return (
|
|
12
|
+
<Item>
|
|
13
|
+
<Typography size="medium" variant="label" color="neutral800">
|
|
14
|
+
{title}
|
|
15
|
+
</Typography>
|
|
16
|
+
<Typography
|
|
17
|
+
size="large"
|
|
18
|
+
variant="label"
|
|
19
|
+
color={valueColor || 'foreground'}>
|
|
20
|
+
{`${valueColor ? '%' : '$'}${value}`}
|
|
21
|
+
</Typography>
|
|
22
|
+
</Item>
|
|
23
|
+
);
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { RouteErrors } from './RouteErrors';
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { PropTypes } from './SearchInput.types';
|
|
2
|
+
|
|
3
|
+
import { CloseIcon, IconButton, SearchIcon, TextField } from '@rango-dev/ui';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
|
|
6
|
+
import { IconWrapper } from './SearchInput.styles';
|
|
7
|
+
|
|
8
|
+
export function SearchInput(props: PropTypes) {
|
|
9
|
+
const {
|
|
10
|
+
variant,
|
|
11
|
+
fullWidth,
|
|
12
|
+
color,
|
|
13
|
+
size,
|
|
14
|
+
onChange,
|
|
15
|
+
value,
|
|
16
|
+
setValue,
|
|
17
|
+
...inputAttributes
|
|
18
|
+
} = props;
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<TextField
|
|
22
|
+
prefix={
|
|
23
|
+
<IconWrapper>
|
|
24
|
+
<SearchIcon color="black" />
|
|
25
|
+
</IconWrapper>
|
|
26
|
+
}
|
|
27
|
+
suffix={
|
|
28
|
+
!!value.length && (
|
|
29
|
+
<IconButton
|
|
30
|
+
variant="ghost"
|
|
31
|
+
onClick={() => setValue?.('')}
|
|
32
|
+
size="small">
|
|
33
|
+
<CloseIcon color="gray" size={10} />
|
|
34
|
+
</IconButton>
|
|
35
|
+
)
|
|
36
|
+
}
|
|
37
|
+
fullWidth={fullWidth}
|
|
38
|
+
color={color}
|
|
39
|
+
variant={variant}
|
|
40
|
+
style={{
|
|
41
|
+
padding: 10,
|
|
42
|
+
borderRadius: 25,
|
|
43
|
+
alignItems: 'center',
|
|
44
|
+
}}
|
|
45
|
+
size={size}
|
|
46
|
+
value={value}
|
|
47
|
+
onChange={onChange}
|
|
48
|
+
{...inputAttributes}
|
|
49
|
+
/>
|
|
50
|
+
);
|
|
51
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
|
|
3
|
+
export type PropTypes = {
|
|
4
|
+
variant?: 'contained' | 'outlined' | 'ghost';
|
|
5
|
+
fullWidth?: boolean;
|
|
6
|
+
color?: 'dark' | 'light';
|
|
7
|
+
size?: 'small' | 'large';
|
|
8
|
+
value: string;
|
|
9
|
+
setValue?: (value: string) => void;
|
|
10
|
+
} & Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'value'>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SearchInput } from './SearchInput';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type BlockchainMeta } from 'rango-sdk';
|
|
2
|
+
|
|
3
|
+
import { filterByType } from '../BlockchainList/BlockchainList.helpers';
|
|
4
|
+
|
|
5
|
+
import { BlockchainCategories } from './SelectableCategoryList.types';
|
|
6
|
+
|
|
7
|
+
const blockchainslogo = {
|
|
8
|
+
[BlockchainCategories.EVM]: ['ETH', 'BSC', 'POLYGON'],
|
|
9
|
+
[BlockchainCategories.COSMOS]: ['COSMOS', 'OSMOSIS', 'JUNO'],
|
|
10
|
+
[BlockchainCategories.UTXO]: ['BTC', 'LTC', 'BCH'],
|
|
11
|
+
[BlockchainCategories.OTHER]: ['STARKNET', 'TRON', 'SOLANA'],
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export const generateBlockchainsLogo = (
|
|
15
|
+
list: BlockchainMeta[],
|
|
16
|
+
type: Exclude<BlockchainCategories, 'ALL'>
|
|
17
|
+
) =>
|
|
18
|
+
list
|
|
19
|
+
.filter((item) => filterByType(item, type))
|
|
20
|
+
.filter((item) => blockchainslogo[type].includes(item.name));
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { styled } from '@rango-dev/ui';
|
|
2
|
+
|
|
3
|
+
export const Container = styled('div', {
|
|
4
|
+
display: 'grid',
|
|
5
|
+
gap: '$10',
|
|
6
|
+
gridTemplateColumns: 'auto 1fr 1fr 1fr 1fr',
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
export const ImageContent = styled('div', {
|
|
10
|
+
display: 'flex',
|
|
11
|
+
position: 'relative',
|
|
12
|
+
alignItems: 'center',
|
|
13
|
+
justifyContent: 'center',
|
|
14
|
+
paddingTop: '$10',
|
|
15
|
+
});
|
|
16
|
+
export const FirstImage = styled('img', {
|
|
17
|
+
position: 'absolute',
|
|
18
|
+
top: -2,
|
|
19
|
+
width: 15,
|
|
20
|
+
height: 15,
|
|
21
|
+
});
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-magic-numbers */
|
|
2
|
+
import type { PropTypes } from './SelectableCategoryList.types';
|
|
3
|
+
|
|
4
|
+
import { i18n } from '@lingui/core';
|
|
5
|
+
import { Divider, Image, Skeleton, Typography } from '@rango-dev/ui';
|
|
6
|
+
import React from 'react';
|
|
7
|
+
|
|
8
|
+
import { useMetaStore } from '../../store/meta';
|
|
9
|
+
import { BlockchainsChip } from '../BlockchainsChip';
|
|
10
|
+
|
|
11
|
+
import { generateBlockchainsLogo } from './SelectableCategoryList.helpers';
|
|
12
|
+
import {
|
|
13
|
+
Container,
|
|
14
|
+
FirstImage,
|
|
15
|
+
ImageContent,
|
|
16
|
+
} from './SelectableCategoryList.styles';
|
|
17
|
+
import { BlockchainCategories } from './SelectableCategoryList.types';
|
|
18
|
+
|
|
19
|
+
export function SelectableCategoryList(props: PropTypes) {
|
|
20
|
+
const { setCategory, category } = props;
|
|
21
|
+
const blockchains = useMetaStore.use.meta().blockchains;
|
|
22
|
+
const loadingStatus = useMetaStore.use.loadingStatus();
|
|
23
|
+
const categories = Object.keys(
|
|
24
|
+
BlockchainCategories
|
|
25
|
+
) as BlockchainCategories[];
|
|
26
|
+
return (
|
|
27
|
+
<Container>
|
|
28
|
+
{loadingStatus === 'loading' &&
|
|
29
|
+
Array.from(Array(5), (_, index) => (
|
|
30
|
+
<Skeleton
|
|
31
|
+
key={index}
|
|
32
|
+
variant="rounded"
|
|
33
|
+
height={70}
|
|
34
|
+
width={index === 0 ? 45 : 65}
|
|
35
|
+
/>
|
|
36
|
+
))}
|
|
37
|
+
{loadingStatus === 'success' &&
|
|
38
|
+
categories.map((blockchainCategory) => (
|
|
39
|
+
<BlockchainsChip
|
|
40
|
+
selected={category === blockchainCategory}
|
|
41
|
+
key={blockchainCategory}
|
|
42
|
+
onClick={() => setCategory(blockchainCategory)}>
|
|
43
|
+
{blockchainCategory !== BlockchainCategories.ALL && (
|
|
44
|
+
<>
|
|
45
|
+
<ImageContent>
|
|
46
|
+
{generateBlockchainsLogo(blockchains, blockchainCategory).map(
|
|
47
|
+
(blockchain, index) =>
|
|
48
|
+
index === 0 ? (
|
|
49
|
+
<FirstImage
|
|
50
|
+
key={`image-${blockchain.name}-${blockchain.chainId}`}
|
|
51
|
+
src={blockchain.logo}
|
|
52
|
+
/>
|
|
53
|
+
) : (
|
|
54
|
+
<Image
|
|
55
|
+
key={`image-${blockchain.name}-${blockchain.chainId}`}
|
|
56
|
+
src={blockchain.logo}
|
|
57
|
+
size={15}
|
|
58
|
+
/>
|
|
59
|
+
)
|
|
60
|
+
)}
|
|
61
|
+
</ImageContent>
|
|
62
|
+
<Divider size={12} />
|
|
63
|
+
</>
|
|
64
|
+
)}
|
|
65
|
+
<Typography
|
|
66
|
+
size="xsmall"
|
|
67
|
+
variant="body"
|
|
68
|
+
color={
|
|
69
|
+
blockchainCategory === BlockchainCategories.ALL
|
|
70
|
+
? 'secondary500'
|
|
71
|
+
: undefined
|
|
72
|
+
}>
|
|
73
|
+
{i18n.t(BlockchainCategories[blockchainCategory])}
|
|
74
|
+
</Typography>
|
|
75
|
+
</BlockchainsChip>
|
|
76
|
+
))}
|
|
77
|
+
</Container>
|
|
78
|
+
);
|
|
79
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SelectableCategoryList } from './SelectableCategoryList';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { styled } from '@rango-dev/ui';
|
|
2
|
+
|
|
3
|
+
export const SettingsContainer = styled('div', {
|
|
4
|
+
height: '100%',
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
export const LiquiditySourceList = styled('ul', {
|
|
8
|
+
padding: '$15 $5 0',
|
|
9
|
+
margin: 0,
|
|
10
|
+
listStyle: 'none',
|
|
11
|
+
height: '100%',
|
|
12
|
+
overflowY: 'visible',
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export const LiquiditySourceDivider = styled('li', {
|
|
16
|
+
margin: '0 auto',
|
|
17
|
+
width: '100%',
|
|
18
|
+
height: '1px',
|
|
19
|
+
backgroundColor: '$neutral300',
|
|
20
|
+
});
|
|
21
|
+
export const LiquiditySourceSuffix = styled('div', {
|
|
22
|
+
width: 80,
|
|
23
|
+
display: 'flex',
|
|
24
|
+
justifyContent: 'flex-end',
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export const NotFoundContainer = styled('div', {
|
|
28
|
+
display: 'flex',
|
|
29
|
+
flexDirection: 'column',
|
|
30
|
+
alignItems: 'center',
|
|
31
|
+
justifyContent: 'center',
|
|
32
|
+
height: '100%',
|
|
33
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { styled } from '@rango-dev/ui';
|
|
2
|
+
|
|
3
|
+
export const BaseContainer = styled('div', {
|
|
4
|
+
paddingTop: '$5',
|
|
5
|
+
paddingBottom: '30px',
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
export const SlippageChipsContainer = styled('div', {
|
|
9
|
+
display: 'flex',
|
|
10
|
+
alignItems: 'center',
|
|
11
|
+
justifyContent: 'start',
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
export const Head = styled('div', {
|
|
15
|
+
display: 'flex',
|
|
16
|
+
justifyContent: 'start',
|
|
17
|
+
alignItems: 'center',
|
|
18
|
+
paddingBottom: '$10',
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
export const SlippageTooltipContainer = styled('div', {
|
|
22
|
+
maxWidth: '300px',
|
|
23
|
+
padding: '$10',
|
|
24
|
+
});
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { i18n } from '@lingui/core';
|
|
2
|
+
import {
|
|
3
|
+
Chip,
|
|
4
|
+
Divider,
|
|
5
|
+
InfoIcon,
|
|
6
|
+
TextField,
|
|
7
|
+
Tooltip,
|
|
8
|
+
Typography,
|
|
9
|
+
} from '@rango-dev/ui';
|
|
10
|
+
import React from 'react';
|
|
11
|
+
|
|
12
|
+
import {
|
|
13
|
+
MAX_SLIPPAGE,
|
|
14
|
+
MIN_SLIPPGAE,
|
|
15
|
+
SLIPPAGES,
|
|
16
|
+
} from '../../constants/swapSettings';
|
|
17
|
+
import { useSettingsStore } from '../../store/settings';
|
|
18
|
+
|
|
19
|
+
import { BaseContainer, Head, SlippageChipsContainer } from './Slippage.styles';
|
|
20
|
+
import { SlippageTooltipContent } from './SlippageTooltipContent';
|
|
21
|
+
|
|
22
|
+
export function Slippage() {
|
|
23
|
+
const slippage = useSettingsStore.use.slippage();
|
|
24
|
+
const setSlippage = useSettingsStore.use.setSlippage();
|
|
25
|
+
const customSlippage = useSettingsStore.use.customSlippage();
|
|
26
|
+
const setCustomSlippage = useSettingsStore.use.setCustomSlippage();
|
|
27
|
+
|
|
28
|
+
return (
|
|
29
|
+
<BaseContainer>
|
|
30
|
+
<Head>
|
|
31
|
+
<Typography variant="title" size="xmedium">
|
|
32
|
+
{i18n.t('Slippage tolerance per swap')}
|
|
33
|
+
</Typography>
|
|
34
|
+
<Divider direction="horizontal" size={4} />
|
|
35
|
+
<Tooltip side="top" content={<SlippageTooltipContent />}>
|
|
36
|
+
<InfoIcon color="gray" />
|
|
37
|
+
</Tooltip>
|
|
38
|
+
</Head>
|
|
39
|
+
<SlippageChipsContainer>
|
|
40
|
+
{SLIPPAGES.map((slippageItem, index) => {
|
|
41
|
+
const key = `slippage-${index}`;
|
|
42
|
+
return (
|
|
43
|
+
<>
|
|
44
|
+
<Chip
|
|
45
|
+
style={{ width: '64px', flexShrink: 0 }}
|
|
46
|
+
key={key}
|
|
47
|
+
onClick={() => {
|
|
48
|
+
if (customSlippage) {
|
|
49
|
+
setCustomSlippage(null);
|
|
50
|
+
}
|
|
51
|
+
setSlippage(slippageItem);
|
|
52
|
+
}}
|
|
53
|
+
selected={!customSlippage && slippageItem === slippage}
|
|
54
|
+
label={`${slippageItem.toString()}%`}
|
|
55
|
+
/>
|
|
56
|
+
<Divider direction="horizontal" size={8} />
|
|
57
|
+
</>
|
|
58
|
+
);
|
|
59
|
+
})}
|
|
60
|
+
<TextField
|
|
61
|
+
type="number"
|
|
62
|
+
min="0.01"
|
|
63
|
+
max="30"
|
|
64
|
+
step="0.01"
|
|
65
|
+
fullWidth
|
|
66
|
+
variant="contained"
|
|
67
|
+
value={customSlippage || ''}
|
|
68
|
+
color="dark"
|
|
69
|
+
onChange={(event) => {
|
|
70
|
+
const parsedValue = parseFloat(event.target.value);
|
|
71
|
+
if (
|
|
72
|
+
!parsedValue ||
|
|
73
|
+
(parsedValue >= MIN_SLIPPGAE && parsedValue <= MAX_SLIPPAGE)
|
|
74
|
+
) {
|
|
75
|
+
setCustomSlippage(parsedValue);
|
|
76
|
+
}
|
|
77
|
+
}}
|
|
78
|
+
suffix={
|
|
79
|
+
customSlippage && (
|
|
80
|
+
<Typography variant="body" size="small">
|
|
81
|
+
%
|
|
82
|
+
</Typography>
|
|
83
|
+
)
|
|
84
|
+
}
|
|
85
|
+
placeholder="Custom"
|
|
86
|
+
/>
|
|
87
|
+
</SlippageChipsContainer>
|
|
88
|
+
</BaseContainer>
|
|
89
|
+
);
|
|
90
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { i18n } from '@lingui/core';
|
|
2
|
+
import { Typography } from '@rango-dev/ui';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
|
|
5
|
+
import { SlippageTooltipContainer } from './Slippage.styles';
|
|
6
|
+
|
|
7
|
+
export function SlippageTooltipContent() {
|
|
8
|
+
return (
|
|
9
|
+
<SlippageTooltipContainer>
|
|
10
|
+
<Typography variant="label" size="small" color="neutral900">
|
|
11
|
+
{i18n.t(
|
|
12
|
+
'Your transaction will be reverted if the price changes unfavorably by more than this percentage'
|
|
13
|
+
)}
|
|
14
|
+
<br />
|
|
15
|
+
<br />
|
|
16
|
+
<b>{i18n.t('Warning')}</b>:
|
|
17
|
+
{i18n.t(
|
|
18
|
+
'This setting is applied per step, e.g. 1Inch, Thorchain, etc. and only that step will be reverted, not the whole transaction'
|
|
19
|
+
)}
|
|
20
|
+
</Typography>
|
|
21
|
+
</SlippageTooltipContainer>
|
|
22
|
+
);
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Slippage } from './Slippage';
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import type { SwapDetailsPlaceholderPropTypes } from './SwapDetails.types';
|
|
2
|
+
|
|
3
|
+
import { i18n } from '@lingui/core';
|
|
4
|
+
import {
|
|
5
|
+
CopyIcon,
|
|
6
|
+
IconButton,
|
|
7
|
+
NotFound,
|
|
8
|
+
Skeleton,
|
|
9
|
+
Typography,
|
|
10
|
+
} from '@rango-dev/ui';
|
|
11
|
+
import React from 'react';
|
|
12
|
+
|
|
13
|
+
import { navigationRoutes } from '../../constants/navigationRoutes';
|
|
14
|
+
import { useNavigateBack } from '../../hooks/useNavigateBack';
|
|
15
|
+
import { SuffixContainer } from '../HeaderButtons/HeaderButtons.styles';
|
|
16
|
+
import { Layout } from '../Layout';
|
|
17
|
+
import { LoadingSwapDetails } from '../LoadingSwapDetails';
|
|
18
|
+
|
|
19
|
+
import {
|
|
20
|
+
Container,
|
|
21
|
+
HeaderDetails,
|
|
22
|
+
PlaceholderContainer,
|
|
23
|
+
} from './SwapDetails.styles';
|
|
24
|
+
|
|
25
|
+
export function SwapDetailsPlaceholder(props: SwapDetailsPlaceholderPropTypes) {
|
|
26
|
+
const { requestId, showSkeleton } = props;
|
|
27
|
+
const { navigateBackFrom } = useNavigateBack();
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
<Layout
|
|
31
|
+
noPadding
|
|
32
|
+
header={{
|
|
33
|
+
title: i18n.t('Swap and Bridge'),
|
|
34
|
+
onBack: navigateBackFrom.bind(null, navigationRoutes.swapDetails),
|
|
35
|
+
suffix: <SuffixContainer />,
|
|
36
|
+
}}>
|
|
37
|
+
{showSkeleton && (
|
|
38
|
+
<Container>
|
|
39
|
+
<HeaderDetails>
|
|
40
|
+
<div className="row">
|
|
41
|
+
<Typography variant="label" size="large" color="neutral900">
|
|
42
|
+
{`${i18n.t('Request ID')}:`}
|
|
43
|
+
</Typography>
|
|
44
|
+
<div className="request-id">
|
|
45
|
+
<Typography variant="label" size="small" color="neutral900">
|
|
46
|
+
<Skeleton width={60} height={10} variant="rounded" />
|
|
47
|
+
</Typography>
|
|
48
|
+
<IconButton variant="ghost">
|
|
49
|
+
<CopyIcon size={16} color="gray" />
|
|
50
|
+
</IconButton>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
<div className="row">
|
|
54
|
+
<Typography variant="label" size="large" color="neutral900">
|
|
55
|
+
{`${i18n.t('Created at')}:`}
|
|
56
|
+
</Typography>
|
|
57
|
+
<Typography variant="label" size="small" color="neutral900">
|
|
58
|
+
<Skeleton width={60} height={10} variant="rounded" />
|
|
59
|
+
</Typography>
|
|
60
|
+
</div>
|
|
61
|
+
</HeaderDetails>
|
|
62
|
+
<LoadingSwapDetails />
|
|
63
|
+
</Container>
|
|
64
|
+
)}
|
|
65
|
+
{!showSkeleton && (
|
|
66
|
+
<PlaceholderContainer>
|
|
67
|
+
<NotFound
|
|
68
|
+
title={i18n.t('Not found')}
|
|
69
|
+
description={i18n.t(
|
|
70
|
+
'swapNotFound',
|
|
71
|
+
{ requestId },
|
|
72
|
+
{ message: 'Swap with request ID = ${requestId} not found.' }
|
|
73
|
+
)}
|
|
74
|
+
/>
|
|
75
|
+
</PlaceholderContainer>
|
|
76
|
+
)}
|
|
77
|
+
</Layout>
|
|
78
|
+
);
|
|
79
|
+
}
|