@rango-dev/ui 0.1.10-next.102
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/README.md +181 -0
- package/dist/components/Alert/Alert.d.ts +7 -0
- package/dist/components/Alert/Alert.stories.d.ts +5 -0
- package/dist/components/Alert/LoadingFailedAlert.d.ts +2 -0
- package/dist/components/Alert/NotFoundAlert.d.ts +7 -0
- package/dist/components/Alert/index.d.ts +2 -0
- package/dist/components/BestRoute/BestRoute.d.ts +12 -0
- package/dist/components/BestRoute/BestRoute.stories.d.ts +8 -0
- package/dist/components/BestRoute/index.d.ts +1 -0
- package/dist/components/BestRoute/mock.d.ts +4 -0
- package/dist/components/BlockchainSelector/BlockchainSelector.d.ts +17 -0
- package/dist/components/BlockchainSelector/BlockchainSelector.stories.d.ts +5 -0
- package/dist/components/BlockchainSelector/index.d.ts +1 -0
- package/dist/components/BlockchainsList/BlockchainsList.d.ts +10 -0
- package/dist/components/BlockchainsList/BlockchainsList.stories.d.ts +5 -0
- package/dist/components/BlockchainsList/index.d.ts +1 -0
- package/dist/components/BlockchainsList/mockData.d.ts +2 -0
- package/dist/components/Button/Button.d.ts +17 -0
- package/dist/components/Button/Button.stories.d.ts +8 -0
- package/dist/components/Button/index.d.ts +1 -0
- package/dist/components/Checkbox/Checkbox.d.ts +11 -0
- package/dist/components/Checkbox/Checkbox.stories.d.ts +5 -0
- package/dist/components/Checkbox/index.d.ts +1 -0
- package/dist/components/Chip/Chip.d.ts +12 -0
- package/dist/components/Chip/Chip.stories.d.ts +7 -0
- package/dist/components/Chip/index.d.ts +1 -0
- package/dist/components/ColorPicker/ColorPicker.d.ts +9 -0
- package/dist/components/ColorPicker/ColorPicker.stories.d.ts +5 -0
- package/dist/components/ColorPicker/index.d.ts +1 -0
- package/dist/components/ConnectWalletsModal/ConnectWallets.stories.d.ts +5 -0
- package/dist/components/ConnectWalletsModal/ConnectWalletsModal.d.ts +11 -0
- package/dist/components/ConnectWalletsModal/index.d.ts +1 -0
- package/dist/components/ConnectWalletsModal/mockData.d.ts +2 -0
- package/dist/components/Divider/Divider.d.ts +6 -0
- package/dist/components/Divider/index.d.ts +1 -0
- package/dist/components/Drawer/Drawer.d.ts +13 -0
- package/dist/components/Drawer/Drawer.stories.d.ts +8 -0
- package/dist/components/Drawer/index.d.ts +1 -0
- package/dist/components/Header/Header.d.ts +9 -0
- package/dist/components/Header/index.d.ts +1 -0
- package/dist/components/Icon/AddCircleIcon.d.ts +3 -0
- package/dist/components/Icon/AddIcon.d.ts +3 -0
- package/dist/components/Icon/AddWalletIcon.d.ts +3 -0
- package/dist/components/Icon/AngleDownIcon.d.ts +3 -0
- package/dist/components/Icon/AngleLeftIcon.d.ts +3 -0
- package/dist/components/Icon/AngleRightIcon.d.ts +3 -0
- package/dist/components/Icon/AngleUpIcon.d.ts +3 -0
- package/dist/components/Icon/ArrowRightIcon.d.ts +3 -0
- package/dist/components/Icon/BagIcon.d.ts +3 -0
- package/dist/components/Icon/BanIcon.d.ts +3 -0
- package/dist/components/Icon/CheckCircleIcon.d.ts +3 -0
- package/dist/components/Icon/CheckIcon.d.ts +3 -0
- package/dist/components/Icon/CheckSquareIcon.d.ts +3 -0
- package/dist/components/Icon/CheckWalletIcon.d.ts +3 -0
- package/dist/components/Icon/ChevronRightIcon.d.ts +3 -0
- package/dist/components/Icon/CloseIcon.d.ts +1 -0
- package/dist/components/Icon/CopyIcon.d.ts +3 -0
- package/dist/components/Icon/DeleteCircleIcon.d.ts +3 -0
- package/dist/components/Icon/DeleteWalletIcon.d.ts +3 -0
- package/dist/components/Icon/DisconnectIcon.d.ts +3 -0
- package/dist/components/Icon/DownloadIcon.d.ts +3 -0
- package/dist/components/Icon/GasIcon.d.ts +3 -0
- package/dist/components/Icon/HistoryIcon.d.ts +3 -0
- package/dist/components/Icon/HorizontalSwapIcon.d.ts +3 -0
- package/dist/components/Icon/Icons.stories.d.ts +5 -0
- package/dist/components/Icon/InfoCircleIcon.d.ts +3 -0
- package/dist/components/Icon/MinusCircleIcon.d.ts +3 -0
- package/dist/components/Icon/RetryIcon.d.ts +3 -0
- package/dist/components/Icon/RetryLeftIcon.d.ts +3 -0
- package/dist/components/Icon/RetryRightIcon.d.ts +3 -0
- package/dist/components/Icon/SearchIcon.d.ts +3 -0
- package/dist/components/Icon/SearchMinusIcon.d.ts +3 -0
- package/dist/components/Icon/SettingIcon.d.ts +3 -0
- package/dist/components/Icon/SignatureIcon.d.ts +3 -0
- package/dist/components/Icon/SwapWalletIcon.d.ts +3 -0
- package/dist/components/Icon/TimeIcon.d.ts +3 -0
- package/dist/components/Icon/TrashIcon.d.ts +3 -0
- package/dist/components/Icon/TryAgainIcon.d.ts +3 -0
- package/dist/components/Icon/VerticalSwapIcon.d.ts +3 -0
- package/dist/components/Icon/WalletIconIcon.d.ts +3 -0
- package/dist/components/Icon/WarningIcon.d.ts +3 -0
- package/dist/components/Icon/common.d.ts +2 -0
- package/dist/components/Icon/index.d.ts +40 -0
- package/dist/components/Icon/types.d.ts +6 -0
- package/dist/components/LiquiditySourceList/LiquiditySource.stories.d.ts +5 -0
- package/dist/components/LiquiditySourceList/LiquiditySourceList.d.ts +11 -0
- package/dist/components/LiquiditySourceList/index.d.ts +1 -0
- package/dist/components/LiquiditySourceList/mockData.d.ts +2 -0
- package/dist/components/LiquiditySourcesSelector/LiquiditySourcesSelector.d.ts +13 -0
- package/dist/components/LiquiditySourcesSelector/LiquiditySourcesSelector.stories.d.ts +5 -0
- package/dist/components/LiquiditySourcesSelector/index.d.ts +1 -0
- package/dist/components/Modal/Modal.d.ts +12 -0
- package/dist/components/Modal/Modal.stories.d.ts +5 -0
- package/dist/components/Modal/index.d.ts +1 -0
- package/dist/components/Radio/Radio.d.ts +13 -0
- package/dist/components/Radio/Radio.stories.d.ts +5 -0
- package/dist/components/Radio/index.d.ts +1 -0
- package/dist/components/SecondaryPage/SecondaryPage.d.ts +16 -0
- package/dist/components/SecondaryPage/SecondaryPage.stories.d.ts +2 -0
- package/dist/components/SecondaryPage/index.d.ts +1 -0
- package/dist/components/SelectableWalletList/SelectableWalletList.d.ts +7 -0
- package/dist/components/SelectableWalletList/SelectableWalletList.stories.d.ts +5 -0
- package/dist/components/SelectableWalletList/index.d.ts +1 -0
- package/dist/components/SelectableWalletList/mock.d.ts +2 -0
- package/dist/components/Settings/Settings.d.ts +23 -0
- package/dist/components/Settings/Settings.stories.d.ts +5 -0
- package/dist/components/Settings/index.d.ts +1 -0
- package/dist/components/Skeleton/Skeleton.d.ts +6 -0
- package/dist/components/Skeleton/Skeleton.stories.d.ts +5 -0
- package/dist/components/Skeleton/index.d.ts +1 -0
- package/dist/components/Spacer/Spacer.d.ts +6 -0
- package/dist/components/Spacer/Spacer.stories.d.ts +5 -0
- package/dist/components/Spacer/index.d.ts +1 -0
- package/dist/components/Spinner/Spinner.d.ts +6 -0
- package/dist/components/Spinner/Spinner.stories.d.ts +5 -0
- package/dist/components/Spinner/index.d.ts +1 -0
- package/dist/components/StatusDrawer/StatusDrawer.d.ts +11 -0
- package/dist/components/StatusDrawer/StatusDrawer.stories.d.ts +5 -0
- package/dist/components/StatusDrawer/index.d.ts +1 -0
- package/dist/components/StepDetail/StepDetail.d.ts +10 -0
- package/dist/components/StepDetail/StepDetail.stories.d.ts +5 -0
- package/dist/components/StepDetail/index.d.ts +1 -0
- package/dist/components/SwapContainer/SwapContainer.d.ts +7 -0
- package/dist/components/SwapContainer/SwapContainer.stories.d.ts +5 -0
- package/dist/components/SwapContainer/index.d.ts +1 -0
- package/dist/components/SwapDetail/SwapDetail.d.ts +8 -0
- package/dist/components/SwapDetail/SwapDetail.stories.d.ts +5 -0
- package/dist/components/SwapDetail/Token.d.ts +16 -0
- package/dist/components/SwapDetail/index.d.ts +1 -0
- package/dist/components/SwapDetail/mock.d.ts +2 -0
- package/dist/components/Switch/Switch.d.ts +6 -0
- package/dist/components/Switch/Switch.stories.d.ts +5 -0
- package/dist/components/Switch/index.d.ts +1 -0
- package/dist/components/TextField/TextField.d.ts +10 -0
- package/dist/components/TextField/TextField.stories.d.ts +7 -0
- package/dist/components/TextField/index.d.ts +1 -0
- package/dist/components/TokenList/TokenItem.d.ts +11 -0
- package/dist/components/TokenList/TokenList.d.ts +17 -0
- package/dist/components/TokenList/TokenList.stories.d.ts +5 -0
- package/dist/components/TokenList/index.d.ts +1 -0
- package/dist/components/TokenList/mockData.d.ts +2 -0
- package/dist/components/TokenSelector/TokenSelector.d.ts +16 -0
- package/dist/components/TokenSelector/TokenSelector.stories.d.ts +5 -0
- package/dist/components/TokenSelector/index.d.ts +1 -0
- package/dist/components/Tooltip/Tooltip.d.ts +7 -0
- package/dist/components/Tooltip/Tooltip.stories.d.ts +5 -0
- package/dist/components/Tooltip/index.d.ts +1 -0
- package/dist/components/Typography/Typography.d.ts +18 -0
- package/dist/components/Typography/Typography.stories.d.ts +5 -0
- package/dist/components/Typography/index.d.ts +1 -0
- package/dist/components/VirtualizedList/VirtualizedList.d.ts +17 -0
- package/dist/components/Wallet/State.d.ts +7 -0
- package/dist/components/Wallet/Wallet.d.ts +7 -0
- package/dist/components/Wallet/Wallet.stories.d.ts +5 -0
- package/dist/components/Wallet/index.d.ts +1 -0
- package/dist/components/common/FilledCircle.d.ts +1 -0
- package/dist/components/common/index.d.ts +1 -0
- package/dist/components/index.d.ts +31 -0
- package/dist/containers/ConfirmSwap/ConfirmSwap.d.ts +20 -0
- package/dist/containers/ConfirmSwap/ConfirmSwap.stories.d.ts +6 -0
- package/dist/containers/ConfirmSwap/index.d.ts +1 -0
- package/dist/containers/ConfirmSwap/mock.d.ts +5 -0
- package/dist/containers/History/History.d.ts +13 -0
- package/dist/containers/History/History.stories.d.ts +5 -0
- package/dist/containers/History/index.d.ts +1 -0
- package/dist/containers/History/mock.d.ts +2 -0
- package/dist/containers/History/types.d.ts +39 -0
- package/dist/containers/SwapHistory/SwapHistory.d.ts +24 -0
- package/dist/containers/SwapHistory/SwapHistory.stories.d.ts +5 -0
- package/dist/containers/SwapHistory/SwapMessages.d.ts +17 -0
- package/dist/containers/SwapHistory/index.d.ts +1 -0
- package/dist/containers/SwapHistory/mock.d.ts +2 -0
- package/dist/containers/index.d.ts +3 -0
- package/dist/helper/index.d.ts +2 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +8 -0
- package/dist/theme.d.ts +8 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/meta.d.ts +23 -0
- package/dist/types/swaps.d.ts +29 -0
- package/dist/types/wallet.d.ts +23 -0
- package/dist/ui.cjs.development.js +4956 -0
- package/dist/ui.cjs.development.js.map +1 -0
- package/dist/ui.cjs.production.min.js +2 -0
- package/dist/ui.cjs.production.min.js.map +1 -0
- package/dist/ui.esm.js +4870 -0
- package/dist/ui.esm.js.map +1 -0
- package/package.json +88 -0
- package/src/components/Alert/Alert.stories.tsx +22 -0
- package/src/components/Alert/Alert.tsx +102 -0
- package/src/components/Alert/LoadingFailedAlert.tsx +11 -0
- package/src/components/Alert/NotFoundAlert.tsx +19 -0
- package/src/components/Alert/index.ts +2 -0
- package/src/components/BestRoute/BestRoute.stories.tsx +31 -0
- package/src/components/BestRoute/BestRoute.tsx +232 -0
- package/src/components/BestRoute/index.ts +1 -0
- package/src/components/BestRoute/mock.ts +554 -0
- package/src/components/BlockchainSelector/BlockchainSelector.stories.tsx +25 -0
- package/src/components/BlockchainSelector/BlockchainSelector.tsx +93 -0
- package/src/components/BlockchainSelector/index.ts +1 -0
- package/src/components/BlockchainsList/BlockchainsList.stories.tsx +25 -0
- package/src/components/BlockchainsList/BlockchainsList.tsx +70 -0
- package/src/components/BlockchainsList/index.ts +1 -0
- package/src/components/BlockchainsList/mockData.ts +2972 -0
- package/src/components/Button/Button.stories.tsx +59 -0
- package/src/components/Button/Button.tsx +421 -0
- package/src/components/Button/index.ts +1 -0
- package/src/components/Checkbox/Checkbox.stories.tsx +22 -0
- package/src/components/Checkbox/Checkbox.tsx +56 -0
- package/src/components/Checkbox/index.ts +1 -0
- package/src/components/Chip/Chip.stories.tsx +37 -0
- package/src/components/Chip/Chip.tsx +48 -0
- package/src/components/Chip/index.ts +1 -0
- package/src/components/ColorPicker/ColorPicker.stories.tsx +36 -0
- package/src/components/ColorPicker/ColorPicker.tsx +85 -0
- package/src/components/ColorPicker/index.ts +1 -0
- package/src/components/ConnectWalletsModal/ConnectWallets.stories.tsx +13 -0
- package/src/components/ConnectWalletsModal/ConnectWalletsModal.tsx +42 -0
- package/src/components/ConnectWalletsModal/index.ts +1 -0
- package/src/components/ConnectWalletsModal/mockData.ts +134 -0
- package/src/components/Divider/Divider.tsx +41 -0
- package/src/components/Divider/index.ts +1 -0
- package/src/components/Drawer/Drawer.stories.tsx +86 -0
- package/src/components/Drawer/Drawer.tsx +124 -0
- package/src/components/Drawer/index.ts +1 -0
- package/src/components/Header/Header.tsx +39 -0
- package/src/components/Header/index.ts +1 -0
- package/src/components/Icon/AddCircleIcon.tsx +31 -0
- package/src/components/Icon/AddIcon.tsx +31 -0
- package/src/components/Icon/AddWalletIcon.tsx +50 -0
- package/src/components/Icon/AngleDownIcon.tsx +30 -0
- package/src/components/Icon/AngleLeftIcon.tsx +33 -0
- package/src/components/Icon/AngleRightIcon.tsx +32 -0
- package/src/components/Icon/AngleUpIcon.tsx +32 -0
- package/src/components/Icon/ArrowRightIcon.tsx +31 -0
- package/src/components/Icon/BagIcon.tsx +39 -0
- package/src/components/Icon/BanIcon.tsx +32 -0
- package/src/components/Icon/CheckCircleIcon.tsx +39 -0
- package/src/components/Icon/CheckIcon.tsx +30 -0
- package/src/components/Icon/CheckSquareIcon.tsx +37 -0
- package/src/components/Icon/CheckWalletIcon.tsx +45 -0
- package/src/components/Icon/ChevronRightIcon.tsx +29 -0
- package/src/components/Icon/CloseIcon.tsx +9 -0
- package/src/components/Icon/CopyIcon.tsx +59 -0
- package/src/components/Icon/DeleteCircleIcon.tsx +31 -0
- package/src/components/Icon/DeleteWalletIcon.tsx +50 -0
- package/src/components/Icon/DisconnectIcon.tsx +31 -0
- package/src/components/Icon/DownloadIcon.tsx +37 -0
- package/src/components/Icon/GasIcon.tsx +37 -0
- package/src/components/Icon/HistoryIcon.tsx +34 -0
- package/src/components/Icon/HorizontalSwapIcon.tsx +38 -0
- package/src/components/Icon/Icons.stories.tsx +44 -0
- package/src/components/Icon/InfoCircleIcon.tsx +39 -0
- package/src/components/Icon/MinusCircleIcon.tsx +31 -0
- package/src/components/Icon/RetryIcon.tsx +30 -0
- package/src/components/Icon/RetryLeftIcon.tsx +31 -0
- package/src/components/Icon/RetryRightIcon.tsx +31 -0
- package/src/components/Icon/SearchIcon.tsx +31 -0
- package/src/components/Icon/SearchMinusIcon.tsx +31 -0
- package/src/components/Icon/SettingIcon.tsx +31 -0
- package/src/components/Icon/SignatureIcon.tsx +32 -0
- package/src/components/Icon/SwapWalletIcon.tsx +50 -0
- package/src/components/Icon/TimeIcon.tsx +29 -0
- package/src/components/Icon/TrashIcon.tsx +31 -0
- package/src/components/Icon/TryAgainIcon.tsx +31 -0
- package/src/components/Icon/VerticalSwapIcon.tsx +38 -0
- package/src/components/Icon/WalletIconIcon.tsx +40 -0
- package/src/components/Icon/WarningIcon.tsx +37 -0
- package/src/components/Icon/common.ts +69 -0
- package/src/components/Icon/index.ts +48 -0
- package/src/components/Icon/types.tsx +45 -0
- package/src/components/LiquiditySourceList/LiquiditySource.stories.tsx +13 -0
- package/src/components/LiquiditySourceList/LiquiditySourceList.tsx +195 -0
- package/src/components/LiquiditySourceList/index.ts +1 -0
- package/src/components/LiquiditySourceList/mockData.ts +316 -0
- package/src/components/LiquiditySourcesSelector/LiquiditySourcesSelector.stories.tsx +16 -0
- package/src/components/LiquiditySourcesSelector/LiquiditySourcesSelector.tsx +61 -0
- package/src/components/LiquiditySourcesSelector/index.ts +1 -0
- package/src/components/Modal/Modal.stories.tsx +22 -0
- package/src/components/Modal/Modal.tsx +93 -0
- package/src/components/Modal/index.ts +1 -0
- package/src/components/Radio/Radio.stories.tsx +23 -0
- package/src/components/Radio/Radio.tsx +100 -0
- package/src/components/Radio/index.ts +1 -0
- package/src/components/SecondaryPage/SecondaryPage.stories.tsx +7 -0
- package/src/components/SecondaryPage/SecondaryPage.tsx +68 -0
- package/src/components/SecondaryPage/index.ts +1 -0
- package/src/components/SelectableWalletList/SelectableWalletList.stories.tsx +14 -0
- package/src/components/SelectableWalletList/SelectableWalletList.tsx +118 -0
- package/src/components/SelectableWalletList/index.ts +1 -0
- package/src/components/SelectableWalletList/mock.ts +13 -0
- package/src/components/Settings/Settings.stories.tsx +34 -0
- package/src/components/Settings/Settings.tsx +208 -0
- package/src/components/Settings/index.ts +1 -0
- package/src/components/Skeleton/Skeleton.stories.tsx +24 -0
- package/src/components/Skeleton/Skeleton.tsx +66 -0
- package/src/components/Skeleton/index.ts +1 -0
- package/src/components/Spacer/Spacer.stories.tsx +31 -0
- package/src/components/Spacer/Spacer.tsx +128 -0
- package/src/components/Spacer/index.ts +1 -0
- package/src/components/Spinner/Spinner.stories.tsx +25 -0
- package/src/components/Spinner/Spinner.tsx +61 -0
- package/src/components/Spinner/index.ts +1 -0
- package/src/components/StatusDrawer/StatusDrawer.stories.tsx +38 -0
- package/src/components/StatusDrawer/StatusDrawer.tsx +82 -0
- package/src/components/StatusDrawer/index.ts +1 -0
- package/src/components/StepDetail/StepDetail.stories.tsx +37 -0
- package/src/components/StepDetail/StepDetail.tsx +109 -0
- package/src/components/StepDetail/index.ts +1 -0
- package/src/components/SwapContainer/SwapContainer.stories.tsx +13 -0
- package/src/components/SwapContainer/SwapContainer.tsx +43 -0
- package/src/components/SwapContainer/index.ts +1 -0
- package/src/components/SwapDetail/SwapDetail.stories.tsx +19 -0
- package/src/components/SwapDetail/SwapDetail.tsx +112 -0
- package/src/components/SwapDetail/Token.tsx +68 -0
- package/src/components/SwapDetail/index.ts +1 -0
- package/src/components/SwapDetail/mock.ts +276 -0
- package/src/components/Switch/Switch.stories.tsx +9 -0
- package/src/components/Switch/Switch.tsx +55 -0
- package/src/components/Switch/index.ts +1 -0
- package/src/components/TextField/TextField.stories.tsx +31 -0
- package/src/components/TextField/TextField.tsx +141 -0
- package/src/components/TextField/index.ts +1 -0
- package/src/components/TokenList/TokenItem.tsx +73 -0
- package/src/components/TokenList/TokenList.stories.tsx +18 -0
- package/src/components/TokenList/TokenList.tsx +95 -0
- package/src/components/TokenList/index.ts +1 -0
- package/src/components/TokenList/mockData.ts +1721 -0
- package/src/components/TokenSelector/TokenSelector.stories.tsx +18 -0
- package/src/components/TokenSelector/TokenSelector.tsx +95 -0
- package/src/components/TokenSelector/index.ts +1 -0
- package/src/components/Tooltip/Tooltip.stories.tsx +52 -0
- package/src/components/Tooltip/Tooltip.tsx +116 -0
- package/src/components/Tooltip/index.ts +1 -0
- package/src/components/Typography/Typography.stories.tsx +72 -0
- package/src/components/Typography/Typography.tsx +216 -0
- package/src/components/Typography/index.ts +1 -0
- package/src/components/VirtualizedList/VirtualizedList.tsx +62 -0
- package/src/components/Wallet/State.tsx +34 -0
- package/src/components/Wallet/Wallet.stories.tsx +36 -0
- package/src/components/Wallet/Wallet.tsx +69 -0
- package/src/components/Wallet/index.ts +1 -0
- package/src/components/common/FilledCircle.tsx +8 -0
- package/src/components/common/index.ts +1 -0
- package/src/components/index.ts +31 -0
- package/src/containers/ConfirmSwap/ConfirmSwap.stories.tsx +22 -0
- package/src/containers/ConfirmSwap/ConfirmSwap.tsx +180 -0
- package/src/containers/ConfirmSwap/index.ts +1 -0
- package/src/containers/ConfirmSwap/mock.ts +223 -0
- package/src/containers/History/History.stories.tsx +14 -0
- package/src/containers/History/History.tsx +115 -0
- package/src/containers/History/index.ts +1 -0
- package/src/containers/History/mock.ts +826 -0
- package/src/containers/History/types.tsx +47 -0
- package/src/containers/SwapHistory/SwapHistory.stories.tsx +13 -0
- package/src/containers/SwapHistory/SwapHistory.tsx +442 -0
- package/src/containers/SwapHistory/SwapMessages.tsx +116 -0
- package/src/containers/SwapHistory/index.ts +1 -0
- package/src/containers/SwapHistory/mock.ts +276 -0
- package/src/containers/index.ts +3 -0
- package/src/helper/index.ts +16 -0
- package/src/index.ts +4 -0
- package/src/theme.ts +163 -0
- package/src/types/index.ts +3 -0
- package/src/types/meta.ts +22 -0
- package/src/types/swaps.ts +44 -0
- package/src/types/wallet.ts +30 -0
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { RoutingResultType, TransactionType } from 'rango-sdk';
|
|
3
|
+
import { PendingSwap } from '../History/types';
|
|
4
|
+
|
|
5
|
+
export const pendingSwap: PendingSwap = {
|
|
6
|
+
creationTime: '1673164511955',
|
|
7
|
+
finishTime: '1673164550137',
|
|
8
|
+
requestId: '51e211d9-d61c-45d2-a4d4-1f9f7f90ee85',
|
|
9
|
+
inputAmount: '1',
|
|
10
|
+
wallets: {
|
|
11
|
+
OSMOSIS: {
|
|
12
|
+
walletType: 'keplr',
|
|
13
|
+
address: 'osmo1unf2rcytjxfpz8x8ar63h4qeftadptg5t0nqcl',
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
status: 'running',
|
|
17
|
+
isPaused: false,
|
|
18
|
+
extraMessage: null,
|
|
19
|
+
extraMessageSeverity: 'info',
|
|
20
|
+
extraMessageDetail: '',
|
|
21
|
+
extraMessageErrorCode: null,
|
|
22
|
+
networkStatusExtraMessage: null,
|
|
23
|
+
networkStatusExtraMessageDetail: null,
|
|
24
|
+
lastNotificationTime: null,
|
|
25
|
+
settings: {
|
|
26
|
+
slippage: '1.0',
|
|
27
|
+
disabledSwappersIds: [],
|
|
28
|
+
disabledSwappersGroups: [],
|
|
29
|
+
},
|
|
30
|
+
simulationResult: {
|
|
31
|
+
resultType: RoutingResultType.OK,
|
|
32
|
+
outputAmount: '1.540670',
|
|
33
|
+
swaps: [
|
|
34
|
+
{
|
|
35
|
+
swapperId: 'Osmosis',
|
|
36
|
+
swapperType: 'DEX',
|
|
37
|
+
swapperLogo: '',
|
|
38
|
+
from: {
|
|
39
|
+
symbol: 'JUNO',
|
|
40
|
+
logo: 'https://api.rango.exchange/tokens/COSMOS/JUNO.png',
|
|
41
|
+
address:
|
|
42
|
+
'ibc/46b44899322f3cd854d2d46deef881958467cdd4b3b10086da49296bbed94bed',
|
|
43
|
+
blockchain: 'OSMOSIS',
|
|
44
|
+
blockchainLogo: '',
|
|
45
|
+
decimals: 6,
|
|
46
|
+
usdPrice: 1.1091996179668873,
|
|
47
|
+
},
|
|
48
|
+
to: {
|
|
49
|
+
symbol: 'OSMO',
|
|
50
|
+
logo: 'https://api.rango.exchange/i/mJQPS2',
|
|
51
|
+
address: null,
|
|
52
|
+
blockchain: 'OSMOSIS',
|
|
53
|
+
decimals: 6,
|
|
54
|
+
blockchainLogo: '',
|
|
55
|
+
usdPrice: 0.7192435454440882,
|
|
56
|
+
},
|
|
57
|
+
fromAmount: '1.000000',
|
|
58
|
+
fromAmountPrecision: null,
|
|
59
|
+
fromAmountMinValue: null,
|
|
60
|
+
fromAmountMaxValue: null,
|
|
61
|
+
fromAmountRestrictionType: 'EXCLUSIVE',
|
|
62
|
+
toAmount: '1.540670',
|
|
63
|
+
fee: [
|
|
64
|
+
{
|
|
65
|
+
asset: {
|
|
66
|
+
blockchain: 'OSMOSIS',
|
|
67
|
+
symbol: 'OSMO',
|
|
68
|
+
address: null,
|
|
69
|
+
},
|
|
70
|
+
expenseType: 'FROM_SOURCE_WALLET',
|
|
71
|
+
amount: '0',
|
|
72
|
+
name: 'Network Fee',
|
|
73
|
+
},
|
|
74
|
+
],
|
|
75
|
+
estimatedTimeInSeconds: 45,
|
|
76
|
+
swapChainType: 'INTRA_CHAIN',
|
|
77
|
+
routes: [
|
|
78
|
+
{
|
|
79
|
+
nodes: [
|
|
80
|
+
{
|
|
81
|
+
nodes: [
|
|
82
|
+
{
|
|
83
|
+
marketName: 'pool#498',
|
|
84
|
+
marketId: null,
|
|
85
|
+
percent: 1,
|
|
86
|
+
},
|
|
87
|
+
],
|
|
88
|
+
from: 'JUNO',
|
|
89
|
+
fromLogo: 'https://api.rango.exchange/tokens/COSMOS/JUNO.png',
|
|
90
|
+
fromAddress:
|
|
91
|
+
'ibc/46b44899322f3cd854d2d46deef881958467cdd4b3b10086da49296bbed94bed',
|
|
92
|
+
fromBlockchain: 'OSMOSIS',
|
|
93
|
+
to: 'ATOM',
|
|
94
|
+
toLogo: 'https://api.rango.exchange/tokens/COSMOS/ATOM.png',
|
|
95
|
+
toAddress:
|
|
96
|
+
'ibc/27394fb092d2eccd56123c74f36e4c1f926001ceada9ca97ea622b25f41e5eb2',
|
|
97
|
+
toBlockchain: 'OSMOSIS',
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
nodes: [
|
|
101
|
+
{
|
|
102
|
+
marketName: 'pool#8',
|
|
103
|
+
marketId: null,
|
|
104
|
+
percent: 1,
|
|
105
|
+
},
|
|
106
|
+
],
|
|
107
|
+
from: 'ATOM',
|
|
108
|
+
fromLogo: 'https://api.rango.exchange/tokens/COSMOS/ATOM.png',
|
|
109
|
+
fromAddress:
|
|
110
|
+
'ibc/27394fb092d2eccd56123c74f36e4c1f926001ceada9ca97ea622b25f41e5eb2',
|
|
111
|
+
fromBlockchain: 'OSMOSIS',
|
|
112
|
+
to: 'IRIS',
|
|
113
|
+
toLogo: 'https://api.rango.exchange/tokens/COSMOS/IRIS.png',
|
|
114
|
+
toAddress:
|
|
115
|
+
'ibc/7c4d60aa95e5a7558b0a364860979ca34b7ff8aaf255b87af9e879374470cec0',
|
|
116
|
+
toBlockchain: 'OSMOSIS',
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
nodes: [
|
|
120
|
+
{
|
|
121
|
+
marketName: 'pool#7',
|
|
122
|
+
marketId: null,
|
|
123
|
+
percent: 1,
|
|
124
|
+
},
|
|
125
|
+
],
|
|
126
|
+
from: 'IRIS',
|
|
127
|
+
fromLogo: 'https://api.rango.exchange/tokens/COSMOS/IRIS.png',
|
|
128
|
+
fromAddress:
|
|
129
|
+
'ibc/7c4d60aa95e5a7558b0a364860979ca34b7ff8aaf255b87af9e879374470cec0',
|
|
130
|
+
fromBlockchain: 'OSMOSIS',
|
|
131
|
+
to: 'OSMO',
|
|
132
|
+
toLogo: 'https://api.rango.exchange/tokens/COSMOS/OSMO.png',
|
|
133
|
+
toAddress: null,
|
|
134
|
+
toBlockchain: 'OSMOSIS',
|
|
135
|
+
},
|
|
136
|
+
],
|
|
137
|
+
},
|
|
138
|
+
],
|
|
139
|
+
recommendedSlippage: null,
|
|
140
|
+
timeStat: {
|
|
141
|
+
min: 6,
|
|
142
|
+
avg: 40,
|
|
143
|
+
max: 241,
|
|
144
|
+
},
|
|
145
|
+
includesDestinationTx: false,
|
|
146
|
+
maxRequiredSign: 1,
|
|
147
|
+
warnings: [],
|
|
148
|
+
},
|
|
149
|
+
],
|
|
150
|
+
},
|
|
151
|
+
validateBalanceOrFee: true,
|
|
152
|
+
steps: [
|
|
153
|
+
{
|
|
154
|
+
id: 1,
|
|
155
|
+
fromBlockchain: 'OSMOSIS',
|
|
156
|
+
fromSymbol: 'JUNO',
|
|
157
|
+
fromSymbolAddress:
|
|
158
|
+
'ibc/46b44899322f3cd854d2d46deef881958467cdd4b3b10086da49296bbed94bed',
|
|
159
|
+
fromDecimals: 6,
|
|
160
|
+
fromAmountPrecision: null,
|
|
161
|
+
fromAmountMinValue: null,
|
|
162
|
+
fromAmountMaxValue: null,
|
|
163
|
+
toBlockchainLogo: 'https://api.rango.exchange/swappers/osmosis.png',
|
|
164
|
+
fromBlockchainLogo: 'https://api.rango.exchange/swappers/osmosis.png',
|
|
165
|
+
toBlockchain: 'OSMOSIS',
|
|
166
|
+
fromLogo: 'https://api.rango.exchange/tokens/COSMOS/JUNO.png',
|
|
167
|
+
toSymbol: 'OSMO',
|
|
168
|
+
toSymbolAddress: null,
|
|
169
|
+
swapperType: 'DEX',
|
|
170
|
+
toDecimals: 6,
|
|
171
|
+
toLogo: 'https://api.rango.exchange/i/mJQPS2',
|
|
172
|
+
startTransactionTime: 1673164519916,
|
|
173
|
+
swapperId: 'Osmosis',
|
|
174
|
+
swapperLogo: '',
|
|
175
|
+
expectedOutputAmountHumanReadable: '1.540670',
|
|
176
|
+
outputAmount: '1.540658',
|
|
177
|
+
status: 'running',
|
|
178
|
+
networkStatus: null,
|
|
179
|
+
executedTransactionId:
|
|
180
|
+
'0f8f17eecc863c2d6be65ef52cfe3128ff3cd7baeddf133160bea8ccdfbf876b',
|
|
181
|
+
explorerUrl: [
|
|
182
|
+
{
|
|
183
|
+
url: 'https://www.mintscan.io/osmosis/txs/0f8f17eecc863c2d6be65ef52cfe3128ff3cd7baeddf133160bea8ccdfbf876b',
|
|
184
|
+
description: null,
|
|
185
|
+
},
|
|
186
|
+
],
|
|
187
|
+
cosmosTransaction: {
|
|
188
|
+
type: TransactionType.COSMOS,
|
|
189
|
+
fromWalletAddress: 'osmo1unf2rcytjxfpz8x8ar63h4qeftadptg5t0nqcl',
|
|
190
|
+
blockChain: 'OSMOSIS',
|
|
191
|
+
data: {
|
|
192
|
+
chainId: 'osmosis-1',
|
|
193
|
+
account_number: 102721,
|
|
194
|
+
sequence: '308',
|
|
195
|
+
msgs: [
|
|
196
|
+
{
|
|
197
|
+
__type: 'OsmosisSwapMessage',
|
|
198
|
+
type: 'osmosis/gamm/swap-exact-amount-in',
|
|
199
|
+
value: {
|
|
200
|
+
sender: 'osmo1unf2rcytjxfpz8x8ar63h4qeftadptg5t0nqcl',
|
|
201
|
+
routes: [
|
|
202
|
+
{
|
|
203
|
+
pool_id: '498',
|
|
204
|
+
token_out_denom:
|
|
205
|
+
'ibc/27394FB092D2ECCD56123C74F36E4C1F926001CEADA9CA97EA622B25F41E5EB2',
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
pool_id: '8',
|
|
209
|
+
token_out_denom:
|
|
210
|
+
'ibc/7C4D60AA95E5A7558B0A364860979CA34B7FF8AAF255B87AF9E879374470CEC0',
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
pool_id: '7',
|
|
214
|
+
token_out_denom: 'uosmo',
|
|
215
|
+
},
|
|
216
|
+
],
|
|
217
|
+
token_in: {
|
|
218
|
+
denom:
|
|
219
|
+
'ibc/46B44899322F3CD854D2D46DEEF881958467CDD4B3B10086DA49296BBED94BED',
|
|
220
|
+
amount: '1000000',
|
|
221
|
+
},
|
|
222
|
+
token_out_min_amount: '1525264',
|
|
223
|
+
},
|
|
224
|
+
},
|
|
225
|
+
],
|
|
226
|
+
protoMsgs: [
|
|
227
|
+
{
|
|
228
|
+
type_url: '/osmosis.gamm.v1beta1.MsgSwapExactAmountIn',
|
|
229
|
+
value: [
|
|
230
|
+
10, 43, 111, 115, 109, 111, 49, 117, 110, 102, 50, 114, 99, 121,
|
|
231
|
+
116, 106, 120, 102, 112, 122, 56, 120, 56, 97, 114, 54, 51, 104,
|
|
232
|
+
52, 113, 101, 102, 116, 97, 100, 112, 116, 103, 53, 116, 48,
|
|
233
|
+
110, 113, 99, 108, 18, 73, 8, -14, 3, 18, 68, 105, 98, 99, 47,
|
|
234
|
+
50, 55, 51, 57, 52, 70, 66, 48, 57, 50, 68, 50, 69, 67, 67, 68,
|
|
235
|
+
53, 54, 49, 50, 51, 67, 55, 52, 70, 51, 54, 69, 52, 67, 49, 70,
|
|
236
|
+
57, 50, 54, 48, 48, 49, 67, 69, 65, 68, 65, 57, 67, 65, 57, 55,
|
|
237
|
+
69, 65, 54, 50, 50, 66, 50, 53, 70, 52, 49, 69, 53, 69, 66, 50,
|
|
238
|
+
18, 72, 8, 8, 18, 68, 105, 98, 99, 47, 55, 67, 52, 68, 54, 48,
|
|
239
|
+
65, 65, 57, 53, 69, 53, 65, 55, 53, 53, 56, 66, 48, 65, 51, 54,
|
|
240
|
+
52, 56, 54, 48, 57, 55, 57, 67, 65, 51, 52, 66, 55, 70, 70, 56,
|
|
241
|
+
65, 65, 70, 50, 53, 53, 66, 56, 55, 65, 70, 57, 69, 56, 55, 57,
|
|
242
|
+
51, 55, 52, 52, 55, 48, 67, 69, 67, 48, 18, 9, 8, 7, 18, 5, 117,
|
|
243
|
+
111, 115, 109, 111, 26, 79, 10, 68, 105, 98, 99, 47, 52, 54, 66,
|
|
244
|
+
52, 52, 56, 57, 57, 51, 50, 50, 70, 51, 67, 68, 56, 53, 52, 68,
|
|
245
|
+
50, 68, 52, 54, 68, 69, 69, 70, 56, 56, 49, 57, 53, 56, 52, 54,
|
|
246
|
+
55, 67, 68, 68, 52, 66, 51, 66, 49, 48, 48, 56, 54, 68, 65, 52,
|
|
247
|
+
57, 50, 57, 54, 66, 66, 69, 68, 57, 52, 66, 69, 68, 18, 7, 49,
|
|
248
|
+
48, 48, 48, 48, 48, 48, 34, 7, 49, 53, 50, 53, 50, 54, 52,
|
|
249
|
+
],
|
|
250
|
+
},
|
|
251
|
+
],
|
|
252
|
+
memo: '',
|
|
253
|
+
source: null,
|
|
254
|
+
fee: {
|
|
255
|
+
gas: '900000',
|
|
256
|
+
amount: [
|
|
257
|
+
{
|
|
258
|
+
denom: 'uosmo',
|
|
259
|
+
amount: '0',
|
|
260
|
+
},
|
|
261
|
+
],
|
|
262
|
+
},
|
|
263
|
+
signType: 'AMINO',
|
|
264
|
+
rpcUrl: 'sample_rpc',
|
|
265
|
+
},
|
|
266
|
+
rawTransfer: null,
|
|
267
|
+
},
|
|
268
|
+
solanaTransaction: null,
|
|
269
|
+
evmTransaction: null,
|
|
270
|
+
evmApprovalTransaction: null,
|
|
271
|
+
transferTransaction: null,
|
|
272
|
+
diagnosisUrl: null,
|
|
273
|
+
internalSteps: null,
|
|
274
|
+
},
|
|
275
|
+
],
|
|
276
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export const containsText = (text: string, searchText: string) =>
|
|
2
|
+
text.toLowerCase().indexOf(searchText.toLowerCase()) > -1;
|
|
3
|
+
|
|
4
|
+
export const getConciseAddress = (
|
|
5
|
+
address: string | null,
|
|
6
|
+
maxChars = 8,
|
|
7
|
+
ellipsisLength = 3
|
|
8
|
+
): string | null => {
|
|
9
|
+
if (!address) return null;
|
|
10
|
+
if (address.length < 2 * maxChars + ellipsisLength) return address;
|
|
11
|
+
const start = Math.ceil((address.length - maxChars) / 2);
|
|
12
|
+
const end = address.length - maxChars;
|
|
13
|
+
return `${address.substr(start, maxChars)}${'.'.repeat(
|
|
14
|
+
ellipsisLength
|
|
15
|
+
)}${address.substr(end)}`;
|
|
16
|
+
};
|
package/src/index.ts
ADDED
package/src/theme.ts
ADDED
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
// TSDX + stiches doesn't work with import statement and has a bug.
|
|
2
|
+
|
|
3
|
+
import { PropertyValue, CreateStitches } from '@stitches/react';
|
|
4
|
+
import { DefaultThemeMap } from '@stitches/react/types/config';
|
|
5
|
+
|
|
6
|
+
// Solution: (https://github.com/stitchesjs/stitches/issues/833#issuecomment-950707025)
|
|
7
|
+
const { createStitches } = require('@stitches/react');
|
|
8
|
+
|
|
9
|
+
/* ----------------------- Values ----------------------- */
|
|
10
|
+
const theme = {
|
|
11
|
+
colors: {
|
|
12
|
+
primary: '#5FA425',
|
|
13
|
+
primary100: '#9FC87C',
|
|
14
|
+
primary200: '#8FBF66',
|
|
15
|
+
primary300: '#7FB651',
|
|
16
|
+
primary400: '#6FAD3B',
|
|
17
|
+
primary500: '#5FA425',
|
|
18
|
+
primary600: '#4C831E',
|
|
19
|
+
primary700: '#396216',
|
|
20
|
+
primary800: '#26420F',
|
|
21
|
+
primary900: '#132107',
|
|
22
|
+
neutrals200: '#FAFAFA',
|
|
23
|
+
neutrals300: '#EAEAEA',
|
|
24
|
+
neutrals400: '#999999',
|
|
25
|
+
neutrals500: '#888888',
|
|
26
|
+
neutrals600: '#666666',
|
|
27
|
+
neutrals700: '#444444',
|
|
28
|
+
neutrals800: '#333333',
|
|
29
|
+
neutrals900: '#111111',
|
|
30
|
+
background: '#fff',
|
|
31
|
+
foreground: '#000',
|
|
32
|
+
success: '#0070F3',
|
|
33
|
+
success100: '#D3E5FF',
|
|
34
|
+
success300: '#3291FF',
|
|
35
|
+
success500: '#0070F3',
|
|
36
|
+
success700: '#0761D1',
|
|
37
|
+
warning: '#F5A623',
|
|
38
|
+
warning100: '#FFEFCF',
|
|
39
|
+
warning300: '#F7B955',
|
|
40
|
+
warning500: '#F5A623',
|
|
41
|
+
warning700: '#AB570A',
|
|
42
|
+
error: '#FF0000',
|
|
43
|
+
error100: '#F7D4D6',
|
|
44
|
+
error300: '#FF3333',
|
|
45
|
+
error500: '#FF0000',
|
|
46
|
+
error700: '#E60000',
|
|
47
|
+
// Only use this color when you are going to use white for both dark and light theme.
|
|
48
|
+
white: '#fff',
|
|
49
|
+
},
|
|
50
|
+
space: {
|
|
51
|
+
2: '2px',
|
|
52
|
+
4: '4px',
|
|
53
|
+
6: '6px',
|
|
54
|
+
8: '8px',
|
|
55
|
+
10: '10px',
|
|
56
|
+
12: '12px',
|
|
57
|
+
16: '16px',
|
|
58
|
+
20: '20px',
|
|
59
|
+
24: '24px',
|
|
60
|
+
28: '28px',
|
|
61
|
+
30: '30px',
|
|
62
|
+
32: '32px',
|
|
63
|
+
},
|
|
64
|
+
fontSizes: {
|
|
65
|
+
10: '10px',
|
|
66
|
+
12: '12px',
|
|
67
|
+
14: '14px',
|
|
68
|
+
16: '16px',
|
|
69
|
+
18: '18px',
|
|
70
|
+
20: '20px',
|
|
71
|
+
24: '24px',
|
|
72
|
+
32: '32px',
|
|
73
|
+
36: '36px',
|
|
74
|
+
40: '40px',
|
|
75
|
+
48: '48px',
|
|
76
|
+
},
|
|
77
|
+
fonts: {},
|
|
78
|
+
fontWeights: {
|
|
79
|
+
400: '400',
|
|
80
|
+
500: '500',
|
|
81
|
+
600: '600',
|
|
82
|
+
700: '700',
|
|
83
|
+
},
|
|
84
|
+
lineHeights: {},
|
|
85
|
+
letterSpacings: {},
|
|
86
|
+
sizes: {
|
|
87
|
+
4: '4px',
|
|
88
|
+
6: '6px',
|
|
89
|
+
8: '8px',
|
|
90
|
+
12: '12px',
|
|
91
|
+
16: '16px',
|
|
92
|
+
20: '20px',
|
|
93
|
+
24: '24px',
|
|
94
|
+
28: '28px',
|
|
95
|
+
32: '32px',
|
|
96
|
+
36: '36px',
|
|
97
|
+
40: '40px',
|
|
98
|
+
48: '48px',
|
|
99
|
+
},
|
|
100
|
+
borderWidths: {},
|
|
101
|
+
borderStyles: {},
|
|
102
|
+
radii: {
|
|
103
|
+
5: '8px',
|
|
104
|
+
10: '12px',
|
|
105
|
+
},
|
|
106
|
+
shadows: {
|
|
107
|
+
s: '0px 3px 5px 3px #f0f2f5, 0px 6px 10px 3px #f0f2f5, 0px 1px 18px 3px #f0f2f5',
|
|
108
|
+
},
|
|
109
|
+
zIndices: {},
|
|
110
|
+
transitions: {},
|
|
111
|
+
};
|
|
112
|
+
const media = {
|
|
113
|
+
sm: '(min-width: 640px)',
|
|
114
|
+
md: '(min-width: 768px)',
|
|
115
|
+
lg: '(min-width: 1024px)',
|
|
116
|
+
};
|
|
117
|
+
const utils = {
|
|
118
|
+
bc: (value: PropertyValue<'backgroundColor'>) => ({
|
|
119
|
+
backgroundColor: value,
|
|
120
|
+
}),
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
/* ----------------------- End of Values ----------------------- */
|
|
124
|
+
|
|
125
|
+
const typedCreateStiches = createStitches as CreateStitches;
|
|
126
|
+
|
|
127
|
+
// Note: it seems there is a bug on tsdx and when it compiles the code, it goes through an error
|
|
128
|
+
// We can directly check it with `tsc` to see if the error is correct or not.
|
|
129
|
+
// We `ignore` it for now, to get safety check on VSCode.
|
|
130
|
+
// @ts-ignore
|
|
131
|
+
export const { styled, css, createTheme, keyframes, globalCss } =
|
|
132
|
+
typedCreateStiches<
|
|
133
|
+
'',
|
|
134
|
+
typeof media,
|
|
135
|
+
typeof theme,
|
|
136
|
+
DefaultThemeMap,
|
|
137
|
+
// TODO: Make `utils` typesafe as well.
|
|
138
|
+
{}
|
|
139
|
+
>({
|
|
140
|
+
media,
|
|
141
|
+
theme,
|
|
142
|
+
utils,
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
export const lightTheme = createTheme({});
|
|
146
|
+
|
|
147
|
+
export const darkTheme = createTheme({
|
|
148
|
+
colors: {
|
|
149
|
+
neutrals200: '#111111',
|
|
150
|
+
neutrals300: '#333333',
|
|
151
|
+
neutrals400: '#444444',
|
|
152
|
+
neutrals500: '#666666',
|
|
153
|
+
neutrals600: '#888888',
|
|
154
|
+
neutrals700: '#999999',
|
|
155
|
+
neutrals800: '#EAEAEA',
|
|
156
|
+
neutrals900: '#FAFAFA',
|
|
157
|
+
foreground: '#fff',
|
|
158
|
+
background: '#000',
|
|
159
|
+
},
|
|
160
|
+
shadows: {
|
|
161
|
+
s: '0px 3px 5px 3px #222, 0px 6px 10px 3px #222, 0px 1px 18px 3px #222',
|
|
162
|
+
},
|
|
163
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export type TokenMeta = {
|
|
2
|
+
blockchain: string;
|
|
3
|
+
symbol: string;
|
|
4
|
+
image: string;
|
|
5
|
+
address: string | null;
|
|
6
|
+
usdPrice: number | null;
|
|
7
|
+
isSecondaryCoin: boolean;
|
|
8
|
+
coinSource: string | null;
|
|
9
|
+
coinSourceUrl: string | null;
|
|
10
|
+
name: string | null;
|
|
11
|
+
decimals: number;
|
|
12
|
+
balance?: { amount: string; usdPrice: string };
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export interface LiquiditySource {
|
|
16
|
+
title: string;
|
|
17
|
+
logo: string;
|
|
18
|
+
type: 'BRIDGE' | 'AGGREGATOR' | 'DEX';
|
|
19
|
+
selected: boolean;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export type LoadingStatus = 'loading' | 'success' | 'failed';
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BestRouteResponse,
|
|
3
|
+
BlockchainValidationStatus,
|
|
4
|
+
SimulationResult,
|
|
5
|
+
SwapResult,
|
|
6
|
+
WalletRequiredAssets,
|
|
7
|
+
} from 'rango-sdk';
|
|
8
|
+
export type SwapStatus = 'running' | 'failed' | 'success';
|
|
9
|
+
export type MessageSeverity = 'error' | 'warning' | 'info' | 'success';
|
|
10
|
+
|
|
11
|
+
export type StepStatus =
|
|
12
|
+
| 'created'
|
|
13
|
+
| 'running'
|
|
14
|
+
| 'failed'
|
|
15
|
+
| 'success'
|
|
16
|
+
| 'waitingForApproval'
|
|
17
|
+
| 'approved';
|
|
18
|
+
|
|
19
|
+
export enum PendingSwapNetworkStatus {
|
|
20
|
+
WaitingForConnectingWallet = 'waitingForConnectingWallet',
|
|
21
|
+
WaitingForQueue = 'waitingForQueue',
|
|
22
|
+
WaitingForNetworkChange = 'waitingForNetworkChange',
|
|
23
|
+
NetworkChanged = 'networkChanged',
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type WalletTypeAndAddress = {
|
|
27
|
+
walletType: string;
|
|
28
|
+
address: string;
|
|
29
|
+
};
|
|
30
|
+
export type SwapSavedSettings = {
|
|
31
|
+
slippage: string;
|
|
32
|
+
disabledSwappersIds: string[];
|
|
33
|
+
disabledSwappersGroups: string[];
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export type SimulationAssetAndAmount = WalletRequiredAssets;
|
|
37
|
+
export type SimulationValidationStatus = BlockchainValidationStatus;
|
|
38
|
+
export type BestRouteType = BestRouteResponse;
|
|
39
|
+
|
|
40
|
+
export type BestRouteWithFee = Omit<BestRouteResponse, 'result'> & {
|
|
41
|
+
result: Omit<SimulationResult, 'swaps'> & {
|
|
42
|
+
swaps: (SwapResult & { feeInUsd?: string })[];
|
|
43
|
+
};
|
|
44
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { InstallObjects, WalletType } from '@rango-dev/wallets-shared';
|
|
2
|
+
|
|
3
|
+
export enum WalletState {
|
|
4
|
+
NOT_INSTALLED = 'not installed',
|
|
5
|
+
DISCONNECTED = 'disconnected',
|
|
6
|
+
CONNECTING = 'connecting',
|
|
7
|
+
CONNECTED = 'connected',
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export type WalletInfo = {
|
|
11
|
+
state:
|
|
12
|
+
| WalletState.CONNECTED
|
|
13
|
+
| WalletState.DISCONNECTED
|
|
14
|
+
| WalletState.CONNECTING
|
|
15
|
+
| WalletState.NOT_INSTALLED;
|
|
16
|
+
installLink: InstallObjects | string;
|
|
17
|
+
name: string;
|
|
18
|
+
image: string;
|
|
19
|
+
type: WalletType;
|
|
20
|
+
showOnMobile: boolean;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export interface SelectableWallet {
|
|
24
|
+
chain: string;
|
|
25
|
+
walletType: WalletType;
|
|
26
|
+
address: string;
|
|
27
|
+
image: string;
|
|
28
|
+
selected: boolean;
|
|
29
|
+
name: string;
|
|
30
|
+
}
|