@rango-dev/widget-embedded 0.12.1-next.9 → 0.14.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 (279) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/Widget.d.ts.map +1 -1
  3. package/dist/components/AppRouter.d.ts +5 -2
  4. package/dist/components/AppRouter.d.ts.map +1 -1
  5. package/dist/components/AppRoutes.d.ts.map +1 -1
  6. package/dist/components/BlockchainList/BlockchainList.d.ts.map +1 -1
  7. package/dist/components/BlockchainList/BlockchainList.helpers.d.ts.map +1 -1
  8. package/dist/components/BlockchainList/BlockchainList.styles.d.ts +14 -4
  9. package/dist/components/BlockchainList/BlockchainList.styles.d.ts.map +1 -1
  10. package/dist/components/BlockchainsSection/BlockchainsSection.d.ts.map +1 -1
  11. package/dist/components/BlockchainsSection/BlockchainsSection.styles.d.ts +6 -1
  12. package/dist/components/BlockchainsSection/BlockchainsSection.styles.d.ts.map +1 -1
  13. package/dist/components/ConfirmWalletsModal/ConfirmWallets.helpers.d.ts +1 -1
  14. package/dist/components/ConfirmWalletsModal/ConfirmWallets.helpers.d.ts.map +1 -1
  15. package/dist/components/ConfirmWalletsModal/ConfirmWallets.styles.d.ts +94 -17
  16. package/dist/components/ConfirmWalletsModal/ConfirmWallets.styles.d.ts.map +1 -1
  17. package/dist/components/ConfirmWalletsModal/ConfirmWalletsModal.d.ts.map +1 -1
  18. package/dist/components/ConfirmWalletsModal/WalletList.d.ts.map +1 -1
  19. package/dist/components/ConfirmWalletsModal/WalletList.styles.d.ts +18 -3
  20. package/dist/components/ConfirmWalletsModal/WalletList.styles.d.ts.map +1 -1
  21. package/dist/components/HeaderButtons/HeaderButtons.styles.d.ts +25 -284
  22. package/dist/components/HeaderButtons/HeaderButtons.styles.d.ts.map +1 -1
  23. package/dist/components/HeaderButtons/HeaderButtons.types.d.ts +1 -0
  24. package/dist/components/HeaderButtons/HeaderButtons.types.d.ts.map +1 -1
  25. package/dist/components/HeaderButtons/HomeButtons.d.ts.map +1 -1
  26. package/dist/components/HeaderButtons/UnreadNotificationsBadge.d.ts.map +1 -1
  27. package/dist/components/HeaderButtons/WalletButton.d.ts.map +1 -1
  28. package/dist/components/Layout/Layout.d.ts.map +1 -1
  29. package/dist/components/Layout/Layout.styles.d.ts +18 -3
  30. package/dist/components/Layout/Layout.styles.d.ts.map +1 -1
  31. package/dist/components/LoadingLiquiditySourceList/LoadingLiquiditySourceList.styles.d.ts +6 -1
  32. package/dist/components/LoadingLiquiditySourceList/LoadingLiquiditySourceList.styles.d.ts.map +1 -1
  33. package/dist/components/LoadingSwapDetails/LoadingSwapDetailStep.d.ts +4 -0
  34. package/dist/components/LoadingSwapDetails/LoadingSwapDetailStep.d.ts.map +1 -0
  35. package/dist/components/LoadingSwapDetails/LoadingSwapDetails.d.ts +3 -0
  36. package/dist/components/LoadingSwapDetails/LoadingSwapDetails.d.ts.map +1 -0
  37. package/dist/components/{SelectableCategoryList/SelectableCategoryList.styles.d.ts → LoadingSwapDetails/LoadingSwapDetails.styles.d.ts} +21 -6
  38. package/dist/components/LoadingSwapDetails/LoadingSwapDetails.styles.d.ts.map +1 -0
  39. package/dist/components/LoadingSwapDetails/LoadingSwapDetails.types.d.ts +4 -0
  40. package/dist/components/LoadingSwapDetails/LoadingSwapDetails.types.d.ts.map +1 -0
  41. package/dist/components/LoadingSwapDetails/index.d.ts +2 -0
  42. package/dist/components/LoadingSwapDetails/index.d.ts.map +1 -0
  43. package/dist/components/NoRoutes/NoRoutes.helper.d.ts.map +1 -1
  44. package/dist/components/NoRoutes/NoRoutes.styles.d.ts +18 -3
  45. package/dist/components/NoRoutes/NoRoutes.styles.d.ts.map +1 -1
  46. package/dist/components/NotificationContent/NotificationContent.d.ts.map +1 -1
  47. package/dist/components/NotificationContent/NotificationContent.styles.d.ts +24 -4
  48. package/dist/components/NotificationContent/NotificationContent.styles.d.ts.map +1 -1
  49. package/dist/components/RouteErrors/RouteErrors.d.ts.map +1 -1
  50. package/dist/components/RouteErrors/RouteErrors.styles.d.ts +24 -4
  51. package/dist/components/RouteErrors/RouteErrors.styles.d.ts.map +1 -1
  52. package/dist/components/RouteErrors/RouteErrors.types.d.ts +3 -1
  53. package/dist/components/RouteErrors/RouteErrors.types.d.ts.map +1 -1
  54. package/dist/components/RouteErrors/RouteErrorsModal.d.ts.map +1 -1
  55. package/dist/components/SearchInput/SearchInput.styles.d.ts +6 -1
  56. package/dist/components/SearchInput/SearchInput.styles.d.ts.map +1 -1
  57. package/dist/components/SettingsContainer/SettingsContainer.style.d.ts +23 -151
  58. package/dist/components/SettingsContainer/SettingsContainer.style.d.ts.map +1 -1
  59. package/dist/components/SettingsContainer/index.d.ts +1 -1
  60. package/dist/components/SettingsContainer/index.d.ts.map +1 -1
  61. package/dist/components/Slippage/Slippage.d.ts.map +1 -1
  62. package/dist/components/Slippage/Slippage.styles.d.ts +24 -4
  63. package/dist/components/Slippage/Slippage.styles.d.ts.map +1 -1
  64. package/dist/components/SwapDetails/SwapDetails.Placeholder.d.ts.map +1 -1
  65. package/dist/components/SwapDetails/SwapDetails.d.ts.map +1 -1
  66. package/dist/components/SwapDetails/SwapDetails.helpers.d.ts +2 -9
  67. package/dist/components/SwapDetails/SwapDetails.helpers.d.ts.map +1 -1
  68. package/dist/components/SwapDetails/SwapDetails.styles.d.ts +35 -153
  69. package/dist/components/SwapDetails/SwapDetails.styles.d.ts.map +1 -1
  70. package/dist/components/SwapDetails/SwapDetails.types.d.ts +1 -1
  71. package/dist/components/SwapDetails/SwapDetails.types.d.ts.map +1 -1
  72. package/dist/components/SwapDetailsAlerts/SwapDetailsAlerts.styles.d.ts +6 -1
  73. package/dist/components/SwapDetailsAlerts/SwapDetailsAlerts.styles.d.ts.map +1 -1
  74. package/dist/components/SwapDetailsAlerts/SwapDetailsAlerts.types.d.ts +2 -1
  75. package/dist/components/SwapDetailsAlerts/SwapDetailsAlerts.types.d.ts.map +1 -1
  76. package/dist/components/SwapDetailsModal/SwapDetailsModal.WalletState.d.ts +1 -1
  77. package/dist/components/SwapDetailsModal/SwapDetailsModal.WalletState.d.ts.map +1 -1
  78. package/dist/components/SwapDetailsModal/SwapDetailsModal.d.ts.map +1 -1
  79. package/dist/components/SwapDetailsModal/SwapDetailsModal.styles.d.ts +6 -1
  80. package/dist/components/SwapDetailsModal/SwapDetailsModal.styles.d.ts.map +1 -1
  81. package/dist/components/SwapDetailsModal/SwapDetailsModal.types.d.ts +2 -1
  82. package/dist/components/SwapDetailsModal/SwapDetailsModal.types.d.ts.map +1 -1
  83. package/dist/components/SwapsGroup/SwapsGroup.d.ts.map +1 -1
  84. package/dist/components/SwapsGroup/SwapsGroup.styles.d.ts +24 -4
  85. package/dist/components/SwapsGroup/SwapsGroup.styles.d.ts.map +1 -1
  86. package/dist/components/SwitchFromAndTo.d.ts.map +1 -1
  87. package/dist/components/TokenList/TokenList.d.ts.map +1 -1
  88. package/dist/components/TokenList/TokenList.helpers.d.ts.map +1 -1
  89. package/dist/components/TokenList/TokenList.styles.d.ts +207 -9
  90. package/dist/components/TokenList/TokenList.styles.d.ts.map +1 -1
  91. package/dist/components/TokenList/TokenList.types.d.ts +1 -1
  92. package/dist/components/TokenList/TokenList.types.d.ts.map +1 -1
  93. package/dist/components/UpdateUrl.d.ts +6 -1
  94. package/dist/components/UpdateUrl.d.ts.map +1 -1
  95. package/dist/components/WalletModal/WalletModalContent.styles.d.ts +24 -4
  96. package/dist/components/WalletModal/WalletModalContent.styles.d.ts.map +1 -1
  97. package/dist/components/WidgetEvents.d.ts.map +1 -1
  98. package/dist/constants/errors.d.ts +2 -2
  99. package/dist/constants/routing.d.ts +12 -2
  100. package/dist/constants/routing.d.ts.map +1 -1
  101. package/dist/constants.d.ts +2 -0
  102. package/dist/constants.d.ts.map +1 -0
  103. package/dist/globalStyles.d.ts +1 -1
  104. package/dist/globalStyles.d.ts.map +1 -1
  105. package/dist/hooks/useNavigateBack.d.ts.map +1 -1
  106. package/dist/hooks/usePrepareBlockchainList.d.ts +18 -0
  107. package/dist/hooks/usePrepareBlockchainList.d.ts.map +1 -0
  108. package/dist/hooks/useSwapInput.d.ts.map +1 -1
  109. package/dist/hooks/useSyncStoresWithConfig.d.ts +3 -0
  110. package/dist/hooks/useSyncStoresWithConfig.d.ts.map +1 -0
  111. package/dist/hooks/useTheme.d.ts +3 -6
  112. package/dist/hooks/useTheme.d.ts.map +1 -1
  113. package/dist/hooks/useWalletProviders.d.ts +3 -3
  114. package/dist/hooks/useWalletProviders.d.ts.map +1 -1
  115. package/dist/index.js +1 -1
  116. package/dist/index.js.map +4 -4
  117. package/dist/pages/ConfirmSwapPage.d.ts.map +1 -1
  118. package/dist/pages/Home.d.ts.map +1 -1
  119. package/dist/pages/LiquiditySourcePage.d.ts.map +1 -1
  120. package/dist/pages/SelectBlockchainPage.d.ts +1 -2
  121. package/dist/pages/SelectBlockchainPage.d.ts.map +1 -1
  122. package/dist/pages/SelectSwapItemsPage.d.ts +1 -5
  123. package/dist/pages/SelectSwapItemsPage.d.ts.map +1 -1
  124. package/dist/pages/SettingsPage.d.ts.map +1 -1
  125. package/dist/pages/SwapDetailsPage.d.ts.map +1 -1
  126. package/dist/pages/WalletsPage.d.ts.map +1 -1
  127. package/dist/services/httpService.d.ts +0 -1
  128. package/dist/services/httpService.d.ts.map +1 -1
  129. package/dist/store/app.d.ts +26 -0
  130. package/dist/store/app.d.ts.map +1 -0
  131. package/dist/store/bestRoute.d.ts +4 -8
  132. package/dist/store/bestRoute.d.ts.map +1 -1
  133. package/dist/store/meta.d.ts +0 -2
  134. package/dist/store/meta.d.ts.map +1 -1
  135. package/dist/store/slices/config.d.ts +8 -0
  136. package/dist/store/slices/config.d.ts.map +1 -0
  137. package/dist/store/slices/data.d.ts +26 -0
  138. package/dist/store/slices/data.d.ts.map +1 -0
  139. package/dist/store/wallets.d.ts.map +1 -1
  140. package/dist/types/config.d.ts +3 -0
  141. package/dist/types/config.d.ts.map +1 -1
  142. package/dist/utils/common.d.ts +1 -0
  143. package/dist/utils/common.d.ts.map +1 -1
  144. package/dist/utils/configs.d.ts +5 -0
  145. package/dist/utils/configs.d.ts.map +1 -1
  146. package/dist/utils/meta.d.ts +1 -0
  147. package/dist/utils/meta.d.ts.map +1 -1
  148. package/dist/utils/numbers.d.ts +3 -1
  149. package/dist/utils/numbers.d.ts.map +1 -1
  150. package/dist/utils/routing.d.ts +6 -3
  151. package/dist/utils/routing.d.ts.map +1 -1
  152. package/dist/utils/settings.d.ts +1 -0
  153. package/dist/utils/settings.d.ts.map +1 -1
  154. package/dist/utils/swap.d.ts +1 -1
  155. package/dist/utils/swap.d.ts.map +1 -1
  156. package/dist/utils/time.d.ts +2 -2
  157. package/dist/utils/time.d.ts.map +1 -1
  158. package/dist/utils/wallets.d.ts +1 -1
  159. package/dist/utils/wallets.d.ts.map +1 -1
  160. package/package.json +8 -8
  161. package/readme.md +3 -1
  162. package/src/Widget.tsx +22 -3
  163. package/src/components/AppRouter.tsx +38 -7
  164. package/src/components/AppRoutes.tsx +4 -28
  165. package/src/components/BlockchainList/BlockchainList.helpers.ts +1 -1
  166. package/src/components/BlockchainList/BlockchainList.styles.ts +6 -5
  167. package/src/components/BlockchainList/BlockchainList.tsx +6 -9
  168. package/src/components/BlockchainsSection/BlockchainsSection.tsx +29 -42
  169. package/src/components/ConfirmWalletsModal/ConfirmWallets.helpers.ts +33 -7
  170. package/src/components/ConfirmWalletsModal/ConfirmWallets.styles.ts +48 -7
  171. package/src/components/ConfirmWalletsModal/ConfirmWalletsModal.tsx +59 -16
  172. package/src/components/ConfirmWalletsModal/WalletList.tsx +66 -22
  173. package/src/components/HeaderButtons/HeaderButtons.styles.ts +2 -2
  174. package/src/components/HeaderButtons/HeaderButtons.types.ts +1 -0
  175. package/src/components/HeaderButtons/HomeButtons.tsx +18 -5
  176. package/src/components/HeaderButtons/UnreadNotificationsBadge.tsx +1 -2
  177. package/src/components/HeaderButtons/WalletButton.tsx +4 -1
  178. package/src/components/Layout/Layout.styles.ts +5 -3
  179. package/src/components/Layout/Layout.tsx +5 -20
  180. package/src/components/LoadingSwapDetails/LoadingSwapDetailStep.tsx +41 -0
  181. package/src/components/LoadingSwapDetails/LoadingSwapDetails.styles.ts +78 -0
  182. package/src/components/LoadingSwapDetails/LoadingSwapDetails.tsx +53 -0
  183. package/src/components/LoadingSwapDetails/LoadingSwapDetails.types.ts +3 -0
  184. package/src/components/LoadingSwapDetails/index.ts +1 -0
  185. package/src/components/NoRoutes/NoRoutes.helper.ts +4 -2
  186. package/src/components/NotificationContent/NotificationContent.tsx +3 -7
  187. package/src/components/RouteErrors/RouteErrors.styles.ts +2 -1
  188. package/src/components/RouteErrors/RouteErrors.tsx +37 -26
  189. package/src/components/RouteErrors/RouteErrors.types.ts +3 -1
  190. package/src/components/RouteErrors/RouteErrorsModal.tsx +42 -14
  191. package/src/components/SettingsContainer/SettingsContainer.style.ts +2 -7
  192. package/src/components/SettingsContainer/index.ts +0 -1
  193. package/src/components/Slippage/Slippage.tsx +6 -2
  194. package/src/components/Slippage/SlippageTooltipContent.tsx +1 -1
  195. package/src/components/SwapDetails/SwapDetails.Placeholder.tsx +52 -16
  196. package/src/components/SwapDetails/SwapDetails.helpers.tsx +19 -33
  197. package/src/components/SwapDetails/SwapDetails.styles.ts +10 -14
  198. package/src/components/SwapDetails/SwapDetails.tsx +143 -101
  199. package/src/components/SwapDetails/SwapDetails.types.ts +1 -1
  200. package/src/components/SwapDetailsAlerts/SwapDetailsAlerts.types.ts +5 -4
  201. package/src/components/SwapDetailsModal/SwapDetailsModal.WalletState.tsx +6 -7
  202. package/src/components/SwapDetailsModal/SwapDetailsModal.tsx +3 -0
  203. package/src/components/SwapDetailsModal/SwapDetailsModal.types.ts +2 -1
  204. package/src/components/SwapsGroup/SwapsGroup.tsx +3 -2
  205. package/src/components/SwitchFromAndTo.tsx +1 -35
  206. package/src/components/TokenList/TokenList.helpers.ts +6 -8
  207. package/src/components/TokenList/TokenList.styles.ts +7 -1
  208. package/src/components/TokenList/TokenList.tsx +29 -23
  209. package/src/components/TokenList/TokenList.types.ts +1 -1
  210. package/src/components/UpdateUrl.tsx +7 -1
  211. package/src/components/WidgetEvents.tsx +9 -3
  212. package/src/constants/errors.ts +2 -2
  213. package/src/constants/routing.ts +17 -2
  214. package/src/constants.ts +1 -0
  215. package/src/globalStyles.ts +1 -4
  216. package/src/hooks/useFetchBestRoute.ts +2 -2
  217. package/src/hooks/useNavigateBack.ts +10 -0
  218. package/src/hooks/usePrepareBlockchainList.ts +125 -0
  219. package/src/hooks/useSwapInput.ts +17 -3
  220. package/src/hooks/useSyncStoresWithConfig.ts +102 -0
  221. package/src/hooks/useTheme.ts +37 -75
  222. package/src/hooks/useWalletProviders.ts +7 -7
  223. package/src/pages/ConfirmSwapPage.tsx +65 -36
  224. package/src/pages/HistoryPage.tsx +2 -2
  225. package/src/pages/Home.tsx +114 -50
  226. package/src/pages/LanguagePage.tsx +1 -1
  227. package/src/pages/LiquiditySourcePage.tsx +22 -18
  228. package/src/pages/SelectBlockchainPage.tsx +19 -20
  229. package/src/pages/SelectSwapItemsPage.tsx +66 -88
  230. package/src/pages/SettingsPage.tsx +42 -15
  231. package/src/pages/SwapDetailsPage.tsx +9 -2
  232. package/src/pages/ThemePage.tsx +1 -1
  233. package/src/pages/WalletsPage.tsx +11 -5
  234. package/src/services/httpService.ts +4 -5
  235. package/src/store/app.ts +15 -0
  236. package/src/store/bestRoute.ts +45 -71
  237. package/src/store/meta.ts +11 -29
  238. package/src/store/slices/config.ts +26 -0
  239. package/src/store/slices/data.ts +203 -0
  240. package/src/store/wallets.ts +0 -27
  241. package/src/types/config.ts +3 -0
  242. package/src/utils/common.ts +3 -0
  243. package/src/utils/configs.ts +8 -2
  244. package/src/utils/meta.ts +7 -0
  245. package/src/utils/numbers.ts +3 -2
  246. package/src/utils/routing.ts +76 -14
  247. package/src/utils/settings.ts +15 -0
  248. package/src/utils/swap.ts +82 -26
  249. package/src/utils/time.ts +69 -36
  250. package/src/utils/wallets.ts +49 -29
  251. package/dist/components/BlockchainsChip/BlockchainsChip.d.ts +0 -5
  252. package/dist/components/BlockchainsChip/BlockchainsChip.d.ts.map +0 -1
  253. package/dist/components/BlockchainsChip/BlockchainsChip.styles.d.ts +0 -151
  254. package/dist/components/BlockchainsChip/BlockchainsChip.styles.d.ts.map +0 -1
  255. package/dist/components/BlockchainsChip/BlockchainsChip.types.d.ts +0 -6
  256. package/dist/components/BlockchainsChip/BlockchainsChip.types.d.ts.map +0 -1
  257. package/dist/components/BlockchainsChip/index.d.ts +0 -2
  258. package/dist/components/BlockchainsChip/index.d.ts.map +0 -1
  259. package/dist/components/BlockchainsSection/BlockchainSection.helpers.d.ts +0 -3
  260. package/dist/components/BlockchainsSection/BlockchainSection.helpers.d.ts.map +0 -1
  261. package/dist/components/SelectableCategoryList/SelectableCategoryList.d.ts +0 -4
  262. package/dist/components/SelectableCategoryList/SelectableCategoryList.d.ts.map +0 -1
  263. package/dist/components/SelectableCategoryList/SelectableCategoryList.helpers.d.ts +0 -4
  264. package/dist/components/SelectableCategoryList/SelectableCategoryList.helpers.d.ts.map +0 -1
  265. package/dist/components/SelectableCategoryList/SelectableCategoryList.styles.d.ts.map +0 -1
  266. package/dist/components/SelectableCategoryList/SelectableCategoryList.types.d.ts +0 -12
  267. package/dist/components/SelectableCategoryList/SelectableCategoryList.types.d.ts.map +0 -1
  268. package/dist/components/SelectableCategoryList/index.d.ts +0 -2
  269. package/dist/components/SelectableCategoryList/index.d.ts.map +0 -1
  270. package/src/components/BlockchainsChip/BlockchainsChip.styles.ts +0 -30
  271. package/src/components/BlockchainsChip/BlockchainsChip.tsx +0 -15
  272. package/src/components/BlockchainsChip/BlockchainsChip.types.ts +0 -4
  273. package/src/components/BlockchainsChip/index.ts +0 -1
  274. package/src/components/BlockchainsSection/BlockchainSection.helpers.ts +0 -20
  275. package/src/components/SelectableCategoryList/SelectableCategoryList.helpers.ts +0 -20
  276. package/src/components/SelectableCategoryList/SelectableCategoryList.styles.ts +0 -21
  277. package/src/components/SelectableCategoryList/SelectableCategoryList.tsx +0 -79
  278. package/src/components/SelectableCategoryList/SelectableCategoryList.types.ts +0 -12
  279. package/src/components/SelectableCategoryList/index.ts +0 -1
package/src/utils/time.ts CHANGED
@@ -1,46 +1,79 @@
1
- import { PendingSwap } from '@rango-dev/queue-manager-rango-preset';
2
-
3
- export function timeSince(timeMillis: number): string {
4
- const seconds = Math.floor((new Date().getTime() - timeMillis) / 1000);
5
- let intervalType: string;
6
-
7
- let interval = Math.floor(seconds / 31536000);
8
- if (interval >= 1) {
9
- intervalType = 'year';
10
- } else {
11
- interval = Math.floor(seconds / 2592000);
12
- if (interval >= 1) {
13
- intervalType = 'month';
14
- } else {
15
- interval = Math.floor(seconds / 86400);
16
- if (interval >= 1) {
17
- intervalType = 'day';
18
- } else {
19
- interval = Math.floor(seconds / 3600);
20
- if (interval >= 1) {
21
- intervalType = 'hour';
22
- } else {
23
- interval = Math.floor(seconds / 60);
24
- if (interval >= 1) {
25
- intervalType = 'minute';
26
- } else {
27
- interval = seconds;
28
- intervalType = 'second';
29
- }
30
- }
31
- }
1
+ import type { PendingSwap } from '@rango-dev/queue-manager-rango-preset';
2
+
3
+ import { i18n } from '@lingui/core';
4
+
5
+ const MILLISECOND_PER_SECOND = 1000;
6
+ const SECONDS_PER_YEAR = 31536000;
7
+ const SECONDS_PER_MONTH = 2592000;
8
+ const SECONDS_PER_DAY = 86400;
9
+ const SECONDS_PER_HOUR = 3600;
10
+ const SECONDS_PER_MINUTE = 60;
11
+
12
+ export function timeSince(millisecond: number): string {
13
+ const seconds = Math.floor(
14
+ (Date.now() - millisecond) / MILLISECOND_PER_SECOND
15
+ );
16
+
17
+ const intervals = [
18
+ {
19
+ turningPoint: SECONDS_PER_YEAR,
20
+ label: i18n.t('year'),
21
+ pluralLabel: i18n.t('years'),
22
+ },
23
+ {
24
+ turningPoint: SECONDS_PER_MONTH,
25
+ label: i18n.t('month'),
26
+ pluralLabel: i18n.t('months'),
27
+ },
28
+ {
29
+ turningPoint: SECONDS_PER_DAY,
30
+ label: i18n.t('day'),
31
+ pluralLabel: i18n.t('days'),
32
+ },
33
+ {
34
+ turningPoint: SECONDS_PER_HOUR,
35
+ label: i18n.t('hour'),
36
+ pluralLabel: i18n.t('hours'),
37
+ },
38
+ {
39
+ turningPoint: SECONDS_PER_MINUTE,
40
+ label: i18n.t('minute'),
41
+ pluralLabel: i18n.t('minutes'),
42
+ },
43
+ ];
44
+
45
+ const sortedIntervals = intervals.sort(
46
+ (a, b) => b.turningPoint - a.turningPoint
47
+ );
48
+
49
+ for (const interval of sortedIntervals) {
50
+ const { turningPoint, label, pluralLabel } = interval;
51
+ const intervalCount = Math.floor(seconds / turningPoint);
52
+ if (intervalCount > 1) {
53
+ return `${intervalCount} ${pluralLabel}`;
54
+ }
55
+ if (intervalCount === 1) {
56
+ return `${intervalCount} ${label}`;
32
57
  }
33
58
  }
34
59
 
35
- if (interval > 1 || interval === 0) {
36
- intervalType += 's';
60
+ if (seconds > 1) {
61
+ return `${seconds} ${i18n.t('seconds')}`;
37
62
  }
38
63
 
39
- return interval + ' ' + intervalType;
64
+ return `${seconds} ${i18n.t('second')}`;
40
65
  }
41
66
 
42
67
  export function getSwapDate(pendingSwap: PendingSwap) {
43
68
  return pendingSwap.finishTime
44
- ? `${timeSince(parseInt(pendingSwap.finishTime))} ago`
45
- : `${timeSince(parseInt(pendingSwap.creationTime))} ago`;
69
+ ? i18n.t({
70
+ id: 'timeAgo',
71
+ message: '{time} ago',
72
+ values: { time: timeSince(parseInt(pendingSwap.finishTime)) },
73
+ })
74
+ : i18n.t({
75
+ id: 'timeAgo',
76
+ message: '{time} ago',
77
+ values: { time: timeSince(parseInt(pendingSwap.creationTime)) },
78
+ });
46
79
  }
@@ -135,19 +135,19 @@ export function prepareAccountsForWalletStore(
135
135
  /*
136
136
  * In some cases we can handle unknown network by checking its address
137
137
  * pattern and act on it.
138
- * Example: showing our evm compatible netwrok when the uknown network is evem.
138
+ * Example: showing our evm compatible network when the unknown network is evm.
139
139
  * Otherwise, we stop executing this function.
140
140
  */
141
- const isUknownAndEvmBased =
141
+ const isUnknownAndEvmBased =
142
142
  network === Networks.Unknown && isEvmAddress(address);
143
- if (isUnknown && !isUknownAndEvmBased) {
143
+ if (isUnknown && !isUnknownAndEvmBased) {
144
144
  return;
145
145
  }
146
146
 
147
147
  const isEvmBasedChain = evmBasedChains.includes(network);
148
148
 
149
149
  // If it's an evm network, we will add the address to all the evm chains.
150
- if (isEvmBasedChain || isUknownAndEvmBased) {
150
+ if (isEvmBasedChain || isUnknownAndEvmBased) {
151
151
  /*
152
152
  * all evm chains are not supported in wallets, so we are adding
153
153
  * only to those that are supported by wallet.
@@ -158,7 +158,7 @@ export function prepareAccountsForWalletStore(
158
158
 
159
159
  evmChainsSupportedByWallet.forEach((network) => {
160
160
  /*
161
- * EVM addresses are not case sensetive.
161
+ * EVM addresses are not case sensitive.
162
162
  * Some wallets like Binance-chain return some letters in uppercase which produces bugs in our wallet state.
163
163
  */
164
164
  addAccount(network, address.toLowerCase());
@@ -311,7 +311,7 @@ export function resetConnectedWalletState(
311
311
 
312
312
  export const calculateWalletUsdValue = (connectedWallet: ConnectedWallet[]) => {
313
313
  const uniqueAccountAddresses = new Set<string | null>();
314
- const uniqueBalane: ConnectedWallet[] = connectedWallet?.reduce(
314
+ const uniqueBalance: ConnectedWallet[] = connectedWallet?.reduce(
315
315
  (acc: ConnectedWallet[], current: ConnectedWallet) => {
316
316
  return acc.findIndex(
317
317
  (i) => i.address === current.address && i.chain === current.chain
@@ -323,7 +323,7 @@ export const calculateWalletUsdValue = (connectedWallet: ConnectedWallet[]) => {
323
323
  []
324
324
  );
325
325
 
326
- const modifiedWalletBlockchains = uniqueBalane?.map((chain) => {
326
+ const modifiedWalletBlockchains = uniqueBalance?.map((chain) => {
327
327
  const modifiedWalletBlockchain: Blockchain = {
328
328
  name: chain.chain,
329
329
  accounts: [],
@@ -348,10 +348,10 @@ export const calculateWalletUsdValue = (connectedWallet: ConnectedWallet[]) => {
348
348
  ?.reduce((a, b) => a.plus(b), ZERO) || ZERO
349
349
  ).toString();
350
350
 
351
- return numberWithThousandSeperator(total);
351
+ return numberWithThousandSeparator(total);
352
352
  };
353
353
 
354
- function numberWithThousandSeperator(number: string | number): string {
354
+ function numberWithThousandSeparator(number: string | number): string {
355
355
  const parts = number.toString().split('.');
356
356
  parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ',');
357
357
  return parts.join('.');
@@ -428,7 +428,6 @@ export function getTokensWithBalance(
428
428
  tokens: TokenWithBalance[],
429
429
  connectedWallets: ConnectedWallet[]
430
430
  ): TokenWithBalance[] {
431
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
432
431
  return tokens.map(({ balance, ...otherProps }) => {
433
432
  const tokenAmount = numberToString(
434
433
  new BigNumber(
@@ -464,17 +463,55 @@ export function getTokensWithBalance(
464
463
  });
465
464
  }
466
465
 
466
+ export function getTokensBalanceFromWalletAndSort(
467
+ tokens: TokenWithBalance[],
468
+ connectedWallets: ConnectedWallet[]
469
+ ) {
470
+ const list =
471
+ connectedWallets.length > 0
472
+ ? getTokensWithBalance(tokens, connectedWallets)
473
+ : tokens;
474
+ list.sort((tokenA, tokenB) => {
475
+ if (tokenA.balance?.usdValue && tokenB.balance?.usdValue) {
476
+ return (
477
+ parseFloat(tokenB.balance.usdValue) -
478
+ parseFloat(tokenA.balance.usdValue)
479
+ );
480
+ }
481
+
482
+ if (!tokenA.balance?.usdValue && tokenB.balance?.usdValue) {
483
+ return 1;
484
+ }
485
+
486
+ if (tokenA.balance?.usdValue && !tokenB.balance?.usdValue) {
487
+ return -1;
488
+ }
489
+
490
+ if (!tokenA.balance?.usdValue && !tokenB.balance?.usdValue) {
491
+ return (
492
+ parseFloat(tokenB.balance?.amount || '0') -
493
+ parseFloat(tokenA.balance?.amount || '0')
494
+ );
495
+ }
496
+
497
+ return 0;
498
+ });
499
+
500
+ return list;
501
+ }
502
+
467
503
  export function getSortedTokens(
468
504
  chain: BlockchainMeta | null,
469
505
  tokens: Token[],
470
506
  connectedWallets: ConnectedWallet[],
471
507
  otherChainTokens: TokenWithBalance[]
472
508
  ): TokenWithBalance[] {
473
- const fromChainEqueulsToToBlockchain =
509
+ const fromChainEqualsToToBlockchain =
474
510
  chain?.name === otherChainTokens[0]?.name;
475
- if (fromChainEqueulsToToBlockchain) {
511
+ if (fromChainEqualsToToBlockchain) {
476
512
  return otherChainTokens;
477
513
  }
514
+
478
515
  const filteredTokens = tokens.filter(
479
516
  (token) => token.blockchain === chain?.name
480
517
  );
@@ -492,23 +529,6 @@ export function tokensAreEqual(
492
529
  );
493
530
  }
494
531
 
495
- export function getDefaultToken(
496
- sortedTokens: TokenWithBalance[],
497
- otherToken: TokenWithBalance | null
498
- ): TokenWithBalance {
499
- let selectedToken: TokenWithBalance;
500
- const firstToken = sortedTokens[0];
501
- const secondToken = sortedTokens[1];
502
- if (sortedTokens.length === 1) {
503
- selectedToken = firstToken;
504
- } else if (tokensAreEqual(firstToken, otherToken)) {
505
- selectedToken = secondToken;
506
- } else {
507
- selectedToken = firstToken;
508
- }
509
- return selectedToken;
510
- }
511
-
512
532
  export function sortWalletsBasedOnConnectionState(
513
533
  wallets: ModalWalletInfo[]
514
534
  ): ModalWalletInfo[] {
@@ -1,5 +0,0 @@
1
- import type { PropTypes } from './BlockchainsChip.types';
2
- import type { PropsWithChildren } from 'react';
3
- import React from 'react';
4
- export declare function BlockchainsChip(props: PropsWithChildren<PropTypes>): React.JSX.Element;
5
- //# sourceMappingURL=BlockchainsChip.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BlockchainsChip.d.ts","sourceRoot":"","sources":["../../../src/components/BlockchainsChip/BlockchainsChip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE/C,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,wBAAgB,eAAe,CAAC,KAAK,EAAE,iBAAiB,CAAC,SAAS,CAAC,qBAOlE"}
@@ -1,151 +0,0 @@
1
- export declare const Chip: import("@stitches/react/types/styled-component").StyledComponent<"button", {
2
- selected?: boolean | "true" | "false" | undefined;
3
- }, {
4
- sm: string;
5
- md: string;
6
- lg: string;
7
- }, import("@stitches/react/types/css-util").CSS<{
8
- sm: string;
9
- md: string;
10
- lg: string;
11
- }, {
12
- colors: {
13
- primary500: string;
14
- primary600: string;
15
- secondary100: string;
16
- secondary200: string;
17
- secondary300: string;
18
- secondary400: string;
19
- secondary500: string;
20
- secondary600: string;
21
- secondary700: string;
22
- secondary800: string;
23
- secondary900: string;
24
- neutral100: string;
25
- neutral200: string;
26
- neutral300: string;
27
- neutral400: string;
28
- neutral500: string;
29
- neutral600: string;
30
- neutral700: string;
31
- neutral800: string;
32
- neutral900: string;
33
- error100: string;
34
- error300: string;
35
- error500: string;
36
- error600: string;
37
- error700: string;
38
- warning100: string;
39
- warning300: string;
40
- warning500: string;
41
- warning600: string;
42
- warning700: string;
43
- info100: string;
44
- info300: string;
45
- info500: string;
46
- info600: string;
47
- info700: string;
48
- success100: string;
49
- success300: string;
50
- success500: string;
51
- success600: string;
52
- success700: string;
53
- background: string;
54
- foreground: string;
55
- };
56
- space: {
57
- 0: string;
58
- 5: string;
59
- 10: string;
60
- 15: string;
61
- 20: string;
62
- 25: string;
63
- 30: string;
64
- 40: string;
65
- 46: string;
66
- 50: string;
67
- 60: string;
68
- 70: string;
69
- 80: string;
70
- 90: string;
71
- 100: string;
72
- 2: string;
73
- 4: string;
74
- 6: string;
75
- 8: string;
76
- 12: string;
77
- 16: string;
78
- 24: string;
79
- 28: string;
80
- 32: string;
81
- };
82
- radii: {
83
- xs: string;
84
- sm: string;
85
- xm: string;
86
- md: string;
87
- xl: string;
88
- lg: string;
89
- };
90
- fontSizes: {
91
- 10: string;
92
- 12: string;
93
- 14: string;
94
- 16: string;
95
- 18: string;
96
- 20: string;
97
- 22: string;
98
- 24: string;
99
- 28: string;
100
- 32: string;
101
- 36: string;
102
- 40: string;
103
- 48: string;
104
- };
105
- fonts: {};
106
- fontWeights: {
107
- regular: number;
108
- medium: number;
109
- semiBold: number;
110
- bold: number;
111
- };
112
- lineHeights: {
113
- 12: string;
114
- 16: string;
115
- 20: string;
116
- 24: string;
117
- 26: string;
118
- 28: string;
119
- 30: string;
120
- 36: string;
121
- 40: string;
122
- 44: string;
123
- 52: string;
124
- 64: string;
125
- };
126
- letterSpacings: {};
127
- sizes: {
128
- 4: string;
129
- 6: string;
130
- 8: string;
131
- 12: string;
132
- 16: string;
133
- 18: string;
134
- 20: string;
135
- 24: string;
136
- 28: string;
137
- 32: string;
138
- 36: string;
139
- 40: string;
140
- 45: string;
141
- 48: string;
142
- };
143
- borderWidths: {};
144
- borderStyles: {};
145
- shadows: {
146
- s: string;
147
- };
148
- zIndices: {};
149
- transitions: {};
150
- }, import("@stitches/react/types/config").DefaultThemeMap, {}>>;
151
- //# sourceMappingURL=BlockchainsChip.styles.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BlockchainsChip.styles.d.ts","sourceRoot":"","sources":["../../../src/components/BlockchainsChip/BlockchainsChip.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+DA2Bf,CAAC"}
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- export interface PropTypes {
3
- selected?: boolean;
4
- onClick?: React.MouseEventHandler<HTMLButtonElement>;
5
- }
6
- //# sourceMappingURL=BlockchainsChip.types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BlockchainsChip.types.d.ts","sourceRoot":"","sources":["../../../src/components/BlockchainsChip/BlockchainsChip.types.ts"],"names":[],"mappings":";AAAA,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;CACtD"}
@@ -1,2 +0,0 @@
1
- export { BlockchainsChip } from './BlockchainsChip';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/BlockchainsChip/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
@@ -1,3 +0,0 @@
1
- import type { BlockchainMeta } from 'rango-sdk';
2
- export declare const sortBlockchains: (blockchains: BlockchainMeta[]) => BlockchainMeta[];
3
- //# sourceMappingURL=BlockchainSection.helpers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BlockchainSection.helpers.d.ts","sourceRoot":"","sources":["../../../src/components/BlockchainsSection/BlockchainSection.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEhD,eAAO,MAAM,eAAe,gBAAiB,cAAc,EAAE,qBAiB5D,CAAC"}
@@ -1,4 +0,0 @@
1
- import type { PropTypes } from './SelectableCategoryList.types';
2
- import React from 'react';
3
- export declare function SelectableCategoryList(props: PropTypes): React.JSX.Element;
4
- //# sourceMappingURL=SelectableCategoryList.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SelectableCategoryList.d.ts","sourceRoot":"","sources":["../../../src/components/SelectableCategoryList/SelectableCategoryList.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAIhE,OAAO,KAAK,MAAM,OAAO,CAAC;AAa1B,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,SAAS,qBA4DtD"}
@@ -1,4 +0,0 @@
1
- import { type BlockchainMeta } from 'rango-sdk';
2
- import { BlockchainCategories } from './SelectableCategoryList.types';
3
- export declare const generateBlockchainsLogo: (list: BlockchainMeta[], type: Exclude<BlockchainCategories, 'ALL'>) => BlockchainMeta[];
4
- //# sourceMappingURL=SelectableCategoryList.helpers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SelectableCategoryList.helpers.d.ts","sourceRoot":"","sources":["../../../src/components/SelectableCategoryList/SelectableCategoryList.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,WAAW,CAAC;AAIhD,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAStE,eAAO,MAAM,uBAAuB,SAC5B,cAAc,EAAE,QAChB,QAAQ,oBAAoB,EAAE,KAAK,CAAC,qBAIoB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"SelectableCategoryList.styles.d.ts","sourceRoot":"","sources":["../../../src/components/SelectableCategoryList/SelectableCategoryList.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+DAIpB,CAAC;AAEH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+DAMvB,CAAC;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+DAKrB,CAAC"}
@@ -1,12 +0,0 @@
1
- export interface PropTypes {
2
- setCategory: (type: string) => void;
3
- category: string;
4
- }
5
- export declare enum BlockchainCategories {
6
- ALL = "ALL",
7
- EVM = "EVM",
8
- COSMOS = "COSMOS",
9
- UTXO = "UTXO",
10
- OTHER = "OTHER"
11
- }
12
- //# sourceMappingURL=SelectableCategoryList.types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SelectableCategoryList.types.d.ts","sourceRoot":"","sources":["../../../src/components/SelectableCategoryList/SelectableCategoryList.types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,SAAS;IACxB,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,oBAAY,oBAAoB;IAC9B,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,KAAK,UAAU;CAChB"}
@@ -1,2 +0,0 @@
1
- export { SelectableCategoryList } from './SelectableCategoryList';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SelectableCategoryList/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC"}
@@ -1,30 +0,0 @@
1
- import { styled } from '@rango-dev/ui';
2
-
3
- export const Chip = styled('button', {
4
- padding: '$10',
5
- borderRadius: '$sm',
6
- backgroundColor: '$neutral100',
7
- display: 'flex',
8
- flexDirection: 'column',
9
- justifyContent: 'center',
10
- alignItems: 'center',
11
- cursor: 'pointer',
12
- border: 0,
13
- '.image-container': {
14
- borderRadius: '$xm',
15
- overflow: 'hidden',
16
- },
17
- '&:hover': {
18
- backgroundColor: '$neutral400',
19
- },
20
- '&:focus-visible': {
21
- outline: 0,
22
- backgroundColor: '$neutral500',
23
- },
24
- variants: {
25
- selected: {
26
- true: { outline: '1px solid $secondary500' },
27
- false: { outline: 0 },
28
- },
29
- },
30
- });
@@ -1,15 +0,0 @@
1
- import type { PropTypes } from './BlockchainsChip.types';
2
- import type { PropsWithChildren } from 'react';
3
-
4
- import React from 'react';
5
-
6
- import { Chip } from './BlockchainsChip.styles';
7
-
8
- export function BlockchainsChip(props: PropsWithChildren<PropTypes>) {
9
- const { children, selected, onClick } = props;
10
- return (
11
- <Chip selected={selected} onClick={onClick}>
12
- {children}
13
- </Chip>
14
- );
15
- }
@@ -1,4 +0,0 @@
1
- export interface PropTypes {
2
- selected?: boolean;
3
- onClick?: React.MouseEventHandler<HTMLButtonElement>;
4
- }
@@ -1 +0,0 @@
1
- export { BlockchainsChip } from './BlockchainsChip';
@@ -1,20 +0,0 @@
1
- import type { BlockchainMeta } from 'rango-sdk';
2
-
3
- export const sortBlockchains = (blockchains: BlockchainMeta[]) => {
4
- const importantBlockchains: BlockchainMeta[] = [];
5
- const otherBlockchains: BlockchainMeta[] = [];
6
-
7
- for (const blockchain of blockchains) {
8
- if (
9
- blockchain.name === 'ETH' ||
10
- blockchain.name === 'COSMOS' ||
11
- blockchain.name === 'OSMOSIS'
12
- ) {
13
- importantBlockchains.push(blockchain);
14
- } else {
15
- otherBlockchains.push(blockchain);
16
- }
17
- }
18
-
19
- return importantBlockchains.concat(otherBlockchains);
20
- };
@@ -1,20 +0,0 @@
1
- import { type BlockchainMeta } from 'rango-sdk';
2
-
3
- import { filterByType } from '../BlockchainList/BlockchainList.helpers';
4
-
5
- import { BlockchainCategories } from './SelectableCategoryList.types';
6
-
7
- const blockchainslogo = {
8
- [BlockchainCategories.EVM]: ['ETH', 'BSC', 'POLYGON'],
9
- [BlockchainCategories.COSMOS]: ['COSMOS', 'OSMOSIS', 'JUNO'],
10
- [BlockchainCategories.UTXO]: ['BTC', 'LTC', 'BCH'],
11
- [BlockchainCategories.OTHER]: ['STARKNET', 'TRON', 'SOLANA'],
12
- };
13
-
14
- export const generateBlockchainsLogo = (
15
- list: BlockchainMeta[],
16
- type: Exclude<BlockchainCategories, 'ALL'>
17
- ) =>
18
- list
19
- .filter((item) => filterByType(item, type))
20
- .filter((item) => blockchainslogo[type].includes(item.name));
@@ -1,21 +0,0 @@
1
- import { styled } from '@rango-dev/ui';
2
-
3
- export const Container = styled('div', {
4
- display: 'grid',
5
- gap: '$10',
6
- gridTemplateColumns: 'auto 1fr 1fr 1fr 1fr',
7
- });
8
-
9
- export const ImageContent = styled('div', {
10
- display: 'flex',
11
- position: 'relative',
12
- alignItems: 'center',
13
- justifyContent: 'center',
14
- paddingTop: '$10',
15
- });
16
- export const FirstImage = styled('img', {
17
- position: 'absolute',
18
- top: -2,
19
- width: 15,
20
- height: 15,
21
- });