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

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 (331) 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 +370 -56
  8. package/dist/components/ConfirmWalletsModal/ConfirmWallets.styles.d.ts.map +1 -1
  9. package/dist/components/ConfirmWalletsModal/ConfirmWalletsModal.d.ts.map +1 -1
  10. package/dist/components/ConfirmWalletsModal/ConfirmWalletsModal.types.d.ts +0 -2
  11. package/dist/components/ConfirmWalletsModal/ConfirmWalletsModal.types.d.ts.map +1 -1
  12. package/dist/components/ConfirmWalletsModal/WalletList.d.ts.map +1 -1
  13. package/dist/components/ConfirmWalletsModal/WalletList.type.d.ts +1 -4
  14. package/dist/components/ConfirmWalletsModal/WalletList.type.d.ts.map +1 -1
  15. package/dist/components/HeaderButtons/HomeButtons.d.ts.map +1 -1
  16. package/dist/components/Layout/Layout.d.ts.map +1 -1
  17. package/dist/components/Layout/Layout.types.d.ts +2 -2
  18. package/dist/components/Layout/Layout.types.d.ts.map +1 -1
  19. package/dist/components/LoadingSwapDetails/LoadingSwapDetailStep.d.ts.map +1 -1
  20. package/dist/components/LoadingSwapDetails/LoadingSwapDetails.d.ts.map +1 -1
  21. package/dist/components/LoadingSwapDetails/LoadingSwapDetails.styles.d.ts +1727 -0
  22. package/dist/components/LoadingSwapDetails/LoadingSwapDetails.styles.d.ts.map +1 -1
  23. package/dist/components/NotificationContent/NotificationContent.d.ts.map +1 -1
  24. package/dist/components/Quote/Quote.d.ts.map +1 -1
  25. package/dist/components/Quote/Quote.styles.d.ts +633 -3
  26. package/dist/components/Quote/Quote.styles.d.ts.map +1 -1
  27. package/dist/components/Quote/Quote.types.d.ts +0 -1
  28. package/dist/components/Quote/Quote.types.d.ts.map +1 -1
  29. package/dist/components/Quote/QuoteSummary.styles.d.ts +157 -0
  30. package/dist/components/Quote/QuoteSummary.styles.d.ts.map +1 -1
  31. package/dist/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.d.ts.map +1 -1
  32. package/dist/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.helpers.d.ts.map +1 -1
  33. package/dist/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.styles.d.ts.map +1 -1
  34. package/dist/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.types.d.ts +1 -0
  35. package/dist/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.types.d.ts.map +1 -1
  36. package/dist/components/Slippage/Slippage.d.ts.map +1 -1
  37. package/dist/components/SwapDetails/SwapDetails.Placeholder.d.ts.map +1 -1
  38. package/dist/components/SwapDetails/SwapDetails.d.ts.map +1 -1
  39. package/dist/components/SwapDetails/SwapDetails.helpers.d.ts +1 -1
  40. package/dist/components/SwapDetails/SwapDetails.helpers.d.ts.map +1 -1
  41. package/dist/components/SwapDetails/SwapDetails.styles.d.ts +628 -0
  42. package/dist/components/SwapDetails/SwapDetails.styles.d.ts.map +1 -1
  43. package/dist/components/SwapDetailsModal/SwapDetailsCompleteModal.d.ts.map +1 -1
  44. package/dist/components/SwapDetailsModal/SwapDetailsModal.helpers.d.ts +1 -1
  45. package/dist/components/SwapDetailsModal/SwapDetailsModal.helpers.d.ts.map +1 -1
  46. package/dist/components/SwapDetailsModal/SwapDetailsModal.types.d.ts +1 -1
  47. package/dist/components/SwapDetailsModal/SwapDetailsModal.types.d.ts.map +1 -1
  48. package/dist/components/SwapsGroup/SwapsGroup.d.ts.map +1 -1
  49. package/dist/components/SwapsGroup/SwapsGroup.styles.d.ts +157 -0
  50. package/dist/components/SwapsGroup/SwapsGroup.styles.d.ts.map +1 -1
  51. package/dist/components/TokenList/TokenList.d.ts.map +1 -1
  52. package/dist/components/TokenList/TokenList.helpers.d.ts +2 -2
  53. package/dist/components/TokenList/TokenList.helpers.d.ts.map +1 -1
  54. package/dist/components/TokenList/TokenList.styles.d.ts +942 -0
  55. package/dist/components/TokenList/TokenList.styles.d.ts.map +1 -1
  56. package/dist/components/TokenList/TokenList.types.d.ts +3 -9
  57. package/dist/components/TokenList/TokenList.types.d.ts.map +1 -1
  58. package/dist/components/TokenList/index.d.ts +0 -1
  59. package/dist/components/TokenList/index.d.ts.map +1 -1
  60. package/dist/components/UpdateUrl.d.ts +1 -6
  61. package/dist/components/UpdateUrl.d.ts.map +1 -1
  62. package/dist/components/WidgetEvents.d.ts.map +1 -1
  63. package/dist/constants/errors.d.ts.map +1 -1
  64. package/dist/constants/index.d.ts +1 -0
  65. package/dist/constants/index.d.ts.map +1 -1
  66. package/dist/constants/navigationRoutes.d.ts +1 -2
  67. package/dist/constants/navigationRoutes.d.ts.map +1 -1
  68. package/dist/constants/searchParams.d.ts +2 -1
  69. package/dist/constants/searchParams.d.ts.map +1 -1
  70. package/dist/containers/App/App.d.ts +3 -0
  71. package/dist/containers/App/App.d.ts.map +1 -0
  72. package/dist/containers/App/App.styles.d.ts +158 -0
  73. package/dist/containers/App/App.styles.d.ts.map +1 -0
  74. package/dist/containers/App/index.d.ts +2 -0
  75. package/dist/containers/App/index.d.ts.map +1 -0
  76. package/dist/containers/QuoteInfo/QuoteInfo.d.ts.map +1 -1
  77. package/dist/containers/QuoteInfo/QuoteInfo.styles.d.ts +316 -0
  78. package/dist/containers/QuoteInfo/QuoteInfo.styles.d.ts.map +1 -1
  79. package/dist/containers/QuoteInfo/QuoteInfo.types.d.ts +3 -0
  80. package/dist/containers/QuoteInfo/QuoteInfo.types.d.ts.map +1 -1
  81. package/dist/containers/Wallets/Wallets.d.ts +6 -0
  82. package/dist/containers/Wallets/Wallets.d.ts.map +1 -0
  83. package/dist/containers/Wallets/Wallets.types.d.ts +11 -0
  84. package/dist/containers/Wallets/Wallets.types.d.ts.map +1 -0
  85. package/dist/containers/Wallets/index.d.ts +2 -0
  86. package/dist/containers/Wallets/index.d.ts.map +1 -0
  87. package/dist/containers/Widget/Widget.d.ts +5 -0
  88. package/dist/containers/Widget/Widget.d.ts.map +1 -0
  89. package/dist/containers/Widget/Widget.types.d.ts +5 -0
  90. package/dist/containers/Widget/Widget.types.d.ts.map +1 -0
  91. package/dist/containers/Widget/index.d.ts +3 -0
  92. package/dist/containers/Widget/index.d.ts.map +1 -0
  93. package/dist/containers/WidgetInfo/WidgetInfo.d.ts +6 -0
  94. package/dist/containers/WidgetInfo/WidgetInfo.d.ts.map +1 -0
  95. package/dist/containers/WidgetInfo/WidgetInfo.helpers.d.ts +20 -0
  96. package/dist/containers/WidgetInfo/WidgetInfo.helpers.d.ts.map +1 -0
  97. package/dist/containers/WidgetInfo/WidgetInfo.types.d.ts +21 -0
  98. package/dist/containers/WidgetInfo/WidgetInfo.types.d.ts.map +1 -0
  99. package/dist/containers/WidgetInfo/index.d.ts +2 -0
  100. package/dist/containers/WidgetInfo/index.d.ts.map +1 -0
  101. package/dist/containers/WidgetProvider/WidgetProvider.d.ts +5 -0
  102. package/dist/containers/WidgetProvider/WidgetProvider.d.ts.map +1 -0
  103. package/dist/containers/WidgetProvider/WidgetProvider.types.d.ts +7 -0
  104. package/dist/containers/WidgetProvider/WidgetProvider.types.d.ts.map +1 -0
  105. package/dist/containers/WidgetProvider/index.d.ts +2 -0
  106. package/dist/containers/WidgetProvider/index.d.ts.map +1 -0
  107. package/dist/hooks/useConfirmSwap/useConfirmSwap.d.ts.map +1 -1
  108. package/dist/hooks/useConfirmSwap/useConfirmSwap.helpers.d.ts +6 -3
  109. package/dist/hooks/useConfirmSwap/useConfirmSwap.helpers.d.ts.map +1 -1
  110. package/dist/hooks/useConfirmSwap/useConfirmSwap.types.d.ts +1 -1
  111. package/dist/hooks/useConfirmSwap/useConfirmSwap.types.d.ts.map +1 -1
  112. package/dist/hooks/useForceAutoConnect.d.ts +2 -0
  113. package/dist/hooks/useForceAutoConnect.d.ts.map +1 -0
  114. package/dist/hooks/useLanguage.d.ts +1 -1
  115. package/dist/hooks/useLanguage.d.ts.map +1 -1
  116. package/dist/hooks/useNavigateBack.d.ts +1 -3
  117. package/dist/hooks/useNavigateBack.d.ts.map +1 -1
  118. package/dist/hooks/usePrepareBlockchainList/usePrepareBlockchainList.constants.d.ts +1 -1
  119. package/dist/hooks/usePrepareBlockchainList/usePrepareBlockchainList.d.ts +2 -2
  120. package/dist/hooks/usePrepareBlockchainList/usePrepareBlockchainList.d.ts.map +1 -1
  121. package/dist/hooks/usePrepareBlockchainList/usePrepareBlockchainList.helpers.d.ts +3 -5
  122. package/dist/hooks/usePrepareBlockchainList/usePrepareBlockchainList.helpers.d.ts.map +1 -1
  123. package/dist/hooks/usePrepareBlockchainList/usePrepareBlockchainList.mock.d.ts +1 -0
  124. package/dist/hooks/usePrepareBlockchainList/usePrepareBlockchainList.mock.d.ts.map +1 -1
  125. package/dist/hooks/usePrepareBlockchainList/usePrepareBlockchainList.types.d.ts +5 -1
  126. package/dist/hooks/usePrepareBlockchainList/usePrepareBlockchainList.types.d.ts.map +1 -1
  127. package/dist/hooks/useSwapInput.d.ts.map +1 -1
  128. package/dist/hooks/useSyncStoresWithConfig.d.ts +1 -2
  129. package/dist/hooks/useSyncStoresWithConfig.d.ts.map +1 -1
  130. package/dist/hooks/useTheme.d.ts +1 -1
  131. package/dist/hooks/useTheme.d.ts.map +1 -1
  132. package/dist/hooks/useWalletList.d.ts.map +1 -1
  133. package/dist/index.d.ts +20 -8
  134. package/dist/index.d.ts.map +1 -1
  135. package/dist/index.js +1 -1
  136. package/dist/index.js.map +4 -4
  137. package/dist/pages/ConfirmSwapPage.d.ts +1 -6
  138. package/dist/pages/ConfirmSwapPage.d.ts.map +1 -1
  139. package/dist/pages/HistoryPage.d.ts.map +1 -1
  140. package/dist/pages/Home.d.ts.map +1 -1
  141. package/dist/pages/LanguagePage.d.ts.map +1 -1
  142. package/dist/pages/LiquiditySourcePage.d.ts +1 -2
  143. package/dist/pages/LiquiditySourcePage.d.ts.map +1 -1
  144. package/dist/pages/SelectBlockchainPage.d.ts.map +1 -1
  145. package/dist/pages/SelectSwapItemsPage.d.ts.map +1 -1
  146. package/dist/pages/SettingsPage.d.ts +1 -6
  147. package/dist/pages/SettingsPage.d.ts.map +1 -1
  148. package/dist/pages/SwapDetailsPage.d.ts.map +1 -1
  149. package/dist/pages/ThemePage.d.ts.map +1 -1
  150. package/dist/pages/WalletsPage.d.ts +1 -8
  151. package/dist/pages/WalletsPage.d.ts.map +1 -1
  152. package/dist/store/AppStore.d.ts +47 -0
  153. package/dist/store/AppStore.d.ts.map +1 -0
  154. package/dist/store/app.d.ts +41 -22
  155. package/dist/store/app.d.ts.map +1 -1
  156. package/dist/store/notification.d.ts +4 -3
  157. package/dist/store/notification.d.ts.map +1 -1
  158. package/dist/store/quote.d.ts +23 -16
  159. package/dist/store/quote.d.ts.map +1 -1
  160. package/dist/store/slices/config.d.ts +3 -2
  161. package/dist/store/slices/config.d.ts.map +1 -1
  162. package/dist/store/slices/data.d.ts +3 -0
  163. package/dist/store/slices/data.d.ts.map +1 -1
  164. package/dist/store/slices/settings.d.ts +39 -0
  165. package/dist/store/slices/settings.d.ts.map +1 -0
  166. package/dist/store/ui.d.ts +2 -1
  167. package/dist/store/ui.d.ts.map +1 -1
  168. package/dist/store/wallets.d.ts +14 -9
  169. package/dist/store/wallets.d.ts.map +1 -1
  170. package/dist/types/config.d.ts +38 -5
  171. package/dist/types/config.d.ts.map +1 -1
  172. package/dist/types/swap.d.ts +4 -14
  173. package/dist/types/swap.d.ts.map +1 -1
  174. package/dist/types/wallets.d.ts +15 -1
  175. package/dist/types/wallets.d.ts.map +1 -1
  176. package/dist/utils/colors.d.ts.map +1 -1
  177. package/dist/utils/configs.d.ts +1 -0
  178. package/dist/utils/configs.d.ts.map +1 -1
  179. package/dist/utils/meta.d.ts +2 -1
  180. package/dist/utils/meta.d.ts.map +1 -1
  181. package/dist/utils/providers.d.ts +2 -2
  182. package/dist/utils/providers.d.ts.map +1 -1
  183. package/dist/utils/queue.d.ts +2 -2
  184. package/dist/utils/queue.d.ts.map +1 -1
  185. package/dist/utils/quote.d.ts +1 -1
  186. package/dist/utils/quote.d.ts.map +1 -1
  187. package/dist/utils/settings.d.ts +6 -2
  188. package/dist/utils/settings.d.ts.map +1 -1
  189. package/dist/utils/swap.d.ts +16 -7
  190. package/dist/utils/swap.d.ts.map +1 -1
  191. package/dist/utils/time.d.ts +1 -1
  192. package/dist/utils/time.d.ts.map +1 -1
  193. package/dist/utils/wallets.d.ts +7 -9
  194. package/dist/utils/wallets.d.ts.map +1 -1
  195. package/package.json +12 -10
  196. package/src/QueueManager.tsx +18 -17
  197. package/src/components/AppRouter.tsx +8 -32
  198. package/src/components/AppRoutes.tsx +57 -69
  199. package/src/components/BlockchainList/BlockchainList.styles.ts +2 -2
  200. package/src/components/BlockchainList/BlockchainList.tsx +4 -4
  201. package/src/components/BlockchainsSection/BlockchainsSection.tsx +4 -4
  202. package/src/components/ConfirmWalletsModal/ConfirmWallets.styles.ts +12 -6
  203. package/src/components/ConfirmWalletsModal/ConfirmWalletsModal.tsx +20 -21
  204. package/src/components/ConfirmWalletsModal/ConfirmWalletsModal.types.ts +0 -2
  205. package/src/components/ConfirmWalletsModal/WalletList.tsx +6 -5
  206. package/src/components/ConfirmWalletsModal/WalletList.type.ts +1 -4
  207. package/src/components/HeaderButtons/HomeButtons.tsx +28 -18
  208. package/src/components/Layout/Layout.tsx +20 -7
  209. package/src/components/Layout/Layout.types.ts +2 -2
  210. package/src/components/LoadingSwapDetails/LoadingSwapDetailStep.tsx +14 -7
  211. package/src/components/LoadingSwapDetails/LoadingSwapDetails.styles.ts +63 -60
  212. package/src/components/LoadingSwapDetails/LoadingSwapDetails.tsx +17 -8
  213. package/src/components/NoResult/NoResult.helpers.ts +12 -12
  214. package/src/components/NoResult/NoResult.tsx +6 -6
  215. package/src/components/NotificationContent/NotificationContent.tsx +5 -3
  216. package/src/components/Quote/Quote.styles.ts +42 -12
  217. package/src/components/Quote/Quote.tsx +106 -37
  218. package/src/components/Quote/Quote.types.ts +0 -1
  219. package/src/components/Quote/QuoteSkeleton.tsx +1 -1
  220. package/src/components/Quote/QuoteSummary.styles.ts +9 -8
  221. package/src/components/Quote/QuoteSummary.tsx +2 -2
  222. package/src/components/QuoteWarningsAndErrors/QuoteErrorsModalItem.tsx +1 -1
  223. package/src/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.helpers.ts +11 -4
  224. package/src/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.styles.ts +8 -1
  225. package/src/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.tsx +13 -13
  226. package/src/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.types.ts +1 -0
  227. package/src/components/QuoteWarningsAndErrors/SlippageWariningModal.tsx +3 -3
  228. package/src/components/Slippage/Slippage.tsx +3 -5
  229. package/src/components/SwapDetails/SwapDetails.Placeholder.tsx +5 -7
  230. package/src/components/SwapDetails/SwapDetails.helpers.tsx +1 -1
  231. package/src/components/SwapDetails/SwapDetails.styles.ts +37 -33
  232. package/src/components/SwapDetails/SwapDetails.tsx +33 -45
  233. package/src/components/SwapDetailsAlerts/SwapDetailsAlerts.Warning.tsx +1 -1
  234. package/src/components/SwapDetailsModal/SwapDetailsCompleteModal.tsx +4 -3
  235. package/src/components/SwapDetailsModal/SwapDetailsModal.Cancel.tsx +2 -2
  236. package/src/components/SwapDetailsModal/SwapDetailsModal.helpers.tsx +1 -1
  237. package/src/components/SwapDetailsModal/SwapDetailsModal.tsx +1 -1
  238. package/src/components/SwapDetailsModal/SwapDetailsModal.types.ts +1 -1
  239. package/src/components/SwapsGroup/SwapsGroup.styles.ts +10 -1
  240. package/src/components/SwapsGroup/SwapsGroup.tsx +3 -5
  241. package/src/components/TokenList/TokenList.helpers.ts +2 -2
  242. package/src/components/TokenList/TokenList.styles.ts +58 -37
  243. package/src/components/TokenList/TokenList.tsx +28 -23
  244. package/src/components/TokenList/TokenList.types.ts +3 -10
  245. package/src/components/TokenList/index.ts +0 -1
  246. package/src/components/UpdateUrl.tsx +23 -18
  247. package/src/components/WidgetEvents.tsx +4 -2
  248. package/src/constants/errors.ts +9 -5
  249. package/src/constants/index.ts +1 -0
  250. package/src/constants/navigationRoutes.ts +7 -8
  251. package/src/constants/searchParams.ts +1 -0
  252. package/src/containers/App/App.styles.ts +18 -0
  253. package/src/containers/App/App.tsx +52 -0
  254. package/src/containers/App/index.ts +1 -0
  255. package/src/containers/QuoteInfo/QuoteInfo.styles.ts +17 -1
  256. package/src/containers/QuoteInfo/QuoteInfo.tsx +44 -43
  257. package/src/containers/QuoteInfo/QuoteInfo.types.ts +3 -0
  258. package/src/{Wallets.tsx → containers/Wallets/Wallets.tsx} +48 -34
  259. package/src/containers/Wallets/Wallets.types.ts +12 -0
  260. package/src/containers/Wallets/index.ts +1 -0
  261. package/src/containers/Widget/Widget.tsx +19 -0
  262. package/src/containers/Widget/Widget.types.ts +5 -0
  263. package/src/containers/Widget/index.ts +2 -0
  264. package/src/containers/WidgetInfo/WidgetInfo.helpers.ts +64 -0
  265. package/src/containers/WidgetInfo/WidgetInfo.tsx +62 -0
  266. package/src/containers/WidgetInfo/WidgetInfo.types.ts +21 -0
  267. package/src/containers/WidgetInfo/index.ts +1 -0
  268. package/src/containers/WidgetProvider/WidgetProvider.tsx +28 -0
  269. package/src/containers/WidgetProvider/WidgetProvider.types.ts +7 -0
  270. package/src/containers/WidgetProvider/index.ts +1 -0
  271. package/src/hooks/useConfirmSwap/useConfirmSwap.helpers.ts +15 -11
  272. package/src/hooks/useConfirmSwap/useConfirmSwap.ts +25 -24
  273. package/src/hooks/useConfirmSwap/useConfirmSwap.types.ts +1 -1
  274. package/src/hooks/useForceAutoConnect.ts +27 -0
  275. package/src/hooks/useLanguage.ts +4 -5
  276. package/src/hooks/useNavigateBack.ts +3 -52
  277. package/src/hooks/usePrepareBlockchainList/usePrepareBlockchainList.constants.ts +1 -1
  278. package/src/hooks/usePrepareBlockchainList/usePrepareBlockchainList.helpers.ts +37 -7
  279. package/src/hooks/usePrepareBlockchainList/usePrepareBlockchainList.mock.ts +60 -0
  280. package/src/hooks/usePrepareBlockchainList/usePrepareBlockchainList.test.ts +78 -3
  281. package/src/hooks/usePrepareBlockchainList/usePrepareBlockchainList.ts +15 -6
  282. package/src/hooks/usePrepareBlockchainList/usePrepareBlockchainList.types.ts +6 -1
  283. package/src/hooks/useSwapInput.ts +89 -30
  284. package/src/hooks/useSyncStoresWithConfig.ts +38 -22
  285. package/src/hooks/useTheme.ts +4 -5
  286. package/src/hooks/useWalletList.ts +3 -5
  287. package/src/index.ts +53 -5
  288. package/src/pages/ConfirmSwapPage.tsx +61 -41
  289. package/src/pages/HistoryPage.tsx +2 -7
  290. package/src/pages/Home.tsx +58 -88
  291. package/src/pages/LanguagePage.tsx +0 -5
  292. package/src/pages/LiquiditySourcePage.tsx +24 -37
  293. package/src/pages/SelectBlockchainPage.tsx +28 -21
  294. package/src/pages/SelectSwapItemsPage.tsx +10 -27
  295. package/src/pages/SettingsPage.tsx +28 -24
  296. package/src/pages/SwapDetailsPage.tsx +6 -7
  297. package/src/pages/ThemePage.tsx +2 -7
  298. package/src/pages/WalletsPage.tsx +4 -15
  299. package/src/services/httpService.ts +1 -1
  300. package/src/store/AppStore.tsx +41 -0
  301. package/src/store/app.ts +44 -6
  302. package/src/store/quote.ts +29 -26
  303. package/src/store/slices/config.ts +25 -15
  304. package/src/store/slices/data.ts +64 -29
  305. package/src/store/slices/settings.ts +168 -0
  306. package/src/store/wallets.ts +68 -37
  307. package/src/types/config.ts +50 -5
  308. package/src/types/swap.ts +4 -13
  309. package/src/types/wallets.ts +18 -1
  310. package/src/utils/colors.ts +2 -1
  311. package/src/utils/configs.ts +2 -1
  312. package/src/utils/date.ts +1 -1
  313. package/src/utils/meta.ts +8 -1
  314. package/src/utils/providers.ts +8 -5
  315. package/src/utils/queue.ts +2 -2
  316. package/src/utils/quote.ts +7 -7
  317. package/src/utils/settings.ts +17 -10
  318. package/src/utils/swap.ts +59 -55
  319. package/src/utils/time.ts +1 -1
  320. package/src/utils/wallets.ts +107 -149
  321. package/dist/Wallets.d.ts +0 -17
  322. package/dist/Wallets.d.ts.map +0 -1
  323. package/dist/Widget.d.ts +0 -9
  324. package/dist/Widget.d.ts.map +0 -1
  325. package/dist/store/meta.d.ts +0 -23
  326. package/dist/store/meta.d.ts.map +0 -1
  327. package/dist/store/settings.d.ts +0 -81
  328. package/dist/store/settings.d.ts.map +0 -1
  329. package/src/Widget.tsx +0 -119
  330. package/src/store/meta.ts +0 -39
  331. package/src/store/settings.ts +0 -158
@@ -54,7 +54,7 @@ export function QuoteSkeleton(props: PropTypes) {
54
54
  );
55
55
 
56
56
  return (
57
- <Container>
57
+ <Container rounded={type !== 'basic'}>
58
58
  <div className="cost-and-tag">
59
59
  <div className="cost">
60
60
  <Skeleton width={60} height={10} variant="rounded" />
@@ -1,15 +1,16 @@
1
- import { styled } from '@rango-dev/ui';
1
+ import { css, styled } from '@rango-dev/ui';
2
2
 
3
3
  export const Container = styled('div', {
4
4
  position: 'relative',
5
5
  display: 'flex',
6
6
  flexDirection: 'column',
7
7
  width: '100%',
8
- '& .separator': {
9
- height: '14px',
10
- marginLeft: '14px',
11
- position: 'absolute',
12
- borderLeft: '1px solid $foreground',
13
- top: '42%',
14
- },
8
+ });
9
+
10
+ export const separatorStyles = css({
11
+ height: '14px',
12
+ marginLeft: '14px',
13
+ position: 'absolute',
14
+ borderLeft: '1px solid $foreground',
15
+ top: '42%',
15
16
  });
@@ -3,7 +3,7 @@ import type { PriceImpactWarningLevel, Step } from '@rango-dev/ui';
3
3
  import { TokenAmount } from '@rango-dev/ui';
4
4
  import React from 'react';
5
5
 
6
- import { Container } from './QuoteSummary.styles';
6
+ import { Container, separatorStyles } from './QuoteSummary.styles';
7
7
 
8
8
  type PropTypes = {
9
9
  from: Step['from'];
@@ -27,7 +27,7 @@ export function QuoteSummary(props: PropTypes) {
27
27
  }}
28
28
  chain={{ image: from.chain.image }}
29
29
  />
30
- <div className="separator" />
30
+ <div className={separatorStyles()} />
31
31
  <TokenAmount
32
32
  direction="horizontal"
33
33
  label="Estimated output"
@@ -10,7 +10,7 @@ export function QuoteErrorsModalItem(props: ModalContentData) {
10
10
 
11
11
  return (
12
12
  <Item>
13
- <Typography size="medium" variant="label" color="neutral600">
13
+ <Typography size="medium" variant="label" className="_title">
14
14
  {title}
15
15
  </Typography>
16
16
  <Typography
@@ -31,6 +31,7 @@ export function makeAlerts(
31
31
  if (warningLevel === 'high') {
32
32
  alertInfo.alertType = 'error';
33
33
  }
34
+ alertInfo.action = null;
34
35
  alertInfo.title = errorMessages().highValueLossError.title;
35
36
  }
36
37
  if (warning.type === QuoteWarningType.UNKNOWN_PRICE) {
@@ -38,14 +39,15 @@ export function makeAlerts(
38
39
  }
39
40
  if (warning.type === QuoteWarningType.INSUFFICIENT_SLIPPAGE) {
40
41
  alertInfo.title = i18n.t({
41
- id: 'minimum required slippage for this route: {minRequiredSlippage}',
42
+ id: 'We recommend you to increase slippage to at least {minRequiredSlippage} for this route.',
42
43
  values: {
43
44
  minRequiredSlippage: warning.minRequiredSlippage,
44
45
  },
45
46
  });
47
+ alertInfo.action = 'change-settings';
46
48
  }
47
49
  if (warning.type === QuoteWarningType.HIGH_SLIPPAGE) {
48
- alertInfo.title = i18n.t('Caution, your slippage is high');
50
+ alertInfo.title = i18n.t('Caution, your slippage is high.');
49
51
  }
50
52
  return alertInfo;
51
53
  }
@@ -53,11 +55,16 @@ export function makeAlerts(
53
55
  alertInfo.alertType = 'error';
54
56
  if (error.type === QuoteErrorType.BRIDGE_LIMIT) {
55
57
  alertInfo.title = error.recommendation;
56
- alertInfo.action = null;
58
+ alertInfo.action = 'show-info';
57
59
  }
58
60
 
59
61
  if (error.type === QuoteErrorType.INSUFFICIENT_SLIPPAGE) {
60
- alertInfo.title = '';
62
+ alertInfo.title = i18n.t({
63
+ id: 'You need to increase slippage to at least {minRequiredSlippage} for this route.',
64
+ values: {
65
+ minRequiredSlippage: error.minRequiredSlippage,
66
+ },
67
+ });
61
68
  alertInfo.action = 'change-settings';
62
69
  }
63
70
 
@@ -1,4 +1,4 @@
1
- import { styled } from '@rango-dev/ui';
1
+ import { darkTheme, styled } from '@rango-dev/ui';
2
2
 
3
3
  export const Alerts = styled('div', {
4
4
  width: '100%',
@@ -19,6 +19,13 @@ export const Item = styled('div', {
19
19
  justifyContent: 'space-between',
20
20
  alignItems: 'center',
21
21
  width: '100%',
22
+ '._title': {
23
+ $$color: '$colors$neutral600',
24
+ [`.${darkTheme} &`]: {
25
+ $$color: '$colors$neutral700',
26
+ },
27
+ color: '$$color',
28
+ },
22
29
  });
23
30
 
24
31
  export const Action = styled('div', {
@@ -3,9 +3,7 @@ import type { PropTypes } from './QuoteWarningsAndErrors.types';
3
3
  import { i18n } from '@lingui/core';
4
4
  import { Alert, Button, InfoIcon } from '@rango-dev/ui';
5
5
  import React from 'react';
6
- import { useNavigate } from 'react-router-dom';
7
6
 
8
- import { navigationRoutes } from '../../constants/navigationRoutes';
9
7
  import { QuoteErrorType, QuoteWarningType } from '../../types';
10
8
  import { NoResult } from '../NoResult';
11
9
 
@@ -24,10 +22,9 @@ export function QuoteWarningsAndErrors(props: PropTypes) {
24
22
  onOpenWarningModal,
25
23
  onCloseWarningModal,
26
24
  onConfirmWarningModal,
25
+ onChangeSettings,
27
26
  } = props;
28
27
 
29
- const navigate = useNavigate();
30
-
31
28
  const warningModalHandlers = {
32
29
  open: showWarningModal,
33
30
  onClose: onCloseWarningModal,
@@ -58,20 +55,23 @@ export function QuoteWarningsAndErrors(props: PropTypes) {
58
55
  title={alertInfo.title}
59
56
  type={alertInfo.alertType}
60
57
  variant="alarm"
61
- action={
62
- alertInfo.action === 'show-info' ? (
58
+ {...(alertInfo.action === 'show-info' && {
59
+ action: (
63
60
  <Action onClick={onOpenWarningModal}>
64
61
  <InfoIcon size={12} color="gray" />
65
62
  </Action>
66
- ) : (
63
+ ),
64
+ })}
65
+ {...(alertInfo.action === 'change-settings' && {
66
+ action: (
67
67
  <Button
68
- size="xsmall"
69
- type={'error'}
70
- onClick={() => navigate(navigationRoutes.settings)}>
71
- {i18n.t('Change Settings')}
68
+ size="xxsmall"
69
+ type={alertInfo.alertType}
70
+ onClick={onChangeSettings}>
71
+ {i18n.t('Change')}
72
72
  </Button>
73
- )
74
- }
73
+ ),
74
+ })}
75
75
  />
76
76
  </Alerts>
77
77
  )}
@@ -9,6 +9,7 @@ export interface PropTypes {
9
9
  onOpenWarningModal: () => void;
10
10
  onCloseWarningModal: () => void;
11
11
  onConfirmWarningModal: () => void;
12
+ onChangeSettings: () => void;
12
13
  }
13
14
 
14
15
  type ModalPropTypesKeys = keyof Omit<PropTypes, 'extraSpace' | 'loading'>;
@@ -9,7 +9,7 @@ import React from 'react';
9
9
  import { useNavigate } from 'react-router-dom';
10
10
 
11
11
  import { navigationRoutes } from '../../constants/navigationRoutes';
12
- import { useSettingsStore } from '../../store/settings';
12
+ import { useAppStore } from '../../store/AppStore';
13
13
  import { QuoteWarningType } from '../../types';
14
14
  import { getContainer } from '../../utils/common';
15
15
 
@@ -21,7 +21,7 @@ type PropsTypes = {
21
21
  };
22
22
 
23
23
  export function SlippageWarningModal(props: PropsTypes) {
24
- const { customSlippage, slippage } = useSettingsStore();
24
+ const { customSlippage, slippage } = useAppStore();
25
25
  const { open, onClose, onConfirm, warning } = props;
26
26
  const navigate = useNavigate();
27
27
  const userSlippage = customSlippage ?? slippage;
@@ -33,7 +33,7 @@ export function SlippageWarningModal(props: PropsTypes) {
33
33
  <Button
34
34
  size="small"
35
35
  variant="ghost"
36
- onClick={() => navigate('/' + navigationRoutes.settings)}>
36
+ onClick={() => navigate('../' + navigationRoutes.settings)}>
37
37
  <Typography variant="label" size="medium" color="$neutral900">
38
38
  {i18n.t('Change settings')}
39
39
  </Typography>
@@ -14,17 +14,15 @@ import {
14
14
  MIN_SLIPPGAE,
15
15
  SLIPPAGES,
16
16
  } from '../../constants/swapSettings';
17
- import { useSettingsStore } from '../../store/settings';
17
+ import { useAppStore } from '../../store/AppStore';
18
18
  import { getContainer } from '../../utils/common';
19
19
 
20
20
  import { BaseContainer, Head, SlippageChipsContainer } from './Slippage.styles';
21
21
  import { SlippageTooltipContent } from './SlippageTooltipContent';
22
22
 
23
23
  export function Slippage() {
24
- const slippage = useSettingsStore.use.slippage();
25
- const setSlippage = useSettingsStore.use.setSlippage();
26
- const customSlippage = useSettingsStore.use.customSlippage();
27
- const setCustomSlippage = useSettingsStore.use.setCustomSlippage();
24
+ const { slippage, setSlippage, customSlippage, setCustomSlippage } =
25
+ useAppStore();
28
26
 
29
27
  return (
30
28
  <BaseContainer>
@@ -10,8 +10,6 @@ import {
10
10
  } from '@rango-dev/ui';
11
11
  import React from 'react';
12
12
 
13
- import { navigationRoutes } from '../../constants/navigationRoutes';
14
- import { useNavigateBack } from '../../hooks/useNavigateBack';
15
13
  import { SuffixContainer } from '../HeaderButtons/HeaderButtons.styles';
16
14
  import { Layout } from '../Layout';
17
15
  import { LoadingSwapDetails } from '../LoadingSwapDetails';
@@ -20,28 +18,28 @@ import {
20
18
  Container,
21
19
  HeaderDetails,
22
20
  PlaceholderContainer,
21
+ requestIdStyles,
22
+ rowStyles,
23
23
  } from './SwapDetails.styles';
24
24
 
25
25
  export function SwapDetailsPlaceholder(props: SwapDetailsPlaceholderPropTypes) {
26
26
  const { requestId, showSkeleton } = props;
27
- const { navigateBackFrom } = useNavigateBack();
28
27
 
29
28
  return (
30
29
  <Layout
31
30
  noPadding
32
31
  header={{
33
32
  title: i18n.t('Swap and Bridge'),
34
- onBack: () => navigateBackFrom(navigationRoutes.swapDetails),
35
33
  suffix: <SuffixContainer />,
36
34
  }}>
37
35
  {showSkeleton && (
38
36
  <Container>
39
37
  <HeaderDetails>
40
- <div className="row">
38
+ <div className={rowStyles()}>
41
39
  <Typography variant="label" size="large" color="neutral700">
42
40
  {`${i18n.t('Request ID')}:`}
43
41
  </Typography>
44
- <div className="request-id">
42
+ <div className={requestIdStyles()}>
45
43
  <Typography variant="label" size="small" color="neutral700">
46
44
  <Skeleton width={60} height={10} variant="rounded" />
47
45
  </Typography>
@@ -50,7 +48,7 @@ export function SwapDetailsPlaceholder(props: SwapDetailsPlaceholderPropTypes) {
50
48
  </IconButton>
51
49
  </div>
52
50
  </div>
53
- <div className="row">
51
+ <div className={rowStyles()}>
54
52
  <Typography variant="label" size="large" color="neutral700">
55
53
  {`${i18n.t('Created at')}:`}
56
54
  </Typography>
@@ -1,6 +1,6 @@
1
1
  import type { GetStep } from '../SwapDetailsAlerts';
2
- import type { PendingSwapStep } from '@rango-dev/queue-manager-rango-preset';
3
2
  import type { Step, StepDetailsProps } from '@rango-dev/ui';
3
+ import type { PendingSwapStep } from 'rango-types';
4
4
 
5
5
  import React from 'react';
6
6
 
@@ -1,4 +1,4 @@
1
- import { darkTheme, styled } from '@rango-dev/ui';
1
+ import { css, darkTheme, styled } from '@rango-dev/ui';
2
2
 
3
3
  export const Container = styled('div', {
4
4
  display: 'flex',
@@ -7,38 +7,6 @@ export const Container = styled('div', {
7
7
  alignItems: 'center',
8
8
  height: '0',
9
9
  flexGrow: 1,
10
- '& .row': {
11
- display: 'flex',
12
- width: '100%',
13
- justifyContent: 'space-between',
14
- alignItems: 'center',
15
- padding: '$10 $20',
16
- borderBottom: '1px solid',
17
- $$color: '$colors$neutral300',
18
- [`.${darkTheme} &`]: {
19
- $$color: '$colors$neutral400',
20
- },
21
- borderColor: '$$color',
22
- color: '$neutral500',
23
- },
24
- '& .request-id': {
25
- display: 'flex',
26
- justifyContent: 'center',
27
- alignItems: 'center',
28
- height: '$24',
29
- },
30
- '& .output': {
31
- display: 'flex',
32
- width: '100%',
33
- padding: '$15 $20 $20',
34
- flexDirection: 'column',
35
- alignItems: 'start',
36
- },
37
- '& .title-steps': {
38
- textAlign: 'left',
39
- width: '100%',
40
- padding: '0 $20 $10',
41
- },
42
10
  });
43
11
 
44
12
  export const HeaderDetails = styled('div', {
@@ -70,3 +38,39 @@ export const LoaderContainer = styled('div', {
70
38
  paddingTop: '33%',
71
39
  flex: 1,
72
40
  });
41
+
42
+ export const rowStyles = css({
43
+ display: 'flex',
44
+ width: '100%',
45
+ justifyContent: 'space-between',
46
+ alignItems: 'center',
47
+ padding: '$10 $20',
48
+ borderBottom: '1px solid',
49
+ $$color: '$colors$neutral300',
50
+ [`.${darkTheme} &`]: {
51
+ $$color: '$colors$neutral400',
52
+ },
53
+ borderColor: '$$color',
54
+ color: '$neutral500',
55
+ });
56
+
57
+ export const requestIdStyles = css({
58
+ display: 'flex',
59
+ justifyContent: 'center',
60
+ alignItems: 'center',
61
+ height: '$24',
62
+ });
63
+
64
+ export const outputStyles = css({
65
+ display: 'flex',
66
+ width: '100%',
67
+ padding: '$15 $20 $20',
68
+ flexDirection: 'column',
69
+ alignItems: 'start',
70
+ });
71
+
72
+ export const titleStepsStyles = css({
73
+ textAlign: 'left',
74
+ width: '100%',
75
+ padding: '0 $20 $10',
76
+ });
@@ -6,7 +6,6 @@ import {
6
6
  getCurrentBlockchainOfOrNull,
7
7
  getCurrentStep,
8
8
  getRelatedWalletOrNull,
9
- PendingSwapNetworkStatus,
10
9
  } from '@rango-dev/queue-manager-rango-preset';
11
10
  import {
12
11
  Button,
@@ -19,10 +18,10 @@ import {
19
18
  useCopyToClipboard,
20
19
  } from '@rango-dev/ui';
21
20
  import { useWallets } from '@rango-dev/wallets-react';
21
+ import { PendingSwapNetworkStatus } from 'rango-types';
22
22
  import React, { useEffect, useRef, useState } from 'react';
23
23
  import { useNavigate } from 'react-router-dom';
24
24
 
25
- import { navigationRoutes } from '../../constants/navigationRoutes';
26
25
  import {
27
26
  GAS_FEE_MAX_DECIMALS,
28
27
  GAS_FEE_MIN_DECIMALS,
@@ -33,8 +32,7 @@ import {
33
32
  USD_VALUE_MAX_DECIMALS,
34
33
  USD_VALUE_MIN_DECIMALS,
35
34
  } from '../../constants/routing';
36
- import { useNavigateBack } from '../../hooks/useNavigateBack';
37
- import { useMetaStore } from '../../store/meta';
35
+ import { useAppStore } from '../../store/AppStore';
38
36
  import { useNotificationStore } from '../../store/notification';
39
37
  import { useQuoteStore } from '../../store/quote';
40
38
  import {
@@ -49,7 +47,7 @@ import {
49
47
  shouldRetrySwap,
50
48
  } from '../../utils/swap';
51
49
  import { getSwapDate } from '../../utils/time';
52
- import { getConciseAddress, getUsdPrice } from '../../utils/wallets';
50
+ import { getConciseAddress } from '../../utils/wallets';
53
51
  import { SuffixContainer } from '../HeaderButtons/HeaderButtons.styles';
54
52
  import { Layout } from '../Layout';
55
53
  import { QuoteSummary } from '../Quote';
@@ -59,23 +57,29 @@ import {
59
57
  } from '../SwapDetailsModal';
60
58
 
61
59
  import { getSteps, getStepState, RESET_INTERVAL } from './SwapDetails.helpers';
62
- import { Container, HeaderDetails, StepsList } from './SwapDetails.styles';
60
+ import {
61
+ Container,
62
+ HeaderDetails,
63
+ outputStyles,
64
+ requestIdStyles,
65
+ rowStyles,
66
+ StepsList,
67
+ titleStepsStyles,
68
+ } from './SwapDetails.styles';
63
69
 
64
70
  export function SwapDetails(props: SwapDetailsProps) {
65
71
  const { swap, requestId, onDelete, onCancel: onCancelProps } = props;
66
72
  const { canSwitchNetworkTo, connect, getWalletInfo } = useWallets();
73
+ const blockchains = useAppStore().blockchains();
74
+ const tokens = useAppStore().tokens();
67
75
  const retry = useQuoteStore.use.retry();
68
76
  const navigate = useNavigate();
69
- const { navigateBackFrom } = useNavigateBack();
70
77
  const [_, handleCopy] = useCopyToClipboard(RESET_INTERVAL);
71
78
  const listRef = useRef<HTMLDivElement | null>(null);
72
79
  const [modalState, setModalState] = useState<ModalState>(null);
73
80
  const [showCompletedModal, setShowCompletedModal] = useState<
74
81
  'success' | 'failed' | null
75
82
  >(null);
76
- const {
77
- meta: { tokens, blockchains },
78
- } = useMetaStore();
79
83
 
80
84
  const onCancel = () => {
81
85
  onCancelProps();
@@ -150,7 +154,7 @@ export function SwapDetails(props: SwapDetailsProps) {
150
154
  showNetworkModal: currentStepNetworkStatus,
151
155
  setNetworkModal: setModalState,
152
156
  message: stepMessage,
153
- blockchains,
157
+ blockchains: blockchains,
154
158
  });
155
159
  const numberOfSteps = steps.length;
156
160
  const [firstStep, lastStep] = [swap.steps[0], swap.steps[numberOfSteps - 1]];
@@ -167,35 +171,19 @@ export function SwapDetails(props: SwapDetailsProps) {
167
171
  )?.diagnosisUrl;
168
172
 
169
173
  const outputUsdValue = numberToString(
170
- String(
171
- parseFloat(
172
- numberToString(
173
- outputAmount,
174
- TOKEN_AMOUNT_MIN_DECIMALS,
175
- TOKEN_AMOUNT_MAX_DECIMALS
176
- )
177
- ) *
178
- (getUsdPrice(
179
- lastStep.toBlockchain,
180
- lastStep.toSymbol,
181
- lastStep.toSymbolAddress,
182
- tokens
183
- ) || 0)
184
- ),
174
+ parseFloat(
175
+ numberToString(
176
+ outputAmount,
177
+ TOKEN_AMOUNT_MIN_DECIMALS,
178
+ TOKEN_AMOUNT_MAX_DECIMALS
179
+ )
180
+ ) * (lastStep.toUsdPrice || 0),
185
181
  USD_VALUE_MIN_DECIMALS,
186
182
  USD_VALUE_MAX_DECIMALS
187
183
  );
188
184
 
189
185
  const inputUsdValue = numberToString(
190
- String(
191
- parseFloat(swap.inputAmount) *
192
- (getUsdPrice(
193
- firstStep.fromBlockchain,
194
- firstStep.fromSymbol,
195
- firstStep.fromSymbolAddress,
196
- tokens
197
- ) || 0)
198
- ),
186
+ parseFloat(swap.inputAmount) * (firstStep.fromUsdPrice || 0),
199
187
  USD_VALUE_MIN_DECIMALS,
200
188
  USD_VALUE_MAX_DECIMALS
201
189
  );
@@ -238,7 +226,6 @@ export function SwapDetails(props: SwapDetailsProps) {
238
226
  noPadding
239
227
  header={{
240
228
  title: i18n.t('Swap and Bridge'),
241
- onBack: () => navigateBackFrom(navigationRoutes.swapDetails),
242
229
  onCancel:
243
230
  swap.status === 'running' ? () => setModalState('cancel') : undefined,
244
231
  suffix: swap.status !== 'running' && (
@@ -264,9 +251,10 @@ export function SwapDetails(props: SwapDetailsProps) {
264
251
  type="primary"
265
252
  size="large"
266
253
  onClick={() => {
267
- retry(swap);
254
+ retry(swap, { blockchains: blockchains, tokens: tokens });
268
255
  setTimeout(() => {
269
- navigate(navigationRoutes.home);
256
+ const home = '../../';
257
+ navigate(home);
270
258
  }, 0);
271
259
  }}>
272
260
  {i18n.t('Try again')}
@@ -275,11 +263,11 @@ export function SwapDetails(props: SwapDetailsProps) {
275
263
  }>
276
264
  <Container>
277
265
  <HeaderDetails>
278
- <div className="row">
266
+ <div className={rowStyles()}>
279
267
  <Typography variant="label" size="large" color="neutral700">
280
268
  {`${i18n.t('Request ID')}:`}
281
269
  </Typography>
282
- <div className="request-id">
270
+ <div className={requestIdStyles()}>
283
271
  <Typography variant="label" size="small" color="neutral700">
284
272
  {requestId}
285
273
  </Typography>
@@ -290,7 +278,7 @@ export function SwapDetails(props: SwapDetailsProps) {
290
278
  </IconButton>
291
279
  </div>
292
280
  </div>
293
- <div className="row">
281
+ <div className={rowStyles()}>
294
282
  <Typography variant="label" size="large" color="neutral700">
295
283
  {`${i18n.t('Created at')}:`}
296
284
  </Typography>
@@ -300,7 +288,7 @@ export function SwapDetails(props: SwapDetailsProps) {
300
288
  </div>
301
289
  </HeaderDetails>
302
290
 
303
- <div className="output">
291
+ <div className={outputStyles()}>
304
292
  <QuoteCost
305
293
  fee={numberToString(
306
294
  String(totalFee),
@@ -348,14 +336,14 @@ export function SwapDetails(props: SwapDetailsProps) {
348
336
  },
349
337
  }}
350
338
  percentageChange={numberToString(
351
- String(percentageChange),
339
+ percentageChange,
352
340
  PERCENTAGE_CHANGE_MIN_DECIMALS,
353
341
  PERCENTAGE_CHANGE_MAX_DECIMALS
354
342
  )}
355
343
  warningLevel={getPriceImpactLevel(percentageChange ?? 0)}
356
344
  />
357
345
  </div>
358
- <div className="title-steps">
346
+ <div className={titleStepsStyles()}>
359
347
  <Typography variant="title" size="small">
360
348
  {i18n.t('Swaps steps')}
361
349
  </Typography>
@@ -406,7 +394,7 @@ export function SwapDetails(props: SwapDetailsProps) {
406
394
  )}
407
395
  usdValue={outputUsdValue}
408
396
  percentageChange={numberToString(
409
- String(percentageChange),
397
+ percentageChange,
410
398
  PERCENTAGE_CHANGE_MIN_DECIMALS,
411
399
  PERCENTAGE_CHANGE_MAX_DECIMALS
412
400
  )}
@@ -1,8 +1,8 @@
1
1
  import type { WaningAlertsProps } from './SwapDetailsAlerts.types';
2
2
 
3
3
  import { i18n } from '@lingui/core';
4
- import { PendingSwapNetworkStatus } from '@rango-dev/queue-manager-rango-preset';
5
4
  import { Alert, Button } from '@rango-dev/ui';
5
+ import { PendingSwapNetworkStatus } from 'rango-types';
6
6
  import React from 'react';
7
7
 
8
8
  export function WarningAlert(props: WaningAlertsProps) {
@@ -12,8 +12,6 @@ import {
12
12
  import React from 'react';
13
13
  import { useNavigate } from 'react-router-dom';
14
14
 
15
- import { navigationRoutes } from '../../constants/navigationRoutes';
16
-
17
15
  export function SwapDetailsCompleteModal(props: CompleteModalPropTypes) {
18
16
  const {
19
17
  open,
@@ -70,7 +68,10 @@ export function SwapDetailsCompleteModal(props: CompleteModalPropTypes) {
70
68
  variant="contained"
71
69
  type="primary"
72
70
  size="large"
73
- onClick={() => navigate(navigationRoutes.home)}>
71
+ onClick={() => {
72
+ const home = '../../';
73
+ navigate(home);
74
+ }}>
74
75
  <Typography variant="title" size="medium" color="neutral100">
75
76
  {i18n.t('Done')}
76
77
  </Typography>
@@ -10,8 +10,8 @@ export const CancelContent = ({ onCancel, onClose }: CancelContentProps) => {
10
10
  <Divider size={20} />
11
11
  <MessageBox
12
12
  type="error"
13
- title={i18n.t('Transaction Cancel')}
14
- description={i18n.t('Are you sure you want to Cancel this swap?')}
13
+ title={i18n.t('Cancel Swap')}
14
+ description={i18n.t('Are you sure you want to cancel this swap?')}
15
15
  />
16
16
  <Divider size={32} />
17
17
  <Button
@@ -1,7 +1,7 @@
1
1
  import type { ModalNetworkValueTypes } from './SwapDetailsModal.types';
2
2
 
3
3
  import { i18n } from '@lingui/core';
4
- import { PendingSwapNetworkStatus } from '@rango-dev/queue-manager-rango-preset';
4
+ import { PendingSwapNetworkStatus } from 'rango-types';
5
5
 
6
6
  export const modalNetworkValues: Record<
7
7
  Exclude<PendingSwapNetworkStatus, PendingSwapNetworkStatus.WaitingForQueue>,
@@ -1,7 +1,7 @@
1
1
  import type { ModalPropTypes } from './SwapDetailsModal.types';
2
2
 
3
- import { PendingSwapNetworkStatus } from '@rango-dev/queue-manager-rango-preset';
4
3
  import { Modal } from '@rango-dev/ui';
4
+ import { PendingSwapNetworkStatus } from 'rango-types';
5
5
  import React from 'react';
6
6
 
7
7
  import { CancelContent } from './SwapDetailsModal.Cancel';
@@ -1,5 +1,5 @@
1
- import type { PendingSwapNetworkStatus } from '@rango-dev/queue-manager-rango-preset';
2
1
  import type { WalletType } from '@rango-dev/wallets-shared';
2
+ import type { PendingSwapNetworkStatus } from 'rango-types';
3
3
 
4
4
  export type ModalState =
5
5
  | Exclude<PendingSwapNetworkStatus, PendingSwapNetworkStatus.WaitingForQueue>