@rango-dev/widget-embedded 0.17.1-next.3 → 0.17.1-next.30

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.
Files changed (312) hide show
  1. package/dist/QueueManager.d.ts +5 -2
  2. package/dist/QueueManager.d.ts.map +1 -1
  3. package/dist/components/AppRouter.d.ts +0 -2
  4. package/dist/components/AppRouter.d.ts.map +1 -1
  5. package/dist/components/AppRoutes.d.ts +1 -6
  6. package/dist/components/AppRoutes.d.ts.map +1 -1
  7. package/dist/components/ConfirmWalletsModal/ConfirmWallets.styles.d.ts +56 -56
  8. package/dist/components/ConfirmWalletsModal/ConfirmWalletsModal.d.ts.map +1 -1
  9. package/dist/components/ConfirmWalletsModal/ConfirmWalletsModal.types.d.ts +0 -2
  10. package/dist/components/ConfirmWalletsModal/ConfirmWalletsModal.types.d.ts.map +1 -1
  11. package/dist/components/ConfirmWalletsModal/WalletList.d.ts.map +1 -1
  12. package/dist/components/ConfirmWalletsModal/WalletList.type.d.ts +1 -4
  13. package/dist/components/ConfirmWalletsModal/WalletList.type.d.ts.map +1 -1
  14. package/dist/components/HeaderButtons/HomeButtons.d.ts.map +1 -1
  15. package/dist/components/Layout/Layout.d.ts.map +1 -1
  16. package/dist/components/Layout/Layout.types.d.ts +2 -2
  17. package/dist/components/Layout/Layout.types.d.ts.map +1 -1
  18. package/dist/components/NotificationContent/NotificationContent.d.ts.map +1 -1
  19. package/dist/components/Quote/Quote.d.ts.map +1 -1
  20. package/dist/components/Quote/Quote.styles.d.ts +159 -0
  21. package/dist/components/Quote/Quote.styles.d.ts.map +1 -1
  22. package/dist/components/Quote/Quote.types.d.ts +0 -1
  23. package/dist/components/Quote/Quote.types.d.ts.map +1 -1
  24. package/dist/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.d.ts.map +1 -1
  25. package/dist/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.helpers.d.ts.map +1 -1
  26. package/dist/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.styles.d.ts.map +1 -1
  27. package/dist/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.types.d.ts +1 -0
  28. package/dist/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.types.d.ts.map +1 -1
  29. package/dist/components/Slippage/Slippage.d.ts.map +1 -1
  30. package/dist/components/SwapDetails/SwapDetails.Placeholder.d.ts.map +1 -1
  31. package/dist/components/SwapDetails/SwapDetails.d.ts.map +1 -1
  32. package/dist/components/SwapDetails/SwapDetails.helpers.d.ts +1 -1
  33. package/dist/components/SwapDetails/SwapDetails.helpers.d.ts.map +1 -1
  34. package/dist/components/SwapDetailsModal/SwapDetailsCompleteModal.d.ts.map +1 -1
  35. package/dist/components/SwapDetailsModal/SwapDetailsModal.helpers.d.ts +1 -1
  36. package/dist/components/SwapDetailsModal/SwapDetailsModal.helpers.d.ts.map +1 -1
  37. package/dist/components/SwapDetailsModal/SwapDetailsModal.types.d.ts +1 -1
  38. package/dist/components/SwapDetailsModal/SwapDetailsModal.types.d.ts.map +1 -1
  39. package/dist/components/SwapsGroup/SwapsGroup.d.ts.map +1 -1
  40. package/dist/components/SwapsGroup/SwapsGroup.styles.d.ts.map +1 -1
  41. package/dist/components/TokenList/TokenList.d.ts.map +1 -1
  42. package/dist/components/TokenList/TokenList.helpers.d.ts +2 -2
  43. package/dist/components/TokenList/TokenList.helpers.d.ts.map +1 -1
  44. package/dist/components/TokenList/TokenList.styles.d.ts.map +1 -1
  45. package/dist/components/TokenList/TokenList.types.d.ts +3 -9
  46. package/dist/components/TokenList/TokenList.types.d.ts.map +1 -1
  47. package/dist/components/TokenList/index.d.ts +0 -1
  48. package/dist/components/TokenList/index.d.ts.map +1 -1
  49. package/dist/components/UpdateUrl.d.ts +1 -6
  50. package/dist/components/UpdateUrl.d.ts.map +1 -1
  51. package/dist/components/WidgetEvents.d.ts.map +1 -1
  52. package/dist/constants/errors.d.ts.map +1 -1
  53. package/dist/constants/index.d.ts +1 -0
  54. package/dist/constants/index.d.ts.map +1 -1
  55. package/dist/constants/navigationRoutes.d.ts +1 -2
  56. package/dist/constants/navigationRoutes.d.ts.map +1 -1
  57. package/dist/constants/searchParams.d.ts +2 -1
  58. package/dist/constants/searchParams.d.ts.map +1 -1
  59. package/dist/containers/App/App.d.ts +3 -0
  60. package/dist/containers/App/App.d.ts.map +1 -0
  61. package/dist/containers/App/App.styles.d.ts +158 -0
  62. package/dist/containers/App/App.styles.d.ts.map +1 -0
  63. package/dist/containers/App/index.d.ts +2 -0
  64. package/dist/containers/App/index.d.ts.map +1 -0
  65. package/dist/containers/QuoteInfo/QuoteInfo.d.ts.map +1 -1
  66. package/dist/containers/QuoteInfo/QuoteInfo.styles.d.ts +316 -0
  67. package/dist/containers/QuoteInfo/QuoteInfo.styles.d.ts.map +1 -1
  68. package/dist/containers/QuoteInfo/QuoteInfo.types.d.ts +3 -0
  69. package/dist/containers/QuoteInfo/QuoteInfo.types.d.ts.map +1 -1
  70. package/dist/containers/Wallets/Wallets.d.ts +6 -0
  71. package/dist/containers/Wallets/Wallets.d.ts.map +1 -0
  72. package/dist/containers/Wallets/Wallets.types.d.ts +11 -0
  73. package/dist/containers/Wallets/Wallets.types.d.ts.map +1 -0
  74. package/dist/containers/Wallets/index.d.ts +2 -0
  75. package/dist/containers/Wallets/index.d.ts.map +1 -0
  76. package/dist/containers/Widget/Widget.d.ts +5 -0
  77. package/dist/containers/Widget/Widget.d.ts.map +1 -0
  78. package/dist/containers/Widget/Widget.types.d.ts +5 -0
  79. package/dist/containers/Widget/Widget.types.d.ts.map +1 -0
  80. package/dist/containers/Widget/index.d.ts +3 -0
  81. package/dist/containers/Widget/index.d.ts.map +1 -0
  82. package/dist/containers/WidgetInfo/WidgetInfo.d.ts +6 -0
  83. package/dist/containers/WidgetInfo/WidgetInfo.d.ts.map +1 -0
  84. package/dist/containers/WidgetInfo/WidgetInfo.helpers.d.ts +20 -0
  85. package/dist/containers/WidgetInfo/WidgetInfo.helpers.d.ts.map +1 -0
  86. package/dist/containers/WidgetInfo/WidgetInfo.types.d.ts +21 -0
  87. package/dist/containers/WidgetInfo/WidgetInfo.types.d.ts.map +1 -0
  88. package/dist/containers/WidgetInfo/index.d.ts +2 -0
  89. package/dist/containers/WidgetInfo/index.d.ts.map +1 -0
  90. package/dist/containers/WidgetProvider/WidgetProvider.d.ts +5 -0
  91. package/dist/containers/WidgetProvider/WidgetProvider.d.ts.map +1 -0
  92. package/dist/containers/WidgetProvider/WidgetProvider.types.d.ts +7 -0
  93. package/dist/containers/WidgetProvider/WidgetProvider.types.d.ts.map +1 -0
  94. package/dist/containers/WidgetProvider/index.d.ts +2 -0
  95. package/dist/containers/WidgetProvider/index.d.ts.map +1 -0
  96. package/dist/hooks/useConfirmSwap/useConfirmSwap.d.ts.map +1 -1
  97. package/dist/hooks/useConfirmSwap/useConfirmSwap.helpers.d.ts +6 -3
  98. package/dist/hooks/useConfirmSwap/useConfirmSwap.helpers.d.ts.map +1 -1
  99. package/dist/hooks/useConfirmSwap/useConfirmSwap.types.d.ts +1 -1
  100. package/dist/hooks/useConfirmSwap/useConfirmSwap.types.d.ts.map +1 -1
  101. package/dist/hooks/useForceAutoConnect.d.ts +2 -0
  102. package/dist/hooks/useForceAutoConnect.d.ts.map +1 -0
  103. package/dist/hooks/useLanguage.d.ts +1 -1
  104. package/dist/hooks/useLanguage.d.ts.map +1 -1
  105. package/dist/hooks/useNavigateBack.d.ts +1 -3
  106. package/dist/hooks/useNavigateBack.d.ts.map +1 -1
  107. package/dist/hooks/usePrepareBlockchainList/usePrepareBlockchainList.constants.d.ts +1 -1
  108. package/dist/hooks/usePrepareBlockchainList/usePrepareBlockchainList.d.ts +2 -2
  109. package/dist/hooks/usePrepareBlockchainList/usePrepareBlockchainList.d.ts.map +1 -1
  110. package/dist/hooks/usePrepareBlockchainList/usePrepareBlockchainList.helpers.d.ts +3 -5
  111. package/dist/hooks/usePrepareBlockchainList/usePrepareBlockchainList.helpers.d.ts.map +1 -1
  112. package/dist/hooks/usePrepareBlockchainList/usePrepareBlockchainList.mock.d.ts +1 -0
  113. package/dist/hooks/usePrepareBlockchainList/usePrepareBlockchainList.mock.d.ts.map +1 -1
  114. package/dist/hooks/usePrepareBlockchainList/usePrepareBlockchainList.types.d.ts +5 -1
  115. package/dist/hooks/usePrepareBlockchainList/usePrepareBlockchainList.types.d.ts.map +1 -1
  116. package/dist/hooks/useSwapInput.d.ts.map +1 -1
  117. package/dist/hooks/useSyncStoresWithConfig.d.ts +1 -2
  118. package/dist/hooks/useSyncStoresWithConfig.d.ts.map +1 -1
  119. package/dist/hooks/useTheme.d.ts +1 -1
  120. package/dist/hooks/useTheme.d.ts.map +1 -1
  121. package/dist/hooks/useWalletList.d.ts.map +1 -1
  122. package/dist/index.d.ts +20 -8
  123. package/dist/index.d.ts.map +1 -1
  124. package/dist/index.js +1 -1
  125. package/dist/index.js.map +4 -4
  126. package/dist/pages/ConfirmSwapPage.d.ts +1 -6
  127. package/dist/pages/ConfirmSwapPage.d.ts.map +1 -1
  128. package/dist/pages/HistoryPage.d.ts.map +1 -1
  129. package/dist/pages/Home.d.ts.map +1 -1
  130. package/dist/pages/LanguagePage.d.ts.map +1 -1
  131. package/dist/pages/LiquiditySourcePage.d.ts +1 -2
  132. package/dist/pages/LiquiditySourcePage.d.ts.map +1 -1
  133. package/dist/pages/SelectBlockchainPage.d.ts.map +1 -1
  134. package/dist/pages/SelectSwapItemsPage.d.ts.map +1 -1
  135. package/dist/pages/SettingsPage.d.ts +1 -6
  136. package/dist/pages/SettingsPage.d.ts.map +1 -1
  137. package/dist/pages/SwapDetailsPage.d.ts.map +1 -1
  138. package/dist/pages/ThemePage.d.ts.map +1 -1
  139. package/dist/pages/WalletsPage.d.ts +1 -8
  140. package/dist/pages/WalletsPage.d.ts.map +1 -1
  141. package/dist/store/AppStore.d.ts +47 -0
  142. package/dist/store/AppStore.d.ts.map +1 -0
  143. package/dist/store/app.d.ts +41 -22
  144. package/dist/store/app.d.ts.map +1 -1
  145. package/dist/store/notification.d.ts +4 -3
  146. package/dist/store/notification.d.ts.map +1 -1
  147. package/dist/store/quote.d.ts +23 -16
  148. package/dist/store/quote.d.ts.map +1 -1
  149. package/dist/store/slices/config.d.ts +3 -2
  150. package/dist/store/slices/config.d.ts.map +1 -1
  151. package/dist/store/slices/data.d.ts +3 -0
  152. package/dist/store/slices/data.d.ts.map +1 -1
  153. package/dist/store/slices/settings.d.ts +39 -0
  154. package/dist/store/slices/settings.d.ts.map +1 -0
  155. package/dist/store/ui.d.ts +2 -1
  156. package/dist/store/ui.d.ts.map +1 -1
  157. package/dist/store/wallets.d.ts +14 -9
  158. package/dist/store/wallets.d.ts.map +1 -1
  159. package/dist/types/config.d.ts +38 -5
  160. package/dist/types/config.d.ts.map +1 -1
  161. package/dist/types/swap.d.ts +4 -14
  162. package/dist/types/swap.d.ts.map +1 -1
  163. package/dist/types/wallets.d.ts +15 -1
  164. package/dist/types/wallets.d.ts.map +1 -1
  165. package/dist/utils/colors.d.ts.map +1 -1
  166. package/dist/utils/configs.d.ts +1 -0
  167. package/dist/utils/configs.d.ts.map +1 -1
  168. package/dist/utils/meta.d.ts +2 -1
  169. package/dist/utils/meta.d.ts.map +1 -1
  170. package/dist/utils/providers.d.ts +2 -2
  171. package/dist/utils/providers.d.ts.map +1 -1
  172. package/dist/utils/queue.d.ts +2 -2
  173. package/dist/utils/queue.d.ts.map +1 -1
  174. package/dist/utils/quote.d.ts +1 -1
  175. package/dist/utils/quote.d.ts.map +1 -1
  176. package/dist/utils/settings.d.ts +6 -2
  177. package/dist/utils/settings.d.ts.map +1 -1
  178. package/dist/utils/swap.d.ts +16 -7
  179. package/dist/utils/swap.d.ts.map +1 -1
  180. package/dist/utils/time.d.ts +1 -1
  181. package/dist/utils/time.d.ts.map +1 -1
  182. package/dist/utils/wallets.d.ts +7 -9
  183. package/dist/utils/wallets.d.ts.map +1 -1
  184. package/package.json +12 -10
  185. package/src/QueueManager.tsx +18 -17
  186. package/src/components/AppRouter.tsx +8 -32
  187. package/src/components/AppRoutes.tsx +57 -69
  188. package/src/components/BlockchainList/BlockchainList.tsx +4 -4
  189. package/src/components/BlockchainsSection/BlockchainsSection.tsx +4 -4
  190. package/src/components/ConfirmWalletsModal/ConfirmWalletsModal.tsx +16 -19
  191. package/src/components/ConfirmWalletsModal/ConfirmWalletsModal.types.ts +0 -2
  192. package/src/components/ConfirmWalletsModal/WalletList.tsx +6 -5
  193. package/src/components/ConfirmWalletsModal/WalletList.type.ts +1 -4
  194. package/src/components/HeaderButtons/HomeButtons.tsx +28 -18
  195. package/src/components/Layout/Layout.tsx +20 -7
  196. package/src/components/Layout/Layout.types.ts +2 -2
  197. package/src/components/NoResult/NoResult.helpers.ts +12 -12
  198. package/src/components/NoResult/NoResult.tsx +6 -6
  199. package/src/components/NotificationContent/NotificationContent.tsx +5 -3
  200. package/src/components/Quote/Quote.styles.ts +28 -1
  201. package/src/components/Quote/Quote.tsx +100 -34
  202. package/src/components/Quote/Quote.types.ts +0 -1
  203. package/src/components/Quote/QuoteSkeleton.tsx +1 -1
  204. package/src/components/QuoteWarningsAndErrors/QuoteErrorsModalItem.tsx +1 -1
  205. package/src/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.helpers.ts +11 -4
  206. package/src/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.styles.ts +8 -1
  207. package/src/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.tsx +13 -13
  208. package/src/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.types.ts +1 -0
  209. package/src/components/QuoteWarningsAndErrors/SlippageWariningModal.tsx +3 -3
  210. package/src/components/Slippage/Slippage.tsx +3 -5
  211. package/src/components/SwapDetails/SwapDetails.Placeholder.tsx +0 -4
  212. package/src/components/SwapDetails/SwapDetails.helpers.tsx +1 -1
  213. package/src/components/SwapDetails/SwapDetails.tsx +19 -39
  214. package/src/components/SwapDetailsAlerts/SwapDetailsAlerts.Warning.tsx +1 -1
  215. package/src/components/SwapDetailsModal/SwapDetailsCompleteModal.tsx +4 -3
  216. package/src/components/SwapDetailsModal/SwapDetailsModal.Cancel.tsx +2 -2
  217. package/src/components/SwapDetailsModal/SwapDetailsModal.helpers.tsx +1 -1
  218. package/src/components/SwapDetailsModal/SwapDetailsModal.tsx +1 -1
  219. package/src/components/SwapDetailsModal/SwapDetailsModal.types.ts +1 -1
  220. package/src/components/SwapsGroup/SwapsGroup.styles.ts +8 -1
  221. package/src/components/SwapsGroup/SwapsGroup.tsx +0 -2
  222. package/src/components/TokenList/TokenList.helpers.ts +2 -2
  223. package/src/components/TokenList/TokenList.styles.ts +14 -2
  224. package/src/components/TokenList/TokenList.tsx +16 -19
  225. package/src/components/TokenList/TokenList.types.ts +3 -10
  226. package/src/components/TokenList/index.ts +0 -1
  227. package/src/components/UpdateUrl.tsx +23 -18
  228. package/src/components/WidgetEvents.tsx +4 -2
  229. package/src/constants/errors.ts +9 -5
  230. package/src/constants/index.ts +1 -0
  231. package/src/constants/navigationRoutes.ts +7 -8
  232. package/src/constants/searchParams.ts +1 -0
  233. package/src/containers/App/App.styles.ts +18 -0
  234. package/src/containers/App/App.tsx +52 -0
  235. package/src/containers/App/index.ts +1 -0
  236. package/src/containers/QuoteInfo/QuoteInfo.styles.ts +17 -1
  237. package/src/containers/QuoteInfo/QuoteInfo.tsx +44 -43
  238. package/src/containers/QuoteInfo/QuoteInfo.types.ts +3 -0
  239. package/src/{Wallets.tsx → containers/Wallets/Wallets.tsx} +48 -34
  240. package/src/containers/Wallets/Wallets.types.ts +12 -0
  241. package/src/containers/Wallets/index.ts +1 -0
  242. package/src/containers/Widget/Widget.tsx +19 -0
  243. package/src/containers/Widget/Widget.types.ts +5 -0
  244. package/src/containers/Widget/index.ts +2 -0
  245. package/src/containers/WidgetInfo/WidgetInfo.helpers.ts +64 -0
  246. package/src/containers/WidgetInfo/WidgetInfo.tsx +62 -0
  247. package/src/containers/WidgetInfo/WidgetInfo.types.ts +21 -0
  248. package/src/containers/WidgetInfo/index.ts +1 -0
  249. package/src/containers/WidgetProvider/WidgetProvider.tsx +28 -0
  250. package/src/containers/WidgetProvider/WidgetProvider.types.ts +7 -0
  251. package/src/containers/WidgetProvider/index.ts +1 -0
  252. package/src/hooks/useConfirmSwap/useConfirmSwap.helpers.ts +15 -11
  253. package/src/hooks/useConfirmSwap/useConfirmSwap.ts +25 -24
  254. package/src/hooks/useConfirmSwap/useConfirmSwap.types.ts +1 -1
  255. package/src/hooks/useForceAutoConnect.ts +27 -0
  256. package/src/hooks/useLanguage.ts +4 -5
  257. package/src/hooks/useNavigateBack.ts +3 -52
  258. package/src/hooks/usePrepareBlockchainList/usePrepareBlockchainList.constants.ts +1 -1
  259. package/src/hooks/usePrepareBlockchainList/usePrepareBlockchainList.helpers.ts +37 -7
  260. package/src/hooks/usePrepareBlockchainList/usePrepareBlockchainList.mock.ts +60 -0
  261. package/src/hooks/usePrepareBlockchainList/usePrepareBlockchainList.test.ts +78 -3
  262. package/src/hooks/usePrepareBlockchainList/usePrepareBlockchainList.ts +15 -6
  263. package/src/hooks/usePrepareBlockchainList/usePrepareBlockchainList.types.ts +6 -1
  264. package/src/hooks/useSwapInput.ts +89 -30
  265. package/src/hooks/useSyncStoresWithConfig.ts +38 -22
  266. package/src/hooks/useTheme.ts +4 -5
  267. package/src/hooks/useWalletList.ts +3 -5
  268. package/src/index.ts +53 -5
  269. package/src/pages/ConfirmSwapPage.tsx +39 -24
  270. package/src/pages/HistoryPage.tsx +2 -7
  271. package/src/pages/Home.tsx +58 -88
  272. package/src/pages/LanguagePage.tsx +0 -5
  273. package/src/pages/LiquiditySourcePage.tsx +24 -37
  274. package/src/pages/SelectBlockchainPage.tsx +28 -21
  275. package/src/pages/SelectSwapItemsPage.tsx +10 -27
  276. package/src/pages/SettingsPage.tsx +28 -24
  277. package/src/pages/SwapDetailsPage.tsx +6 -7
  278. package/src/pages/ThemePage.tsx +2 -7
  279. package/src/pages/WalletsPage.tsx +4 -15
  280. package/src/services/httpService.ts +1 -1
  281. package/src/store/AppStore.tsx +41 -0
  282. package/src/store/app.ts +44 -6
  283. package/src/store/quote.ts +29 -26
  284. package/src/store/slices/config.ts +25 -15
  285. package/src/store/slices/data.ts +64 -29
  286. package/src/store/slices/settings.ts +168 -0
  287. package/src/store/wallets.ts +68 -37
  288. package/src/types/config.ts +50 -5
  289. package/src/types/swap.ts +4 -13
  290. package/src/types/wallets.ts +18 -1
  291. package/src/utils/colors.ts +2 -1
  292. package/src/utils/configs.ts +2 -1
  293. package/src/utils/date.ts +1 -1
  294. package/src/utils/meta.ts +8 -1
  295. package/src/utils/providers.ts +8 -5
  296. package/src/utils/queue.ts +2 -2
  297. package/src/utils/quote.ts +7 -7
  298. package/src/utils/settings.ts +17 -10
  299. package/src/utils/swap.ts +59 -55
  300. package/src/utils/time.ts +1 -1
  301. package/src/utils/wallets.ts +107 -149
  302. package/dist/Wallets.d.ts +0 -17
  303. package/dist/Wallets.d.ts.map +0 -1
  304. package/dist/Widget.d.ts +0 -9
  305. package/dist/Widget.d.ts.map +0 -1
  306. package/dist/store/meta.d.ts +0 -23
  307. package/dist/store/meta.d.ts.map +0 -1
  308. package/dist/store/settings.d.ts +0 -81
  309. package/dist/store/settings.d.ts.map +0 -1
  310. package/src/Widget.tsx +0 -119
  311. package/src/store/meta.ts +0 -39
  312. package/src/store/settings.ts +0 -158
@@ -1,5 +1,4 @@
1
- import type { PendingSwap } from '@rango-dev/queue-manager-rango-preset';
2
- import type { PendingSwapStep } from 'rango-types';
1
+ import type { PendingSwap, PendingSwapStep } from 'rango-types';
3
2
 
4
3
  import { i18n } from '@lingui/core';
5
4
  import { useManager } from '@rango-dev/queue-manager-react';
@@ -11,8 +10,6 @@ import { Layout } from '../components/Layout';
11
10
  import { SearchInput } from '../components/SearchInput';
12
11
  import { SwapsGroup } from '../components/SwapsGroup';
13
12
  import { NotFoundContainer } from '../components/SwapsGroup/SwapsGroup.styles';
14
- import { navigationRoutes } from '../constants/navigationRoutes';
15
- import { useNavigateBack } from '../hooks/useNavigateBack';
16
13
  import { useUiStore } from '../store/ui';
17
14
  import { groupSwapsByDate } from '../utils/date';
18
15
  import { containsText } from '../utils/numbers';
@@ -51,7 +48,6 @@ const isStepContainsText = (steps: PendingSwapStep[], value: string) => {
51
48
  export function HistoryPage() {
52
49
  const setSelectedSwap = useUiStore.use.setSelectedSwap();
53
50
  const navigate = useNavigate();
54
- const { navigateBackFrom } = useNavigateBack();
55
51
  const { manager, state } = useManager();
56
52
  const list: PendingSwap[] = getPendingSwaps(manager).map(({ swap }) => swap);
57
53
  const [searchedFor, setSearchedFor] = useState<string>('');
@@ -78,7 +74,6 @@ export function HistoryPage() {
78
74
  return (
79
75
  <Layout
80
76
  header={{
81
- onBack: () => navigateBackFrom(navigationRoutes.swaps),
82
77
  title: i18n.t('History'),
83
78
  }}>
84
79
  <Container>
@@ -108,7 +103,7 @@ export function HistoryPage() {
108
103
  list={filteredList}
109
104
  onSwapClick={(requestId) => {
110
105
  setSelectedSwap(requestId);
111
- navigate(`${requestId}`, { replace: true });
106
+ navigate(requestId);
112
107
  }}
113
108
  groupBy={groupSwapsByDate}
114
109
  isLoading={loading}
@@ -9,8 +9,6 @@ import { SwitchFromAndToButton } from '../components/SwitchFromAndTo';
9
9
  import { errorMessages } from '../constants/errors';
10
10
  import { navigationRoutes } from '../constants/navigationRoutes';
11
11
  import {
12
- BALANCE_MAX_DECIMALS,
13
- BALANCE_MIN_DECIMALS,
14
12
  PERCENTAGE_CHANGE_MAX_DECIMALS,
15
13
  PERCENTAGE_CHANGE_MIN_DECIMALS,
16
14
  TOKEN_AMOUNT_MAX_DECIMALS,
@@ -20,27 +18,22 @@ import {
20
18
  } from '../constants/routing';
21
19
  import { QuoteInfo } from '../containers/QuoteInfo';
22
20
  import { useSwapInput } from '../hooks/useSwapInput';
23
- import { useMetaStore } from '../store/meta';
21
+ import { useAppStore } from '../store/AppStore';
24
22
  import { useQuoteStore } from '../store/quote';
25
23
  import { useUiStore } from '../store/ui';
26
24
  import { useWalletsStore } from '../store/wallets';
27
- import { ButtonState } from '../types';
28
25
  import { numberToString } from '../utils/numbers';
29
26
  import { getPriceImpact, getPriceImpactLevel } from '../utils/quote';
30
- import {
31
- canComputePriceImpact,
32
- getOutputRatio,
33
- getPercentageChange,
34
- getSwapButtonState,
35
- hasHighValueLoss,
36
- hasLimitError,
37
- } from '../utils/swap';
38
- import { getBalanceFromWallet } from '../utils/wallets';
27
+ import { canComputePriceImpact, getSwapButtonState } from '../utils/swap';
28
+ import { formatBalance } from '../utils/wallets';
39
29
 
40
30
  const Container = styled('div', {
41
31
  display: 'flex',
42
32
  flexDirection: 'column',
43
33
  overflowY: 'visible',
34
+ '& .quote__container': {
35
+ paddingTop: '$2',
36
+ },
44
37
  });
45
38
 
46
39
  const FromContainer = styled('div', {
@@ -76,18 +69,15 @@ export function Home() {
76
69
  setQuoteWarningsConfirmed,
77
70
  } = useQuoteStore();
78
71
 
79
- const { loadingStatus: loadingMetaStatus } = useMetaStore();
72
+ const fetchMetaStatus = useAppStore().fetchStatus;
80
73
 
81
- const connectedWallets = useWalletsStore.use.connectedWallets();
74
+ const { connectedWallets, getBalanceFor } = useWalletsStore();
82
75
  const setCurrentPage = useUiStore.use.setCurrentPage();
83
76
  const [showQuoteWarningModal, setShowQuoteWarningModal] = useState(false);
84
77
  const layoutRef = useRef<HTMLDivElement>(null);
85
78
 
86
79
  const needsToWarnEthOnPath = false;
87
80
 
88
- const outToInRatio = getOutputRatio(inputUsdValue, outputUsdValue);
89
- const highValueLoss = hasHighValueLoss(inputUsdValue, outToInRatio);
90
-
91
81
  const priceImpactInputCanNotBeComputed = !canComputePriceImpact(
92
82
  quote,
93
83
  inputAmount,
@@ -99,48 +89,26 @@ export function Home() {
99
89
  inputAmount,
100
90
  outputUsdValue
101
91
  );
102
- const swapButtonState = getSwapButtonState(
103
- loadingMetaStatus,
104
- connectedWallets,
92
+
93
+ const swapButtonState = getSwapButtonState({
94
+ fetchMetaStatus,
105
95
  fetchingQuote,
96
+ inputAmount,
106
97
  quote,
107
- hasLimitError(quote),
108
- highValueLoss,
109
- priceImpactInputCanNotBeComputed || priceImpactOutputCanNotBeComputed,
98
+ anyWalletConnected: connectedWallets.length > 0,
99
+ error: quoteError,
100
+ warning: quoteWarning,
110
101
  needsToWarnEthOnPath,
111
- inputAmount
112
- );
102
+ });
113
103
 
114
- const tokenBalance =
115
- !!fromBlockchain && !!fromToken
116
- ? numberToString(
117
- getBalanceFromWallet(
118
- connectedWallets,
119
- fromBlockchain?.name,
120
- fromToken?.symbol,
121
- fromToken?.address
122
- )?.amount || '0',
123
- BALANCE_MIN_DECIMALS,
124
- BALANCE_MAX_DECIMALS
125
- )
126
- : '0';
104
+ const fromTokenBalance = fromToken ? getBalanceFor(fromToken) : null;
105
+
106
+ const fromTokenFormattedBalance =
107
+ formatBalance(fromTokenBalance)?.amount ?? '0';
127
108
 
128
109
  const tokenBalanceReal =
129
110
  !!fromBlockchain && !!fromToken
130
- ? numberToString(
131
- getBalanceFromWallet(
132
- connectedWallets,
133
- fromBlockchain?.name,
134
- fromToken?.symbol,
135
- fromToken?.address
136
- )?.amount || '0',
137
- getBalanceFromWallet(
138
- connectedWallets,
139
- fromBlockchain?.name,
140
- fromToken?.symbol,
141
- fromToken?.address
142
- )?.decimal
143
- )
111
+ ? numberToString(fromTokenBalance?.amount, fromTokenBalance?.decimals)
144
112
  : '0';
145
113
 
146
114
  useEffect(() => {
@@ -152,10 +120,8 @@ export function Home() {
152
120
  const percentageChange =
153
121
  !inputUsdValue || !outputUsdValue || !outputUsdValue.gt(0)
154
122
  ? null
155
- : getPercentageChange(
156
- inputUsdValue.toString(),
157
- outputUsdValue.toString()
158
- );
123
+ : getPriceImpact(inputUsdValue.toString(), outputUsdValue.toString());
124
+
159
125
  return (
160
126
  <Layout
161
127
  ref={layoutRef}
@@ -167,14 +133,13 @@ export function Home() {
167
133
  size="large"
168
134
  disabled={swapButtonState.disabled}
169
135
  prefix={
170
- !swapButtonState.disabled &&
171
- swapButtonState.hasWarning && <WarningIcon />
136
+ swapButtonState.action === 'confirm-warning' && <WarningIcon />
172
137
  }
173
138
  fullWidth
174
139
  onClick={() => {
175
- if (swapButtonState.state === ButtonState.WAITFORCONNECTING) {
140
+ if (swapButtonState.action === 'connect-wallet') {
176
141
  navigate(navigationRoutes.wallets);
177
- } else if (quoteWarning) {
142
+ } else if (swapButtonState.action === 'confirm-warning') {
178
143
  setShowQuoteWarningModal(true);
179
144
  } else {
180
145
  navigate(navigationRoutes.confirmSwap);
@@ -184,7 +149,10 @@ export function Home() {
184
149
  </Button>
185
150
  }
186
151
  header={{
187
- hasConnectWallet: true,
152
+ onWallet: () => {
153
+ navigate(navigationRoutes.wallets);
154
+ },
155
+ hasBackButton: false,
188
156
  title: i18n.t('Swap'),
189
157
  suffix: (
190
158
  <HomeButtons
@@ -200,11 +168,9 @@ export function Home() {
200
168
  <FromContainer>
201
169
  <SwapInput
202
170
  label={i18n.t('From')}
203
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
204
- //@ts-ignore
205
171
  mode="From"
206
172
  onInputChange={setInputAmount}
207
- balance={tokenBalance}
173
+ balance={fromTokenFormattedBalance}
208
174
  chain={{
209
175
  displayName: fromBlockchain?.displayName || '',
210
176
  image: fromBlockchain?.logo || '',
@@ -213,7 +179,7 @@ export function Home() {
213
179
  displayName: fromToken?.symbol || '',
214
180
  image: fromToken?.image || '',
215
181
  }}
216
- onClickToken={() => navigate('from-swap')}
182
+ onClickToken={() => navigate(navigationRoutes.fromSwap)}
217
183
  price={{
218
184
  value: inputAmount,
219
185
  usdValue: priceImpactInputCanNotBeComputed
@@ -227,10 +193,10 @@ export function Home() {
227
193
  ? errorMessages().unknownPriceError.impactTitle
228
194
  : undefined,
229
195
  }}
230
- disabled={loadingMetaStatus === 'failed'}
231
- loading={loadingMetaStatus === 'loading'}
196
+ disabled={fetchMetaStatus === 'failed'}
197
+ loading={fetchMetaStatus === 'loading'}
232
198
  onSelectMaxBalance={() => {
233
- if (tokenBalance !== '0') {
199
+ if (fromTokenFormattedBalance !== '0') {
234
200
  setInputAmount(tokenBalanceReal.split(',').join(''));
235
201
  }
236
202
  }}
@@ -241,6 +207,7 @@ export function Home() {
241
207
  sharpBottomStyle={!!quote?.result || fetchingQuote}
242
208
  label={i18n.t('To')}
243
209
  mode="To"
210
+ fetchingQuote={fetchingQuote}
244
211
  chain={{
245
212
  displayName: toBlockchain?.displayName || '',
246
213
  image: toBlockchain?.logo || '',
@@ -272,27 +239,30 @@ export function Home() {
272
239
  ? errorMessages().unknownPriceError.impactTitle
273
240
  : undefined,
274
241
  }}
275
- onClickToken={() => navigate('to-swap')}
276
- disabled={loadingMetaStatus === 'failed'}
277
- loading={loadingMetaStatus === 'loading'}
242
+ onClickToken={() => navigate(navigationRoutes.toSwap)}
243
+ disabled={fetchMetaStatus === 'failed'}
244
+ loading={fetchMetaStatus === 'loading'}
278
245
  />
279
246
  </InputsContainer>
280
- <QuoteInfo
281
- quote={quote}
282
- loading={fetchingQuote}
283
- error={quoteError}
284
- warning={quoteWarning}
285
- type="basic"
286
- refetchQuote={fetchQuote}
287
- showWarningModal={showQuoteWarningModal}
288
- onOpenWarningModal={() => setShowQuoteWarningModal(true)}
289
- onCloseWarningModal={() => setShowQuoteWarningModal(false)}
290
- onConfirmWarningModal={() => {
291
- setShowQuoteWarningModal(false);
292
- setQuoteWarningsConfirmed(true);
293
- navigate(navigationRoutes.confirmSwap);
294
- }}
295
- />
247
+ <div className="quote__container">
248
+ <QuoteInfo
249
+ quote={quote}
250
+ loading={fetchingQuote}
251
+ error={quoteError}
252
+ warning={quoteWarning}
253
+ type="basic"
254
+ refetchQuote={fetchQuote}
255
+ showWarningModal={showQuoteWarningModal}
256
+ onOpenWarningModal={() => setShowQuoteWarningModal(true)}
257
+ onCloseWarningModal={() => setShowQuoteWarningModal(false)}
258
+ onConfirmWarningModal={() => {
259
+ setShowQuoteWarningModal(false);
260
+ setQuoteWarningsConfirmed(true);
261
+ navigate(navigationRoutes.confirmSwap);
262
+ }}
263
+ onChangeSettings={() => navigate(navigationRoutes.settings)}
264
+ />
265
+ </div>
296
266
  </Container>
297
267
  </Layout>
298
268
  );
@@ -10,13 +10,9 @@ import React from 'react';
10
10
 
11
11
  import { Layout } from '../components/Layout';
12
12
  import { SettingsContainer } from '../components/SettingsContainer';
13
- import { navigationRoutes } from '../constants/navigationRoutes';
14
13
  import { useLanguage } from '../hooks/useLanguage';
15
- import { useNavigateBack } from '../hooks/useNavigateBack';
16
14
 
17
15
  export function LanguagePage() {
18
- const { navigateBackFrom } = useNavigateBack();
19
-
20
16
  const { activeLanguage, changeLanguage, languages } = useLanguage();
21
17
 
22
18
  const languageList = languages.map((languageItem) => {
@@ -38,7 +34,6 @@ export function LanguagePage() {
38
34
  return (
39
35
  <Layout
40
36
  header={{
41
- onBack: () => navigateBackFrom(navigationRoutes.settings),
42
37
  title: i18n.t('Language'),
43
38
  }}>
44
39
  <SettingsContainer>
@@ -23,32 +23,22 @@ import {
23
23
  NotFoundContainer,
24
24
  SettingsContainer,
25
25
  } from '../components/SettingsContainer';
26
- import { navigationRoutes } from '../constants/navigationRoutes';
27
- import { useNavigateBack } from '../hooks/useNavigateBack';
28
- import { useMetaStore } from '../store/meta';
29
- import { useSettingsStore } from '../store/settings';
26
+ import { useAppStore } from '../store/AppStore';
30
27
  import { containsText } from '../utils/numbers';
31
- import {
32
- getUniqueSwappersGroups,
33
- sortLiquiditySourcesByGroupTitle,
34
- } from '../utils/settings';
28
+ import { getUniqueSwappersGroups } from '../utils/settings';
35
29
 
36
30
  interface PropTypes {
37
- supportedSwappers?: string[];
38
31
  sourceType: 'Exchanges' | 'Bridges';
39
32
  }
40
33
 
41
- export function LiquiditySourcePage({
42
- supportedSwappers,
43
- sourceType,
44
- }: PropTypes) {
34
+ export function LiquiditySourcePage({ sourceType }: PropTypes) {
35
+ const fetchStatus = useAppStore().fetchStatus;
36
+ const swappers = useAppStore().swappers();
37
+ const disabledLiquiditySources = useAppStore().disabledLiquiditySources;
45
38
  const [searchedFor, setSearchedFor] = useState<string>('');
46
- const toggleLiquiditySource = useSettingsStore.use.toggleLiquiditySource();
47
- const { navigateBackFrom } = useNavigateBack();
48
- const loadingMetaStatus = useMetaStore.use.loadingStatus();
49
-
39
+ const toggleLiquiditySource = useAppStore().toggleLiquiditySource;
50
40
  const supportedUniqueSwappersGroups: Array<UniqueSwappersGroupType> =
51
- getUniqueSwappersGroups(supportedSwappers);
41
+ getUniqueSwappersGroups(swappers, disabledLiquiditySources);
52
42
 
53
43
  const validTypes: Array<LiquiditySourceType> = [];
54
44
  if (sourceType === 'Exchanges') {
@@ -79,22 +69,20 @@ export function LiquiditySourcePage({
79
69
  });
80
70
  };
81
71
 
82
- const list = liquiditySources
83
- .sort(sortLiquiditySourcesByGroupTitle)
84
- .map((sourceItem) => {
85
- const { selected, groupTitle, logo } = sourceItem;
86
- return {
87
- start: <Image src={logo} size={22} type="circular" />,
88
- onClick: () => toggleLiquiditySource(groupTitle),
89
- end: <Checkbox checked={selected} />,
90
- title: (
91
- <Typography variant="title" size="xmedium">
92
- {i18n.t(groupTitle)}
93
- </Typography>
94
- ),
95
- ...sourceItem,
96
- };
97
- });
72
+ const list = liquiditySources.map((sourceItem) => {
73
+ const { selected, groupTitle, logo } = sourceItem;
74
+ return {
75
+ start: <Image src={logo} size={22} type="circular" />,
76
+ onClick: () => toggleLiquiditySource(groupTitle),
77
+ end: <Checkbox checked={selected} />,
78
+ title: (
79
+ <Typography variant="title" size="xmedium">
80
+ {i18n.t(groupTitle)}
81
+ </Typography>
82
+ ),
83
+ ...sourceItem,
84
+ };
85
+ });
98
86
 
99
87
  const searchHandler = (event: React.ChangeEvent<HTMLInputElement>) => {
100
88
  const value = event.target.value;
@@ -111,7 +99,6 @@ export function LiquiditySourcePage({
111
99
  return (
112
100
  <Layout
113
101
  header={{
114
- onBack: () => navigateBackFrom(navigationRoutes.settings),
115
102
  title: i18n.t(sourceType),
116
103
  suffix: (
117
104
  <LiquiditySourceSuffix>
@@ -131,7 +118,7 @@ export function LiquiditySourcePage({
131
118
  placeholder={i18n.t('Search {sourceType}', { sourceType })}
132
119
  onChange={searchHandler}
133
120
  />
134
- {loadingMetaStatus === 'loading' && <LoadingLiquiditySourceList />}
121
+ {fetchStatus === 'loading' && <LoadingLiquiditySourceList />}
135
122
 
136
123
  {!filteredList.length && !!searchedFor ? (
137
124
  <NotFoundContainer>
@@ -141,7 +128,7 @@ export function LiquiditySourcePage({
141
128
  />
142
129
  </NotFoundContainer>
143
130
  ) : (
144
- loadingMetaStatus === 'success' && (
131
+ fetchStatus === 'success' && (
145
132
  <LiquiditySourceList>
146
133
  {filteredList.map((sourceItem) => {
147
134
  return (
@@ -1,14 +1,16 @@
1
1
  import { i18n } from '@lingui/core';
2
- import { Divider, SelectableCategoryList } from '@rango-dev/ui';
2
+ import {
3
+ Divider,
4
+ getCountCategories,
5
+ SelectableCategoryList
6
+ } from '@rango-dev/ui';
3
7
  import React, { useState } from 'react';
4
8
 
5
9
  import { BlockchainList } from '../components/BlockchainList';
6
10
  import { Layout } from '../components/Layout';
7
11
  import { SearchInput } from '../components/SearchInput';
8
- import { navigationRoutes } from '../constants/navigationRoutes';
9
12
  import { useNavigateBack } from '../hooks/useNavigateBack';
10
- import { useAppStore } from '../store/app';
11
- import { useMetaStore } from '../store/meta';
13
+ import { useAppStore } from '../store/AppStore';
12
14
  import { useQuoteStore } from '../store/quote';
13
15
 
14
16
  interface PropTypes {
@@ -17,34 +19,40 @@ interface PropTypes {
17
19
 
18
20
  export function SelectBlockchainPage(props: PropTypes) {
19
21
  const { type } = props;
20
- const { navigateBackFrom } = useNavigateBack();
22
+ const navigateBack = useNavigateBack();
21
23
  const [searchedFor, setSearchedFor] = useState<string>('');
22
24
  const [blockchainCategory, setBlockchainCategory] = useState<string>('ALL');
23
25
  const setToBlockchain = useQuoteStore.use.setToBlockchain();
24
26
  const setFromBlockchain = useQuoteStore.use.setFromBlockchain();
25
- const { loadingStatus } = useMetaStore();
27
+ const fetchStatus = useAppStore().fetchStatus;
26
28
 
27
29
  const blockchains = useAppStore().blockchains({
28
- type: type,
30
+ type: type
29
31
  });
30
- const routeKey = type === 'source' ? 'fromBlockchain' : 'toBlockchain';
32
+
33
+ const countActiveCategories = getCountCategories(blockchains);
34
+
35
+ const showCategory = countActiveCategories !== 1;
31
36
 
32
37
  return (
33
38
  <Layout
34
39
  header={{
35
- onBack: () => {
36
- navigateBackFrom(navigationRoutes[routeKey]);
37
- },
38
- title: i18n.t(`Select Blockchain`),
40
+ title: i18n.t(`Select Blockchain`)
39
41
  }}>
40
42
  <Divider size={12} />
41
- <SelectableCategoryList
42
- setCategory={setBlockchainCategory}
43
- category={blockchainCategory}
44
- blockchains={blockchains}
45
- isLoading={loadingStatus === 'loading'}
46
- />
47
- <Divider size={24} />
43
+
44
+ {showCategory && (
45
+ <>
46
+ <SelectableCategoryList
47
+ setCategory={setBlockchainCategory}
48
+ category={blockchainCategory}
49
+ blockchains={blockchains}
50
+ isLoading={fetchStatus === 'loading'}
51
+ />
52
+ <Divider size={24} />
53
+ </>
54
+ )}
55
+
48
56
  <SearchInput
49
57
  value={searchedFor}
50
58
  autoFocus
@@ -67,8 +75,7 @@ export function SelectBlockchainPage(props: PropTypes) {
67
75
  } else {
68
76
  setToBlockchain(blockchain);
69
77
  }
70
-
71
- navigateBackFrom(navigationRoutes[routeKey]);
78
+ navigateBack();
72
79
  }}
73
80
  />
74
81
  </Layout>
@@ -11,10 +11,10 @@ import { SearchInput } from '../components/SearchInput';
11
11
  import { TokenList } from '../components/TokenList/TokenList';
12
12
  import { navigationRoutes } from '../constants/navigationRoutes';
13
13
  import { useNavigateBack } from '../hooks/useNavigateBack';
14
- import { useAppStore } from '../store/app';
14
+ import { useAppStore } from '../store/AppStore';
15
15
  import { useQuoteStore } from '../store/quote';
16
16
  import { useWalletsStore } from '../store/wallets';
17
- import { getTokensBalanceFromWalletAndSort } from '../utils/wallets';
17
+ import { sortTokensByBalance } from '../utils/wallets';
18
18
 
19
19
  interface PropTypes {
20
20
  type: 'source' | 'destination';
@@ -23,7 +23,7 @@ interface PropTypes {
23
23
  export function SelectSwapItemsPage(props: PropTypes) {
24
24
  const { type } = props;
25
25
  const navigate = useNavigate();
26
- const { navigateBackFrom } = useNavigateBack();
26
+ const navigateBack = useNavigateBack();
27
27
  const {
28
28
  fromBlockchain,
29
29
  toBlockchain,
@@ -32,7 +32,7 @@ export function SelectSwapItemsPage(props: PropTypes) {
32
32
  setFromBlockchain,
33
33
  setToBlockchain,
34
34
  } = useQuoteStore();
35
- const { connectedWallets } = useWalletsStore();
35
+ const getBalanceFor = useWalletsStore.use.getBalanceFor();
36
36
  const [searchedFor, setSearchedFor] = useState<string>('');
37
37
 
38
38
  const selectedBlockchain = type === 'source' ? fromBlockchain : toBlockchain;
@@ -47,10 +47,7 @@ export function SelectSwapItemsPage(props: PropTypes) {
47
47
  blockchain: selectedBlockchainName,
48
48
  searchFor: searchedFor,
49
49
  });
50
- const tokensList = getTokensBalanceFromWalletAndSort(
51
- tokens,
52
- connectedWallets
53
- );
50
+ const tokensList = sortTokensByBalance(tokens, getBalanceFor);
54
51
 
55
52
  // Actions
56
53
  const updateBlockchain = (blockchain: BlockchainMeta) => {
@@ -63,36 +60,22 @@ export function SelectSwapItemsPage(props: PropTypes) {
63
60
 
64
61
  const updateToken = (token: Token) => {
65
62
  if (type === 'source') {
66
- setFromToken(token);
63
+ setFromToken({ token, meta: { blockchains, tokens } });
67
64
  } else {
68
- setToToken(token);
65
+ setToToken({ token, meta: { blockchains, tokens } });
69
66
  }
70
67
  };
71
68
 
72
69
  return (
73
70
  <Layout
74
71
  header={{
75
- onBack: () =>
76
- navigateBackFrom(
77
- type === 'source'
78
- ? navigationRoutes.fromSwap
79
- : navigationRoutes.toSwap
80
- ),
81
- title: i18n.t('Swap {type}', {
82
- type: type === 'source' ? 'from' : 'to',
83
- }),
72
+ title: i18n.t('Swap {type}', { type }),
84
73
  }}>
85
74
  <BlockchainsSection
86
75
  blockchains={blockchains}
87
76
  type={type == 'source' ? 'from' : 'to'}
88
77
  blockchain={type === 'source' ? fromBlockchain : toBlockchain}
89
- onMoreClick={() =>
90
- navigate(
91
- type === 'source'
92
- ? navigationRoutes.fromBlockchain
93
- : navigationRoutes.toBlockchain
94
- )
95
- }
78
+ onMoreClick={() => navigate(navigationRoutes.blockchains)}
96
79
  onChange={(blockchain) => {
97
80
  updateBlockchain(blockchain);
98
81
  }}
@@ -123,7 +106,7 @@ export function SelectSwapItemsPage(props: PropTypes) {
123
106
  updateBlockchain(tokenBlockchain);
124
107
  }
125
108
 
126
- navigateBackFrom(navigationRoutes.fromSwap);
109
+ navigateBack();
127
110
  }}
128
111
  />
129
112
  </Layout>