@lifi/widget 1.31.1 → 1.32.1

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 (441) hide show
  1. package/App.js +4 -16
  2. package/AppDrawer.js +13 -7
  3. package/AppDrawer.style.d.ts +3 -3
  4. package/AppDrawer.style.js +1 -1
  5. package/AppProvider.js +1 -1
  6. package/AppRoutes.js +9 -0
  7. package/cjs/App.js +4 -16
  8. package/cjs/AppDrawer.js +13 -7
  9. package/cjs/AppDrawer.style.d.ts +3 -3
  10. package/cjs/AppDrawer.style.js +1 -1
  11. package/cjs/AppProvider.js +1 -1
  12. package/cjs/AppRoutes.js +9 -0
  13. package/cjs/components/ActiveSwaps/ActiveSwapItem.js +9 -7
  14. package/cjs/components/ActiveSwaps/ActiveSwaps.js +3 -3
  15. package/cjs/components/ActiveSwaps/ActiveSwaps.style.d.ts +5 -5
  16. package/cjs/components/AppContainer.d.ts +2 -2
  17. package/cjs/components/AppContainer.js +1 -1
  18. package/cjs/components/BottomSheet/BottomSheet.d.ts +1 -1
  19. package/cjs/components/BottomSheet/BottomSheet.js +2 -2
  20. package/cjs/components/Card/Card.d.ts +2 -2
  21. package/cjs/components/Card/CardHeader.d.ts +1 -1
  22. package/cjs/components/Card/CardTitle.d.ts +1 -1
  23. package/cjs/components/ChainSelect/ChainSelect.d.ts +0 -1
  24. package/cjs/components/ChainSelect/ChainSelect.js +3 -4
  25. package/cjs/components/ChainSelect/ChainSelect.style.d.ts +3 -3
  26. package/cjs/components/ContractComponent/ContractComponent.js +1 -1
  27. package/cjs/components/Dialog.js +1 -1
  28. package/cjs/components/GasSufficiencyMessage/GasSufficiencyMessage.js +13 -28
  29. package/cjs/components/GasSufficiencyMessage/GasSufficiencyMessage.style.d.ts +1 -1
  30. package/cjs/components/Header/Header.js +1 -1
  31. package/cjs/components/Header/Header.style.d.ts +4 -4
  32. package/cjs/components/Header/NavigationHeader.js +6 -2
  33. package/cjs/components/Header/WalletHeader.js +12 -22
  34. package/cjs/{pages/SelectNativeTokenPage/SelectNativeTokenPage.style.d.ts → components/ListItemButton.d.ts} +1 -2
  35. package/cjs/{pages/SelectWalletPage/SelectWalletPage.style.js → components/ListItemButton.js} +2 -8
  36. package/cjs/components/ListItemText.d.ts +2 -0
  37. package/cjs/{pages/SelectNativeTokenPage/SelectNativeTokenPage.style.js → components/ListItemText.js} +1 -10
  38. package/cjs/components/NFT/NFT.js +2 -14
  39. package/cjs/components/NFT/NFT.style.d.ts +1 -1
  40. package/cjs/components/NotFound.js +2 -2
  41. package/cjs/components/PoweredBy/PoweredBy.js +2 -2
  42. package/cjs/components/PoweredBy/PoweredBy.style.d.ts +1 -1
  43. package/cjs/components/ProgressToNextUpdate/ProgressToNextUpdate.js +5 -17
  44. package/cjs/components/ReverseTokensButton/ReverseTokensButton.js +1 -1
  45. package/cjs/components/ReverseTokensButton/ReverseTokensButton.style.d.ts +2 -2
  46. package/cjs/components/Select.js +1 -0
  47. package/cjs/components/SelectChainAndToken.js +4 -4
  48. package/cjs/components/SelectTokenButton/SelectTokenButton.js +2 -2
  49. package/cjs/components/SelectTokenButton/SelectTokenButton.style.d.ts +1 -1
  50. package/cjs/components/SendToWallet/SendToWallet.js +9 -19
  51. package/cjs/components/SendToWallet/SendToWallet.style.d.ts +2 -2
  52. package/cjs/components/SendToWallet/SendToWalletButton.js +5 -5
  53. package/cjs/components/SmallAvatar.d.ts +3 -3
  54. package/cjs/components/Step/CircularProgress.d.ts +0 -1
  55. package/cjs/components/Step/CircularProgress.js +2 -2
  56. package/cjs/components/Step/CircularProgress.style.d.ts +1 -1
  57. package/cjs/components/Step/DestinationWalletAddress.js +6 -7
  58. package/cjs/components/Step/GasStepProcess.js +8 -8
  59. package/cjs/components/Step/Step.js +4 -5
  60. package/cjs/components/Step/StepList.d.ts +0 -1
  61. package/cjs/components/Step/StepList.js +8 -4
  62. package/cjs/components/Step/StepProcess.js +3 -3
  63. package/cjs/components/Step/StepProcess.style.d.ts +3 -3
  64. package/cjs/components/Step/StepTimer.js +4 -8
  65. package/cjs/components/StepActions/StepActions.js +20 -37
  66. package/cjs/components/StepActions/StepActions.style.d.ts +1 -1
  67. package/cjs/components/StepDivider/StepDivider.style.d.ts +1 -1
  68. package/cjs/components/SwapButton/SwapButton.js +5 -14
  69. package/cjs/components/SwapInput/FormPriceHelperText.js +6 -6
  70. package/cjs/components/SwapInput/SwapInput.js +4 -16
  71. package/cjs/components/SwapInput/SwapInput.style.d.ts +2 -2
  72. package/cjs/components/SwapInput/SwapInputAdornment.style.d.ts +2 -2
  73. package/cjs/components/SwapInput/SwapInputEndAdornment.d.ts +0 -1
  74. package/cjs/components/SwapInput/SwapInputEndAdornment.js +2 -3
  75. package/cjs/components/SwapRouteCard/SwapRouteCard.js +9 -25
  76. package/cjs/components/SwapRouteCard/SwapRouteCard.style.d.ts +3 -3
  77. package/cjs/components/SwapRouteCard/SwapRouteCardSkeleton.js +4 -16
  78. package/cjs/components/SwapRouteCard/SwapRouteNotFoundCard.js +2 -2
  79. package/cjs/components/SwapRouteCard/utils.js +1 -1
  80. package/cjs/components/SwapRoutes/SwapRoutes.js +4 -4
  81. package/cjs/components/SwapRoutes/SwapRoutes.style.d.ts +5 -5
  82. package/cjs/components/SwapRoutes/SwapRoutesExpanded.d.ts +0 -1
  83. package/cjs/components/SwapRoutes/SwapRoutesExpanded.js +3 -3
  84. package/cjs/components/TextFitter/TextFitter.js +3 -3
  85. package/cjs/components/Token/Token.js +19 -33
  86. package/cjs/components/Token/Token.style.d.ts +3 -3
  87. package/cjs/components/TokenAvatar/TokenAvatar.js +6 -7
  88. package/cjs/components/TokenAvatar/TokenAvatar.style.d.ts +2 -2
  89. package/cjs/components/TokenList/TokenList.js +3 -4
  90. package/cjs/components/TokenList/TokenList.style.d.ts +3 -3
  91. package/cjs/components/TokenList/TokenList.style.js +2 -6
  92. package/cjs/components/TokenList/TokenListItem.js +9 -9
  93. package/cjs/components/TokenList/TokenNotFound.js +4 -5
  94. package/cjs/components/TokenList/VirtualizedTokenList.js +10 -11
  95. package/cjs/components/TokenList/useTokenSelect.js +2 -2
  96. package/cjs/config/env.js +1 -1
  97. package/cjs/config/sentry.js +3 -12
  98. package/cjs/config/theme.js +44 -16
  99. package/cjs/config/version.d.ts +1 -1
  100. package/cjs/config/version.js +1 -1
  101. package/cjs/hooks/useChain.js +1 -1
  102. package/cjs/hooks/useChains.js +5 -14
  103. package/cjs/hooks/useContentHeight.js +1 -2
  104. package/cjs/hooks/useFeaturedTokens.js +1 -4
  105. package/cjs/hooks/useGasSufficiency.js +28 -34
  106. package/cjs/hooks/useProcessMessage.js +7 -11
  107. package/cjs/hooks/useRouteExecution.js +16 -26
  108. package/cjs/hooks/useSwapRoutes.js +16 -26
  109. package/cjs/hooks/useToken.js +2 -2
  110. package/cjs/hooks/useTokenAddressBalance.js +1 -2
  111. package/cjs/hooks/useTokenBalance.js +24 -27
  112. package/cjs/hooks/useTokenBalances.d.ts +1 -1
  113. package/cjs/hooks/useTokenBalances.js +8 -20
  114. package/cjs/hooks/useTokenSearch.d.ts +1 -1
  115. package/cjs/hooks/useTokenSearch.js +12 -21
  116. package/cjs/hooks/useTokens.d.ts +1 -1
  117. package/cjs/hooks/useTokens.js +36 -38
  118. package/cjs/hooks/useTools.d.ts +2 -11
  119. package/cjs/hooks/useTools.js +11 -21
  120. package/cjs/i18n/en.json +8 -8
  121. package/cjs/i18n/uk.json +8 -8
  122. package/cjs/icons/LiFiFullLogo.js +1 -1
  123. package/cjs/icons/LiFiLogo.js +1 -1
  124. package/cjs/icons/LiFiToolLogo.js +1 -1
  125. package/cjs/index.d.ts +1 -0
  126. package/cjs/index.js +2 -0
  127. package/cjs/pages/ActiveSwapsPage/ActiveSwapsEmpty.js +2 -2
  128. package/cjs/pages/ActiveSwapsPage/ActiveSwapsPage.d.ts +0 -1
  129. package/cjs/pages/ActiveSwapsPage/ActiveSwapsPage.js +3 -3
  130. package/cjs/pages/MainPage/MainPage.js +1 -1
  131. package/cjs/pages/MainPage/MainPage.style.d.ts +1 -1
  132. package/cjs/pages/MainPage/MainSwapButton.js +3 -12
  133. package/cjs/pages/SelectChainPage/SelectChainPage.js +6 -14
  134. package/cjs/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.d.ts +4 -0
  135. package/cjs/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.js +51 -0
  136. package/cjs/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.style.d.ts +20 -0
  137. package/cjs/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.style.js +8 -0
  138. package/cjs/pages/SelectEnabledToolsPage/index.d.ts +1 -0
  139. package/cjs/pages/SelectEnabledToolsPage/index.js +17 -0
  140. package/cjs/pages/SelectNativeTokenPage/SelectNativeTokenPage.js +4 -3
  141. package/cjs/pages/SelectTokenPage/SearchTokenInput.d.ts +0 -1
  142. package/cjs/pages/SelectTokenPage/SearchTokenInput.js +4 -1
  143. package/cjs/pages/SelectTokenPage/SelectTokenPage.js +2 -3
  144. package/cjs/pages/SelectWalletPage/SelectWalletPage.d.ts +0 -1
  145. package/cjs/pages/SelectWalletPage/SelectWalletPage.js +13 -19
  146. package/cjs/pages/SettingsPage/ColorSchemeButtonGroup.js +3 -3
  147. package/cjs/pages/SettingsPage/ColorSchemeButtonGroup.style.d.ts +2 -2
  148. package/cjs/pages/SettingsPage/EnabledToolsButton.d.ts +4 -0
  149. package/cjs/pages/SettingsPage/EnabledToolsButton.js +25 -0
  150. package/cjs/pages/{SelectChainPage/SelectChainPage.style.d.ts → SettingsPage/EnabledToolsButton.style.d.ts} +1 -1
  151. package/cjs/pages/{SelectChainPage/SelectChainPage.style.js → SettingsPage/EnabledToolsButton.style.js} +7 -10
  152. package/cjs/pages/SettingsPage/GasPriceSelect.d.ts +0 -1
  153. package/cjs/pages/SettingsPage/GasPriceSelect.js +1 -1
  154. package/cjs/pages/SettingsPage/LanguageSelect.js +5 -6
  155. package/cjs/pages/SettingsPage/ResetSettingsButton.d.ts +2 -0
  156. package/cjs/pages/SettingsPage/ResetSettingsButton.js +27 -0
  157. package/cjs/pages/SettingsPage/RoutePrioritySelect.js +4 -4
  158. package/cjs/pages/SettingsPage/SettingsPage.d.ts +0 -1
  159. package/cjs/pages/SettingsPage/SettingsPage.js +3 -2
  160. package/cjs/pages/SettingsPage/ShowDestinationWallet.d.ts +0 -1
  161. package/cjs/pages/SettingsPage/ShowDestinationWallet.js +3 -3
  162. package/cjs/pages/SettingsPage/SlippageInput.d.ts +0 -1
  163. package/cjs/pages/SettingsPage/SlippageInput.js +3 -3
  164. package/cjs/pages/SwapDetailsPage/SwapDetailsPage.js +14 -22
  165. package/cjs/pages/SwapDetailsPage/SwapDetailsPage.style.d.ts +1 -1
  166. package/cjs/pages/SwapHistoryPage/SwapHistoryEmpty.js +2 -2
  167. package/cjs/pages/SwapHistoryPage/SwapHistoryItem.js +9 -7
  168. package/cjs/pages/SwapHistoryPage/SwapHistoryPage.js +2 -2
  169. package/cjs/pages/SwapPage/ExchangeRateBottomSheet.js +21 -26
  170. package/cjs/pages/SwapPage/StartSwapButton.js +1 -1
  171. package/cjs/pages/SwapPage/StatusBottomSheet.js +21 -19
  172. package/cjs/pages/SwapPage/StatusBottomSheet.style.d.ts +2 -2
  173. package/cjs/pages/SwapPage/SwapPage.js +9 -21
  174. package/cjs/pages/SwapPage/SwapPage.style.d.ts +1 -1
  175. package/cjs/pages/SwapPage/TokenValueBottomSheet.js +8 -9
  176. package/cjs/pages/SwapRoutesPage/SwapRoutesPage.js +3 -3
  177. package/cjs/pages/SwapRoutesPage/SwapRoutesPage.style.d.ts +1 -1
  178. package/cjs/providers/I18nProvider/I18nProvider.js +7 -8
  179. package/cjs/providers/SDKProvider/SDKProvider.js +15 -4
  180. package/cjs/providers/SwapFormProvider/SwapFormProvider.js +12 -6
  181. package/cjs/providers/SwapFormProvider/URLSearchParamsBuilder.js +3 -12
  182. package/cjs/providers/TelemetryProvider/TelemetryProvider.js +1 -1
  183. package/cjs/providers/ThemeProvider/ThemeProvider.js +2 -2
  184. package/cjs/providers/WalletProvider/WalletProvider.js +30 -39
  185. package/cjs/providers/WidgetProvider/WidgetProvider.js +20 -27
  186. package/cjs/providers/WidgetProvider/utils.js +2 -3
  187. package/cjs/stores/StoreProvider.js +1 -7
  188. package/cjs/stores/chains/index.d.ts +1 -2
  189. package/cjs/stores/chains/index.js +1 -2
  190. package/cjs/stores/chains/useChainOrder.js +2 -2
  191. package/cjs/stores/chains/useChainOrderStore.d.ts +3 -0
  192. package/cjs/stores/chains/{createChainOrderStore.js → useChainOrderStore.js} +3 -4
  193. package/cjs/stores/routes/RouteExecutionStore.js +2 -14
  194. package/cjs/stores/routes/createRouteExecutionStore.js +27 -16
  195. package/cjs/stores/routes/types.d.ts +1 -1
  196. package/cjs/stores/routes/useExecutingRoutesIds.js +2 -5
  197. package/cjs/stores/routes/useRecommendedRouteStore.d.ts +10 -2
  198. package/cjs/stores/routes/useRecommendedRouteStore.js +30 -2
  199. package/cjs/stores/routes/useSwapHistory.js +3 -6
  200. package/cjs/stores/routes/utils.js +4 -4
  201. package/cjs/stores/settings/index.d.ts +1 -1
  202. package/cjs/stores/settings/index.js +1 -1
  203. package/cjs/stores/settings/types.d.ts +6 -6
  204. package/cjs/stores/settings/useAppearance.js +2 -2
  205. package/cjs/stores/settings/useSettings.js +2 -2
  206. package/cjs/stores/settings/useSettingsStore.d.ts +6 -0
  207. package/cjs/stores/settings/{createSettingsStore.js → useSettingsStore.js} +48 -28
  208. package/cjs/utils/colors.js +1 -1
  209. package/cjs/utils/format.js +3 -3
  210. package/cjs/utils/navigationRoutes.d.ts +2 -0
  211. package/cjs/utils/navigationRoutes.js +6 -0
  212. package/components/ActiveSwaps/ActiveSwapItem.js +9 -7
  213. package/components/ActiveSwaps/ActiveSwaps.js +3 -3
  214. package/components/ActiveSwaps/ActiveSwaps.style.d.ts +5 -5
  215. package/components/AppContainer.d.ts +2 -2
  216. package/components/AppContainer.js +1 -1
  217. package/components/BottomSheet/BottomSheet.d.ts +1 -1
  218. package/components/BottomSheet/BottomSheet.js +2 -2
  219. package/components/Card/Card.d.ts +2 -2
  220. package/components/Card/CardHeader.d.ts +1 -1
  221. package/components/Card/CardTitle.d.ts +1 -1
  222. package/components/ChainSelect/ChainSelect.d.ts +0 -1
  223. package/components/ChainSelect/ChainSelect.js +3 -4
  224. package/components/ChainSelect/ChainSelect.style.d.ts +3 -3
  225. package/components/ContractComponent/ContractComponent.js +1 -1
  226. package/components/Dialog.js +1 -1
  227. package/components/GasSufficiencyMessage/GasSufficiencyMessage.js +13 -28
  228. package/components/GasSufficiencyMessage/GasSufficiencyMessage.style.d.ts +1 -1
  229. package/components/Header/Header.js +1 -1
  230. package/components/Header/Header.style.d.ts +4 -4
  231. package/components/Header/NavigationHeader.js +6 -2
  232. package/components/Header/WalletHeader.js +12 -22
  233. package/{pages/SelectChainPage/SelectChainPage.style.d.ts → components/ListItemButton.d.ts} +1 -2
  234. package/components/ListItemButton.js +11 -0
  235. package/components/ListItemText.d.ts +2 -0
  236. package/components/ListItemText.js +8 -0
  237. package/components/NFT/NFT.js +2 -14
  238. package/components/NFT/NFT.style.d.ts +1 -1
  239. package/components/NotFound.js +2 -2
  240. package/components/PoweredBy/PoweredBy.js +2 -2
  241. package/components/PoweredBy/PoweredBy.style.d.ts +1 -1
  242. package/components/ProgressToNextUpdate/ProgressToNextUpdate.js +5 -17
  243. package/components/ReverseTokensButton/ReverseTokensButton.js +1 -1
  244. package/components/ReverseTokensButton/ReverseTokensButton.style.d.ts +2 -2
  245. package/components/Select.js +1 -0
  246. package/components/SelectChainAndToken.js +4 -4
  247. package/components/SelectTokenButton/SelectTokenButton.js +2 -2
  248. package/components/SelectTokenButton/SelectTokenButton.style.d.ts +1 -1
  249. package/components/SendToWallet/SendToWallet.js +9 -19
  250. package/components/SendToWallet/SendToWallet.style.d.ts +2 -2
  251. package/components/SendToWallet/SendToWalletButton.js +5 -5
  252. package/components/SmallAvatar.d.ts +3 -3
  253. package/components/Step/CircularProgress.d.ts +0 -1
  254. package/components/Step/CircularProgress.js +2 -2
  255. package/components/Step/CircularProgress.style.d.ts +1 -1
  256. package/components/Step/DestinationWalletAddress.js +6 -7
  257. package/components/Step/GasStepProcess.js +8 -8
  258. package/components/Step/Step.js +4 -5
  259. package/components/Step/StepList.d.ts +0 -1
  260. package/components/Step/StepList.js +8 -4
  261. package/components/Step/StepProcess.js +3 -3
  262. package/components/Step/StepProcess.style.d.ts +3 -3
  263. package/components/Step/StepTimer.js +4 -8
  264. package/components/StepActions/StepActions.js +20 -37
  265. package/components/StepActions/StepActions.style.d.ts +1 -1
  266. package/components/StepDivider/StepDivider.style.d.ts +1 -1
  267. package/components/SwapButton/SwapButton.js +5 -14
  268. package/components/SwapInput/FormPriceHelperText.js +6 -6
  269. package/components/SwapInput/SwapInput.js +4 -16
  270. package/components/SwapInput/SwapInput.style.d.ts +2 -2
  271. package/components/SwapInput/SwapInputAdornment.style.d.ts +2 -2
  272. package/components/SwapInput/SwapInputEndAdornment.d.ts +0 -1
  273. package/components/SwapInput/SwapInputEndAdornment.js +2 -3
  274. package/components/SwapRouteCard/SwapRouteCard.js +9 -25
  275. package/components/SwapRouteCard/SwapRouteCard.style.d.ts +3 -3
  276. package/components/SwapRouteCard/SwapRouteCardSkeleton.js +4 -16
  277. package/components/SwapRouteCard/SwapRouteNotFoundCard.js +2 -2
  278. package/components/SwapRouteCard/utils.js +1 -1
  279. package/components/SwapRoutes/SwapRoutes.js +4 -4
  280. package/components/SwapRoutes/SwapRoutes.style.d.ts +5 -5
  281. package/components/SwapRoutes/SwapRoutesExpanded.d.ts +0 -1
  282. package/components/SwapRoutes/SwapRoutesExpanded.js +3 -3
  283. package/components/TextFitter/TextFitter.js +3 -3
  284. package/components/Token/Token.js +19 -33
  285. package/components/Token/Token.style.d.ts +3 -3
  286. package/components/TokenAvatar/TokenAvatar.js +6 -7
  287. package/components/TokenAvatar/TokenAvatar.style.d.ts +2 -2
  288. package/components/TokenList/TokenList.js +3 -4
  289. package/components/TokenList/TokenList.style.d.ts +3 -3
  290. package/components/TokenList/TokenList.style.js +3 -7
  291. package/components/TokenList/TokenListItem.js +9 -9
  292. package/components/TokenList/TokenNotFound.js +4 -5
  293. package/components/TokenList/VirtualizedTokenList.js +10 -11
  294. package/components/TokenList/useTokenSelect.js +2 -2
  295. package/config/env.js +1 -1
  296. package/config/sentry.js +3 -12
  297. package/config/theme.js +44 -16
  298. package/config/version.d.ts +1 -1
  299. package/config/version.js +1 -1
  300. package/hooks/useChain.js +1 -1
  301. package/hooks/useChains.js +5 -14
  302. package/hooks/useContentHeight.js +1 -2
  303. package/hooks/useFeaturedTokens.js +1 -4
  304. package/hooks/useGasSufficiency.js +28 -34
  305. package/hooks/useProcessMessage.js +7 -11
  306. package/hooks/useRouteExecution.js +16 -26
  307. package/hooks/useSwapRoutes.js +16 -26
  308. package/hooks/useToken.js +2 -2
  309. package/hooks/useTokenAddressBalance.js +1 -2
  310. package/hooks/useTokenBalance.js +24 -27
  311. package/hooks/useTokenBalances.d.ts +1 -1
  312. package/hooks/useTokenBalances.js +8 -20
  313. package/hooks/useTokenSearch.d.ts +1 -1
  314. package/hooks/useTokenSearch.js +12 -21
  315. package/hooks/useTokens.d.ts +1 -1
  316. package/hooks/useTokens.js +36 -38
  317. package/hooks/useTools.d.ts +2 -11
  318. package/hooks/useTools.js +12 -22
  319. package/i18n/en.json +8 -8
  320. package/i18n/uk.json +8 -8
  321. package/icons/LiFiFullLogo.js +1 -1
  322. package/icons/LiFiLogo.js +1 -1
  323. package/icons/LiFiToolLogo.js +1 -1
  324. package/index.d.ts +1 -0
  325. package/index.js +2 -0
  326. package/package.json +7 -7
  327. package/pages/ActiveSwapsPage/ActiveSwapsEmpty.js +2 -2
  328. package/pages/ActiveSwapsPage/ActiveSwapsPage.d.ts +0 -1
  329. package/pages/ActiveSwapsPage/ActiveSwapsPage.js +3 -3
  330. package/pages/MainPage/MainPage.js +1 -1
  331. package/pages/MainPage/MainPage.style.d.ts +1 -1
  332. package/pages/MainPage/MainSwapButton.js +3 -12
  333. package/pages/SelectChainPage/SelectChainPage.js +6 -14
  334. package/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.d.ts +4 -0
  335. package/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.js +47 -0
  336. package/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.style.d.ts +20 -0
  337. package/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.style.js +5 -0
  338. package/pages/SelectEnabledToolsPage/index.d.ts +1 -0
  339. package/pages/SelectEnabledToolsPage/index.js +1 -0
  340. package/pages/SelectNativeTokenPage/SelectNativeTokenPage.js +4 -3
  341. package/pages/SelectTokenPage/SearchTokenInput.d.ts +0 -1
  342. package/pages/SelectTokenPage/SearchTokenInput.js +4 -1
  343. package/pages/SelectTokenPage/SelectTokenPage.js +2 -3
  344. package/pages/SelectWalletPage/SelectWalletPage.d.ts +0 -1
  345. package/pages/SelectWalletPage/SelectWalletPage.js +13 -19
  346. package/pages/SettingsPage/ColorSchemeButtonGroup.js +3 -3
  347. package/pages/SettingsPage/ColorSchemeButtonGroup.style.d.ts +2 -2
  348. package/pages/SettingsPage/EnabledToolsButton.d.ts +4 -0
  349. package/pages/SettingsPage/EnabledToolsButton.js +21 -0
  350. package/{cjs/pages/SelectWalletPage/SelectWalletPage.style.d.ts → pages/SettingsPage/EnabledToolsButton.style.d.ts} +1 -1
  351. package/pages/SettingsPage/EnabledToolsButton.style.js +14 -0
  352. package/pages/SettingsPage/GasPriceSelect.d.ts +0 -1
  353. package/pages/SettingsPage/GasPriceSelect.js +1 -1
  354. package/pages/SettingsPage/LanguageSelect.js +5 -6
  355. package/pages/SettingsPage/ResetSettingsButton.d.ts +2 -0
  356. package/pages/SettingsPage/ResetSettingsButton.js +23 -0
  357. package/pages/SettingsPage/RoutePrioritySelect.js +4 -4
  358. package/pages/SettingsPage/SettingsPage.d.ts +0 -1
  359. package/pages/SettingsPage/SettingsPage.js +3 -2
  360. package/pages/SettingsPage/ShowDestinationWallet.d.ts +0 -1
  361. package/pages/SettingsPage/ShowDestinationWallet.js +3 -3
  362. package/pages/SettingsPage/SlippageInput.d.ts +0 -1
  363. package/pages/SettingsPage/SlippageInput.js +3 -3
  364. package/pages/SwapDetailsPage/SwapDetailsPage.js +14 -22
  365. package/pages/SwapDetailsPage/SwapDetailsPage.style.d.ts +1 -1
  366. package/pages/SwapHistoryPage/SwapHistoryEmpty.js +2 -2
  367. package/pages/SwapHistoryPage/SwapHistoryItem.js +9 -7
  368. package/pages/SwapHistoryPage/SwapHistoryPage.js +2 -2
  369. package/pages/SwapPage/ExchangeRateBottomSheet.js +21 -26
  370. package/pages/SwapPage/StartSwapButton.js +1 -1
  371. package/pages/SwapPage/StatusBottomSheet.js +21 -19
  372. package/pages/SwapPage/StatusBottomSheet.style.d.ts +2 -2
  373. package/pages/SwapPage/SwapPage.js +9 -21
  374. package/pages/SwapPage/SwapPage.style.d.ts +1 -1
  375. package/pages/SwapPage/TokenValueBottomSheet.js +8 -9
  376. package/pages/SwapRoutesPage/SwapRoutesPage.js +3 -3
  377. package/pages/SwapRoutesPage/SwapRoutesPage.style.d.ts +1 -1
  378. package/providers/I18nProvider/I18nProvider.js +7 -8
  379. package/providers/SDKProvider/SDKProvider.js +15 -4
  380. package/providers/SwapFormProvider/SwapFormProvider.js +12 -6
  381. package/providers/SwapFormProvider/URLSearchParamsBuilder.js +3 -12
  382. package/providers/TelemetryProvider/TelemetryProvider.js +1 -1
  383. package/providers/ThemeProvider/ThemeProvider.js +2 -2
  384. package/providers/WalletProvider/WalletProvider.js +30 -39
  385. package/providers/WidgetProvider/WidgetProvider.js +22 -29
  386. package/providers/WidgetProvider/utils.js +2 -3
  387. package/stores/StoreProvider.js +2 -8
  388. package/stores/chains/index.d.ts +1 -2
  389. package/stores/chains/index.js +1 -2
  390. package/stores/chains/useChainOrder.js +1 -1
  391. package/stores/chains/useChainOrderStore.d.ts +3 -0
  392. package/stores/chains/{createChainOrderStore.js → useChainOrderStore.js} +2 -2
  393. package/stores/routes/RouteExecutionStore.js +2 -14
  394. package/stores/routes/createRouteExecutionStore.js +27 -16
  395. package/stores/routes/types.d.ts +1 -1
  396. package/stores/routes/useExecutingRoutesIds.js +2 -5
  397. package/stores/routes/useRecommendedRouteStore.d.ts +10 -2
  398. package/stores/routes/useRecommendedRouteStore.js +25 -1
  399. package/stores/routes/useSwapHistory.js +3 -6
  400. package/stores/routes/utils.js +4 -4
  401. package/stores/settings/index.d.ts +1 -1
  402. package/stores/settings/index.js +1 -1
  403. package/stores/settings/types.d.ts +6 -6
  404. package/stores/settings/useAppearance.js +1 -1
  405. package/stores/settings/useSettings.js +1 -1
  406. package/stores/settings/useSettingsStore.d.ts +6 -0
  407. package/stores/settings/{createSettingsStore.js → useSettingsStore.js} +46 -26
  408. package/tsconfig.cjs.tsbuildinfo +1 -1
  409. package/utils/colors.js +1 -1
  410. package/utils/format.js +3 -3
  411. package/utils/navigationRoutes.d.ts +2 -0
  412. package/utils/navigationRoutes.js +6 -0
  413. package/cjs/pages/SettingsPage/AdvancedPreferences.d.ts +0 -2
  414. package/cjs/pages/SettingsPage/AdvancedPreferences.js +0 -24
  415. package/cjs/pages/SettingsPage/EnabledBridgesSelect.d.ts +0 -2
  416. package/cjs/pages/SettingsPage/EnabledBridgesSelect.js +0 -24
  417. package/cjs/pages/SettingsPage/EnabledExchangesSelect.d.ts +0 -2
  418. package/cjs/pages/SettingsPage/EnabledExchangesSelect.js +0 -24
  419. package/cjs/stores/chains/ChainOrderStore.d.ts +0 -9
  420. package/cjs/stores/chains/ChainOrderStore.js +0 -44
  421. package/cjs/stores/chains/createChainOrderStore.d.ts +0 -4
  422. package/cjs/stores/settings/SettingsStore.d.ts +0 -11
  423. package/cjs/stores/settings/SettingsStore.js +0 -58
  424. package/cjs/stores/settings/createSettingsStore.d.ts +0 -5
  425. package/pages/SelectChainPage/SelectChainPage.style.js +0 -17
  426. package/pages/SelectNativeTokenPage/SelectNativeTokenPage.style.d.ts +0 -21
  427. package/pages/SelectNativeTokenPage/SelectNativeTokenPage.style.js +0 -17
  428. package/pages/SelectWalletPage/SelectWalletPage.style.d.ts +0 -21
  429. package/pages/SelectWalletPage/SelectWalletPage.style.js +0 -17
  430. package/pages/SettingsPage/AdvancedPreferences.d.ts +0 -2
  431. package/pages/SettingsPage/AdvancedPreferences.js +0 -20
  432. package/pages/SettingsPage/EnabledBridgesSelect.d.ts +0 -2
  433. package/pages/SettingsPage/EnabledBridgesSelect.js +0 -20
  434. package/pages/SettingsPage/EnabledExchangesSelect.d.ts +0 -2
  435. package/pages/SettingsPage/EnabledExchangesSelect.js +0 -20
  436. package/stores/chains/ChainOrderStore.d.ts +0 -9
  437. package/stores/chains/ChainOrderStore.js +0 -38
  438. package/stores/chains/createChainOrderStore.d.ts +0 -4
  439. package/stores/settings/SettingsStore.d.ts +0 -11
  440. package/stores/settings/SettingsStore.js +0 -51
  441. package/stores/settings/createSettingsStore.d.ts +0 -5
@@ -4,7 +4,7 @@ export declare const CollapseContainer: import("@emotion/styled").StyledComponen
4
4
  component?: import("react").ElementType<any> | undefined;
5
5
  ref?: import("react").Ref<unknown> | undefined;
6
6
  sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
7
- } & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
7
+ } & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
8
8
  ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
9
9
  }, "children" | "sx" | "ref" | ("p" | "color" | "border" | "boxShadow" | "fontWeight" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint") | "component"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
10
10
  export declare const ScrollableContainer: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material").Theme> & {
@@ -12,7 +12,7 @@ export declare const ScrollableContainer: import("@emotion/styled").StyledCompon
12
12
  component?: import("react").ElementType<any> | undefined;
13
13
  ref?: import("react").Ref<unknown> | undefined;
14
14
  sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
15
- } & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
15
+ } & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
16
16
  ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
17
17
  }, "children" | "sx" | "ref" | ("p" | "color" | "border" | "boxShadow" | "fontWeight" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint") | "component"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
18
18
  export declare const Container: import("@emotion/styled").StyledComponent<{
@@ -20,7 +20,7 @@ export declare const Container: import("@emotion/styled").StyledComponent<{
20
20
  classes?: Partial<import("@mui/material").ScopedCssBaselineClasses> | undefined;
21
21
  enableColorScheme?: boolean | undefined;
22
22
  sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
23
- } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
23
+ } & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
24
24
  ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
25
25
  }, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "enableColorScheme"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
26
26
  export declare const Header: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material").Theme> & {
@@ -28,7 +28,7 @@ export declare const Header: import("@emotion/styled").StyledComponent<import("@
28
28
  component?: import("react").ElementType<any> | undefined;
29
29
  ref?: import("react").Ref<unknown> | undefined;
30
30
  sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
31
- } & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
31
+ } & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
32
32
  ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
33
33
  }, "children" | "sx" | "ref" | ("p" | "color" | "border" | "boxShadow" | "fontWeight" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint") | "component"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
34
34
  export declare const Stack: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material").Theme> & {
@@ -38,6 +38,6 @@ export declare const Stack: import("@emotion/styled").StyledComponent<import("@m
38
38
  spacing?: import("@mui/system").ResponsiveStyleValue<string | number> | undefined;
39
39
  divider?: import("react").ReactNode;
40
40
  sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
41
- } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
41
+ } & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
42
42
  ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
43
43
  }, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "ref" | "direction" | ("p" | "color" | "border" | "boxShadow" | "fontWeight" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint") | "divider" | "spacing"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  export declare const SwapRoutesExpanded: () => JSX.Element;
3
2
  export declare const SwapRoutesExpandedElement: () => JSX.Element;
@@ -22,7 +22,7 @@ const SwapRoutesExpanded = () => {
22
22
  element: null,
23
23
  },
24
24
  ]);
25
- return ((0, jsx_runtime_1.jsx)(SwapRoutes_style_1.CollapseContainer, { children: (0, jsx_runtime_1.jsx)(material_1.Collapse, Object.assign({ timeout: timeout, in: !!element, orientation: "horizontal" }, { children: (0, jsx_runtime_1.jsx)(material_1.Grow, Object.assign({ timeout: timeout, in: !!element, mountOnEnter: true, unmountOnExit: true }, { children: (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(exports.SwapRoutesExpandedElement, {}) }) })) })) }));
25
+ return ((0, jsx_runtime_1.jsx)(SwapRoutes_style_1.CollapseContainer, { children: (0, jsx_runtime_1.jsx)(material_1.Collapse, { timeout: timeout, in: !!element, orientation: "horizontal", children: (0, jsx_runtime_1.jsx)(material_1.Grow, { timeout: timeout, in: !!element, mountOnEnter: true, unmountOnExit: true, children: (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(exports.SwapRoutesExpandedElement, {}) }) }) }) }));
26
26
  };
27
27
  exports.SwapRoutesExpanded = SwapRoutesExpanded;
28
28
  const SwapRoutesExpandedElement = () => {
@@ -32,7 +32,7 @@ const SwapRoutesExpandedElement = () => {
32
32
  const { containerStyle } = (0, providers_1.useWidgetConfig)();
33
33
  const { isValid, isValidating } = (0, react_hook_form_1.useFormState)();
34
34
  const { routes, isLoading, isFetching, isFetched, dataUpdatedAt, refetchTime, refetch, } = (0, hooks_1.useSwapRoutes)();
35
- const currentRoute = routes === null || routes === void 0 ? void 0 : routes[0];
35
+ const currentRoute = routes?.[0];
36
36
  (0, useSetRecommendedRoute_1.useSetRecommendedRoute)(currentRoute, isFetching);
37
37
  const handleRouteClick = (route) => {
38
38
  if (isValid && !isValidating) {
@@ -44,6 +44,6 @@ const SwapRoutesExpandedElement = () => {
44
44
  };
45
45
  const expanded = Boolean(currentRoute || isLoading || isFetching || isFetched);
46
46
  const routeNotFound = !currentRoute && !isLoading && !isFetching && expanded;
47
- return ((0, jsx_runtime_1.jsx)(material_1.Collapse, Object.assign({ timeout: timeout.enter, in: expanded, orientation: "horizontal" }, { children: (0, jsx_runtime_1.jsx)(material_1.Grow, Object.assign({ timeout: timeout.enter, in: expanded, mountOnEnter: true, unmountOnExit: true }, { children: (0, jsx_runtime_1.jsx)(SwapRoutes_style_1.Container, Object.assign({ sx: containerStyle, enableColorScheme: true }, { children: (0, jsx_runtime_1.jsxs)(SwapRoutes_style_1.ScrollableContainer, { children: [(0, jsx_runtime_1.jsxs)(SwapRoutes_style_1.Header, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ fontSize: 18, fontWeight: "700", flex: 1, noWrap: true }, { children: t('swap.routes') })), (0, jsx_runtime_1.jsx)(ProgressToNextUpdate_1.ProgressToNextUpdate, { updatedAt: dataUpdatedAt || new Date().getTime(), timeToUpdate: refetchTime, isLoading: isFetching, onClick: () => refetch(), sx: { marginRight: -1 } })] }), (0, jsx_runtime_1.jsx)(material_1.Stack, Object.assign({ direction: "column", spacing: 2, flex: 1, paddingX: 3, paddingBottom: 3 }, { children: routeNotFound ? ((0, jsx_runtime_1.jsx)(SwapRouteCard_1.SwapRouteNotFoundCard, {})) : isLoading ? (Array.from({ length: 3 }).map((_, index) => ((0, jsx_runtime_1.jsx)(SwapRouteCard_1.SwapRouteCardSkeleton, { variant: "stretched" }, index)))) : (routes === null || routes === void 0 ? void 0 : routes.map((route, index) => ((0, jsx_runtime_1.jsx)(SwapRouteCard_1.SwapRouteCard, { route: route, onClick: () => handleRouteClick(route), active: index === 0, variant: "stretched", expanded: (routes === null || routes === void 0 ? void 0 : routes.length) <= 2 }, route.id)))) }))] }) })) })) })));
47
+ return ((0, jsx_runtime_1.jsx)(material_1.Collapse, { timeout: timeout.enter, in: expanded, orientation: "horizontal", children: (0, jsx_runtime_1.jsx)(material_1.Grow, { timeout: timeout.enter, in: expanded, mountOnEnter: true, unmountOnExit: true, children: (0, jsx_runtime_1.jsx)(SwapRoutes_style_1.Container, { sx: containerStyle, enableColorScheme: true, children: (0, jsx_runtime_1.jsxs)(SwapRoutes_style_1.ScrollableContainer, { children: [(0, jsx_runtime_1.jsxs)(SwapRoutes_style_1.Header, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { fontSize: 18, fontWeight: "700", flex: 1, noWrap: true, children: t('swap.routes') }), (0, jsx_runtime_1.jsx)(ProgressToNextUpdate_1.ProgressToNextUpdate, { updatedAt: dataUpdatedAt || new Date().getTime(), timeToUpdate: refetchTime, isLoading: isFetching, onClick: () => refetch(), sx: { marginRight: -1 } })] }), (0, jsx_runtime_1.jsx)(material_1.Stack, { direction: "column", spacing: 2, flex: 1, paddingX: 3, paddingBottom: 3, children: routeNotFound ? ((0, jsx_runtime_1.jsx)(SwapRouteCard_1.SwapRouteNotFoundCard, {})) : isLoading ? (Array.from({ length: 3 }).map((_, index) => ((0, jsx_runtime_1.jsx)(SwapRouteCard_1.SwapRouteCardSkeleton, { variant: "stretched" }, index)))) : (routes?.map((route, index) => ((0, jsx_runtime_1.jsx)(SwapRouteCard_1.SwapRouteCard, { route: route, onClick: () => handleRouteClick(route), active: index === 0, variant: "stretched", expanded: routes?.length <= 2 }, route.id)))) })] }) }) }) }));
48
48
  };
49
49
  exports.SwapRoutesExpandedElement = SwapRoutesExpandedElement;
@@ -29,7 +29,7 @@ const TextFitter = ({ children, width = '100%', height, maxHeight, preserveAspec
29
29
  }
30
30
  setViewBox(box);
31
31
  // setTextRect(textRef.current.getBoundingClientRect());
32
- onFit === null || onFit === void 0 ? void 0 : onFit();
32
+ onFit?.();
33
33
  }, [cropBottom, cropTop, onFit]);
34
34
  (0, react_1.useLayoutEffect)(() => {
35
35
  calculateBox();
@@ -41,12 +41,12 @@ const TextFitter = ({ children, width = '100%', height, maxHeight, preserveAspec
41
41
  });
42
42
  }
43
43
  }, [calculateBox]);
44
- return ((0, jsx_runtime_1.jsx)("svg", Object.assign({ style: svgStyle, viewBox: `${viewBox.x} ${viewBox.y} ${viewBox.width} ${viewBox.height}`, width: width, height: height,
44
+ return ((0, jsx_runtime_1.jsx)("svg", { style: svgStyle, viewBox: `${viewBox.x} ${viewBox.y} ${viewBox.width} ${viewBox.height}`, width: width, height: height,
45
45
  // height={
46
46
  // textRect.height && maxHeight && textRect.height >= maxHeight
47
47
  // ? maxHeight
48
48
  // : height
49
49
  // }
50
- preserveAspectRatio: preserveAspectRatio, fill: theme.palette.text.primary }, { children: (0, jsx_runtime_1.jsx)("text", Object.assign({ x: 0, y: 0, style: textStyle, ref: textRef }, { children: children })) })));
50
+ preserveAspectRatio: preserveAspectRatio, fill: theme.palette.text.primary, children: (0, jsx_runtime_1.jsx)("text", { x: 0, y: 0, style: textStyle, ref: textRef, children: children }) }));
51
51
  };
52
52
  exports.TextFitter = TextFitter;
@@ -1,15 +1,4 @@
1
1
  "use strict";
2
- var __rest = (this && this.__rest) || function (s, e) {
3
- var t = {};
4
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
- t[p] = s[p];
6
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
- t[p[i]] = s[p[i]];
10
- }
11
- return t;
12
- };
13
2
  Object.defineProperty(exports, "__esModule", { value: true });
14
3
  exports.TokenBase = exports.TokenFallback = exports.Token = void 0;
15
4
  const jsx_runtime_1 = require("react/jsx-runtime");
@@ -21,38 +10,35 @@ const SmallAvatar_1 = require("../SmallAvatar");
21
10
  const TextFitter_1 = require("../TextFitter");
22
11
  const TokenAvatar_1 = require("../TokenAvatar");
23
12
  const Token_style_1 = require("./Token.style");
24
- const Token = (_a) => {
25
- var { token } = _a, other = __rest(_a, ["token"]);
26
- if (!(token === null || token === void 0 ? void 0 : token.priceUSD) || !token.logoURI) {
27
- return (0, jsx_runtime_1.jsx)(exports.TokenFallback, Object.assign({ token: token }, other));
13
+ const Token = ({ token, ...other }) => {
14
+ if (!token?.priceUSD || !token.logoURI) {
15
+ return (0, jsx_runtime_1.jsx)(exports.TokenFallback, { token: token, ...other });
28
16
  }
29
- return (0, jsx_runtime_1.jsx)(exports.TokenBase, Object.assign({ token: token }, other));
17
+ return (0, jsx_runtime_1.jsx)(exports.TokenBase, { token: token, ...other });
30
18
  };
31
19
  exports.Token = Token;
32
- const TokenFallback = (_a) => {
33
- var { token, connected, step, disableDescription, isLoading } = _a, other = __rest(_a, ["token", "connected", "step", "disableDescription", "isLoading"]);
34
- const { token: chainToken, isLoading: isLoadingToken } = (0, hooks_1.useToken)(token === null || token === void 0 ? void 0 : token.chainId, token === null || token === void 0 ? void 0 : token.address);
35
- return ((0, jsx_runtime_1.jsx)(exports.TokenBase, Object.assign({ token: Object.assign(Object.assign({}, token), chainToken), isLoading: isLoading || isLoadingToken }, other)));
20
+ const TokenFallback = ({ token, connected, step, disableDescription, isLoading, ...other }) => {
21
+ const { token: chainToken, isLoading: isLoadingToken } = (0, hooks_1.useToken)(token?.chainId, token?.address);
22
+ return ((0, jsx_runtime_1.jsx)(exports.TokenBase, { token: { ...token, ...chainToken }, isLoading: isLoading || isLoadingToken, ...other }));
36
23
  };
37
24
  exports.TokenFallback = TokenFallback;
38
- const TokenBase = (_a) => {
39
- var { token, connected, step, disableDescription, isLoading } = _a, other = __rest(_a, ["token", "connected", "step", "disableDescription", "isLoading"]);
25
+ const TokenBase = ({ token, connected, step, disableDescription, isLoading, ...other }) => {
40
26
  const { t } = (0, react_i18next_1.useTranslation)();
41
- const { chain } = (0, hooks_1.useChain)(token === null || token === void 0 ? void 0 : token.chainId);
42
- const formattedTokenAmount = (0, utils_1.formatTokenAmount)(token === null || token === void 0 ? void 0 : token.amount, token === null || token === void 0 ? void 0 : token.decimals);
43
- const formattedTokenPrice = (0, utils_1.formatTokenPrice)(formattedTokenAmount, token === null || token === void 0 ? void 0 : token.priceUSD);
44
- return ((0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ flex: 1 }, other, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ display: "flex", flex: 1, alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(TokenAvatar_1.TokenAvatar, { token: token, chain: chain, isLoading: isLoading, sx: { marginRight: 2 } }), isLoading ? ((0, jsx_runtime_1.jsx)(material_1.Skeleton, { width: 112, height: 32, variant: "text" })) : ((0, jsx_runtime_1.jsx)(TextFitter_1.TextFitter, Object.assign({ height: 30, textStyle: {
27
+ const { chain } = (0, hooks_1.useChain)(token?.chainId);
28
+ const formattedTokenAmount = (0, utils_1.formatTokenAmount)(token?.amount, token?.decimals);
29
+ const formattedTokenPrice = (0, utils_1.formatTokenPrice)(formattedTokenAmount, token?.priceUSD);
30
+ return ((0, jsx_runtime_1.jsxs)(material_1.Box, { flex: 1, ...other, children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", flex: 1, alignItems: "center", children: [(0, jsx_runtime_1.jsx)(TokenAvatar_1.TokenAvatar, { token: token, chain: chain, isLoading: isLoading, sx: { marginRight: 2 } }), isLoading ? ((0, jsx_runtime_1.jsx)(material_1.Skeleton, { width: 112, height: 32, variant: "text" })) : ((0, jsx_runtime_1.jsx)(TextFitter_1.TextFitter, { height: 30, textStyle: {
45
31
  fontWeight: 700,
46
- } }, { children: t('format.number', {
32
+ }, children: t('format.number', {
47
33
  value: formattedTokenAmount,
48
- }) })))] })), (0, jsx_runtime_1.jsxs)(Token_style_1.TextSecondaryContainer, Object.assign({ connected: connected, component: "span" }, { children: [isLoading ? ((0, jsx_runtime_1.jsx)(material_1.Skeleton, { width: 48, height: 12, variant: "rounded", sx: { marginTop: 0.5 } })) : ((0, jsx_runtime_1.jsx)(Token_style_1.TextSecondary, Object.assign({ connected: connected }, { children: t(`format.currency`, {
34
+ }) }))] }), (0, jsx_runtime_1.jsxs)(Token_style_1.TextSecondaryContainer, { connected: connected, component: "span", children: [isLoading ? ((0, jsx_runtime_1.jsx)(material_1.Skeleton, { width: 48, height: 12, variant: "rounded", sx: { marginTop: 0.5 } })) : ((0, jsx_runtime_1.jsx)(Token_style_1.TextSecondary, { connected: connected, children: t(`format.currency`, {
49
35
  value: formattedTokenPrice,
50
- }) }))), !disableDescription ? ((0, jsx_runtime_1.jsx)(Token_style_1.TextSecondary, Object.assign({ connected: connected, px: 0.5, dot: true }, { children: "\u2022" }))) : null, !step && !disableDescription ? (isLoading ? ((0, jsx_runtime_1.jsx)(material_1.Skeleton, { width: 96, height: 12, variant: "rounded", sx: { marginTop: 0.5 } })) : ((0, jsx_runtime_1.jsx)(Token_style_1.TextSecondary, Object.assign({ connected: connected }, { children: t(`swap.tokenOnChain`, {
51
- tokenSymbol: token === null || token === void 0 ? void 0 : token.symbol,
52
- chainName: chain === null || chain === void 0 ? void 0 : chain.name,
53
- }) })))) : null, step ? ((0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ display: "flex", alignItems: "flex-end", height: 12, mt: 0.5 }, { children: [(0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ pr: 0.75 }, { children: (0, jsx_runtime_1.jsx)(SmallAvatar_1.SmallAvatar, Object.assign({ src: step.toolDetails.logoURI, alt: step.toolDetails.name, sx: {
36
+ }) })), !disableDescription ? ((0, jsx_runtime_1.jsx)(Token_style_1.TextSecondary, { connected: connected, px: 0.5, dot: true, children: "\u2022" })) : null, !step && !disableDescription ? (isLoading ? ((0, jsx_runtime_1.jsx)(material_1.Skeleton, { width: 96, height: 12, variant: "rounded", sx: { marginTop: 0.5 } })) : ((0, jsx_runtime_1.jsx)(Token_style_1.TextSecondary, { connected: connected, children: t(`swap.tokenOnChain`, {
37
+ tokenSymbol: token?.symbol,
38
+ chainName: chain?.name,
39
+ }) }))) : null, step ? ((0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", alignItems: "flex-end", height: 12, mt: 0.5, children: [(0, jsx_runtime_1.jsx)(material_1.Box, { pr: 0.75, children: (0, jsx_runtime_1.jsx)(SmallAvatar_1.SmallAvatar, { src: step.toolDetails.logoURI, alt: step.toolDetails.name, sx: {
54
40
  border: 0,
55
41
  marginBottom: -0.25,
56
- } }, { children: step.toolDetails.name[0] })) })), (0, jsx_runtime_1.jsx)(Token_style_1.TextSecondary, Object.assign({ connected: true }, { children: step.toolDetails.name }))] }))) : null] }))] })));
42
+ }, children: step.toolDetails.name[0] }) }), (0, jsx_runtime_1.jsx)(Token_style_1.TextSecondary, { connected: true, children: step.toolDetails.name })] })) : null] })] }));
57
43
  };
58
44
  exports.TokenBase = TokenBase;
@@ -4,7 +4,7 @@ export declare const TextSecondaryContainer: import("@emotion/styled").StyledCom
4
4
  component?: import("react").ElementType<any> | undefined;
5
5
  ref?: import("react").Ref<unknown> | undefined;
6
6
  sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
7
- } & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
7
+ } & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
8
8
  ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
9
9
  }, "children" | "sx" | "ref" | ("p" | "color" | "border" | "boxShadow" | "fontWeight" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint") | "component"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
10
10
  connected?: boolean | undefined;
@@ -19,7 +19,7 @@ export declare const TextSecondary: import("@emotion/styled").StyledComponent<im
19
19
  sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
20
20
  variant?: "button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "subtitle1" | "subtitle2" | "body1" | "body2" | "overline" | "@supports (font-variation-settings: normal)" | undefined;
21
21
  variantMapping?: Partial<Record<"button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "subtitle1" | "subtitle2" | "body1" | "body2" | "overline" | "@supports (font-variation-settings: normal)", string>> | undefined;
22
- } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof import("react").HTMLAttributes<HTMLSpanElement>> & {
22
+ } & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
23
23
  ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
24
24
  }, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "variant" | ("p" | "color" | "border" | "boxShadow" | "fontWeight" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint") | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
25
25
  connected?: boolean | undefined;
@@ -30,6 +30,6 @@ export declare const TokenDivider: import("@emotion/styled").StyledComponent<imp
30
30
  component?: import("react").ElementType<any> | undefined;
31
31
  ref?: import("react").Ref<unknown> | undefined;
32
32
  sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
33
- } & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
33
+ } & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
34
34
  ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
35
35
  }, "children" | "sx" | "ref" | ("p" | "color" | "border" | "boxShadow" | "fontWeight" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint") | "component"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
@@ -7,24 +7,23 @@ const hooks_1 = require("../../hooks");
7
7
  const SmallAvatar_1 = require("../SmallAvatar");
8
8
  const TokenAvatar_style_1 = require("./TokenAvatar.style");
9
9
  const TokenAvatarFallback = ({ token, isLoading, sx }) => {
10
- const { chain } = (0, hooks_1.useChain)(token === null || token === void 0 ? void 0 : token.chainId);
11
- const { token: chainToken, isLoading: isLoadingToken } = (0, hooks_1.useToken)(token === null || token === void 0 ? void 0 : token.chainId, token === null || token === void 0 ? void 0 : token.address);
12
- return ((0, jsx_runtime_1.jsx)(exports.TokenAvatarBase, { token: chainToken !== null && chainToken !== void 0 ? chainToken : token, isLoading: isLoading || isLoadingToken, chain: chain, sx: sx }));
10
+ const { chain } = (0, hooks_1.useChain)(token?.chainId);
11
+ const { token: chainToken, isLoading: isLoadingToken } = (0, hooks_1.useToken)(token?.chainId, token?.address);
12
+ return ((0, jsx_runtime_1.jsx)(exports.TokenAvatarBase, { token: chainToken ?? token, isLoading: isLoading || isLoadingToken, chain: chain, sx: sx }));
13
13
  };
14
14
  exports.TokenAvatarFallback = TokenAvatarFallback;
15
15
  const TokenAvatarBase = ({ token, chain, isLoading, sx }) => {
16
- var _a;
17
- return ((0, jsx_runtime_1.jsx)(material_1.Badge, Object.assign({ overlap: "circular", anchorOrigin: { vertical: 'bottom', horizontal: 'right' }, badgeContent: chain && !isLoading ? ((0, jsx_runtime_1.jsx)(SmallAvatar_1.SmallAvatar, Object.assign({ src: chain.logoURI, alt: chain.name }, { children: chain.name[0] }))) : ((0, jsx_runtime_1.jsx)(SmallAvatar_1.SmallAvatarSkeleton, {})), sx: sx }, { children: isLoading ? ((0, jsx_runtime_1.jsx)(material_1.Skeleton, { width: 32, height: 32, variant: "circular" })) : ((0, jsx_runtime_1.jsx)(material_1.Avatar, Object.assign({ src: token === null || token === void 0 ? void 0 : token.logoURI, alt: token === null || token === void 0 ? void 0 : token.symbol }, { children: (_a = token === null || token === void 0 ? void 0 : token.symbol) === null || _a === void 0 ? void 0 : _a[0] }))) })));
16
+ return ((0, jsx_runtime_1.jsx)(material_1.Badge, { overlap: "circular", anchorOrigin: { vertical: 'bottom', horizontal: 'right' }, badgeContent: chain && !isLoading ? ((0, jsx_runtime_1.jsx)(SmallAvatar_1.SmallAvatar, { src: chain.logoURI, alt: chain.name, children: chain.name[0] })) : ((0, jsx_runtime_1.jsx)(SmallAvatar_1.SmallAvatarSkeleton, {})), sx: sx, children: isLoading ? ((0, jsx_runtime_1.jsx)(material_1.Skeleton, { width: 32, height: 32, variant: "circular" })) : ((0, jsx_runtime_1.jsx)(material_1.Avatar, { src: token?.logoURI, alt: token?.symbol, children: token?.symbol?.[0] })) }));
18
17
  };
19
18
  exports.TokenAvatarBase = TokenAvatarBase;
20
19
  const TokenAvatar = ({ token, chain, isLoading, sx }) => {
21
- if (!chain || !(token === null || token === void 0 ? void 0 : token.logoURI)) {
20
+ if (!chain || !token?.logoURI) {
22
21
  return (0, jsx_runtime_1.jsx)(exports.TokenAvatarFallback, { token: token, isLoading: isLoading, sx: sx });
23
22
  }
24
23
  return ((0, jsx_runtime_1.jsx)(exports.TokenAvatarBase, { token: token, chain: chain, isLoading: isLoading, sx: sx }));
25
24
  };
26
25
  exports.TokenAvatar = TokenAvatar;
27
26
  const TokenAvatarDefault = ({ sx }) => {
28
- return ((0, jsx_runtime_1.jsx)(material_1.Badge, Object.assign({ overlap: "circular", anchorOrigin: { vertical: 'bottom', horizontal: 'right' }, badgeContent: (0, jsx_runtime_1.jsx)(TokenAvatar_style_1.AvatarDefaultBadge, { width: 16, height: 16 }), sx: sx }, { children: (0, jsx_runtime_1.jsx)(TokenAvatar_style_1.AvatarDefault, { width: 32, height: 32 }) })));
27
+ return ((0, jsx_runtime_1.jsx)(material_1.Badge, { overlap: "circular", anchorOrigin: { vertical: 'bottom', horizontal: 'right' }, badgeContent: (0, jsx_runtime_1.jsx)(TokenAvatar_style_1.AvatarDefaultBadge, { width: 16, height: 16 }), sx: sx, children: (0, jsx_runtime_1.jsx)(TokenAvatar_style_1.AvatarDefault, { width: 32, height: 32 }) }));
29
28
  };
30
29
  exports.TokenAvatarDefault = TokenAvatarDefault;
@@ -5,7 +5,7 @@ export declare const AvatarDefault: import("@emotion/styled").StyledComponent<im
5
5
  component?: import("react").ElementType<any> | undefined;
6
6
  ref?: import("react").Ref<unknown> | undefined;
7
7
  sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
8
- } & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
8
+ } & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
9
9
  ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
10
10
  }, "children" | "sx" | "ref" | ("p" | "color" | "border" | "boxShadow" | "fontWeight" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint") | "component"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
11
11
  export declare const AvatarDefaultBadge: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material").Theme> & {
@@ -13,6 +13,6 @@ export declare const AvatarDefaultBadge: import("@emotion/styled").StyledCompone
13
13
  component?: import("react").ElementType<any> | undefined;
14
14
  ref?: import("react").Ref<unknown> | undefined;
15
15
  sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
16
- } & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
16
+ } & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
17
17
  ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
18
18
  }, "children" | "sx" | "ref" | ("p" | "color" | "border" | "boxShadow" | "fontWeight" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint") | "component"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
@@ -11,7 +11,6 @@ const TokenNotFound_1 = require("./TokenNotFound");
11
11
  const useTokenSelect_1 = require("./useTokenSelect");
12
12
  const VirtualizedTokenList_1 = require("./VirtualizedTokenList");
13
13
  const TokenList = ({ formType, height, onClick, }) => {
14
- var _a, _b;
15
14
  const parentRef = (0, react_1.useRef)(null);
16
15
  const { account } = (0, providers_1.useWallet)();
17
16
  const [selectedChainId] = (0, react_hook_form_1.useWatch)({
@@ -19,8 +18,8 @@ const TokenList = ({ formType, height, onClick, }) => {
19
18
  });
20
19
  const [tokenSearchFilter] = (0, hooks_1.useDebouncedWatch)([providers_1.SwapFormKey.TokenSearchFilter], 320);
21
20
  const { tokens: chainTokens, tokensWithBalance, isLoading: isTokensLoading, isBalanceLoading, featuredTokens, } = (0, hooks_1.useTokenBalances)(selectedChainId);
22
- let filteredTokens = ((_a = tokensWithBalance !== null && tokensWithBalance !== void 0 ? tokensWithBalance : chainTokens) !== null && _a !== void 0 ? _a : []);
23
- const searchFilter = (_b = tokenSearchFilter === null || tokenSearchFilter === void 0 ? void 0 : tokenSearchFilter.toUpperCase()) !== null && _b !== void 0 ? _b : '';
21
+ let filteredTokens = (tokensWithBalance ?? chainTokens ?? []);
22
+ const searchFilter = tokenSearchFilter?.toUpperCase() ?? '';
24
23
  filteredTokens = tokenSearchFilter
25
24
  ? filteredTokens.filter((token) => token.name.toUpperCase().includes(searchFilter) ||
26
25
  token.symbol.toUpperCase().includes(searchFilter) ||
@@ -38,6 +37,6 @@ const TokenList = ({ formType, height, onClick, }) => {
38
37
  ? [searchedToken]
39
38
  : filteredTokens;
40
39
  const handleTokenClick = (0, useTokenSelect_1.useTokenSelect)(formType, onClick);
41
- return ((0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ ref: parentRef, style: { height, overflow: 'auto' } }, { children: [!tokens.length && !isLoading ? ((0, jsx_runtime_1.jsx)(TokenNotFound_1.TokenNotFound, { formType: formType })) : null, (0, jsx_runtime_1.jsx)(VirtualizedTokenList_1.VirtualizedTokenList, { tokens: tokens, featuredTokensLength: featuredTokens === null || featuredTokens === void 0 ? void 0 : featuredTokens.length, scrollElementRef: parentRef, chainId: selectedChainId, isLoading: isLoading, isBalanceLoading: isBalanceLoading, showBalance: account.isActive, showFeatured: !tokenSearchFilter, onClick: handleTokenClick })] })));
40
+ return ((0, jsx_runtime_1.jsxs)(material_1.Box, { ref: parentRef, style: { height, overflow: 'auto' }, children: [!tokens.length && !isLoading ? ((0, jsx_runtime_1.jsx)(TokenNotFound_1.TokenNotFound, { formType: formType })) : null, (0, jsx_runtime_1.jsx)(VirtualizedTokenList_1.VirtualizedTokenList, { tokens: tokens, featuredTokensLength: featuredTokens?.length, scrollElementRef: parentRef, chainId: selectedChainId, isLoading: isLoading, isBalanceLoading: isBalanceLoading, showBalance: account.isActive, showFeatured: !tokenSearchFilter, onClick: handleTokenClick })] }));
42
41
  };
43
42
  exports.TokenList = TokenList;
@@ -15,7 +15,7 @@ export declare const ListItemButton: import("@emotion/styled").StyledComponent<i
15
15
  tabIndex?: number | undefined;
16
16
  TouchRippleProps?: Partial<import("@mui/material/ButtonBase/TouchRipple").TouchRippleProps> | undefined;
17
17
  touchRippleRef?: import("react").Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions> | undefined;
18
- }, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
18
+ }, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
19
19
  ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
20
20
  }, "className" | "style" | "classes" | "tabIndex" | "children" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "TouchRippleProps" | "touchRippleRef" | "alignItems" | "autoFocus" | "dense" | "divider" | "selected" | "disableGutters"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
21
21
  export declare const ListItem: import("@emotion/styled").StyledComponent<{
@@ -33,6 +33,6 @@ export declare const ListItem: import("@emotion/styled").StyledComponent<{
33
33
  slots?: {
34
34
  root?: import("react").ElementType<any> | undefined;
35
35
  } | undefined;
36
- } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "key" | keyof import("react").LiHTMLAttributes<HTMLLIElement>> & {
36
+ } & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & {
37
37
  ref?: ((instance: HTMLLIElement | null) => void) | import("react").RefObject<HTMLLIElement> | null | undefined;
38
- }, "button" | "className" | "style" | "classes" | "children" | "disabled" | "sx" | "alignItems" | "autoFocus" | "dense" | "divider" | "components" | "componentsProps" | "slotProps" | "slots" | "selected" | "disableGutters" | "ContainerComponent" | "ContainerProps" | "disablePadding" | "secondaryAction"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
38
+ }, "button" | "className" | "style" | "classes" | "children" | "disabled" | "sx" | "alignItems" | "autoFocus" | "dense" | "divider" | "components" | "slotProps" | "slots" | "componentsProps" | "selected" | "disableGutters" | "ContainerComponent" | "ContainerProps" | "disablePadding" | "secondaryAction"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
@@ -5,16 +5,12 @@ const material_1 = require("@mui/material");
5
5
  const ListItemSecondaryAction_1 = require("@mui/material/ListItemSecondaryAction");
6
6
  const ListItemText_1 = require("@mui/material/ListItemText");
7
7
  const styles_1 = require("@mui/material/styles");
8
- const utils_1 = require("../../utils");
9
- exports.ListItemButton = (0, styles_1.styled)(material_1.ListItemButton)(({ theme }) => ({
10
- borderRadius: theme.shape.borderRadius,
8
+ const ListItemButton_1 = require("../ListItemButton");
9
+ exports.ListItemButton = (0, styles_1.styled)(ListItemButton_1.ListItemButton)(({ theme }) => ({
11
10
  paddingLeft: theme.spacing(1.5),
12
11
  paddingRight: theme.spacing(1.5),
13
12
  height: 64,
14
13
  width: '100%',
15
- '&:hover': {
16
- backgroundColor: (0, utils_1.getContrastAlphaColor)(theme, '4%'),
17
- },
18
14
  }));
19
15
  exports.ListItem = (0, styles_1.styled)(material_1.ListItem)(({ theme }) => ({
20
16
  position: 'absolute',
@@ -8,31 +8,31 @@ const react_i18next_1 = require("react-i18next");
8
8
  const utils_1 = require("../../utils");
9
9
  const TokenList_style_1 = require("./TokenList.style");
10
10
  exports.TokenListItem = (0, react_1.memo)(({ onClick, size, start, token, showBalance, isBalanceLoading, startAdornment, endAdornment, }) => {
11
- const handleClick = () => onClick === null || onClick === void 0 ? void 0 : onClick(token.address);
12
- return ((0, jsx_runtime_1.jsxs)(TokenList_style_1.ListItem, Object.assign({ disablePadding: true, style: {
11
+ const handleClick = () => onClick?.(token.address);
12
+ return ((0, jsx_runtime_1.jsxs)(TokenList_style_1.ListItem, { disablePadding: true, style: {
13
13
  height: `${size}px`,
14
14
  transform: `translateY(${start}px)`,
15
- } }, { children: [startAdornment, (0, jsx_runtime_1.jsx)(exports.TokenListItemButton, { token: token, showBalance: showBalance, isBalanceLoading: isBalanceLoading, onClick: handleClick }), endAdornment] })));
15
+ }, children: [startAdornment, (0, jsx_runtime_1.jsx)(exports.TokenListItemButton, { token: token, showBalance: showBalance, isBalanceLoading: isBalanceLoading, onClick: handleClick }), endAdornment] }));
16
16
  });
17
17
  const TokenListItemButton = ({ onClick, token, showBalance, isBalanceLoading, }) => {
18
18
  const { t } = (0, react_i18next_1.useTranslation)();
19
19
  const tokenPrice = (0, utils_1.formatTokenPrice)(token.amount, token.priceUSD);
20
- return ((0, jsx_runtime_1.jsxs)(TokenList_style_1.ListItemButton, Object.assign({ onClick: onClick, dense: true, disableRipple: true }, { children: [(0, jsx_runtime_1.jsx)(material_1.ListItemAvatar, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, Object.assign({ src: token.logoURI, alt: token.symbol }, { children: token.symbol[0] })) }), (0, jsx_runtime_1.jsx)(material_1.ListItemText, { primary: token.symbol, secondary: token.name }), showBalance ? (isBalanceLoading ? ((0, jsx_runtime_1.jsx)(exports.TokenAmountSkeleton, {})) : ((0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ sx: { textAlign: 'right' } }, { children: [Number(token.amount) ? ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1", noWrap: true }, { children: t('format.number', {
20
+ return ((0, jsx_runtime_1.jsxs)(TokenList_style_1.ListItemButton, { onClick: onClick, dense: true, disableRipple: true, children: [(0, jsx_runtime_1.jsx)(material_1.ListItemAvatar, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, { src: token.logoURI, alt: token.symbol, children: token.symbol[0] }) }), (0, jsx_runtime_1.jsx)(material_1.ListItemText, { primary: token.symbol, secondary: token.name }), showBalance ? (isBalanceLoading ? ((0, jsx_runtime_1.jsx)(exports.TokenAmountSkeleton, {})) : ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: { textAlign: 'right' }, children: [Number(token.amount) ? ((0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body1", noWrap: true, children: t('format.number', {
21
21
  value: token.amount,
22
- }) }))) : null, tokenPrice ? ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ fontWeight: 400, fontSize: 12, color: "text.secondary", "data-price": token.priceUSD }, { children: t(`format.currency`, {
22
+ }) })) : null, tokenPrice ? ((0, jsx_runtime_1.jsx)(material_1.Typography, { fontWeight: 400, fontSize: 12, color: "text.secondary", "data-price": token.priceUSD, children: t(`format.currency`, {
23
23
  value: tokenPrice,
24
- }) }))) : null] })))) : null] })));
24
+ }) })) : null] }))) : null] }));
25
25
  };
26
26
  exports.TokenListItemButton = TokenListItemButton;
27
27
  const TokenListItemSkeleton = () => {
28
- return ((0, jsx_runtime_1.jsxs)(TokenList_style_1.ListItem, Object.assign({ secondaryAction: (0, jsx_runtime_1.jsx)(exports.TokenAmountSkeleton, {}), disablePadding: true, sx: { position: 'relative', flexDirection: 'row', alignItems: 'center' } }, { children: [(0, jsx_runtime_1.jsx)(material_1.ListItemAvatar, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "circular", width: 32, height: 32, sx: { marginLeft: 1.5, marginRight: 2 } }) }), (0, jsx_runtime_1.jsx)(material_1.ListItemText, { primary: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", width: 48, height: 20 }), secondary: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", width: 96, height: 20 }) })] })));
28
+ return ((0, jsx_runtime_1.jsxs)(TokenList_style_1.ListItem, { secondaryAction: (0, jsx_runtime_1.jsx)(exports.TokenAmountSkeleton, {}), disablePadding: true, sx: { position: 'relative', flexDirection: 'row', alignItems: 'center' }, children: [(0, jsx_runtime_1.jsx)(material_1.ListItemAvatar, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "circular", width: 32, height: 32, sx: { marginLeft: 1.5, marginRight: 2 } }) }), (0, jsx_runtime_1.jsx)(material_1.ListItemText, { primary: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", width: 48, height: 20 }), secondary: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", width: 96, height: 20 }) })] }));
29
29
  };
30
30
  exports.TokenListItemSkeleton = TokenListItemSkeleton;
31
31
  const TokenAmountSkeleton = () => {
32
- return ((0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ sx: {
32
+ return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
33
33
  display: 'flex',
34
34
  flexDirection: 'column',
35
35
  alignItems: 'flex-end',
36
- } }, { children: [(0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", width: 56, height: 24 }), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", width: 48, height: 18 })] })));
36
+ }, children: [(0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", width: 56, height: 24 }), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "text", width: 48, height: 18 })] }));
37
37
  };
38
38
  exports.TokenAmountSkeleton = TokenAmountSkeleton;
@@ -9,21 +9,20 @@ const react_i18next_1 = require("react-i18next");
9
9
  const hooks_1 = require("../../hooks");
10
10
  const providers_1 = require("../../providers");
11
11
  const TokenNotFound = ({ formType }) => {
12
- var _a;
13
12
  const { t } = (0, react_i18next_1.useTranslation)();
14
13
  const [selectedChainId] = (0, react_hook_form_1.useWatch)({
15
14
  name: [providers_1.SwapFormKeyHelper.getChainKey(formType)],
16
15
  });
17
16
  const { getChainById } = (0, hooks_1.useChains)();
18
- return ((0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ sx: {
17
+ return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
19
18
  display: 'flex',
20
19
  justifyContent: 'center',
21
20
  alignItems: 'center',
22
21
  flexDirection: 'column',
23
22
  flex: 1,
24
23
  padding: 3,
25
- } }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ fontSize: 48, lineHeight: 1 }, { children: (0, jsx_runtime_1.jsx)(icons_material_1.SearchOff, { fontSize: "inherit" }) })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ fontSize: 14, color: "text.secondary", textAlign: "center", mt: 2, px: 2 }, { children: t('swap.info.message.emptyTokenList', {
26
- chainName: (_a = getChainById(selectedChainId)) === null || _a === void 0 ? void 0 : _a.name,
27
- }) }))] })));
24
+ }, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { fontSize: 48, lineHeight: 1, children: (0, jsx_runtime_1.jsx)(icons_material_1.SearchOff, { fontSize: "inherit" }) }), (0, jsx_runtime_1.jsx)(material_1.Typography, { fontSize: 14, color: "text.secondary", textAlign: "center", mt: 2, px: 2, children: t('swap.info.message.emptyTokenList', {
25
+ chainName: getChainById(selectedChainId)?.name,
26
+ }) })] }));
28
27
  };
29
28
  exports.TokenNotFound = TokenNotFound;
@@ -10,7 +10,7 @@ const TokenListItem_1 = require("./TokenListItem");
10
10
  const VirtualizedTokenList = ({ tokens, featuredTokensLength, scrollElementRef, chainId, isLoading, isBalanceLoading, showBalance, showFeatured, onClick, }) => {
11
11
  const { t } = (0, react_i18next_1.useTranslation)();
12
12
  const hasFeaturedTokens = !!featuredTokensLength && showFeatured;
13
- const featuredTokensLastIndex = (featuredTokensLength !== null && featuredTokensLength !== void 0 ? featuredTokensLength : 0) - 1;
13
+ const featuredTokensLastIndex = (featuredTokensLength ?? 0) - 1;
14
14
  const tokensLastIndex = tokens.length - 1;
15
15
  const { getVirtualItems, getTotalSize, scrollToIndex } = (0, react_virtual_1.useVirtualizer)({
16
16
  count: tokens.length,
@@ -18,25 +18,24 @@ const VirtualizedTokenList = ({ tokens, featuredTokensLength, scrollElementRef,
18
18
  overscan: 10,
19
19
  paddingEnd: 12,
20
20
  estimateSize: (index) => {
21
- var _a, _b;
22
21
  // heigth of TokenListItem
23
22
  let size = 64;
24
23
  if (!hasFeaturedTokens) {
25
24
  return size;
26
25
  }
27
- if (index === 0 && ((_a = tokens[index]) === null || _a === void 0 ? void 0 : _a.featured)) {
26
+ if (index === 0 && tokens[index]?.featured) {
28
27
  // height of startAdornment
29
28
  size += 24;
30
29
  }
31
30
  if (index === featuredTokensLastIndex &&
32
31
  index !== tokensLastIndex &&
33
- ((_b = tokens[index]) === null || _b === void 0 ? void 0 : _b.featured)) {
32
+ tokens[index]?.featured) {
34
33
  // height of endAdornment
35
34
  size += 32;
36
35
  }
37
36
  return size;
38
37
  },
39
- getItemKey: (index) => { var _a; return (_a = tokens[index].address) !== null && _a !== void 0 ? _a : index; },
38
+ getItemKey: (index) => tokens[index].address ?? index,
40
39
  });
41
40
  (0, react_1.useEffect)(() => {
42
41
  if (getVirtualItems().length) {
@@ -44,16 +43,16 @@ const VirtualizedTokenList = ({ tokens, featuredTokensLength, scrollElementRef,
44
43
  }
45
44
  }, [scrollToIndex, chainId, getVirtualItems]);
46
45
  if (isLoading) {
47
- return ((0, jsx_runtime_1.jsx)(material_1.List, Object.assign({ disablePadding: true }, { children: Array.from({ length: 3 }).map((_, index) => (
46
+ return ((0, jsx_runtime_1.jsx)(material_1.List, { disablePadding: true, children: Array.from({ length: 3 }).map((_, index) => (
48
47
  // eslint-disable-next-line react/no-array-index-key
49
- (0, jsx_runtime_1.jsx)(TokenListItem_1.TokenListItemSkeleton, {}, index))) })));
48
+ (0, jsx_runtime_1.jsx)(TokenListItem_1.TokenListItemSkeleton, {}, index))) }));
50
49
  }
51
- return ((0, jsx_runtime_1.jsx)(material_1.List, Object.assign({ style: { height: getTotalSize() }, disablePadding: true }, { children: getVirtualItems().map((item) => {
50
+ return ((0, jsx_runtime_1.jsx)(material_1.List, { style: { height: getTotalSize() }, disablePadding: true, children: getVirtualItems().map((item) => {
52
51
  const token = tokens[item.index];
53
- return ((0, jsx_runtime_1.jsx)(TokenListItem_1.TokenListItem, { onClick: onClick, size: item.size, start: item.start, token: token, isBalanceLoading: isBalanceLoading, showBalance: showBalance, startAdornment: hasFeaturedTokens && token.featured && item.index === 0 ? ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ fontSize: 14, fontWeight: 600, lineHeight: 1, px: 2, pb: 1.25 }, { children: t('swap.featuredTokens') }))) : null, endAdornment: hasFeaturedTokens &&
52
+ return ((0, jsx_runtime_1.jsx)(TokenListItem_1.TokenListItem, { onClick: onClick, size: item.size, start: item.start, token: token, isBalanceLoading: isBalanceLoading, showBalance: showBalance, startAdornment: hasFeaturedTokens && token.featured && item.index === 0 ? ((0, jsx_runtime_1.jsx)(material_1.Typography, { fontSize: 14, fontWeight: 600, lineHeight: 1, px: 2, pb: 1.25, children: t('swap.featuredTokens') })) : null, endAdornment: hasFeaturedTokens &&
54
53
  token.featured &&
55
54
  item.index === featuredTokensLastIndex &&
56
- item.index !== tokensLastIndex ? ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ fontSize: 14, fontWeight: 600, lineHeight: 1, px: 2, py: 1.25 }, { children: t('swap.otherTokens') }))) : null }, item.key));
57
- }) })));
55
+ item.index !== tokensLastIndex ? ((0, jsx_runtime_1.jsx)(material_1.Typography, { fontSize: 14, fontWeight: 600, lineHeight: 1, px: 2, py: 1.25, children: t('swap.otherTokens') })) : null }, item.key));
56
+ }) }));
58
57
  };
59
58
  exports.VirtualizedTokenList = VirtualizedTokenList;
@@ -11,7 +11,7 @@ const useTokenSelect = (formType, onClick) => {
11
11
  return (0, react_1.useCallback)((tokenAddress, chainId) => {
12
12
  onChange(tokenAddress);
13
13
  onBlur();
14
- const selectedChainId = chainId !== null && chainId !== void 0 ? chainId : getValues(providers_1.SwapFormKeyHelper.getChainKey(formType));
14
+ const selectedChainId = chainId ?? getValues(providers_1.SwapFormKeyHelper.getChainKey(formType));
15
15
  // Set chain again to trigger URL builder update
16
16
  setValue(providers_1.SwapFormKeyHelper.getChainKey(formType), selectedChainId, {
17
17
  shouldDirty: true,
@@ -30,7 +30,7 @@ const useTokenSelect = (formType, onClick) => {
30
30
  shouldTouch: true,
31
31
  });
32
32
  }
33
- onClick === null || onClick === void 0 ? void 0 : onClick();
33
+ onClick?.();
34
34
  }, [formType, getValues, onBlur, onChange, onClick, setValue]);
35
35
  };
36
36
  exports.useTokenSelect = useTokenSelect;
package/cjs/config/env.js CHANGED
@@ -2,5 +2,5 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.env = void 0;
4
4
  exports.env = {
5
- LIFI_API_URL: 'https://li.quest/v1/', // 'https://developkub.li.finance/v1/',
5
+ LIFI_API_URL: 'https://li.quest/v1/', // 'https://develop.li.quest/v1/',
6
6
  };
@@ -1,23 +1,14 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  exports.initSentry = void 0;
13
4
  const version_1 = require("./version");
14
5
  let sentryLoaded = false;
15
- const initSentry = (enabled) => __awaiter(void 0, void 0, void 0, function* () {
6
+ const initSentry = async (enabled) => {
16
7
  if (process.env.NODE_ENV === 'development') {
17
8
  return;
18
9
  }
19
10
  if (enabled || sentryLoaded) {
20
- const [Sentry, { CaptureConsole }, { BrowserTracing }] = yield Promise.all([
11
+ const [Sentry, { CaptureConsole }, { BrowserTracing }] = await Promise.all([
21
12
  Promise.resolve().then(() => require('@sentry/react')),
22
13
  Promise.resolve().then(() => require('@sentry/integrations')),
23
14
  Promise.resolve().then(() => require('@sentry/tracing')),
@@ -38,5 +29,5 @@ const initSentry = (enabled) => __awaiter(void 0, void 0, void 0, function* () {
38
29
  });
39
30
  sentryLoaded = true;
40
31
  }
41
- });
32
+ };
42
33
  exports.initSentry = initSentry;