@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,36 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ComponentMeta } from '@storybook/react';
|
|
3
|
+
|
|
4
|
+
import { PropTypes, Wallet } from './Wallet';
|
|
5
|
+
import { WalletState } from '../../types/wallet';
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
title: 'Wallet chip',
|
|
9
|
+
component: Wallet,
|
|
10
|
+
argTypes: {
|
|
11
|
+
title: {
|
|
12
|
+
name: 'title',
|
|
13
|
+
type: 'string',
|
|
14
|
+
defaultValue: 'Coinbase',
|
|
15
|
+
},
|
|
16
|
+
image: {
|
|
17
|
+
name: 'image',
|
|
18
|
+
type: 'string',
|
|
19
|
+
defaultValue: 'https://app.rango.exchange/wallets/coinbase.svg',
|
|
20
|
+
},
|
|
21
|
+
disabled: {
|
|
22
|
+
name: 'disabled',
|
|
23
|
+
type: 'boolean',
|
|
24
|
+
defaultValue: false,
|
|
25
|
+
},
|
|
26
|
+
state: {
|
|
27
|
+
name: 'wallet state',
|
|
28
|
+
control: {
|
|
29
|
+
type: 'select',
|
|
30
|
+
},
|
|
31
|
+
options: Object.values(WalletState),
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
} as ComponentMeta<typeof Wallet>;
|
|
35
|
+
|
|
36
|
+
export const Main = (args: PropTypes) => <Wallet {...args}></Wallet>;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { detectInstallLink, WalletType } from '@rango-dev/wallets-shared';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
import { styled } from '../../theme';
|
|
5
|
+
import { WalletInfo, WalletState } from '../../types/wallet';
|
|
6
|
+
import { Button } from '../Button/Button';
|
|
7
|
+
import { Typography } from '../Typography';
|
|
8
|
+
import { State } from './State';
|
|
9
|
+
|
|
10
|
+
const WalletImage = styled('img', {
|
|
11
|
+
width: '$24',
|
|
12
|
+
height: '$24',
|
|
13
|
+
marginRight: '$12',
|
|
14
|
+
});
|
|
15
|
+
const Text = styled('div', {
|
|
16
|
+
display: 'flex',
|
|
17
|
+
flexDirection: 'column',
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
const ExtendedButton = styled(Button, {
|
|
21
|
+
variants: {
|
|
22
|
+
type: {
|
|
23
|
+
primary: {
|
|
24
|
+
outline: '1px solid $primary',
|
|
25
|
+
borderColor: '$primary',
|
|
26
|
+
|
|
27
|
+
'&:hover': {
|
|
28
|
+
borderColor: '$primary',
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
export type PropTypes = WalletInfo & {
|
|
36
|
+
onClick: (walletType: WalletType) => void;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export function Wallet(props: PropTypes) {
|
|
40
|
+
const { name, type, image, state, onClick, installLink } = props;
|
|
41
|
+
|
|
42
|
+
return (
|
|
43
|
+
<ExtendedButton
|
|
44
|
+
type={state === WalletState.CONNECTED ? 'primary' : undefined}
|
|
45
|
+
disabled={state == WalletState.CONNECTING}
|
|
46
|
+
onClick={() => {
|
|
47
|
+
if (state === WalletState.NOT_INSTALLED) {
|
|
48
|
+
window.open(detectInstallLink(installLink), '_blank');
|
|
49
|
+
} else onClick(type);
|
|
50
|
+
}}
|
|
51
|
+
align="start"
|
|
52
|
+
variant="outlined"
|
|
53
|
+
size="large"
|
|
54
|
+
prefix={<WalletImage src={image} />}
|
|
55
|
+
suffix={<State walletState={state} installLink={installLink} />}
|
|
56
|
+
>
|
|
57
|
+
<Text>
|
|
58
|
+
<Typography variant="h5" noWrap={false}>
|
|
59
|
+
{name}
|
|
60
|
+
</Typography>
|
|
61
|
+
{state === WalletState.CONNECTED ? (
|
|
62
|
+
<Typography variant="caption" noWrap={false} color="primary">
|
|
63
|
+
Connected
|
|
64
|
+
</Typography>
|
|
65
|
+
) : null}
|
|
66
|
+
</Text>
|
|
67
|
+
</ExtendedButton>
|
|
68
|
+
);
|
|
69
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Wallet';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { FilledCircle } from './FilledCircle';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export * from './BestRoute';
|
|
2
|
+
export * from './BlockchainSelector';
|
|
3
|
+
export * from './Button';
|
|
4
|
+
export * from './Checkbox';
|
|
5
|
+
export * from './Chip';
|
|
6
|
+
export * from './ConnectWalletsModal';
|
|
7
|
+
export * from './Icon';
|
|
8
|
+
export * from './LiquiditySourcesSelector';
|
|
9
|
+
export * from './Modal';
|
|
10
|
+
export * from './SecondaryPage';
|
|
11
|
+
export * from './SelectableWalletList';
|
|
12
|
+
export * from './Settings';
|
|
13
|
+
export * from './Spacer';
|
|
14
|
+
export * from './Spinner';
|
|
15
|
+
export * from './StepDetail';
|
|
16
|
+
export * from './SwapContainer';
|
|
17
|
+
export * from './SwapDetail';
|
|
18
|
+
export * from './Switch';
|
|
19
|
+
export * from './TextField';
|
|
20
|
+
export * from './TokenSelector';
|
|
21
|
+
export * from './Tooltip';
|
|
22
|
+
export * from './Typography';
|
|
23
|
+
export * from './Wallet';
|
|
24
|
+
export * from './Alert';
|
|
25
|
+
export * from './ColorPicker';
|
|
26
|
+
export * from './Radio';
|
|
27
|
+
export * from './TokenList';
|
|
28
|
+
export * from './common';
|
|
29
|
+
export * from './Drawer';
|
|
30
|
+
export * from './Header';
|
|
31
|
+
export * from './Divider';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ComponentMeta } from '@storybook/react';
|
|
3
|
+
import { ConfirmSwap, PropTypes } from './ConfirmSwap';
|
|
4
|
+
import { exampleFor5Wallets, wallets } from './mock';
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
title: 'Containers/ConfirmSwap',
|
|
8
|
+
component: ConfirmSwap,
|
|
9
|
+
argTypes: {
|
|
10
|
+
requiredWallets: {
|
|
11
|
+
defaultValue: ['BSC', 'OSMOSIS'],
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
} as ComponentMeta<typeof ConfirmSwap>;
|
|
15
|
+
|
|
16
|
+
export const Main = (props: PropTypes) => (
|
|
17
|
+
<ConfirmSwap {...props} selectableWallets={wallets} />
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
export const With5Wallets = (props: PropTypes) => (
|
|
21
|
+
<ConfirmSwap {...props} selectableWallets={exampleFor5Wallets} />
|
|
22
|
+
);
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import React, { PropsWithChildren, ReactNode } from 'react';
|
|
2
|
+
import { Alert, Spacer } from '../../components';
|
|
3
|
+
import { Button } from '../../components/Button';
|
|
4
|
+
import { SecondaryPage } from '../../components/SecondaryPage/SecondaryPage';
|
|
5
|
+
import { SelectableWalletList } from '../../components/SelectableWalletList';
|
|
6
|
+
import { Typography } from '../../components/Typography';
|
|
7
|
+
import { styled } from '../../theme';
|
|
8
|
+
import { SelectableWallet } from '../../types';
|
|
9
|
+
|
|
10
|
+
const MainContainer = styled('div', {
|
|
11
|
+
overflowY: 'auto',
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
const Section = styled('div', {
|
|
15
|
+
paddingBottom: '$32',
|
|
16
|
+
marginBottom: '$32',
|
|
17
|
+
borderBottom: '1px solid $neutrals400',
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
const Footer = styled('div', {
|
|
21
|
+
display: 'flex',
|
|
22
|
+
alignItems: 'center',
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
const AlertContainer = styled('div', {
|
|
26
|
+
padding: '$16 0',
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
const ConfirmButton = styled(Button, {
|
|
30
|
+
marginTop: '$16',
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
const Container = styled('div', {
|
|
34
|
+
paddingBottom: '$24',
|
|
35
|
+
|
|
36
|
+
'.title': {
|
|
37
|
+
paddingBottom: '$8',
|
|
38
|
+
display: 'flex',
|
|
39
|
+
alignItems: 'center',
|
|
40
|
+
},
|
|
41
|
+
'.num': {
|
|
42
|
+
backgroundColor: '$neutrals300',
|
|
43
|
+
display: 'inline-flex',
|
|
44
|
+
width: '24px',
|
|
45
|
+
height: '24px',
|
|
46
|
+
color: '$neutrals800',
|
|
47
|
+
borderRadius: '50%',
|
|
48
|
+
fontSize: '$14',
|
|
49
|
+
border: '1px solid $neutrals400',
|
|
50
|
+
justifyContent: 'center',
|
|
51
|
+
alignItems: 'center',
|
|
52
|
+
},
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
const Alerts = styled('div', { paddingBottom: '$16' });
|
|
56
|
+
|
|
57
|
+
export interface PropTypes {
|
|
58
|
+
onBack: () => void;
|
|
59
|
+
onConfirm?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
60
|
+
confirmDisabled?: boolean;
|
|
61
|
+
loading?: boolean;
|
|
62
|
+
requiredWallets: string[];
|
|
63
|
+
selectableWallets: SelectableWallet[];
|
|
64
|
+
onChange: (w: SelectableWallet) => void;
|
|
65
|
+
isExperimentalChain?: (wallet: string) => boolean;
|
|
66
|
+
handleConnectChain?: (wallet: string) => void;
|
|
67
|
+
previewInputs?: ReactNode;
|
|
68
|
+
previewRoutes?: ReactNode;
|
|
69
|
+
confirmButtonTitle: string;
|
|
70
|
+
errors?: ReactNode[];
|
|
71
|
+
warnings?: ReactNode[];
|
|
72
|
+
extraMessages?: ReactNode;
|
|
73
|
+
}
|
|
74
|
+
export function ConfirmSwap(props: PropsWithChildren<PropTypes>) {
|
|
75
|
+
const {
|
|
76
|
+
onBack,
|
|
77
|
+
loading,
|
|
78
|
+
onConfirm,
|
|
79
|
+
requiredWallets,
|
|
80
|
+
selectableWallets,
|
|
81
|
+
onChange,
|
|
82
|
+
confirmDisabled,
|
|
83
|
+
isExperimentalChain,
|
|
84
|
+
handleConnectChain,
|
|
85
|
+
confirmButtonTitle,
|
|
86
|
+
errors,
|
|
87
|
+
warnings,
|
|
88
|
+
extraMessages,
|
|
89
|
+
} = props;
|
|
90
|
+
|
|
91
|
+
return (
|
|
92
|
+
<SecondaryPage
|
|
93
|
+
textField={false}
|
|
94
|
+
title="Confirm Swap"
|
|
95
|
+
onBack={onBack}
|
|
96
|
+
Footer={
|
|
97
|
+
<Footer>
|
|
98
|
+
<ConfirmButton
|
|
99
|
+
fullWidth
|
|
100
|
+
loading={loading}
|
|
101
|
+
type="primary"
|
|
102
|
+
variant="contained"
|
|
103
|
+
onClick={onConfirm}
|
|
104
|
+
disabled={confirmDisabled}
|
|
105
|
+
>
|
|
106
|
+
{confirmButtonTitle}
|
|
107
|
+
</ConfirmButton>
|
|
108
|
+
</Footer>
|
|
109
|
+
}
|
|
110
|
+
>
|
|
111
|
+
<MainContainer>
|
|
112
|
+
<div>
|
|
113
|
+
{extraMessages || null}
|
|
114
|
+
<Alerts>
|
|
115
|
+
{errors?.map((error, index) => (
|
|
116
|
+
<>
|
|
117
|
+
<Spacer direction="vertical" />
|
|
118
|
+
<Alert type="error" key={index}>
|
|
119
|
+
{error}
|
|
120
|
+
</Alert>
|
|
121
|
+
</>
|
|
122
|
+
))}
|
|
123
|
+
{warnings?.map((warning, index) => (
|
|
124
|
+
<>
|
|
125
|
+
<Spacer direction="vertical" />
|
|
126
|
+
<Alert type="warning" key={index}>
|
|
127
|
+
{warning}
|
|
128
|
+
</Alert>
|
|
129
|
+
</>
|
|
130
|
+
))}
|
|
131
|
+
</Alerts>
|
|
132
|
+
</div>
|
|
133
|
+
{props.previewInputs || props.previewRoutes ? (
|
|
134
|
+
<Section>
|
|
135
|
+
{props.previewInputs}
|
|
136
|
+
{!!props.previewRoutes ? (
|
|
137
|
+
<Spacer size={16} direction="vertical" />
|
|
138
|
+
) : null}
|
|
139
|
+
{props.previewRoutes}
|
|
140
|
+
</Section>
|
|
141
|
+
) : null}
|
|
142
|
+
|
|
143
|
+
{requiredWallets.map((wallet, index) => {
|
|
144
|
+
const list = selectableWallets.filter((w) => wallet === w.chain);
|
|
145
|
+
return (
|
|
146
|
+
<Container key={index}>
|
|
147
|
+
<div className="title">
|
|
148
|
+
<div className="num">{index + 1}</div>
|
|
149
|
+
<Spacer size={8} />
|
|
150
|
+
<Typography variant="body2">Your {wallet} Wallet</Typography>
|
|
151
|
+
</div>
|
|
152
|
+
{list.length === 0 && (
|
|
153
|
+
<>
|
|
154
|
+
<AlertContainer>
|
|
155
|
+
<Alert type="error">
|
|
156
|
+
You need to connect a compatible wallet with {wallet}
|
|
157
|
+
</Alert>
|
|
158
|
+
</AlertContainer>
|
|
159
|
+
{isExperimentalChain?.(wallet) && (
|
|
160
|
+
<Button
|
|
161
|
+
variant="contained"
|
|
162
|
+
type="primary"
|
|
163
|
+
align="grow"
|
|
164
|
+
onClick={() => handleConnectChain?.(wallet)}
|
|
165
|
+
>
|
|
166
|
+
{`Add ${wallet} chain to Cosmos wallets`}
|
|
167
|
+
</Button>
|
|
168
|
+
)}
|
|
169
|
+
</>
|
|
170
|
+
)}
|
|
171
|
+
{list.length != 0 && (
|
|
172
|
+
<SelectableWalletList list={list} onChange={onChange} />
|
|
173
|
+
)}
|
|
174
|
+
</Container>
|
|
175
|
+
);
|
|
176
|
+
})}
|
|
177
|
+
</MainContainer>
|
|
178
|
+
</SecondaryPage>
|
|
179
|
+
);
|
|
180
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ConfirmSwap } from './ConfirmSwap';
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { WalletType } from '@rango-dev/wallets-shared';
|
|
3
|
+
import { RoutingResultType } from 'rango-sdk';
|
|
4
|
+
import { BestRouteType } from '../../types/swaps';
|
|
5
|
+
import { SelectableWallet } from '../../types';
|
|
6
|
+
|
|
7
|
+
export const bestRoute: BestRouteType = {
|
|
8
|
+
from: { blockchain: 'BSC', symbol: 'BNB', address: null },
|
|
9
|
+
to: { blockchain: 'AVAX_CCHAIN', symbol: 'AVAX', address: null },
|
|
10
|
+
requestAmount: '0.3',
|
|
11
|
+
requestId: '228529e3-27d7-4fa9-ab84-bb2b90eade6f',
|
|
12
|
+
result: {
|
|
13
|
+
resultType: RoutingResultType.OK,
|
|
14
|
+
outputAmount: '5.685715974132648891',
|
|
15
|
+
swaps: [
|
|
16
|
+
{
|
|
17
|
+
swapperId: 'AnySwap Aggregator',
|
|
18
|
+
swapperType: 'AGGREGATOR',
|
|
19
|
+
swapperLogo: 'https://api.rango.exchange/swappers/multichain.png',
|
|
20
|
+
|
|
21
|
+
from: {
|
|
22
|
+
symbol: 'BNB',
|
|
23
|
+
logo: 'https://api.rango.exchange/i/Y3v1KW',
|
|
24
|
+
blockchainLogo: 'https://api.rango.exchange/blockchains/binance.svg',
|
|
25
|
+
|
|
26
|
+
address: null,
|
|
27
|
+
blockchain: 'BSC',
|
|
28
|
+
decimals: 18,
|
|
29
|
+
usdPrice: 279.2738558274085,
|
|
30
|
+
},
|
|
31
|
+
to: {
|
|
32
|
+
symbol: 'WETH.E',
|
|
33
|
+
logo: 'https://api.rango.exchange/i/j9xgdC',
|
|
34
|
+
blockchainLogo:
|
|
35
|
+
'https://api.rango.exchange/blockchains/avax_cchain.svg',
|
|
36
|
+
|
|
37
|
+
address: '0x49d5c2bdffac6ce2bfdb6640f4f80f226bc10bab',
|
|
38
|
+
blockchain: 'AVAX_CCHAIN',
|
|
39
|
+
decimals: 18,
|
|
40
|
+
usdPrice: 1329.24,
|
|
41
|
+
},
|
|
42
|
+
fromAmount: '0.300000000000000000',
|
|
43
|
+
fromAmountPrecision: null,
|
|
44
|
+
fromAmountMinValue: '0.047579322466294684272760',
|
|
45
|
+
fromAmountMaxValue: '79302.26195302606417382090',
|
|
46
|
+
fromAmountRestrictionType: 'INCLUSIVE',
|
|
47
|
+
toAmount: '0.062064305934309070',
|
|
48
|
+
fee: [
|
|
49
|
+
{
|
|
50
|
+
asset: { blockchain: 'BSC', symbol: 'BNB', address: null },
|
|
51
|
+
expenseType: 'FROM_SOURCE_WALLET',
|
|
52
|
+
amount: '0.001388002000000000',
|
|
53
|
+
name: 'Network Fee',
|
|
54
|
+
},
|
|
55
|
+
],
|
|
56
|
+
estimatedTimeInSeconds: 300,
|
|
57
|
+
swapChainType: 'INTRA_CHAIN',
|
|
58
|
+
routes: null,
|
|
59
|
+
recommendedSlippage: null,
|
|
60
|
+
timeStat: { min: 162, avg: 260, max: 467 },
|
|
61
|
+
includesDestinationTx: false,
|
|
62
|
+
maxRequiredSign: 1,
|
|
63
|
+
warnings: [],
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
swapperId: 'PangolinSwap',
|
|
67
|
+
swapperLogo: 'https://api.rango.exchange/swappers/pangolin.png',
|
|
68
|
+
swapperType: 'DEX',
|
|
69
|
+
from: {
|
|
70
|
+
symbol: 'WETH.E',
|
|
71
|
+
logo: 'https://api.rango.exchange/i/j9xgdC',
|
|
72
|
+
address: '0x49d5c2bdffac6ce2bfdb6640f4f80f226bc10bab',
|
|
73
|
+
blockchain: 'AVAX_CCHAIN',
|
|
74
|
+
decimals: 18,
|
|
75
|
+
usdPrice: 1329.24,
|
|
76
|
+
blockchainLogo:
|
|
77
|
+
'https://api.rango.exchange/blockchains/avax_cchain.svg',
|
|
78
|
+
},
|
|
79
|
+
to: {
|
|
80
|
+
symbol: 'AVAX',
|
|
81
|
+
logo: 'https://api.rango.exchange/i/kX4edQ',
|
|
82
|
+
address: null,
|
|
83
|
+
blockchain: 'AVAX_CCHAIN',
|
|
84
|
+
decimals: 18,
|
|
85
|
+
usdPrice: 12.5,
|
|
86
|
+
blockchainLogo:
|
|
87
|
+
'https://api.rango.exchange/blockchains/avax_cchain.svg',
|
|
88
|
+
},
|
|
89
|
+
fromAmount: '0.062064305934309070',
|
|
90
|
+
fromAmountPrecision: null,
|
|
91
|
+
fromAmountMinValue: null,
|
|
92
|
+
fromAmountMaxValue: null,
|
|
93
|
+
fromAmountRestrictionType: 'EXCLUSIVE',
|
|
94
|
+
toAmount: '5.685715974132648891',
|
|
95
|
+
fee: [
|
|
96
|
+
{
|
|
97
|
+
asset: {
|
|
98
|
+
blockchain: 'AVAX_CCHAIN',
|
|
99
|
+
symbol: 'WETH.E',
|
|
100
|
+
address: '0x49d5c2bdffac6ce2bfdb6640f4f80f226bc10bab',
|
|
101
|
+
},
|
|
102
|
+
name: 'Network Fee',
|
|
103
|
+
expenseType: 'DECREASE_FROM_OUTPUT',
|
|
104
|
+
amount:
|
|
105
|
+
'0.00018619291780292721387591870688029381530892436558133340440690517425537109375',
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
asset: { blockchain: 'AVAX_CCHAIN', symbol: 'AVAX', address: null },
|
|
109
|
+
expenseType: 'FROM_SOURCE_WALLET',
|
|
110
|
+
amount: '0.005370022532678750',
|
|
111
|
+
name: 'Network Fee',
|
|
112
|
+
},
|
|
113
|
+
],
|
|
114
|
+
estimatedTimeInSeconds: 45,
|
|
115
|
+
swapChainType: 'INTER_CHAIN',
|
|
116
|
+
routes: [
|
|
117
|
+
{
|
|
118
|
+
nodes: [
|
|
119
|
+
{
|
|
120
|
+
nodes: [
|
|
121
|
+
{
|
|
122
|
+
marketName: 'PangolinSwap',
|
|
123
|
+
marketId: 'PangolinSwap',
|
|
124
|
+
percent: 1.0,
|
|
125
|
+
},
|
|
126
|
+
],
|
|
127
|
+
from: 'WETH.e',
|
|
128
|
+
fromLogo: '',
|
|
129
|
+
fromAddress: '0x49d5c2bdffac6ce2bfdb6640f4f80f226bc10bab',
|
|
130
|
+
fromBlockchain: 'AVAX_CCHAIN',
|
|
131
|
+
to: 'WAVAX',
|
|
132
|
+
toLogo: '',
|
|
133
|
+
toAddress: '0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7',
|
|
134
|
+
toBlockchain: 'AVAX_CCHAIN',
|
|
135
|
+
},
|
|
136
|
+
],
|
|
137
|
+
},
|
|
138
|
+
],
|
|
139
|
+
recommendedSlippage: null,
|
|
140
|
+
timeStat: { min: 6, avg: 39, max: 317 },
|
|
141
|
+
includesDestinationTx: false,
|
|
142
|
+
maxRequiredSign: 1,
|
|
143
|
+
warnings: [],
|
|
144
|
+
},
|
|
145
|
+
],
|
|
146
|
+
},
|
|
147
|
+
validationStatus: null,
|
|
148
|
+
missingBlockchains: [],
|
|
149
|
+
diagnosisMessages: [],
|
|
150
|
+
walletNotSupportingFromBlockchain: false,
|
|
151
|
+
processingLimitReached: false,
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
export const wallets: SelectableWallet[] = [
|
|
155
|
+
{
|
|
156
|
+
walletType: WalletType.META_MASK,
|
|
157
|
+
address: '0x5423e28219d6d568dcf62a8134d623e6f4a1c2df',
|
|
158
|
+
image: 'https://app.rango.exchange/wallets/metamask.svg',
|
|
159
|
+
chain: 'BSC',
|
|
160
|
+
selected: false,
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
walletType: WalletType.OKX,
|
|
164
|
+
address: '0x2702d89c1c8658b49c45dd460deebcc45faec03c',
|
|
165
|
+
image: 'https://app.rango.exchange/wallets/okx.png',
|
|
166
|
+
chain: 'BSC',
|
|
167
|
+
selected: false,
|
|
168
|
+
},
|
|
169
|
+
|
|
170
|
+
{
|
|
171
|
+
walletType: WalletType.KEPLR,
|
|
172
|
+
address: 'osmo1unf2rcytjxfpz8x8ar63h4qeftadptg5t0nqcl',
|
|
173
|
+
image: 'https://app.rango.exchange/wallets/keplr.png',
|
|
174
|
+
chain: 'OSMOSIS',
|
|
175
|
+
selected: false,
|
|
176
|
+
},
|
|
177
|
+
];
|
|
178
|
+
|
|
179
|
+
export const exampleFor5Wallets: SelectableWallet[] = [
|
|
180
|
+
{
|
|
181
|
+
walletType: WalletType.META_MASK,
|
|
182
|
+
address: '0x5423e28219d6d568dcf62a8134d623e6f4a1c2df',
|
|
183
|
+
image: 'https://app.rango.exchange/wallets/metamask.svg',
|
|
184
|
+
selected: false,
|
|
185
|
+
chain: 'BSC',
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
walletType: WalletType.OKX,
|
|
189
|
+
address: '0x2702d89c1c8658b49c45dd460deebcc45faec03c',
|
|
190
|
+
image: 'https://app.rango.exchange/wallets/okx.png',
|
|
191
|
+
selected: false,
|
|
192
|
+
chain: 'BSC',
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
walletType: WalletType.EXODUS,
|
|
196
|
+
address: '0x2702d89c1c8658b49c45dd460deebcc45faec03c',
|
|
197
|
+
image: 'https://app.rango.exchange/wallets/exodus.png',
|
|
198
|
+
selected: false,
|
|
199
|
+
chain: 'BSC',
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
walletType: WalletType.MATH,
|
|
203
|
+
address: '0x2702d89c1c8658b49c45dd460deebcc45faec03c',
|
|
204
|
+
image: 'https://app.rango.exchange/wallets/math-wallet.png',
|
|
205
|
+
selected: false,
|
|
206
|
+
chain: 'BSC',
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
walletType: WalletType.CLOVER,
|
|
210
|
+
address: '0x2702d89c1c8658b49c45dd460deebcc45faec03c',
|
|
211
|
+
image: 'https://app.rango.exchange/wallets/clover.jpeg',
|
|
212
|
+
selected: false,
|
|
213
|
+
chain: 'BSC',
|
|
214
|
+
},
|
|
215
|
+
|
|
216
|
+
{
|
|
217
|
+
walletType: WalletType.KEPLR,
|
|
218
|
+
address: 'osmo1unf2rcytjxfpz8x8ar63h4qeftadptg5t0nqcl',
|
|
219
|
+
image: 'https://app.rango.exchange/wallets/keplr.png',
|
|
220
|
+
selected: false,
|
|
221
|
+
chain: 'OSMOSIS',
|
|
222
|
+
},
|
|
223
|
+
];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ComponentMeta } from '@storybook/react';
|
|
3
|
+
|
|
4
|
+
import { History, PropTypes } from './History';
|
|
5
|
+
import { pendingSwap } from './mock';
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
title: 'Containers/History',
|
|
9
|
+
component: History,
|
|
10
|
+
} as ComponentMeta<typeof History>;
|
|
11
|
+
|
|
12
|
+
export const Main = (props: PropTypes) => (
|
|
13
|
+
<History {...props} list={pendingSwap} />
|
|
14
|
+
);
|