@rango-dev/widget-embedded 0.17.1-next.8 → 0.18.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.
Files changed (361) hide show
  1. package/CHANGELOG.md +116 -0
  2. package/dist/QueueManager.d.ts +3 -1
  3. package/dist/QueueManager.d.ts.map +1 -1
  4. package/dist/components/AppRouter.d.ts.map +1 -1
  5. package/dist/components/AppRoutes.d.ts.map +1 -1
  6. package/dist/components/BlockchainsSection/BlockchainsSection.d.ts.map +1 -1
  7. package/dist/components/BlockchainsSection/BlockchainsSection.styles.d.ts +1 -1
  8. package/dist/components/BlockchainsSection/BlockchainsSection.styles.d.ts.map +1 -1
  9. package/dist/components/ConfirmWalletsModal/ConfirmWallets.styles.d.ts +690 -61
  10. package/dist/components/ConfirmWalletsModal/ConfirmWallets.styles.d.ts.map +1 -1
  11. package/dist/components/ConfirmWalletsModal/ConfirmWalletsModal.d.ts.map +1 -1
  12. package/dist/components/HeaderButtons/HomeButtons.d.ts.map +1 -1
  13. package/dist/components/Layout/Layout.d.ts.map +1 -1
  14. package/dist/components/Layout/Layout.styles.d.ts.map +1 -1
  15. package/dist/components/Layout/Layout.types.d.ts +2 -2
  16. package/dist/components/Layout/Layout.types.d.ts.map +1 -1
  17. package/dist/components/LoadingSwapDetails/LoadingSwapDetails.d.ts.map +1 -1
  18. package/dist/components/LoadingSwapDetails/LoadingSwapDetails.styles.d.ts +1727 -0
  19. package/dist/components/LoadingSwapDetails/LoadingSwapDetails.styles.d.ts.map +1 -1
  20. package/dist/components/NoResult/NoResult.d.ts.map +1 -1
  21. package/dist/components/NotificationContent/NotificationContent.d.ts.map +1 -1
  22. package/dist/components/Quote/Quote.d.ts.map +1 -1
  23. package/dist/components/Quote/Quote.styles.d.ts +793 -5
  24. package/dist/components/Quote/Quote.styles.d.ts.map +1 -1
  25. package/dist/components/Quote/Quote.types.d.ts +0 -1
  26. package/dist/components/Quote/Quote.types.d.ts.map +1 -1
  27. package/dist/components/Quote/QuoteSummary.styles.d.ts +157 -0
  28. package/dist/components/Quote/QuoteSummary.styles.d.ts.map +1 -1
  29. package/dist/components/Quote/index.d.ts +0 -1
  30. package/dist/components/Quote/index.d.ts.map +1 -1
  31. package/dist/components/QuoteSkeleton/QuoteSkeleton.d.ts.map +1 -0
  32. package/dist/components/{Quote → QuoteSkeleton}/QuoteSkeleton.styles.d.ts +314 -0
  33. package/dist/components/QuoteSkeleton/QuoteSkeleton.styles.d.ts.map +1 -0
  34. package/dist/components/QuoteSkeleton/QuoteSkeleton.types.d.ts.map +1 -0
  35. package/dist/components/QuoteSkeleton/QuoteSummarySkeleton.d.ts +4 -0
  36. package/dist/components/QuoteSkeleton/QuoteSummarySkeleton.d.ts.map +1 -0
  37. package/dist/components/QuoteSkeleton/QuoteSummarySkeleton.styles.d.ts +1571 -0
  38. package/dist/components/QuoteSkeleton/QuoteSummarySkeleton.styles.d.ts.map +1 -0
  39. package/dist/components/QuoteSkeleton/QuoteSummarySkeleton.types.d.ts +6 -0
  40. package/dist/components/QuoteSkeleton/QuoteSummarySkeleton.types.d.ts.map +1 -0
  41. package/dist/components/QuoteSkeleton/StepSkeleton.d.ts +4 -0
  42. package/dist/components/QuoteSkeleton/StepSkeleton.d.ts.map +1 -0
  43. package/dist/components/QuoteSkeleton/StepSkeleton.styles.d.ts +786 -0
  44. package/dist/components/QuoteSkeleton/StepSkeleton.styles.d.ts.map +1 -0
  45. package/dist/components/QuoteSkeleton/StepSkeleton.types.d.ts +4 -0
  46. package/dist/components/QuoteSkeleton/StepSkeleton.types.d.ts.map +1 -0
  47. package/dist/components/QuoteSkeleton/index.d.ts +4 -0
  48. package/dist/components/QuoteSkeleton/index.d.ts.map +1 -0
  49. package/dist/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.d.ts.map +1 -1
  50. package/dist/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.helpers.d.ts.map +1 -1
  51. package/dist/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.styles.d.ts.map +1 -1
  52. package/dist/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.types.d.ts +1 -0
  53. package/dist/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.types.d.ts.map +1 -1
  54. package/dist/components/Slippage/Slippage.d.ts.map +1 -1
  55. package/dist/components/Slippage/Slippage.styles.d.ts +158 -0
  56. package/dist/components/Slippage/Slippage.styles.d.ts.map +1 -1
  57. package/dist/components/SwapDetails/SwapDetails.Placeholder.d.ts.map +1 -1
  58. package/dist/components/SwapDetails/SwapDetails.d.ts.map +1 -1
  59. package/dist/components/SwapDetails/SwapDetails.helpers.d.ts +1 -1
  60. package/dist/components/SwapDetails/SwapDetails.helpers.d.ts.map +1 -1
  61. package/dist/components/SwapDetails/SwapDetails.styles.d.ts +628 -0
  62. package/dist/components/SwapDetails/SwapDetails.styles.d.ts.map +1 -1
  63. package/dist/components/SwapDetailsModal/SwapDetailsCompleteModal.d.ts.map +1 -1
  64. package/dist/components/SwapDetailsModal/SwapDetailsModal.WalletState.d.ts.map +1 -1
  65. package/dist/components/SwapDetailsModal/SwapDetailsModal.helpers.d.ts +1 -1
  66. package/dist/components/SwapDetailsModal/SwapDetailsModal.helpers.d.ts.map +1 -1
  67. package/dist/components/SwapDetailsModal/SwapDetailsModal.types.d.ts +1 -1
  68. package/dist/components/SwapDetailsModal/SwapDetailsModal.types.d.ts.map +1 -1
  69. package/dist/components/SwapsGroup/SwapsGroup.d.ts.map +1 -1
  70. package/dist/components/SwapsGroup/SwapsGroup.styles.d.ts +157 -0
  71. package/dist/components/SwapsGroup/SwapsGroup.styles.d.ts.map +1 -1
  72. package/dist/components/TokenList/TokenList.d.ts.map +1 -1
  73. package/dist/components/TokenList/TokenList.helpers.d.ts +2 -2
  74. package/dist/components/TokenList/TokenList.helpers.d.ts.map +1 -1
  75. package/dist/components/TokenList/TokenList.styles.d.ts +1100 -1
  76. package/dist/components/TokenList/TokenList.styles.d.ts.map +1 -1
  77. package/dist/components/TokenList/TokenList.types.d.ts +4 -9
  78. package/dist/components/TokenList/TokenList.types.d.ts.map +1 -1
  79. package/dist/components/TokenList/index.d.ts +0 -1
  80. package/dist/components/TokenList/index.d.ts.map +1 -1
  81. package/dist/components/UpdateUrl.d.ts.map +1 -1
  82. package/dist/constants/errors.d.ts.map +1 -1
  83. package/dist/constants/index.d.ts +1 -0
  84. package/dist/constants/index.d.ts.map +1 -1
  85. package/dist/constants/navigationRoutes.d.ts +1 -2
  86. package/dist/constants/navigationRoutes.d.ts.map +1 -1
  87. package/dist/constants/searchParams.d.ts +2 -1
  88. package/dist/constants/searchParams.d.ts.map +1 -1
  89. package/dist/containers/App/App.d.ts +3 -0
  90. package/dist/containers/App/App.d.ts.map +1 -0
  91. package/dist/containers/App/App.styles.d.ts +158 -0
  92. package/dist/containers/App/App.styles.d.ts.map +1 -0
  93. package/dist/containers/App/index.d.ts +2 -0
  94. package/dist/containers/App/index.d.ts.map +1 -0
  95. package/dist/containers/QuoteInfo/QuoteInfo.d.ts.map +1 -1
  96. package/dist/containers/QuoteInfo/QuoteInfo.styles.d.ts +316 -0
  97. package/dist/containers/QuoteInfo/QuoteInfo.styles.d.ts.map +1 -1
  98. package/dist/containers/QuoteInfo/QuoteInfo.types.d.ts +3 -0
  99. package/dist/containers/QuoteInfo/QuoteInfo.types.d.ts.map +1 -1
  100. package/dist/containers/Wallets/Wallets.d.ts +6 -0
  101. package/dist/containers/Wallets/Wallets.d.ts.map +1 -0
  102. package/dist/containers/Wallets/Wallets.types.d.ts +11 -0
  103. package/dist/containers/Wallets/Wallets.types.d.ts.map +1 -0
  104. package/dist/containers/Wallets/index.d.ts +2 -0
  105. package/dist/containers/Wallets/index.d.ts.map +1 -0
  106. package/dist/containers/Widget/Widget.d.ts +5 -0
  107. package/dist/containers/Widget/Widget.d.ts.map +1 -0
  108. package/dist/containers/Widget/Widget.types.d.ts +5 -0
  109. package/dist/containers/Widget/Widget.types.d.ts.map +1 -0
  110. package/dist/containers/Widget/index.d.ts +3 -0
  111. package/dist/containers/Widget/index.d.ts.map +1 -0
  112. package/dist/containers/WidgetInfo/WidgetInfo.d.ts +6 -0
  113. package/dist/containers/WidgetInfo/WidgetInfo.d.ts.map +1 -0
  114. package/dist/containers/WidgetInfo/WidgetInfo.helpers.d.ts +20 -0
  115. package/dist/containers/WidgetInfo/WidgetInfo.helpers.d.ts.map +1 -0
  116. package/dist/containers/WidgetInfo/WidgetInfo.types.d.ts +21 -0
  117. package/dist/containers/WidgetInfo/WidgetInfo.types.d.ts.map +1 -0
  118. package/dist/containers/WidgetInfo/index.d.ts +2 -0
  119. package/dist/containers/WidgetInfo/index.d.ts.map +1 -0
  120. package/dist/containers/WidgetProvider/WidgetProvider.d.ts +5 -0
  121. package/dist/containers/WidgetProvider/WidgetProvider.d.ts.map +1 -0
  122. package/dist/containers/WidgetProvider/WidgetProvider.types.d.ts +7 -0
  123. package/dist/containers/WidgetProvider/WidgetProvider.types.d.ts.map +1 -0
  124. package/dist/containers/WidgetProvider/index.d.ts +2 -0
  125. package/dist/containers/WidgetProvider/index.d.ts.map +1 -0
  126. package/dist/hooks/useConfirmSwap/useConfirmSwap.d.ts.map +1 -1
  127. package/dist/hooks/useConfirmSwap/useConfirmSwap.helpers.d.ts +6 -3
  128. package/dist/hooks/useConfirmSwap/useConfirmSwap.helpers.d.ts.map +1 -1
  129. package/dist/hooks/useConfirmSwap/useConfirmSwap.types.d.ts +1 -1
  130. package/dist/hooks/useConfirmSwap/useConfirmSwap.types.d.ts.map +1 -1
  131. package/dist/hooks/useForceAutoConnect.d.ts +2 -0
  132. package/dist/hooks/useForceAutoConnect.d.ts.map +1 -0
  133. package/dist/hooks/useLanguage.d.ts +1 -1
  134. package/dist/hooks/useLanguage.d.ts.map +1 -1
  135. package/dist/hooks/useNavigateBack.d.ts +1 -3
  136. package/dist/hooks/useNavigateBack.d.ts.map +1 -1
  137. package/dist/hooks/usePrepareBlockchainList/usePrepareBlockchainList.constants.d.ts +1 -1
  138. package/dist/hooks/usePrepareBlockchainList/usePrepareBlockchainList.d.ts +2 -2
  139. package/dist/hooks/usePrepareBlockchainList/usePrepareBlockchainList.d.ts.map +1 -1
  140. package/dist/hooks/usePrepareBlockchainList/usePrepareBlockchainList.helpers.d.ts +3 -5
  141. package/dist/hooks/usePrepareBlockchainList/usePrepareBlockchainList.helpers.d.ts.map +1 -1
  142. package/dist/hooks/usePrepareBlockchainList/usePrepareBlockchainList.mock.d.ts +1 -0
  143. package/dist/hooks/usePrepareBlockchainList/usePrepareBlockchainList.mock.d.ts.map +1 -1
  144. package/dist/hooks/usePrepareBlockchainList/usePrepareBlockchainList.types.d.ts +5 -1
  145. package/dist/hooks/usePrepareBlockchainList/usePrepareBlockchainList.types.d.ts.map +1 -1
  146. package/dist/hooks/useSwapInput.d.ts.map +1 -1
  147. package/dist/hooks/useSyncStoresWithConfig.d.ts.map +1 -1
  148. package/dist/hooks/useTheme.d.ts +1 -1
  149. package/dist/hooks/useTheme.d.ts.map +1 -1
  150. package/dist/index.d.ts +20 -8
  151. package/dist/index.d.ts.map +1 -1
  152. package/dist/index.js +1 -1
  153. package/dist/index.js.map +4 -4
  154. package/dist/pages/ConfirmSwapPage.d.ts.map +1 -1
  155. package/dist/pages/HistoryPage.d.ts.map +1 -1
  156. package/dist/pages/Home.d.ts.map +1 -1
  157. package/dist/pages/LanguagePage.d.ts.map +1 -1
  158. package/dist/pages/LiquiditySourcePage.d.ts.map +1 -1
  159. package/dist/pages/SelectBlockchainPage.d.ts.map +1 -1
  160. package/dist/pages/SelectSwapItemsPage.d.ts.map +1 -1
  161. package/dist/pages/SettingsPage.d.ts.map +1 -1
  162. package/dist/pages/SwapDetailsPage.d.ts.map +1 -1
  163. package/dist/pages/ThemePage.d.ts.map +1 -1
  164. package/dist/pages/WalletsPage.d.ts.map +1 -1
  165. package/dist/store/AppStore.d.ts +37 -1
  166. package/dist/store/AppStore.d.ts.map +1 -1
  167. package/dist/store/app.d.ts +39 -2
  168. package/dist/store/app.d.ts.map +1 -1
  169. package/dist/store/notification.d.ts +4 -3
  170. package/dist/store/notification.d.ts.map +1 -1
  171. package/dist/store/quote.d.ts +9 -9
  172. package/dist/store/quote.d.ts.map +1 -1
  173. package/dist/store/slices/config.d.ts.map +1 -1
  174. package/dist/store/slices/data.d.ts +2 -2
  175. package/dist/store/slices/data.d.ts.map +1 -1
  176. package/dist/store/slices/settings.d.ts +39 -0
  177. package/dist/store/slices/settings.d.ts.map +1 -0
  178. package/dist/store/ui.d.ts +2 -1
  179. package/dist/store/ui.d.ts.map +1 -1
  180. package/dist/store/wallets.d.ts +9 -5
  181. package/dist/store/wallets.d.ts.map +1 -1
  182. package/dist/types/config.d.ts +36 -3
  183. package/dist/types/config.d.ts.map +1 -1
  184. package/dist/types/swap.d.ts +4 -14
  185. package/dist/types/swap.d.ts.map +1 -1
  186. package/dist/types/wallets.d.ts +15 -1
  187. package/dist/types/wallets.d.ts.map +1 -1
  188. package/dist/utils/colors.d.ts.map +1 -1
  189. package/dist/utils/configs.d.ts +1 -0
  190. package/dist/utils/configs.d.ts.map +1 -1
  191. package/dist/utils/meta.d.ts +2 -1
  192. package/dist/utils/meta.d.ts.map +1 -1
  193. package/dist/utils/providers.d.ts +2 -2
  194. package/dist/utils/providers.d.ts.map +1 -1
  195. package/dist/utils/queue.d.ts +2 -2
  196. package/dist/utils/queue.d.ts.map +1 -1
  197. package/dist/utils/quote.d.ts +1 -1
  198. package/dist/utils/quote.d.ts.map +1 -1
  199. package/dist/utils/settings.d.ts +4 -1
  200. package/dist/utils/settings.d.ts.map +1 -1
  201. package/dist/utils/swap.d.ts +13 -5
  202. package/dist/utils/swap.d.ts.map +1 -1
  203. package/dist/utils/time.d.ts +1 -1
  204. package/dist/utils/time.d.ts.map +1 -1
  205. package/dist/utils/wallets.d.ts +7 -8
  206. package/dist/utils/wallets.d.ts.map +1 -1
  207. package/package.json +12 -10
  208. package/src/QueueManager.tsx +4 -3
  209. package/src/components/AppRouter.tsx +5 -27
  210. package/src/components/AppRoutes.tsx +54 -33
  211. package/src/components/BlockchainList/BlockchainList.styles.ts +2 -2
  212. package/src/components/BlockchainsSection/BlockchainsSection.styles.ts +1 -1
  213. package/src/components/BlockchainsSection/BlockchainsSection.tsx +19 -10
  214. package/src/components/ConfirmWalletsModal/ConfirmWallets.styles.ts +29 -10
  215. package/src/components/ConfirmWalletsModal/ConfirmWalletsModal.tsx +15 -7
  216. package/src/components/ConfirmWalletsModal/WalletList.tsx +3 -3
  217. package/src/components/HeaderButtons/HomeButtons.tsx +28 -18
  218. package/src/components/Layout/Layout.styles.ts +2 -0
  219. package/src/components/Layout/Layout.tsx +20 -7
  220. package/src/components/Layout/Layout.types.ts +2 -2
  221. package/src/components/LoadingSwapDetails/LoadingSwapDetails.styles.ts +65 -61
  222. package/src/components/LoadingSwapDetails/LoadingSwapDetails.tsx +28 -34
  223. package/src/components/NoResult/NoResult.helpers.ts +12 -12
  224. package/src/components/NoResult/NoResult.tsx +2 -5
  225. package/src/components/NotificationContent/NotificationContent.tsx +2 -1
  226. package/src/components/Quote/Quote.styles.ts +49 -12
  227. package/src/components/Quote/Quote.tsx +107 -38
  228. package/src/components/Quote/Quote.types.ts +0 -1
  229. package/src/components/Quote/QuoteSummary.styles.ts +9 -8
  230. package/src/components/Quote/QuoteSummary.tsx +2 -2
  231. package/src/components/Quote/index.ts +0 -1
  232. package/src/components/QuoteSkeleton/QuoteSkeleton.styles.ts +42 -0
  233. package/src/components/QuoteSkeleton/QuoteSkeleton.tsx +30 -0
  234. package/src/components/QuoteSkeleton/QuoteSummarySkeleton.styles.ts +57 -0
  235. package/src/components/QuoteSkeleton/QuoteSummarySkeleton.tsx +76 -0
  236. package/src/components/QuoteSkeleton/QuoteSummarySkeleton.types.ts +6 -0
  237. package/src/components/QuoteSkeleton/StepSkeleton.styles.ts +33 -0
  238. package/src/components/QuoteSkeleton/StepSkeleton.tsx +44 -0
  239. package/src/components/QuoteSkeleton/StepSkeleton.types.ts +1 -0
  240. package/src/components/QuoteSkeleton/index.ts +3 -0
  241. package/src/components/QuoteWarningsAndErrors/QuoteErrorsModalItem.tsx +1 -1
  242. package/src/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.helpers.ts +11 -4
  243. package/src/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.styles.ts +8 -1
  244. package/src/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.tsx +13 -13
  245. package/src/components/QuoteWarningsAndErrors/QuoteWarningsAndErrors.types.ts +1 -0
  246. package/src/components/QuoteWarningsAndErrors/SlippageWariningModal.tsx +3 -3
  247. package/src/components/Slippage/Slippage.styles.ts +15 -5
  248. package/src/components/Slippage/Slippage.tsx +11 -10
  249. package/src/components/SwapDetails/SwapDetails.Placeholder.tsx +5 -8
  250. package/src/components/SwapDetails/SwapDetails.helpers.tsx +1 -1
  251. package/src/components/SwapDetails/SwapDetails.styles.ts +36 -33
  252. package/src/components/SwapDetails/SwapDetails.tsx +28 -39
  253. package/src/components/SwapDetailsAlerts/SwapDetailsAlerts.Warning.tsx +1 -1
  254. package/src/components/SwapDetailsModal/SwapDetailsCompleteModal.tsx +4 -3
  255. package/src/components/SwapDetailsModal/SwapDetailsModal.Cancel.tsx +2 -2
  256. package/src/components/SwapDetailsModal/SwapDetailsModal.WalletState.tsx +14 -8
  257. package/src/components/SwapDetailsModal/SwapDetailsModal.helpers.tsx +1 -1
  258. package/src/components/SwapDetailsModal/SwapDetailsModal.tsx +1 -1
  259. package/src/components/SwapDetailsModal/SwapDetailsModal.types.ts +1 -1
  260. package/src/components/SwapsGroup/SwapsGroup.styles.ts +10 -1
  261. package/src/components/SwapsGroup/SwapsGroup.tsx +3 -5
  262. package/src/components/TokenList/TokenList.helpers.ts +2 -2
  263. package/src/components/TokenList/TokenList.styles.ts +74 -38
  264. package/src/components/TokenList/TokenList.tsx +30 -20
  265. package/src/components/TokenList/TokenList.types.ts +4 -10
  266. package/src/components/TokenList/index.ts +0 -1
  267. package/src/components/UpdateUrl.tsx +4 -5
  268. package/src/constants/errors.ts +9 -5
  269. package/src/constants/index.ts +1 -0
  270. package/src/constants/navigationRoutes.ts +7 -8
  271. package/src/constants/searchParams.ts +1 -0
  272. package/src/containers/App/App.styles.ts +18 -0
  273. package/src/containers/App/App.tsx +52 -0
  274. package/src/containers/App/index.ts +1 -0
  275. package/src/containers/QuoteInfo/QuoteInfo.styles.ts +17 -1
  276. package/src/containers/QuoteInfo/QuoteInfo.tsx +46 -44
  277. package/src/containers/QuoteInfo/QuoteInfo.types.ts +3 -0
  278. package/src/{Wallets.tsx → containers/Wallets/Wallets.tsx} +25 -31
  279. package/src/containers/Wallets/Wallets.types.ts +12 -0
  280. package/src/containers/Wallets/index.ts +1 -0
  281. package/src/containers/Widget/Widget.tsx +19 -0
  282. package/src/containers/Widget/Widget.types.ts +5 -0
  283. package/src/containers/Widget/index.ts +2 -0
  284. package/src/containers/WidgetInfo/WidgetInfo.helpers.ts +64 -0
  285. package/src/containers/WidgetInfo/WidgetInfo.tsx +62 -0
  286. package/src/containers/WidgetInfo/WidgetInfo.types.ts +21 -0
  287. package/src/containers/WidgetInfo/index.ts +1 -0
  288. package/src/containers/WidgetProvider/WidgetProvider.tsx +28 -0
  289. package/src/containers/WidgetProvider/WidgetProvider.types.ts +7 -0
  290. package/src/containers/WidgetProvider/index.ts +1 -0
  291. package/src/hooks/useConfirmSwap/useConfirmSwap.helpers.ts +15 -11
  292. package/src/hooks/useConfirmSwap/useConfirmSwap.ts +21 -20
  293. package/src/hooks/useConfirmSwap/useConfirmSwap.types.ts +1 -1
  294. package/src/hooks/useForceAutoConnect.ts +27 -0
  295. package/src/hooks/useLanguage.ts +4 -5
  296. package/src/hooks/useNavigateBack.ts +3 -52
  297. package/src/hooks/usePrepareBlockchainList/usePrepareBlockchainList.constants.ts +1 -1
  298. package/src/hooks/usePrepareBlockchainList/usePrepareBlockchainList.helpers.ts +37 -7
  299. package/src/hooks/usePrepareBlockchainList/usePrepareBlockchainList.mock.ts +60 -0
  300. package/src/hooks/usePrepareBlockchainList/usePrepareBlockchainList.test.ts +78 -3
  301. package/src/hooks/usePrepareBlockchainList/usePrepareBlockchainList.ts +15 -6
  302. package/src/hooks/usePrepareBlockchainList/usePrepareBlockchainList.types.ts +6 -1
  303. package/src/hooks/useSwapInput.ts +86 -28
  304. package/src/hooks/useSyncStoresWithConfig.ts +18 -5
  305. package/src/hooks/useTheme.ts +4 -5
  306. package/src/index.ts +53 -5
  307. package/src/pages/ConfirmSwapPage.tsx +61 -33
  308. package/src/pages/HistoryPage.tsx +2 -7
  309. package/src/pages/Home.tsx +55 -81
  310. package/src/pages/LanguagePage.tsx +0 -5
  311. package/src/pages/LiquiditySourcePage.tsx +3 -7
  312. package/src/pages/SelectBlockchainPage.tsx +26 -18
  313. package/src/pages/SelectSwapItemsPage.tsx +13 -26
  314. package/src/pages/SettingsPage.tsx +26 -17
  315. package/src/pages/SwapDetailsPage.tsx +3 -4
  316. package/src/pages/ThemePage.tsx +2 -7
  317. package/src/pages/WalletsPage.tsx +5 -8
  318. package/src/services/httpService.ts +1 -1
  319. package/src/store/AppStore.tsx +7 -1
  320. package/src/store/app.ts +31 -5
  321. package/src/store/quote.ts +3 -4
  322. package/src/store/slices/config.ts +1 -0
  323. package/src/store/slices/data.ts +10 -6
  324. package/src/store/slices/settings.ts +168 -0
  325. package/src/store/wallets.ts +57 -29
  326. package/src/types/config.ts +48 -3
  327. package/src/types/swap.ts +4 -13
  328. package/src/types/wallets.ts +18 -1
  329. package/src/utils/colors.ts +2 -1
  330. package/src/utils/configs.ts +2 -1
  331. package/src/utils/date.ts +1 -1
  332. package/src/utils/meta.ts +8 -1
  333. package/src/utils/providers.ts +8 -5
  334. package/src/utils/queue.ts +2 -2
  335. package/src/utils/quote.ts +7 -7
  336. package/src/utils/settings.ts +11 -5
  337. package/src/utils/swap.ts +46 -40
  338. package/src/utils/time.ts +1 -1
  339. package/src/utils/wallets.ts +127 -144
  340. package/dist/Wallets.d.ts +0 -18
  341. package/dist/Wallets.d.ts.map +0 -1
  342. package/dist/Widget.d.ts +0 -9
  343. package/dist/Widget.d.ts.map +0 -1
  344. package/dist/components/LoadingSwapDetails/LoadingSwapDetailStep.d.ts +0 -4
  345. package/dist/components/LoadingSwapDetails/LoadingSwapDetailStep.d.ts.map +0 -1
  346. package/dist/components/LoadingSwapDetails/LoadingSwapDetails.types.d.ts +0 -4
  347. package/dist/components/LoadingSwapDetails/LoadingSwapDetails.types.d.ts.map +0 -1
  348. package/dist/components/Quote/QuoteSkeleton.d.ts.map +0 -1
  349. package/dist/components/Quote/QuoteSkeleton.styles.d.ts.map +0 -1
  350. package/dist/components/Quote/QuoteSkeleton.types.d.ts.map +0 -1
  351. package/dist/store/settings.d.ts +0 -82
  352. package/dist/store/settings.d.ts.map +0 -1
  353. package/src/Widget.tsx +0 -106
  354. package/src/components/LoadingSwapDetails/LoadingSwapDetailStep.tsx +0 -41
  355. package/src/components/LoadingSwapDetails/LoadingSwapDetails.types.ts +0 -3
  356. package/src/components/Quote/QuoteSkeleton.styles.ts +0 -110
  357. package/src/components/Quote/QuoteSkeleton.tsx +0 -108
  358. package/src/store/settings.ts +0 -161
  359. /package/dist/components/{Quote → QuoteSkeleton}/QuoteSkeleton.d.ts +0 -0
  360. /package/dist/components/{Quote → QuoteSkeleton}/QuoteSkeleton.types.d.ts +0 -0
  361. /package/src/components/{Quote → QuoteSkeleton}/QuoteSkeleton.types.ts +0 -0
@@ -19,15 +19,16 @@ import React, { useEffect, useLayoutEffect, useRef, useState } from 'react';
19
19
  import { useNavigate } from 'react-router-dom';
20
20
 
21
21
  import { getQuoteErrorMessage } from '../../constants/errors';
22
- import { navigationRoutes } from '../../constants/navigationRoutes';
23
22
  import { getQuoteUpdateWarningMessage } from '../../constants/warnings';
24
23
  import { useAppStore } from '../../store/AppStore';
25
24
  import { useQuoteStore } from '../../store/quote';
26
25
  import { useWalletsStore } from '../../store/wallets';
26
+ import { getBlockchainShortNameFor } from '../../utils/meta';
27
27
  import { confirmSwapDisabled } from '../../utils/swap';
28
28
 
29
29
  import { getRequiredWallets, isValidAddress } from './ConfirmWallets.helpers';
30
30
  import {
31
+ alarmsStyles,
31
32
  CollapsibleContent,
32
33
  CollapsibleRoot,
33
34
  ConfirmButton,
@@ -43,6 +44,7 @@ import {
43
44
  Trigger,
44
45
  Wallets,
45
46
  WalletsContainer,
47
+ walletsListStyles,
46
48
  } from './ConfirmWallets.styles';
47
49
  import { WalletList } from './WalletList';
48
50
 
@@ -244,7 +246,8 @@ export function ConfirmWalletsModal(props: PropTypes) {
244
246
  open={open}
245
247
  onClose={() => {
246
248
  if (!quoteWalletsConfirmed) {
247
- navigate(navigationRoutes.home, { replace: true });
249
+ const home = '../';
250
+ navigate(home, { replace: true });
248
251
  }
249
252
  onClose();
250
253
  }}
@@ -285,7 +288,12 @@ export function ConfirmWalletsModal(props: PropTypes) {
285
288
  <Typography variant="headline" size="small">
286
289
  {i18n.t({
287
290
  id: 'Your {blockchainName} wallets',
288
- values: { blockchainName: showMoreWalletFor },
291
+ values: {
292
+ blockchainName: getBlockchainShortNameFor(
293
+ showMoreWalletFor,
294
+ blockchains
295
+ ),
296
+ },
289
297
  })}
290
298
  </Typography>
291
299
  </ShowMoreHeader>
@@ -312,7 +320,7 @@ export function ConfirmWalletsModal(props: PropTypes) {
312
320
  </Modal>
313
321
  {showMoreWalletFor && (
314
322
  <WalletsContainer>
315
- <div className="wallets-list">
323
+ <div className={walletsListStyles()}>
316
324
  <WalletList
317
325
  chain={showMoreWalletFor}
318
326
  isSelected={isSelected}
@@ -355,7 +363,7 @@ export function ConfirmWalletsModal(props: PropTypes) {
355
363
  <Typography variant="title" size="xmedium">
356
364
  {i18n.t({
357
365
  id: 'Your {blockchainName} wallets',
358
- values: { blockchainName: blockchain?.displayName },
366
+ values: { blockchainName: blockchain?.shortName },
359
367
  })}
360
368
  </Typography>
361
369
  <Typography
@@ -364,7 +372,7 @@ export function ConfirmWalletsModal(props: PropTypes) {
364
372
  size="medium">
365
373
  {i18n.t({
366
374
  id: 'You need to connect a {blockchainName} wallet.',
367
- values: { blockchainName: blockchain?.displayName },
375
+ values: { blockchainName: blockchain?.shortName },
368
376
  })}
369
377
  </Typography>
370
378
  </Title>
@@ -452,7 +460,7 @@ export function ConfirmWalletsModal(props: PropTypes) {
452
460
  </CollapsibleContent>
453
461
  </CollapsibleRoot>
454
462
  {isAddressMatched && (
455
- <div className="alarms">
463
+ <div className={alarmsStyles()}>
456
464
  <Alert
457
465
  variant="alarm"
458
466
  type="error"
@@ -33,7 +33,7 @@ import {
33
33
  } from '../../utils/wallets';
34
34
  import { WalletModal } from '../WalletModal';
35
35
 
36
- import { WalletButton } from './ConfirmWallets.styles';
36
+ import { ShowMoreWallets } from './ConfirmWallets.styles';
37
37
  import {
38
38
  LogoContainer,
39
39
  Spinner,
@@ -292,14 +292,14 @@ export function WalletList(props: PropTypes) {
292
292
  );
293
293
  })}
294
294
  {shouldShowMoreWallets && (
295
- <WalletButton selected={false} onClick={onShowMore.bind(null)}>
295
+ <ShowMoreWallets selected={false} onClick={onShowMore}>
296
296
  <Typography variant="label" size="medium">
297
297
  {i18n.t('Show more wallets')}
298
298
  <Typography variant="label" size="medium" color="$primary">
299
299
  &nbsp;+{numberOfSupportedWallets - (limit ?? 0)}
300
300
  </Typography>
301
301
  </Typography>
302
- </WalletButton>
302
+ </ShowMoreWallets>
303
303
  )}
304
304
  </>
305
305
  );
@@ -11,7 +11,9 @@ import {
11
11
  } from '@rango-dev/ui';
12
12
  import React from 'react';
13
13
 
14
+ import { useAppStore } from '../../store/AppStore';
14
15
  import { getContainer } from '../../utils/common';
16
+ import { isFeatureHidden } from '../../utils/settings';
15
17
  import { NotificationContent } from '../NotificationContent';
16
18
 
17
19
  import { HeaderButton } from './HeaderButtons.styles';
@@ -26,6 +28,12 @@ export function HomeButtons(props: HomeButtonsPropTypes) {
26
28
  onClickNotifications,
27
29
  } = props;
28
30
 
31
+ const {
32
+ config: { features },
33
+ } = useAppStore();
34
+
35
+ const isNotificationsHidden = isFeatureHidden('notification', features);
36
+
29
37
  return (
30
38
  <>
31
39
  <Tooltip
@@ -41,25 +49,27 @@ export function HomeButtons(props: HomeButtonsPropTypes) {
41
49
  </HeaderButton>
42
50
  </Tooltip>
43
51
 
44
- <Tooltip
45
- container={getContainer()}
46
- side="top"
47
- content={i18n.t('Notifications')}>
48
- <Popover
49
- align="center"
50
- collisionBoundary={layoutRef}
51
- collisionPadding={{ right: 20, left: 20 }}
52
+ {!isNotificationsHidden && (
53
+ <Tooltip
52
54
  container={getContainer()}
53
- content={<NotificationContent />}>
54
- <HeaderButton
55
- size="small"
56
- variant="ghost"
57
- onClick={onClickNotifications}>
58
- <NotificationsIcon size={18} color="black" />
59
- <UnreadNotificationsBadge />
60
- </HeaderButton>
61
- </Popover>
62
- </Tooltip>
55
+ side="top"
56
+ content={i18n.t('Notifications')}>
57
+ <Popover
58
+ align="center"
59
+ collisionBoundary={layoutRef}
60
+ collisionPadding={{ right: 20, left: 20 }}
61
+ container={getContainer()}
62
+ content={<NotificationContent />}>
63
+ <HeaderButton
64
+ size="small"
65
+ variant="ghost"
66
+ onClick={onClickNotifications}>
67
+ <NotificationsIcon size={18} color="black" />
68
+ <UnreadNotificationsBadge />
69
+ </HeaderButton>
70
+ </Popover>
71
+ </Tooltip>
72
+ )}
63
73
  <Tooltip
64
74
  container={getContainer()}
65
75
  side="top"
@@ -8,8 +8,10 @@ export const Container = styled('div', {
8
8
  overflow: 'hidden !important',
9
9
  boxShadow: '15px 15px 15px 0px rgba(0, 0, 0, 0.05)',
10
10
  width: '95vw',
11
+ minWidth: '300px',
11
12
  maxWidth: '390px',
12
13
  maxHeight: '700px',
14
+ textAlign: 'left',
13
15
  $$color: '$colors$neutral100',
14
16
  [`.${darkTheme} &`]: {
15
17
  $$color: '$colors$neutral300',
@@ -3,12 +3,13 @@ import type { PropsWithChildren } from 'react';
3
3
 
4
4
  import { BottomLogo, Divider, Header } 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';
7
+ import { useNavigateBack } from '../../hooks/useNavigateBack';
8
+ import { useAppStore } from '../../store/AppStore';
9
9
  import { useUiStore } from '../../store/ui';
10
10
  import { useWalletsStore } from '../../store/wallets';
11
11
  import { getContainer } from '../../utils/common';
12
+ import { isFeatureHidden } from '../../utils/settings';
12
13
  import { BackButton, CancelButton, WalletButton } from '../HeaderButtons';
13
14
 
14
15
  import { Container, Content, Footer } from './Layout.styles';
@@ -23,25 +24,37 @@ function LayoutComponent(props: PropsWithChildren<PropTypes>, ref: Ref) {
23
24
  fixedHeight = true,
24
25
  } = props;
25
26
  const connectedWallets = useWalletsStore.use.connectedWallets();
27
+ const {
28
+ config: { features },
29
+ } = useAppStore();
30
+
31
+ const isConnectWalletHidden = isFeatureHidden(
32
+ 'connectWalletButton',
33
+ features
34
+ );
26
35
 
27
36
  const connectWalletsButtonDisabled =
28
37
  useUiStore.use.connectWalletsButtonDisabled();
29
- const navigate = useNavigate();
38
+ const navigateBack = useNavigateBack();
30
39
 
31
40
  const onConnectWallet = () => {
32
- if (!connectWalletsButtonDisabled) {
33
- navigate('/' + navigationRoutes.wallets);
41
+ if (!connectWalletsButtonDisabled && header.onWallet) {
42
+ header.onWallet();
34
43
  }
35
44
  };
45
+
46
+ const showBackButton =
47
+ typeof header.hasBackButton === 'undefined' || header.hasBackButton;
48
+
36
49
  return (
37
50
  <Container ref={ref} fixedHeight={fixedHeight} id="swap-box">
38
51
  <Header
39
- prefix={<>{header.onBack && <BackButton onClick={header.onBack} />}</>}
52
+ prefix={<>{showBackButton && <BackButton onClick={navigateBack} />}</>}
40
53
  title={header.title}
41
54
  suffix={
42
55
  <>
43
56
  {header.suffix}
44
- {header.hasConnectWallet && (
57
+ {header.onWallet && !isConnectWalletHidden && (
45
58
  <WalletButton
46
59
  container={getContainer()}
47
60
  onClick={onConnectWallet}
@@ -1,10 +1,10 @@
1
1
  export interface PropTypes {
2
2
  header: {
3
3
  title: string;
4
- hasConnectWallet?: boolean;
4
+ onWallet?: () => void;
5
5
  hasSettings?: boolean;
6
6
  suffix?: React.ReactNode;
7
- onBack?: () => void;
7
+ hasBackButton?: boolean;
8
8
  onCancel?: () => void;
9
9
  };
10
10
  hasLogo?: boolean;
@@ -1,78 +1,82 @@
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
  width: '100%',
5
5
  height: '100%',
6
- padding: '$0 $20',
7
-
8
- '.cost': {
9
- paddingTop: '$15',
10
- display: 'flex',
11
- },
12
-
13
- '.quote-summary': {
14
- padding: '$15 $0',
15
- },
16
-
17
- '.quote-summary-item': {
18
- display: 'flex',
19
- justifyContent: 'space-between',
20
- alignItems: 'center',
21
- },
22
-
23
- '.token-amount': {
24
- display: 'flex',
25
- justifyContent: 'space-between',
26
- alignItems: 'center',
27
- },
28
-
29
- '.quote-summary-separator': {
30
- width: '0px',
31
- height: '$16',
32
- borderLeft: '1px solid $neutral400',
33
- marginLeft: '13px',
34
- },
35
-
36
- '.swaps-steps': {
37
- paddingBottom: '$10',
38
- },
6
+ padding: '$10 $20',
39
7
  });
40
8
 
41
9
  export const StepContainer = styled('div', {
42
10
  backgroundColor: '$neutral100',
43
11
  borderRadius: '$xm',
44
12
  padding: '$10 $15',
45
-
46
- '.step-title': {
47
- display: 'flex',
48
- justifyContent: 'start',
49
- alignItems: 'center',
50
- },
51
- '.step-tokens': {
52
- paddingTop: '$5',
53
- display: 'flex',
54
- alignItems: 'center',
55
- },
56
- '.step-token-info': {
57
- display: 'flex',
58
- alignItems: 'center',
59
- },
60
- '.step-icon-container': {
61
- padding: '$4 $6',
62
- display: 'flex',
63
- justifyContent: 'center',
64
- alignItems: 'center',
65
- },
66
-
67
- '.extra-info': {
68
- display: 'flex',
69
- paddingTop: '$10',
70
- paddingBottom: '$5',
71
- },
72
13
  });
14
+
73
15
  export const StepSeparator = styled('div', {
74
16
  width: '0px',
75
17
  height: '$20',
76
18
  borderLeft: '1px dashed $neutral700',
77
19
  marginLeft: '25px',
78
20
  });
21
+
22
+ export const quoteSummaryItemStyles = css({
23
+ display: 'flex',
24
+ justifyContent: 'space-between',
25
+ alignItems: 'center',
26
+ });
27
+
28
+ export const tokenAmountStyles = css({
29
+ display: 'flex',
30
+ justifyContent: 'space-between',
31
+ alignItems: 'center',
32
+ });
33
+
34
+ export const costStyles = css({
35
+ paddingTop: '$15',
36
+ display: 'flex',
37
+ });
38
+
39
+ export const quoteSummaryStyles = css({
40
+ padding: '$15 $0',
41
+ });
42
+
43
+ export const quoteSummarySeparatorStyles = css({
44
+ width: '0px',
45
+ height: '$16',
46
+ borderLeft: '1px solid $neutral400',
47
+ marginLeft: '13px',
48
+ });
49
+
50
+ export const swapsStepsStyles = css({
51
+ paddingBottom: '$10',
52
+ });
53
+
54
+ export const stepTitleStyles = css({
55
+ display: 'flex',
56
+ justifyContent: 'start',
57
+ alignItems: 'center',
58
+ });
59
+
60
+ export const stepTokensStyles = css({
61
+ paddingTop: '$5',
62
+ display: 'flex',
63
+ alignItems: 'center',
64
+ });
65
+
66
+ export const stepInfoStyles = css({
67
+ display: 'flex',
68
+ alignItems: 'center',
69
+ });
70
+
71
+ export const stepIconStyles = css({
72
+ padding: '$4 $6',
73
+ display: 'flex',
74
+ justifyContent: 'center',
75
+ alignItems: 'center',
76
+ });
77
+
78
+ export const extraInfoStyles = css({
79
+ display: 'flex',
80
+ paddingTop: '$10',
81
+ paddingBottom: '$5',
82
+ });
@@ -1,53 +1,47 @@
1
1
  import { i18n } from '@lingui/core';
2
- import { ChainToken, Divider, Skeleton, Typography } from '@rango-dev/ui';
2
+ import { Divider, Skeleton, Typography } from '@rango-dev/ui';
3
3
  import React from 'react';
4
4
 
5
- import { Container, StepSeparator } from './LoadingSwapDetails.styles';
6
- import { LoadingSwapDetailStep } from './LoadingSwapDetailStep';
5
+ import { QuoteSummarySkeleton, StepSkeleton } from '../QuoteSkeleton';
7
6
 
8
- export function LoadingSwapDetails() {
9
- const quoteSummary = (
10
- <div className="quote-summary-item">
11
- <div className="token-amount">
12
- <ChainToken loading size="medium" chainImage="" tokenImage="" />
13
- <Divider size={8} direction="horizontal" />
14
- <Skeleton height={15} width={148} variant="rounded" />
15
- </div>
16
- <Skeleton height={12} width={64} variant="rounded" />
17
- </div>
18
- );
7
+ import {
8
+ Container,
9
+ extraInfoStyles,
10
+ StepContainer,
11
+ StepSeparator,
12
+ } from './LoadingSwapDetails.styles';
19
13
 
14
+ export function LoadingSwapDetails() {
20
15
  return (
21
16
  <Container>
22
- <div className="cost">
23
- <Skeleton width={60} height={10} variant="rounded" />
24
- <Divider size={4} direction="horizontal" />
25
- <Skeleton width={60} height={10} variant="rounded" />
26
- <Divider size={4} direction="horizontal" />
27
- <Skeleton width={60} height={10} variant="rounded" />
28
- </div>
29
-
30
- <div className="quote-summary">
31
- {quoteSummary}
32
- <div className="quote-summary-separator"></div>
33
- {quoteSummary}
34
- </div>
35
-
17
+ <QuoteSummarySkeleton type="swap-preview" />
36
18
  <div className="swaps-steps">
37
19
  <Typography variant="title" size="small">
38
20
  {i18n.t('Swaps steps')}
39
21
  </Typography>
40
22
  </div>
41
23
 
42
- <div className="step-container">
43
- <LoadingSwapDetailStep extraInfo />
24
+ <>
25
+ <StepContainer>
26
+ <StepSkeleton separator={false} />
27
+ <div className={extraInfoStyles()}>
28
+ <Divider direction="horizontal" size={20} />
29
+ <Skeleton height={22} variant="rectangular" />
30
+ </div>
31
+ </StepContainer>
44
32
  <StepSeparator />
45
- <LoadingSwapDetailStep />
33
+ <StepContainer>
34
+ <StepSkeleton separator={false} />
35
+ </StepContainer>
46
36
  <StepSeparator />
47
- <LoadingSwapDetailStep />
37
+ <StepContainer>
38
+ <StepSkeleton separator={false} />
39
+ </StepContainer>
48
40
  <StepSeparator />
49
- <LoadingSwapDetailStep />
50
- </div>
41
+ <StepContainer>
42
+ <StepSkeleton separator={false} />
43
+ </StepContainer>
44
+ </>
51
45
  </Container>
52
46
  );
53
47
  }
@@ -27,18 +27,6 @@ export function makeInfo(
27
27
  },
28
28
  description: '',
29
29
  };
30
- } else if (
31
- error?.type === QuoteErrorType.NO_RESULT &&
32
- error.diagnosisMessage
33
- ) {
34
- return {
35
- alert: {
36
- type: 'error',
37
- text: error.diagnosisMessage,
38
- action: null,
39
- },
40
- description: '',
41
- };
42
30
  } else if (disabledLiquiditySources.length) {
43
31
  return {
44
32
  alert: {
@@ -51,6 +39,18 @@ export function makeInfo(
51
39
  },
52
40
  description: errorMessages().liquiditySourcesError.description,
53
41
  };
42
+ } else if (
43
+ error?.type === QuoteErrorType.NO_RESULT &&
44
+ error.diagnosisMessage
45
+ ) {
46
+ return {
47
+ alert: {
48
+ type: 'error',
49
+ text: error.diagnosisMessage,
50
+ action: null,
51
+ },
52
+ description: '',
53
+ };
54
54
  }
55
55
  return {
56
56
  alert: null,
@@ -12,17 +12,14 @@ import React from 'react';
12
12
 
13
13
  import { errorMessages } from '../../constants/errors';
14
14
  import { useAppStore } from '../../store/AppStore';
15
- import { useSettingsStore } from '../../store/settings';
16
15
 
17
16
  import { makeInfo } from './NoResult.helpers';
18
17
  import { Container, Footer, PrefixIcon } from './NoResult.styles';
19
18
 
20
19
  export function NoResult(props: PropTypes) {
21
20
  const { fetch, error } = props;
22
- const disabledLiquiditySources =
23
- useSettingsStore.use.disabledLiquiditySources();
24
- const toggleAllLiquiditySources =
25
- useSettingsStore.use.toggleAllLiquiditySources();
21
+ const disabledLiquiditySources = useAppStore().disabledLiquiditySources;
22
+ const toggleAllLiquiditySources = useAppStore().toggleAllLiquiditySources;
26
23
 
27
24
  const swappers = useAppStore().swappers();
28
25
 
@@ -10,6 +10,7 @@ import {
10
10
  import React from 'react';
11
11
  import { useNavigate } from 'react-router-dom';
12
12
 
13
+ import { navigationRoutes } from '../../constants/navigationRoutes';
13
14
  import { useAppStore } from '../../store/AppStore';
14
15
  import { useNotificationStore } from '../../store/notification';
15
16
  import { useUiStore } from '../../store/ui';
@@ -34,7 +35,7 @@ export function NotificationContent() {
34
35
 
35
36
  const handleOnClick = (requestId: Notification['requestId']) => {
36
37
  setSelectedSwap(requestId);
37
- navigate(`/swaps/${requestId}`);
38
+ navigate(`${navigationRoutes.swaps}/${requestId}`);
38
39
  };
39
40
 
40
41
  return (
@@ -1,5 +1,5 @@
1
1
  import * as Collapsible from '@radix-ui/react-collapsible';
2
- import { darkTheme, styled } from '@rango-dev/ui';
2
+ import { css, darkTheme, Image, styled, Typography } from '@rango-dev/ui';
3
3
 
4
4
  import { CollapsibleContent } from '../ConfirmWalletsModal/ConfirmWallets.styles';
5
5
 
@@ -13,6 +13,7 @@ export const QuoteContainer = styled(Collapsible.Root, {
13
13
  overflowY: 'hidden',
14
14
  width: '100%',
15
15
  borderRadius: '$xm',
16
+ cursor: 'default',
16
17
  variants: {
17
18
  recommended: {
18
19
  true: {
@@ -31,9 +32,10 @@ export const QuoteContainer = styled(Collapsible.Root, {
31
32
  },
32
33
  },
33
34
  },
34
- '& .steps-details': {
35
- padding: '$10 $15',
36
- },
35
+ });
36
+
37
+ export const stepsDetailsStyles = css({
38
+ padding: '$10 $15',
37
39
  });
38
40
 
39
41
  export const SummaryContainer = styled('div', {
@@ -104,14 +106,23 @@ export const SummaryContainer = styled('div', {
104
106
  },
105
107
  },
106
108
  ],
107
- '& .summary': {
108
- width: '100%',
109
- padding: '$15 $15 $10 $15',
110
- },
111
- '& .basic-info': {
112
- paddingTop: '$10',
113
- display: 'flex',
114
- alignItems: 'center',
109
+ });
110
+
111
+ export const summaryStyles = css({
112
+ padding: '$15 $15 $10 $15',
113
+ cursor: 'default',
114
+ });
115
+
116
+ export const basicInfoStyles = css({
117
+ paddingTop: '$10',
118
+ display: 'flex',
119
+ alignItems: 'center',
120
+ '.usd-value': {
121
+ $$color: '$colors$neutral600',
122
+ [`.${darkTheme} &`]: {
123
+ $$color: '$colors$neutral700',
124
+ },
125
+ color: '$$color',
115
126
  },
116
127
  });
117
128
 
@@ -162,8 +173,27 @@ export const Chains = styled(Collapsible.Trigger, {
162
173
  '& div:nth-child(1)': { display: 'flex' },
163
174
  });
164
175
 
176
+ export const ChainImageContainer = styled('div', {
177
+ width: '18px',
178
+ height: '18px',
179
+ borderRadius: '100%',
180
+ border: '1.5px transparent solid',
181
+ display: 'flex',
182
+ justifyContent: 'center',
183
+ alignItems: 'center',
184
+ variants: {
185
+ state: {
186
+ error: {
187
+ borderColor: '$error500',
188
+ },
189
+ warning: { borderColor: '$warning500' },
190
+ },
191
+ },
192
+ });
193
+
165
194
  export const Content = styled(CollapsibleContent, {
166
195
  width: '100%',
196
+ background: 'inherit',
167
197
  });
168
198
 
169
199
  export const IconContainer = styled('div', {
@@ -210,3 +240,10 @@ export const FrameIcon = styled('div', {
210
240
  alignItems: 'center',
211
241
  display: 'flex',
212
242
  });
243
+
244
+ export const BasicInfoOutput = styled(Typography, {
245
+ width: '100%',
246
+ overflow: 'hidden',
247
+ textOverflow: 'ellipsis',
248
+ letterSpacing: 0.4,
249
+ });