@rango-dev/ui 0.1.14 → 0.1.16-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Alert/Alert.d.ts +7 -7
- package/dist/components/Alert/Alert.stories.d.ts +7 -5
- package/dist/components/Alert/LoadingFailedAlert.d.ts +2 -2
- package/dist/components/Alert/NotFoundAlert.d.ts +7 -7
- package/dist/components/Alert/index.d.ts +2 -2
- package/dist/components/BestRoute/BestRoute.d.ts +15 -12
- package/dist/components/BestRoute/BestRoute.stories.d.ts +10 -8
- package/dist/components/BestRoute/index.d.ts +1 -1
- package/dist/components/BestRoute/mock.d.ts +4 -4
- package/dist/components/BlockchainsList/BlockchainsList.d.ts +10 -10
- package/dist/components/BlockchainsList/BlockchainsList.stories.d.ts +5 -5
- package/dist/components/BlockchainsList/index.d.ts +1 -1
- package/dist/components/BlockchainsList/mockData.d.ts +2 -2
- package/dist/components/Button/Button.d.ts +17 -17
- package/dist/components/Button/Button.stories.d.ts +10 -8
- package/dist/components/Button/index.d.ts +1 -1
- package/dist/components/Checkbox/Checkbox.d.ts +11 -11
- package/dist/components/Checkbox/Checkbox.stories.d.ts +7 -5
- package/dist/components/Checkbox/index.d.ts +1 -1
- package/dist/components/Chip/Chip.d.ts +12 -12
- package/dist/components/Chip/Chip.stories.d.ts +7 -7
- package/dist/components/Chip/index.d.ts +1 -1
- package/dist/components/ColorPicker/ColorPicker.d.ts +9 -9
- package/dist/components/ColorPicker/ColorPicker.stories.d.ts +5 -5
- package/dist/components/ColorPicker/index.d.ts +1 -1
- package/dist/components/Divider/Divider.d.ts +6 -6
- package/dist/components/Divider/index.d.ts +1 -1
- package/dist/components/Drawer/Drawer.d.ts +13 -13
- package/dist/components/Drawer/Drawer.stories.d.ts +8 -8
- package/dist/components/Drawer/index.d.ts +1 -1
- package/dist/components/Header/Header.d.ts +9 -9
- package/dist/components/Header/index.d.ts +1 -1
- package/dist/components/Icon/AddCircleIcon.d.ts +3 -3
- package/dist/components/Icon/AddIcon.d.ts +3 -3
- package/dist/components/Icon/AddWalletIcon.d.ts +3 -3
- package/dist/components/Icon/AngleDownIcon.d.ts +3 -3
- package/dist/components/Icon/AngleLeftIcon.d.ts +3 -3
- package/dist/components/Icon/AngleRightIcon.d.ts +3 -3
- package/dist/components/Icon/AngleUpIcon.d.ts +3 -3
- package/dist/components/Icon/ArrowRightIcon.d.ts +3 -3
- package/dist/components/Icon/BagIcon.d.ts +3 -3
- package/dist/components/Icon/BanIcon.d.ts +3 -3
- package/dist/components/Icon/CheckCircleIcon.d.ts +3 -3
- package/dist/components/Icon/CheckIcon.d.ts +3 -3
- package/dist/components/Icon/CheckSquareIcon.d.ts +3 -3
- package/dist/components/Icon/CheckWalletIcon.d.ts +3 -3
- package/dist/components/Icon/ChevronRightIcon.d.ts +3 -3
- package/dist/components/Icon/CloseIcon.d.ts +112 -1
- package/dist/components/Icon/CopyIcon.d.ts +3 -3
- package/dist/components/Icon/DeleteCircleIcon.d.ts +3 -3
- package/dist/components/Icon/DeleteWalletIcon.d.ts +3 -3
- package/dist/components/Icon/DisconnectIcon.d.ts +3 -3
- package/dist/components/Icon/DownloadIcon.d.ts +3 -3
- package/dist/components/Icon/GasIcon.d.ts +3 -3
- package/dist/components/Icon/HistoryIcon.d.ts +3 -3
- package/dist/components/Icon/HorizontalSwapIcon.d.ts +3 -3
- package/dist/components/Icon/Icons.stories.d.ts +5 -5
- package/dist/components/Icon/InfoCircleIcon.d.ts +3 -3
- package/dist/components/Icon/MinusCircleIcon.d.ts +3 -3
- package/dist/components/Icon/RetryIcon.d.ts +3 -3
- package/dist/components/Icon/RetryLeftIcon.d.ts +3 -3
- package/dist/components/Icon/RetryRightIcon.d.ts +3 -3
- package/dist/components/Icon/SearchIcon.d.ts +3 -3
- package/dist/components/Icon/SearchMinusIcon.d.ts +3 -3
- package/dist/components/Icon/SettingIcon.d.ts +3 -3
- package/dist/components/Icon/SignatureIcon.d.ts +3 -3
- package/dist/components/Icon/SwapWalletIcon.d.ts +3 -3
- package/dist/components/Icon/TimeIcon.d.ts +3 -3
- package/dist/components/Icon/TrashIcon.d.ts +3 -3
- package/dist/components/Icon/TryAgainIcon.d.ts +3 -3
- package/dist/components/Icon/VerticalSwapIcon.d.ts +3 -3
- package/dist/components/Icon/WalletIconIcon.d.ts +3 -3
- package/dist/components/Icon/WarningIcon.d.ts +3 -3
- package/dist/components/Icon/common.d.ts +228 -2
- package/dist/components/Icon/index.d.ts +40 -40
- package/dist/components/Icon/types.d.ts +7 -7
- package/dist/components/LiquiditySourceList/LiquiditySource.stories.d.ts +5 -5
- package/dist/components/LiquiditySourceList/LiquiditySourceList.d.ts +11 -11
- package/dist/components/LiquiditySourceList/index.d.ts +1 -1
- package/dist/components/LiquiditySourceList/mockData.d.ts +2 -2
- package/dist/components/Modal/Modal.d.ts +11 -11
- package/dist/components/Modal/Modal.stories.d.ts +5 -5
- package/dist/components/Modal/index.d.ts +1 -1
- package/dist/components/Radio/Radio.d.ts +13 -13
- package/dist/components/Radio/Radio.stories.d.ts +5 -5
- package/dist/components/Radio/index.d.ts +1 -1
- package/dist/components/SecondaryPage/SecondaryPage.d.ts +16 -16
- package/dist/components/SecondaryPage/SecondaryPage.stories.d.ts +5 -2
- package/dist/components/SecondaryPage/index.d.ts +1 -1
- package/dist/components/SelectableWalletList/SelectableWalletList.d.ts +7 -7
- package/dist/components/SelectableWalletList/SelectableWalletList.stories.d.ts +7 -5
- package/dist/components/SelectableWalletList/index.d.ts +1 -1
- package/dist/components/SelectableWalletList/mock.d.ts +2 -2
- package/dist/components/Skeleton/Skeleton.d.ts +6 -6
- package/dist/components/Skeleton/Skeleton.stories.d.ts +5 -5
- package/dist/components/Skeleton/index.d.ts +1 -1
- package/dist/components/Spinner/Spinner.d.ts +6 -6
- package/dist/components/Spinner/Spinner.stories.d.ts +5 -5
- package/dist/components/Spinner/index.d.ts +1 -1
- package/dist/components/StatusDrawer/StatusDrawer.d.ts +11 -11
- package/dist/components/StatusDrawer/StatusDrawer.stories.d.ts +5 -5
- package/dist/components/StatusDrawer/index.d.ts +1 -1
- package/dist/components/StepDetail/StepDetail.d.ts +12 -12
- package/dist/components/StepDetail/StepDetail.stories.d.ts +7 -5
- package/dist/components/StepDetail/index.d.ts +1 -1
- package/dist/components/SwapContainer/SwapContainer.d.ts +7 -7
- package/dist/components/SwapContainer/index.d.ts +1 -1
- package/dist/components/SwapDetail/SwapDetail.d.ts +8 -8
- package/dist/components/SwapDetail/SwapDetail.stories.d.ts +7 -5
- package/dist/components/SwapDetail/Token.d.ts +17 -17
- package/dist/components/SwapDetail/index.d.ts +1 -1
- package/dist/components/SwapDetail/mock.d.ts +2 -2
- package/dist/components/Switch/Switch.d.ts +6 -6
- package/dist/components/Switch/Switch.stories.d.ts +5 -5
- package/dist/components/Switch/index.d.ts +1 -1
- package/dist/components/TextField/TextField.d.ts +10 -10
- package/dist/components/TextField/TextField.stories.d.ts +7 -7
- package/dist/components/TextField/index.d.ts +1 -1
- package/dist/components/TokenList/TokenItem.d.ts +11 -11
- package/dist/components/TokenList/TokenList.d.ts +17 -17
- package/dist/components/TokenList/TokenList.stories.d.ts +5 -5
- package/dist/components/TokenList/index.d.ts +1 -1
- package/dist/components/TokenList/mockData.d.ts +2 -2
- package/dist/components/Tooltip/Tooltip.d.ts +7 -7
- package/dist/components/Tooltip/Tooltip.stories.d.ts +7 -5
- package/dist/components/Tooltip/index.d.ts +1 -1
- package/dist/components/Typography/Typography.d.ts +18 -18
- package/dist/components/Typography/Typography.stories.d.ts +7 -5
- package/dist/components/Typography/index.d.ts +1 -1
- package/dist/components/VirtualizedList/VirtualizedList.d.ts +17 -17
- package/dist/components/Wallet/State.d.ts +7 -7
- package/dist/components/Wallet/Wallet.d.ts +7 -7
- package/dist/components/Wallet/Wallet.stories.d.ts +7 -5
- package/dist/components/Wallet/index.d.ts +1 -1
- package/dist/components/common/FilledCircle.d.ts +111 -1
- package/dist/components/common/Image.d.ts +6 -6
- package/dist/components/common/index.d.ts +2 -2
- package/dist/components/index.d.ts +25 -31
- package/dist/{components → containers}/BlockchainSelector/BlockchainSelector.d.ts +17 -17
- package/dist/{components → containers}/BlockchainSelector/BlockchainSelector.stories.d.ts +5 -5
- package/dist/containers/ConfirmSwap/ConfirmSwap.d.ts +22 -22
- package/dist/containers/ConfirmSwap/ConfirmSwap.stories.d.ts +8 -6
- package/dist/containers/ConfirmSwap/index.d.ts +1 -1
- package/dist/containers/ConfirmSwap/mock.d.ts +5 -5
- package/dist/{components → containers}/ConnectWalletsModal/ConnectWallets.stories.d.ts +5 -5
- package/dist/{components → containers}/ConnectWalletsModal/ConnectWalletsModal.d.ts +11 -11
- package/dist/{components → containers}/ConnectWalletsModal/mockData.d.ts +2 -2
- package/dist/containers/History/History.d.ts +6 -6
- package/dist/containers/History/History.stories.d.ts +9 -5
- package/dist/containers/History/SwapsGroup.d.ts +13 -13
- package/dist/containers/History/index.d.ts +3 -2
- package/dist/containers/History/mock.d.ts +2 -2
- package/dist/containers/History/types.d.ts +39 -39
- package/dist/{components → containers}/LiquiditySourcesSelector/LiquiditySourcesSelector.d.ts +13 -13
- package/dist/{components → containers}/LiquiditySourcesSelector/LiquiditySourcesSelector.stories.d.ts +5 -5
- package/dist/{components → containers}/Settings/Settings.d.ts +24 -24
- package/dist/{components → containers}/Settings/Settings.stories.d.ts +5 -5
- package/dist/containers/SwapHistory/SwapHistory.d.ts +1128 -24
- package/dist/containers/SwapHistory/SwapHistory.stories.d.ts +14 -5
- package/dist/containers/SwapHistory/SwapMessages.d.ts +17 -17
- package/dist/containers/SwapHistory/index.d.ts +1 -1
- package/dist/containers/SwapHistory/mock.d.ts +2 -2
- package/dist/containers/TokenSelector/TokenSelector.d.ts +124 -0
- package/dist/{components → containers}/TokenSelector/TokenSelector.stories.d.ts +5 -5
- package/dist/containers/index.d.ts +8 -3
- package/dist/helper/index.d.ts +6 -6
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/useCopyToClipboard.d.ts +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.js +20 -8
- package/dist/index.js.map +7 -0
- package/dist/theme.d.ts +928 -8
- package/dist/types/index.d.ts +2 -2
- package/dist/types/meta.d.ts +23 -23
- package/dist/types/swaps.d.ts +29 -29
- package/dist/types/wallet.d.ts +23 -23
- package/package.json +18 -38
- package/src/components/Alert/Alert.stories.tsx +19 -6
- package/src/components/Alert/Alert.tsx +3 -3
- package/src/components/BestRoute/BestRoute.stories.tsx +15 -5
- package/src/components/BestRoute/mock.ts +1 -1
- package/src/components/BlockchainsList/BlockchainsList.stories.tsx +9 -3
- package/src/components/BlockchainsList/mockData.ts +603 -108
- package/src/components/Button/Button.stories.tsx +8 -3
- package/src/components/Checkbox/Checkbox.stories.tsx +6 -2
- package/src/components/Chip/Chip.stories.tsx +23 -7
- package/src/components/ColorPicker/ColorPicker.stories.tsx +6 -3
- package/src/components/Divider/Divider.tsx +113 -11
- package/src/components/Drawer/Drawer.stories.tsx +8 -11
- package/src/components/Icon/Icons.stories.tsx +8 -4
- package/src/components/LiquiditySourceList/LiquiditySource.stories.tsx +6 -3
- package/src/components/LiquiditySourceList/LiquiditySourceList.tsx +3 -3
- package/src/components/Modal/Modal.stories.tsx +9 -10
- package/src/components/Radio/Radio.stories.tsx +12 -7
- package/src/components/SecondaryPage/SecondaryPage.stories.tsx +12 -3
- package/src/components/SelectableWalletList/SelectableWalletList.stories.tsx +2 -2
- package/src/components/SelectableWalletList/mock.ts +2 -2
- package/src/components/Skeleton/Skeleton.stories.tsx +6 -2
- package/src/components/Spinner/Spinner.stories.tsx +6 -2
- package/src/components/StatusDrawer/StatusDrawer.stories.tsx +7 -2
- package/src/components/StatusDrawer/StatusDrawer.tsx +2 -2
- package/src/components/StepDetail/StepDetail.stories.tsx +9 -2
- package/src/components/SwapDetail/SwapDetail.stories.tsx +5 -2
- package/src/components/SwapDetail/SwapDetail.tsx +3 -3
- package/src/components/SwapDetail/Token.tsx +4 -4
- package/src/components/Switch/Switch.stories.tsx +2 -2
- package/src/components/TextField/TextField.stories.tsx +3 -2
- package/src/components/TokenList/TokenList.stories.tsx +3 -3
- package/src/components/Tooltip/Tooltip.stories.tsx +7 -2
- package/src/components/Typography/Typography.stories.tsx +2 -2
- package/src/components/Wallet/Wallet.stories.tsx +7 -13
- package/src/components/index.ts +0 -6
- package/src/containers/BlockchainSelector/BlockchainSelector.stories.tsx +41 -0
- package/src/{components → containers}/BlockchainSelector/BlockchainSelector.tsx +5 -5
- package/{dist/components/BlockchainSelector/index.d.ts → src/containers/BlockchainSelector/index.ts} +1 -1
- package/src/containers/ConfirmSwap/ConfirmSwap.stories.tsx +223 -10
- package/src/containers/ConfirmSwap/ConfirmSwap.tsx +21 -12
- package/src/containers/ConfirmSwap/mock.ts +12 -15
- package/src/containers/ConnectWalletsModal/ConnectWallets.stories.tsx +24 -0
- package/src/{components → containers}/ConnectWalletsModal/ConnectWalletsModal.tsx +3 -3
- package/{dist/components/ConnectWalletsModal/index.d.ts → src/containers/ConnectWalletsModal/index.ts} +1 -1
- package/src/{components → containers}/ConnectWalletsModal/mockData.ts +17 -17
- package/src/containers/History/History.stories.tsx +2 -2
- package/src/containers/History/History.tsx +1 -1
- package/src/containers/History/index.ts +2 -1
- package/src/containers/History/mock.ts +3 -3
- package/src/containers/History/types.tsx +1 -1
- package/src/{components → containers}/LiquiditySourcesSelector/LiquiditySourcesSelector.stories.tsx +7 -4
- package/src/{components → containers}/LiquiditySourcesSelector/LiquiditySourcesSelector.tsx +2 -3
- package/{dist/components/LiquiditySourcesSelector/index.d.ts → src/containers/LiquiditySourcesSelector/index.ts} +1 -1
- package/src/containers/Settings/Settings.stories.tsx +27 -0
- package/src/{components → containers}/Settings/Settings.tsx +11 -8
- package/{dist/components/Settings/index.d.ts → src/containers/Settings/index.ts} +1 -1
- package/src/containers/SwapHistory/SwapHistory.stories.tsx +3 -3
- package/src/containers/SwapHistory/SwapHistory.tsx +4 -5
- package/src/containers/SwapHistory/mock.ts +2 -2
- package/src/{components → containers}/TokenSelector/TokenSelector.stories.tsx +7 -8
- package/src/{components → containers}/TokenSelector/TokenSelector.tsx +7 -6
- package/{dist/components/TokenSelector/index.d.ts → src/containers/TokenSelector/index.ts} +1 -1
- package/src/containers/index.ts +5 -0
- package/src/theme.ts +14 -22
- package/src/types/index.ts +1 -1
- package/dist/components/Spacer/Spacer.d.ts +0 -6
- package/dist/components/Spacer/Spacer.stories.d.ts +0 -5
- package/dist/components/Spacer/index.d.ts +0 -1
- package/dist/components/SwapContainer/SwapContainer.stories.d.ts +0 -5
- package/dist/components/TokenSelector/TokenSelector.d.ts +0 -14
- package/dist/ui.cjs.development.js +0 -5181
- package/dist/ui.cjs.development.js.map +0 -1
- package/dist/ui.cjs.production.min.js +0 -2
- package/dist/ui.cjs.production.min.js.map +0 -1
- package/dist/ui.esm.js +0 -5091
- package/dist/ui.esm.js.map +0 -1
- package/src/components/BlockchainSelector/BlockchainSelector.stories.tsx +0 -25
- package/src/components/ConnectWalletsModal/ConnectWallets.stories.tsx +0 -13
- package/src/components/Settings/Settings.stories.tsx +0 -34
- package/src/components/Spacer/Spacer.stories.tsx +0 -31
- package/src/components/Spacer/Spacer.tsx +0 -128
- package/src/components/Spacer/index.ts +0 -1
- package/src/components/SwapContainer/SwapContainer.stories.tsx +0 -13
- /package/{src/components/BlockchainSelector/index.ts → dist/containers/BlockchainSelector/index.d.ts} +0 -0
- /package/{src/components/ConnectWalletsModal/index.ts → dist/containers/ConnectWalletsModal/index.d.ts} +0 -0
- /package/{src/components/LiquiditySourcesSelector/index.ts → dist/containers/LiquiditySourcesSelector/index.d.ts} +0 -0
- /package/{src/components/Settings/index.ts → dist/containers/Settings/index.d.ts} +0 -0
- /package/{src/components/TokenSelector/index.ts → dist/containers/TokenSelector/index.d.ts} +0 -0
|
@@ -31,8 +31,7 @@ export const bestRoute: BestRouteType = {
|
|
|
31
31
|
to: {
|
|
32
32
|
symbol: 'WETH.E',
|
|
33
33
|
logo: 'https://api.rango.exchange/i/j9xgdC',
|
|
34
|
-
blockchainLogo:
|
|
35
|
-
'https://api.rango.exchange/blockchains/avax_cchain.svg',
|
|
34
|
+
blockchainLogo: 'https://api.rango.exchange/blockchains/avax_cchain.svg',
|
|
36
35
|
|
|
37
36
|
address: '0x49d5c2bdffac6ce2bfdb6640f4f80f226bc10bab',
|
|
38
37
|
blockchain: 'AVAX_CCHAIN',
|
|
@@ -73,8 +72,7 @@ export const bestRoute: BestRouteType = {
|
|
|
73
72
|
blockchain: 'AVAX_CCHAIN',
|
|
74
73
|
decimals: 18,
|
|
75
74
|
usdPrice: 1329.24,
|
|
76
|
-
blockchainLogo:
|
|
77
|
-
'https://api.rango.exchange/blockchains/avax_cchain.svg',
|
|
75
|
+
blockchainLogo: 'https://api.rango.exchange/blockchains/avax_cchain.svg',
|
|
78
76
|
},
|
|
79
77
|
to: {
|
|
80
78
|
symbol: 'AVAX',
|
|
@@ -83,8 +81,7 @@ export const bestRoute: BestRouteType = {
|
|
|
83
81
|
blockchain: 'AVAX_CCHAIN',
|
|
84
82
|
decimals: 18,
|
|
85
83
|
usdPrice: 12.5,
|
|
86
|
-
blockchainLogo:
|
|
87
|
-
'https://api.rango.exchange/blockchains/avax_cchain.svg',
|
|
84
|
+
blockchainLogo: 'https://api.rango.exchange/blockchains/avax_cchain.svg',
|
|
88
85
|
},
|
|
89
86
|
fromAmount: '0.062064305934309070',
|
|
90
87
|
fromAmountPrecision: null,
|
|
@@ -153,14 +150,14 @@ export const bestRoute: BestRouteType = {
|
|
|
153
150
|
|
|
154
151
|
export const wallets: SelectableWallet[] = [
|
|
155
152
|
{
|
|
156
|
-
walletType:
|
|
153
|
+
walletType: WalletTypes.META_MASK,
|
|
157
154
|
address: '0x5423e28219d6d568dcf62a8134d623e6f4a1c2df',
|
|
158
155
|
image: 'https://app.rango.exchange/wallets/metamask.svg',
|
|
159
156
|
chain: 'BSC',
|
|
160
157
|
selected: false,
|
|
161
158
|
},
|
|
162
159
|
{
|
|
163
|
-
walletType:
|
|
160
|
+
walletType: WalletTypes.OKX,
|
|
164
161
|
address: '0x2702d89c1c8658b49c45dd460deebcc45faec03c',
|
|
165
162
|
image: 'https://app.rango.exchange/wallets/okx.png',
|
|
166
163
|
chain: 'BSC',
|
|
@@ -168,7 +165,7 @@ export const wallets: SelectableWallet[] = [
|
|
|
168
165
|
},
|
|
169
166
|
|
|
170
167
|
{
|
|
171
|
-
walletType:
|
|
168
|
+
walletType: WalletTypes.KEPLR,
|
|
172
169
|
address: 'osmo1unf2rcytjxfpz8x8ar63h4qeftadptg5t0nqcl',
|
|
173
170
|
image: 'https://app.rango.exchange/wallets/keplr.png',
|
|
174
171
|
chain: 'OSMOSIS',
|
|
@@ -178,35 +175,35 @@ export const wallets: SelectableWallet[] = [
|
|
|
178
175
|
|
|
179
176
|
export const exampleFor5Wallets: SelectableWallet[] = [
|
|
180
177
|
{
|
|
181
|
-
walletType:
|
|
178
|
+
walletType: WalletTypes.META_MASK,
|
|
182
179
|
address: '0x5423e28219d6d568dcf62a8134d623e6f4a1c2df',
|
|
183
180
|
image: 'https://app.rango.exchange/wallets/metamask.svg',
|
|
184
181
|
selected: false,
|
|
185
182
|
chain: 'BSC',
|
|
186
183
|
},
|
|
187
184
|
{
|
|
188
|
-
walletType:
|
|
185
|
+
walletType: WalletTypes.OKX,
|
|
189
186
|
address: '0x2702d89c1c8658b49c45dd460deebcc45faec03c',
|
|
190
187
|
image: 'https://app.rango.exchange/wallets/okx.png',
|
|
191
188
|
selected: false,
|
|
192
189
|
chain: 'BSC',
|
|
193
190
|
},
|
|
194
191
|
{
|
|
195
|
-
walletType:
|
|
192
|
+
walletType: WalletTypes.EXODUS,
|
|
196
193
|
address: '0x2702d89c1c8658b49c45dd460deebcc45faec03c',
|
|
197
194
|
image: 'https://app.rango.exchange/wallets/exodus.png',
|
|
198
195
|
selected: false,
|
|
199
196
|
chain: 'BSC',
|
|
200
197
|
},
|
|
201
198
|
{
|
|
202
|
-
walletType:
|
|
199
|
+
walletType: WalletTypes.MATH,
|
|
203
200
|
address: '0x2702d89c1c8658b49c45dd460deebcc45faec03c',
|
|
204
201
|
image: 'https://app.rango.exchange/wallets/math-wallet.png',
|
|
205
202
|
selected: false,
|
|
206
203
|
chain: 'BSC',
|
|
207
204
|
},
|
|
208
205
|
{
|
|
209
|
-
walletType:
|
|
206
|
+
walletType: WalletTypes.CLOVER,
|
|
210
207
|
address: '0x2702d89c1c8658b49c45dd460deebcc45faec03c',
|
|
211
208
|
image: 'https://app.rango.exchange/wallets/clover.jpeg',
|
|
212
209
|
selected: false,
|
|
@@ -214,7 +211,7 @@ export const exampleFor5Wallets: SelectableWallet[] = [
|
|
|
214
211
|
},
|
|
215
212
|
|
|
216
213
|
{
|
|
217
|
-
walletType:
|
|
214
|
+
walletType: WalletTypes.KEPLR,
|
|
218
215
|
address: 'osmo1unf2rcytjxfpz8x8ar63h4qeftadptg5t0nqcl',
|
|
219
216
|
image: 'https://app.rango.exchange/wallets/keplr.png',
|
|
220
217
|
selected: false,
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { Meta } from '@storybook/react';
|
|
3
|
+
import { ConnectWalletsModal, PropTypes } from './ConnectWalletsModal';
|
|
4
|
+
import { walletsInfo } from './mockData';
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
title: 'Containers/Connect Wallets Modal',
|
|
8
|
+
component: ConnectWalletsModal,
|
|
9
|
+
} as Meta<typeof ConnectWalletsModal>;
|
|
10
|
+
|
|
11
|
+
export const Main = (args: PropTypes) => {
|
|
12
|
+
const [open, setOpen] = useState<boolean>(false);
|
|
13
|
+
return (
|
|
14
|
+
<div>
|
|
15
|
+
<button onClick={() => setOpen(true)}>Open Modal</button>
|
|
16
|
+
<ConnectWalletsModal
|
|
17
|
+
{...args}
|
|
18
|
+
list={walletsInfo}
|
|
19
|
+
open={open}
|
|
20
|
+
onClose={() => setOpen(false)}
|
|
21
|
+
/>
|
|
22
|
+
</div>
|
|
23
|
+
);
|
|
24
|
+
};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { styled } from '../../theme';
|
|
3
3
|
import { WalletInfo } from '../../types/wallet';
|
|
4
|
-
import { Modal } from '../Modal';
|
|
5
4
|
import { WalletType } from '@rango-dev/wallets-shared';
|
|
6
|
-
import { Wallet } from '
|
|
5
|
+
import { Modal, Wallet } from '../../components';
|
|
7
6
|
|
|
8
7
|
export interface PropTypes {
|
|
9
8
|
open: boolean;
|
|
@@ -17,6 +16,7 @@ const ModalContent = styled('div', {
|
|
|
17
16
|
display: 'grid',
|
|
18
17
|
gap: '$8',
|
|
19
18
|
gridTemplateColumns: 'repeat(2, minmax(0, 1fr))',
|
|
19
|
+
overflow: 'auto',
|
|
20
20
|
});
|
|
21
21
|
|
|
22
22
|
export function ConnectWalletsModal(props: PropTypes) {
|
|
@@ -36,7 +36,7 @@ export function ConnectWalletsModal(props: PropTypes) {
|
|
|
36
36
|
open={open}
|
|
37
37
|
content={Content}
|
|
38
38
|
onClose={onClose}
|
|
39
|
-
containerStyle={{ width: '75%', maxWidth: '30rem', height: '
|
|
39
|
+
containerStyle={{ width: '75%', maxWidth: '30rem', height: '60%' }}
|
|
40
40
|
/>
|
|
41
41
|
);
|
|
42
42
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ConnectWalletsModal } from './ConnectWalletsModal';
|
|
1
|
+
export { ConnectWalletsModal } from './ConnectWalletsModal';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { WalletInfo, WalletState } from '../../types/wallet';
|
|
2
|
-
import {
|
|
2
|
+
import { WalletTypes } from '@rango-dev/wallets-shared';
|
|
3
3
|
|
|
4
4
|
export const walletsInfo: WalletInfo[] = [
|
|
5
5
|
{
|
|
@@ -7,7 +7,7 @@ export const walletsInfo: WalletInfo[] = [
|
|
|
7
7
|
name: 'Coinbase',
|
|
8
8
|
state: WalletState.DISCONNECTED,
|
|
9
9
|
installLink: '',
|
|
10
|
-
type:
|
|
10
|
+
type: WalletTypes.COINBASE,
|
|
11
11
|
showOnMobile: true,
|
|
12
12
|
},
|
|
13
13
|
{
|
|
@@ -15,7 +15,7 @@ export const walletsInfo: WalletInfo[] = [
|
|
|
15
15
|
name: 'Coinbase',
|
|
16
16
|
state: WalletState.CONNECTED,
|
|
17
17
|
installLink: '',
|
|
18
|
-
type:
|
|
18
|
+
type: WalletTypes.COINBASE,
|
|
19
19
|
showOnMobile: true,
|
|
20
20
|
},
|
|
21
21
|
{
|
|
@@ -23,14 +23,14 @@ export const walletsInfo: WalletInfo[] = [
|
|
|
23
23
|
name: 'Coinbase',
|
|
24
24
|
state: WalletState.CONNECTING,
|
|
25
25
|
installLink: '',
|
|
26
|
-
type:
|
|
26
|
+
type: WalletTypes.COINBASE,
|
|
27
27
|
showOnMobile: true,
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
image: 'https://app.rango.exchange/wallets/coinbase.svg',
|
|
31
31
|
name: 'Coinbase',
|
|
32
32
|
state: WalletState.NOT_INSTALLED,
|
|
33
|
-
type:
|
|
33
|
+
type: WalletTypes.COINBASE,
|
|
34
34
|
showOnMobile: true,
|
|
35
35
|
installLink:
|
|
36
36
|
'https://chrome.google.com/webstore/detail/coinbase-wallet-extension/hnfanknocfeofbddgcijnmhnfnkdnaad?hl=en',
|
|
@@ -40,7 +40,7 @@ export const walletsInfo: WalletInfo[] = [
|
|
|
40
40
|
name: 'Coinbase',
|
|
41
41
|
state: WalletState.DISCONNECTED,
|
|
42
42
|
installLink: '',
|
|
43
|
-
type:
|
|
43
|
+
type: WalletTypes.COINBASE,
|
|
44
44
|
showOnMobile: true,
|
|
45
45
|
},
|
|
46
46
|
{
|
|
@@ -48,7 +48,7 @@ export const walletsInfo: WalletInfo[] = [
|
|
|
48
48
|
name: 'Coinbase',
|
|
49
49
|
state: WalletState.CONNECTED,
|
|
50
50
|
installLink: '',
|
|
51
|
-
type:
|
|
51
|
+
type: WalletTypes.COINBASE,
|
|
52
52
|
showOnMobile: true,
|
|
53
53
|
},
|
|
54
54
|
{
|
|
@@ -56,7 +56,7 @@ export const walletsInfo: WalletInfo[] = [
|
|
|
56
56
|
name: 'Coinbase',
|
|
57
57
|
state: WalletState.DISCONNECTED,
|
|
58
58
|
installLink: '',
|
|
59
|
-
type:
|
|
59
|
+
type: WalletTypes.COINBASE,
|
|
60
60
|
showOnMobile: true,
|
|
61
61
|
},
|
|
62
62
|
{
|
|
@@ -64,7 +64,7 @@ export const walletsInfo: WalletInfo[] = [
|
|
|
64
64
|
name: 'Coinbase',
|
|
65
65
|
state: WalletState.DISCONNECTED,
|
|
66
66
|
installLink: '',
|
|
67
|
-
type:
|
|
67
|
+
type: WalletTypes.COINBASE,
|
|
68
68
|
showOnMobile: true,
|
|
69
69
|
},
|
|
70
70
|
{
|
|
@@ -72,7 +72,7 @@ export const walletsInfo: WalletInfo[] = [
|
|
|
72
72
|
name: 'Coinbase',
|
|
73
73
|
state: WalletState.DISCONNECTED,
|
|
74
74
|
installLink: '',
|
|
75
|
-
type:
|
|
75
|
+
type: WalletTypes.COINBASE,
|
|
76
76
|
showOnMobile: true,
|
|
77
77
|
},
|
|
78
78
|
{
|
|
@@ -80,7 +80,7 @@ export const walletsInfo: WalletInfo[] = [
|
|
|
80
80
|
name: 'Coinbase',
|
|
81
81
|
state: WalletState.DISCONNECTED,
|
|
82
82
|
installLink: '',
|
|
83
|
-
type:
|
|
83
|
+
type: WalletTypes.COINBASE,
|
|
84
84
|
showOnMobile: true,
|
|
85
85
|
},
|
|
86
86
|
{
|
|
@@ -88,7 +88,7 @@ export const walletsInfo: WalletInfo[] = [
|
|
|
88
88
|
name: 'Coinbase',
|
|
89
89
|
state: WalletState.DISCONNECTED,
|
|
90
90
|
installLink: '',
|
|
91
|
-
type:
|
|
91
|
+
type: WalletTypes.COINBASE,
|
|
92
92
|
showOnMobile: true,
|
|
93
93
|
},
|
|
94
94
|
{
|
|
@@ -96,7 +96,7 @@ export const walletsInfo: WalletInfo[] = [
|
|
|
96
96
|
name: 'Coinbase',
|
|
97
97
|
state: WalletState.DISCONNECTED,
|
|
98
98
|
installLink: '',
|
|
99
|
-
type:
|
|
99
|
+
type: WalletTypes.COINBASE,
|
|
100
100
|
showOnMobile: true,
|
|
101
101
|
},
|
|
102
102
|
{
|
|
@@ -104,7 +104,7 @@ export const walletsInfo: WalletInfo[] = [
|
|
|
104
104
|
name: 'Coinbase',
|
|
105
105
|
state: WalletState.DISCONNECTED,
|
|
106
106
|
installLink: '',
|
|
107
|
-
type:
|
|
107
|
+
type: WalletTypes.COINBASE,
|
|
108
108
|
showOnMobile: true,
|
|
109
109
|
},
|
|
110
110
|
{
|
|
@@ -112,7 +112,7 @@ export const walletsInfo: WalletInfo[] = [
|
|
|
112
112
|
name: 'Coinbase',
|
|
113
113
|
state: WalletState.DISCONNECTED,
|
|
114
114
|
installLink: '',
|
|
115
|
-
type:
|
|
115
|
+
type: WalletTypes.COINBASE,
|
|
116
116
|
showOnMobile: true,
|
|
117
117
|
},
|
|
118
118
|
{
|
|
@@ -120,7 +120,7 @@ export const walletsInfo: WalletInfo[] = [
|
|
|
120
120
|
name: 'Coinbase',
|
|
121
121
|
state: WalletState.DISCONNECTED,
|
|
122
122
|
installLink: '',
|
|
123
|
-
type:
|
|
123
|
+
type: WalletTypes.COINBASE,
|
|
124
124
|
showOnMobile: true,
|
|
125
125
|
},
|
|
126
126
|
{
|
|
@@ -128,7 +128,7 @@ export const walletsInfo: WalletInfo[] = [
|
|
|
128
128
|
name: 'Coinbase',
|
|
129
129
|
state: WalletState.DISCONNECTED,
|
|
130
130
|
installLink: '',
|
|
131
|
-
type:
|
|
131
|
+
type: WalletTypes.COINBASE,
|
|
132
132
|
showOnMobile: true,
|
|
133
133
|
},
|
|
134
134
|
];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Meta } from '@storybook/react';
|
|
3
3
|
|
|
4
4
|
import { History, PropTypes } from './History';
|
|
5
5
|
import { pendingSwap } from './mock';
|
|
@@ -7,7 +7,7 @@ import { pendingSwap } from './mock';
|
|
|
7
7
|
export default {
|
|
8
8
|
title: 'Containers/History',
|
|
9
9
|
component: History,
|
|
10
|
-
} as
|
|
10
|
+
} as Meta<typeof History>;
|
|
11
11
|
|
|
12
12
|
export const Main = (props: PropTypes) => (
|
|
13
13
|
<History {...props} list={pendingSwap} />
|
|
@@ -5,8 +5,8 @@ import { containsText } from '../../helper';
|
|
|
5
5
|
import { styled } from '../../theme';
|
|
6
6
|
import { PendingSwap } from './types';
|
|
7
7
|
import { NotFoundAlert } from '../../components/Alert/NotFoundAlert';
|
|
8
|
-
import { LoaderContainer } from '../../components/TokenSelector/TokenSelector';
|
|
9
8
|
import { SwapsGroup, PropTypes as SwapsGroupPropTypes } from './SwapsGroup';
|
|
9
|
+
import { LoaderContainer } from '../TokenSelector/TokenSelector';
|
|
10
10
|
|
|
11
11
|
const Container = styled('div', {
|
|
12
12
|
overflowY: 'auto',
|
|
@@ -172,7 +172,7 @@ export const pendingSwap: PendingSwap[] = [
|
|
|
172
172
|
toLogo: 'https://api.rango.exchange/i/mJQPS2',
|
|
173
173
|
startTransactionTime: 1673164519916,
|
|
174
174
|
swapperId: 'Osmosis',
|
|
175
|
-
swapperLogo: '',
|
|
175
|
+
swapperLogo: 'https://api.rango.exchange/swappers/osmosis.png',
|
|
176
176
|
expectedOutputAmountHumanReadable: '1.540670',
|
|
177
177
|
outputAmount: '1.540658',
|
|
178
178
|
status: 'running',
|
|
@@ -307,7 +307,7 @@ export const pendingSwap: PendingSwap[] = [
|
|
|
307
307
|
swaps: [
|
|
308
308
|
{
|
|
309
309
|
swapperId: 'Osmosis',
|
|
310
|
-
swapperLogo: '',
|
|
310
|
+
swapperLogo: 'https://api.rango.exchange/swappers/osmosis.png',
|
|
311
311
|
swapperType: 'DEX',
|
|
312
312
|
from: {
|
|
313
313
|
symbol: 'JUNO',
|
|
@@ -581,7 +581,7 @@ export const pendingSwap: PendingSwap[] = [
|
|
|
581
581
|
{
|
|
582
582
|
swapperId: 'Osmosis',
|
|
583
583
|
swapperType: 'DEX',
|
|
584
|
-
swapperLogo: '',
|
|
584
|
+
swapperLogo: 'https://api.rango.exchange/swappers/osmosis.png',
|
|
585
585
|
|
|
586
586
|
from: {
|
|
587
587
|
symbol: 'JUNO',
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
Transfer,
|
|
8
8
|
} from 'rango-sdk';
|
|
9
9
|
import { PendingSwapNetworkStatus, StepStatus } from '../../types/swaps';
|
|
10
|
-
export { PendingSwap } from '@rango-dev/queue-manager-rango-preset';
|
|
10
|
+
export type { PendingSwap } from '@rango-dev/queue-manager-rango-preset';
|
|
11
11
|
|
|
12
12
|
export type PendingSwapStep = {
|
|
13
13
|
id: number;
|
package/src/{components → containers}/LiquiditySourcesSelector/LiquiditySourcesSelector.stories.tsx
RENAMED
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Meta } from '@storybook/react';
|
|
3
3
|
import {
|
|
4
4
|
LiquiditySourcesSelector,
|
|
5
5
|
PropTypes,
|
|
6
6
|
} from './LiquiditySourcesSelector';
|
|
7
|
-
import { liquiditySources } from '
|
|
7
|
+
import { liquiditySources } from '../../components/LiquiditySourceList/mockData';
|
|
8
8
|
|
|
9
9
|
export default {
|
|
10
|
-
title: 'Liquidity Sources Selector',
|
|
10
|
+
title: 'Containers/Liquidity Sources Selector',
|
|
11
11
|
component: LiquiditySourcesSelector,
|
|
12
|
-
|
|
12
|
+
args: {
|
|
13
|
+
loadingStatus: 'success',
|
|
14
|
+
},
|
|
15
|
+
} as Meta<typeof LiquiditySourcesSelector>;
|
|
13
16
|
|
|
14
17
|
export const Main = (args: PropTypes) => (
|
|
15
18
|
<LiquiditySourcesSelector {...args} list={liquiditySources} />
|
|
@@ -2,9 +2,8 @@ import { CSSProperties } from '@stitches/react';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { containsText } from '../../helper';
|
|
4
4
|
import { LiquiditySource, LoadingStatus } from '../../types/meta';
|
|
5
|
-
import { Button } from '
|
|
6
|
-
import { LiquiditySourceList } from '
|
|
7
|
-
import { SecondaryPage } from '../SecondaryPage/SecondaryPage';
|
|
5
|
+
import { Button, SecondaryPage } from '../../components';
|
|
6
|
+
import { LiquiditySourceList } from '../../components/LiquiditySourceList';
|
|
8
7
|
|
|
9
8
|
const filterLiquiditySources = (
|
|
10
9
|
liquiditySources: LiquiditySource[],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { LiquiditySourcesSelector } from './LiquiditySourcesSelector';
|
|
1
|
+
export { LiquiditySourcesSelector } from './LiquiditySourcesSelector';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Meta } from '@storybook/react';
|
|
3
|
+
import { Settings, PropTypes } from './Settings';
|
|
4
|
+
import { liquiditySources } from '../../components/LiquiditySourceList/mockData';
|
|
5
|
+
import { SwapContainer } from '../../components';
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
title: 'Containers/Settings',
|
|
9
|
+
component: Settings,
|
|
10
|
+
args: {
|
|
11
|
+
slippages: [0.5, 1, 3, 5, 8, 13, 20],
|
|
12
|
+
selectedSlippage: 3,
|
|
13
|
+
minSlippage: 1,
|
|
14
|
+
maxSlippage: 10,
|
|
15
|
+
},
|
|
16
|
+
} as Meta<typeof Settings>;
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
export const Main = (args: PropTypes) => (
|
|
20
|
+
<SwapContainer>
|
|
21
|
+
<Settings
|
|
22
|
+
{...args}
|
|
23
|
+
liquiditySources={liquiditySources}
|
|
24
|
+
selectedLiquiditySources={liquiditySources.slice(0, 5)}
|
|
25
|
+
/>
|
|
26
|
+
</SwapContainer>
|
|
27
|
+
);
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { styled } from '../../theme';
|
|
2
2
|
import React, { useState } from 'react';
|
|
3
|
-
|
|
4
|
-
import { SecondaryPage } from '../SecondaryPage/SecondaryPage';
|
|
5
|
-
import { Typography } from '../Typography';
|
|
6
|
-
import { Chip } from '../Chip';
|
|
3
|
+
|
|
7
4
|
import { LiquiditySource, LoadingStatus } from '../../types/meta';
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
import {
|
|
6
|
+
AngleRightIcon,
|
|
7
|
+
Button,
|
|
8
|
+
Chip,
|
|
9
|
+
Radio,
|
|
10
|
+
SecondaryPage,
|
|
11
|
+
Switch,
|
|
12
|
+
TextField,
|
|
13
|
+
Typography,
|
|
14
|
+
} from '../../components';
|
|
12
15
|
|
|
13
16
|
const BaseContainer = styled('div', {
|
|
14
17
|
borderRadius: '$5',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Settings } from './Settings';
|
|
1
|
+
export { Settings } from './Settings';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Meta } from '@storybook/react';
|
|
3
3
|
import { PropTypes, SwapHistory } from './SwapHistory';
|
|
4
4
|
import { pendingSwap } from './mock';
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
|
-
title: 'Swap History',
|
|
7
|
+
title: 'Containers/Swap History',
|
|
8
8
|
component: SwapHistory,
|
|
9
|
-
} as
|
|
9
|
+
} as Meta<typeof SwapHistory>;
|
|
10
10
|
|
|
11
11
|
export const Main = (args: PropTypes) => (
|
|
12
12
|
<SwapHistory {...args} pendingSwap={pendingSwap} />
|
|
@@ -6,12 +6,11 @@ import {
|
|
|
6
6
|
Typography,
|
|
7
7
|
CheckCircleIcon,
|
|
8
8
|
InfoCircleIcon,
|
|
9
|
-
|
|
9
|
+
Divider,
|
|
10
10
|
Button,
|
|
11
11
|
Alert,
|
|
12
12
|
Drawer,
|
|
13
13
|
Spinner,
|
|
14
|
-
Divider,
|
|
15
14
|
Image,
|
|
16
15
|
} from '../../components';
|
|
17
16
|
import { styled } from '../../theme';
|
|
@@ -53,7 +52,7 @@ export const ErrorMsg = styled(Typography, {
|
|
|
53
52
|
|
|
54
53
|
export const FeeContainer = styled('div', {
|
|
55
54
|
paddingLeft: '$16',
|
|
56
|
-
color: '$neutral800'
|
|
55
|
+
color: '$neutral800',
|
|
57
56
|
});
|
|
58
57
|
|
|
59
58
|
export const Fee = styled('div', {
|
|
@@ -243,7 +242,7 @@ export function SwapHistory(props: PropTypes) {
|
|
|
243
242
|
onClick={onCopy.bind(null, pendingSwap?.requestId)}
|
|
244
243
|
>
|
|
245
244
|
<RequestId>{pendingSwap?.requestId}</RequestId>
|
|
246
|
-
<
|
|
245
|
+
<Divider size={4} direction="horizontal" />
|
|
247
246
|
<Button type="primary" variant="ghost" size="compact">
|
|
248
247
|
{isCopied ? 'Copied!' : 'Copy'}
|
|
249
248
|
</Button>
|
|
@@ -408,7 +407,7 @@ export function SwapHistory(props: PropTypes) {
|
|
|
408
407
|
>
|
|
409
408
|
Skip
|
|
410
409
|
</Button>
|
|
411
|
-
<
|
|
410
|
+
<Divider size={16} direction="horizontal" />
|
|
412
411
|
<Button
|
|
413
412
|
variant="contained"
|
|
414
413
|
type="error"
|
|
@@ -34,7 +34,7 @@ export const pendingSwap: PendingSwap = {
|
|
|
34
34
|
{
|
|
35
35
|
swapperId: 'Osmosis',
|
|
36
36
|
swapperType: 'DEX',
|
|
37
|
-
swapperLogo: '',
|
|
37
|
+
swapperLogo: 'https://api.rango.exchange/swappers/osmosis.png',
|
|
38
38
|
from: {
|
|
39
39
|
symbol: 'JUNO',
|
|
40
40
|
logo: 'https://api.rango.exchange/tokens/COSMOS/JUNO.png',
|
|
@@ -171,7 +171,7 @@ export const pendingSwap: PendingSwap = {
|
|
|
171
171
|
toLogo: 'https://api.rango.exchange/i/mJQPS2',
|
|
172
172
|
startTransactionTime: 1673164519916,
|
|
173
173
|
swapperId: 'Osmosis',
|
|
174
|
-
swapperLogo: '',
|
|
174
|
+
swapperLogo: 'https://api.rango.exchange/swappers/osmosis.png',
|
|
175
175
|
expectedOutputAmountHumanReadable: '1.540670',
|
|
176
176
|
outputAmount: '1.540658',
|
|
177
177
|
status: 'running',
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Meta } from '@storybook/react';
|
|
3
3
|
import { TokenSelector, PropTypes } from './TokenSelector';
|
|
4
|
-
import { tokensMeta } from '
|
|
4
|
+
import { tokensMeta } from '../../components/TokenList/mockData';
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
|
-
title: 'Token Selector',
|
|
7
|
+
title: 'Containers/Token Selector',
|
|
8
8
|
component: TokenSelector,
|
|
9
|
-
|
|
10
|
-
type:
|
|
11
|
-
|
|
12
|
-
},
|
|
9
|
+
args: {
|
|
10
|
+
type: 'Source',
|
|
11
|
+
loadingStatus: 'success',
|
|
13
12
|
},
|
|
14
|
-
} as
|
|
13
|
+
} as Meta<typeof TokenSelector>;
|
|
15
14
|
|
|
16
15
|
export const Main = (args: PropTypes) => (
|
|
17
16
|
<TokenSelector {...args} list={tokensMeta} selected={tokensMeta[0]} />
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { containsText } from '../../helper';
|
|
3
|
-
|
|
4
|
-
import { TokenList } from '../TokenList';
|
|
5
|
-
import { TokenWithAmount } from '../TokenList/TokenList';
|
|
3
|
+
|
|
6
4
|
import { LoadingStatus } from '../../types/meta';
|
|
7
|
-
import { Spinner } from '../Spinner';
|
|
8
|
-
import { LoadingFailedAlert } from '../Alert/LoadingFailedAlert';
|
|
9
|
-
import { NotFoundAlert } from '../Alert/NotFoundAlert';
|
|
10
5
|
import { styled } from '../../theme';
|
|
6
|
+
import { NotFoundAlert } from '../../components/Alert/NotFoundAlert';
|
|
7
|
+
import { LoadingFailedAlert, SecondaryPage, Spinner } from '../../components';
|
|
8
|
+
import {
|
|
9
|
+
TokenList,
|
|
10
|
+
TokenWithAmount,
|
|
11
|
+
} from '../../components/TokenList/TokenList';
|
|
11
12
|
|
|
12
13
|
export const LoaderContainer = styled('div', {
|
|
13
14
|
display: 'flex',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { TokenSelector } from './TokenSelector';
|
|
1
|
+
export { TokenSelector } from './TokenSelector';
|
package/src/containers/index.ts
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
export * from './ConfirmSwap';
|
|
2
2
|
export * from './History';
|
|
3
3
|
export * from './SwapHistory';
|
|
4
|
+
export * from './BlockchainSelector';
|
|
5
|
+
export * from './ConnectWalletsModal';
|
|
6
|
+
export * from './LiquiditySourcesSelector';
|
|
7
|
+
export * from './TokenSelector';
|
|
8
|
+
export * from './Settings';
|