@lifi/widget 1.15.1 → 1.17.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 (346) hide show
  1. package/App.js +21 -0
  2. package/AppProvider.d.ts +0 -4
  3. package/AppProvider.js +2 -10
  4. package/README.md +1 -1
  5. package/cjs/App.js +21 -0
  6. package/cjs/AppProvider.d.ts +0 -4
  7. package/cjs/AppProvider.js +3 -12
  8. package/cjs/components/ActiveSwaps/ActiveSwapItem.d.ts +5 -0
  9. package/cjs/components/ActiveSwaps/ActiveSwapItem.js +45 -0
  10. package/cjs/components/{SwapsInProgress/SwapsInProgress.d.ts → ActiveSwaps/ActiveSwaps.d.ts} +1 -1
  11. package/cjs/components/ActiveSwaps/ActiveSwaps.js +30 -0
  12. package/cjs/components/ActiveSwaps/ActiveSwaps.style.d.ts +78 -0
  13. package/cjs/components/ActiveSwaps/ActiveSwaps.style.js +40 -0
  14. package/cjs/components/ActiveSwaps/index.d.ts +2 -0
  15. package/cjs/components/ActiveSwaps/index.js +18 -0
  16. package/cjs/components/AppContainer.js +2 -2
  17. package/cjs/components/Card/Card.d.ts +7 -4
  18. package/cjs/components/Card/Card.js +38 -28
  19. package/cjs/{pages/SelectTokenPage → components/ChainSelect}/ChainSelect.d.ts +0 -0
  20. package/cjs/components/ChainSelect/ChainSelect.js +35 -0
  21. package/cjs/components/{SwapsInProgress/SwapsInProgress.style.d.ts → ChainSelect/ChainSelect.style.d.ts} +10 -19
  22. package/cjs/components/ChainSelect/ChainSelect.style.js +19 -0
  23. package/cjs/components/ChainSelect/index.d.ts +2 -0
  24. package/cjs/components/ChainSelect/index.js +18 -0
  25. package/cjs/components/ChainSelect/useChainSelect.d.ts +8 -0
  26. package/cjs/components/ChainSelect/useChainSelect.js +33 -0
  27. package/cjs/components/GasSufficiencyMessage/GasSufficiencyMessage.js +3 -3
  28. package/cjs/components/Header/Header.js +1 -9
  29. package/cjs/components/Header/NavigationHeader.js +6 -11
  30. package/cjs/components/Header/useHeaderActionStore.d.ts +0 -2
  31. package/cjs/components/Header/useHeaderActionStore.js +1 -5
  32. package/cjs/components/PoweredBy/PoweredBy.style.d.ts +1 -1
  33. package/cjs/components/PoweredBy/PoweredBy.style.js +1 -0
  34. package/cjs/components/SelectChainAndToken.js +5 -5
  35. package/cjs/components/SendToWallet/SendToWallet.js +6 -6
  36. package/cjs/components/Step/CircularProgress.js +1 -1
  37. package/cjs/components/Step/CircularProgress.style.js +1 -1
  38. package/cjs/components/Step/StepProcess.js +1 -5
  39. package/cjs/components/Step/StepProcess.style.d.ts +1 -1
  40. package/cjs/components/Step/StepTimer.d.ts +1 -0
  41. package/cjs/components/Step/StepTimer.js +6 -6
  42. package/cjs/components/SwapButton/SwapButton.js +5 -32
  43. package/cjs/components/SwapButton/types.d.ts +2 -2
  44. package/cjs/components/SwapRouteCard/SwapRouteCard.js +1 -1
  45. package/cjs/components/TokenAvatar/TokenAvatar.style.js +0 -3
  46. package/cjs/components/TokenList/TokenList.js +7 -3
  47. package/cjs/components/TokenList/TokenList.style.js +4 -3
  48. package/cjs/components/TokenList/TokenListItem.js +1 -1
  49. package/cjs/components/TokenList/TokenNotFound.d.ts +2 -1
  50. package/cjs/components/TokenList/TokenNotFound.js +12 -2
  51. package/cjs/components/TokenList/types.d.ts +2 -2
  52. package/cjs/config/theme.js +24 -23
  53. package/cjs/config/version.d.ts +1 -1
  54. package/cjs/config/version.js +1 -1
  55. package/cjs/hooks/index.d.ts +2 -0
  56. package/cjs/hooks/index.js +2 -0
  57. package/cjs/hooks/useChains.d.ts +1 -97
  58. package/cjs/hooks/useChains.js +26 -20
  59. package/cjs/hooks/useFeaturedTokens.d.ts +1 -1
  60. package/cjs/hooks/useFeaturedTokens.js +6 -3
  61. package/cjs/hooks/useGasSufficiency.d.ts +1 -1
  62. package/cjs/hooks/useGasSufficiency.js +36 -28
  63. package/cjs/hooks/useInitializer.js +6 -0
  64. package/cjs/{components/Step/utils.d.ts → hooks/useProcessMessage.d.ts} +4 -0
  65. package/cjs/{components/Step/utils.js → hooks/useProcessMessage.js} +16 -10
  66. package/cjs/hooks/useRouteExecution.d.ts +1 -1
  67. package/cjs/hooks/useRouteExecution.js +26 -35
  68. package/cjs/hooks/useSwapRoutes.js +10 -11
  69. package/cjs/hooks/useToken.d.ts +0 -1
  70. package/cjs/hooks/useToken.js +1 -2
  71. package/cjs/hooks/useTokenBalances.d.ts +1 -2
  72. package/cjs/hooks/useTokenBalances.js +5 -6
  73. package/cjs/hooks/useTokenSearch.js +3 -2
  74. package/cjs/hooks/useTokens.d.ts +1 -2
  75. package/cjs/hooks/useTokens.js +32 -9
  76. package/cjs/hooks/useTools.js +11 -5
  77. package/cjs/hooks/useWidgetEvents.d.ts +3 -0
  78. package/cjs/hooks/useWidgetEvents.js +13 -0
  79. package/cjs/i18n/en/translation.json +14 -10
  80. package/cjs/i18n/index.d.ts +11 -7
  81. package/cjs/index.d.ts +1 -0
  82. package/cjs/index.js +3 -1
  83. package/cjs/pages/ActiveSwapsPage/ActiveSwapsEmpty.d.ts +2 -0
  84. package/cjs/pages/ActiveSwapsPage/ActiveSwapsEmpty.js +18 -0
  85. package/cjs/pages/ActiveSwapsPage/ActiveSwapsPage.d.ts +2 -0
  86. package/cjs/pages/ActiveSwapsPage/ActiveSwapsPage.js +21 -0
  87. package/cjs/pages/ActiveSwapsPage/index.d.ts +1 -0
  88. package/cjs/{components/SwapsInProgress → pages/ActiveSwapsPage}/index.js +1 -1
  89. package/cjs/pages/MainPage/MainPage.js +2 -3
  90. package/cjs/pages/MainPage/MainSwapButton.js +3 -1
  91. package/cjs/pages/MainPage/SwapRoutes.js +4 -1
  92. package/cjs/pages/SelectChainPage/SelectChainPage.d.ts +3 -0
  93. package/cjs/pages/SelectChainPage/SelectChainPage.js +33 -0
  94. package/cjs/pages/SelectChainPage/SelectChainPage.style.d.ts +21 -0
  95. package/cjs/pages/SelectChainPage/SelectChainPage.style.js +20 -0
  96. package/cjs/pages/SelectChainPage/index.d.ts +1 -0
  97. package/cjs/pages/SelectChainPage/index.js +17 -0
  98. package/cjs/pages/SelectTokenPage/SelectTokenPage.d.ts +2 -4
  99. package/cjs/pages/SelectTokenPage/SelectTokenPage.js +2 -2
  100. package/cjs/pages/SelectWalletPage/SelectWalletPage.js +4 -4
  101. package/cjs/pages/SelectWalletPage/SelectWalletPage.style.d.ts +2 -27
  102. package/cjs/pages/SelectWalletPage/SelectWalletPage.style.js +4 -14
  103. package/cjs/pages/SettingsPage/AdvancedPreferences.js +1 -1
  104. package/cjs/pages/SettingsPage/ColorSchemeButtonGroup.style.d.ts +1 -1
  105. package/cjs/pages/SettingsPage/EnabledBridgesSelect.js +3 -6
  106. package/cjs/pages/SettingsPage/EnabledExchangesSelect.js +3 -5
  107. package/cjs/pages/SettingsPage/GasPriceSelect.js +1 -1
  108. package/cjs/pages/SettingsPage/RoutePrioritySelect.js +6 -2
  109. package/cjs/pages/SettingsPage/ShowDestinationWallet.js +1 -1
  110. package/cjs/pages/SettingsPage/SlippageInput.js +1 -1
  111. package/cjs/pages/SwapDetailsPage/SwapDetailsPage.js +3 -4
  112. package/cjs/pages/SwapHistoryPage/SwapHistoryPage.js +2 -3
  113. package/cjs/pages/SwapPage/StatusBottomSheet.js +25 -36
  114. package/cjs/pages/SwapPage/SwapPage.js +16 -3
  115. package/cjs/pages/SwapRoutesPage/SwapRoutesPage.js +4 -3
  116. package/cjs/providers/SDKProvider/SDKProvider.d.ts +4 -0
  117. package/cjs/providers/SDKProvider/SDKProvider.js +27 -0
  118. package/cjs/providers/SDKProvider/index.d.ts +1 -0
  119. package/cjs/providers/SDKProvider/index.js +17 -0
  120. package/cjs/providers/SwapFormProvider/SwapFormProvider.js +4 -30
  121. package/cjs/providers/SwapFormProvider/types.d.ts +5 -5
  122. package/cjs/providers/TelemetryProvider/TelemetryProvider.d.ts +4 -0
  123. package/cjs/providers/TelemetryProvider/TelemetryProvider.js +11 -0
  124. package/cjs/providers/TelemetryProvider/index.d.ts +1 -0
  125. package/cjs/providers/TelemetryProvider/index.js +17 -0
  126. package/cjs/providers/WalletProvider/WalletProvider.d.ts +1 -4
  127. package/cjs/providers/WalletProvider/WalletProvider.js +59 -1
  128. package/cjs/providers/WidgetProvider/WidgetProvider.js +1 -16
  129. package/cjs/providers/WidgetProvider/index.d.ts +1 -0
  130. package/cjs/providers/WidgetProvider/index.js +1 -0
  131. package/cjs/providers/WidgetProvider/utils.d.ts +4 -0
  132. package/cjs/providers/WidgetProvider/utils.js +13 -0
  133. package/cjs/providers/index.d.ts +2 -0
  134. package/cjs/providers/index.js +2 -0
  135. package/cjs/stores/chains/index.d.ts +3 -0
  136. package/cjs/stores/chains/index.js +19 -0
  137. package/cjs/stores/chains/types.d.ts +8 -0
  138. package/cjs/stores/chains/types.js +2 -0
  139. package/cjs/stores/chains/useChainOrder.d.ts +1 -0
  140. package/cjs/stores/chains/useChainOrder.js +12 -0
  141. package/cjs/stores/chains/useChainOrderStore.d.ts +19 -0
  142. package/cjs/stores/chains/useChainOrderStore.js +45 -0
  143. package/cjs/stores/route/index.d.ts +2 -1
  144. package/cjs/stores/route/index.js +2 -1
  145. package/cjs/stores/route/useExecutingRoutesIds.d.ts +1 -0
  146. package/cjs/stores/route/useExecutingRoutesIds.js +20 -0
  147. package/cjs/stores/route/useRouteStore.js +5 -4
  148. package/cjs/stores/route/utils.d.ts +4 -0
  149. package/cjs/stores/route/utils.js +21 -0
  150. package/cjs/stores/settings/index.d.ts +0 -1
  151. package/cjs/stores/settings/index.js +0 -1
  152. package/cjs/stores/settings/useAppearance.js +3 -1
  153. package/cjs/stores/settings/useSettingsStore.js +5 -2
  154. package/cjs/types/events.d.ts +5 -0
  155. package/cjs/types/events.js +9 -0
  156. package/cjs/types/index.d.ts +1 -0
  157. package/cjs/types/index.js +1 -0
  158. package/cjs/types/widget.d.ts +31 -23
  159. package/cjs/utils/colors.d.ts +1 -1
  160. package/cjs/utils/navigationRoutes.d.ts +5 -0
  161. package/cjs/utils/navigationRoutes.js +31 -4
  162. package/components/ActiveSwaps/ActiveSwapItem.d.ts +5 -0
  163. package/components/ActiveSwaps/ActiveSwapItem.js +41 -0
  164. package/components/{SwapsInProgress/SwapsInProgress.d.ts → ActiveSwaps/ActiveSwaps.d.ts} +1 -1
  165. package/components/ActiveSwaps/ActiveSwaps.js +26 -0
  166. package/components/ActiveSwaps/ActiveSwaps.style.d.ts +78 -0
  167. package/components/ActiveSwaps/ActiveSwaps.style.js +37 -0
  168. package/components/ActiveSwaps/index.d.ts +2 -0
  169. package/components/ActiveSwaps/index.js +2 -0
  170. package/components/AppContainer.js +1 -1
  171. package/components/Card/Card.d.ts +7 -4
  172. package/components/Card/Card.js +39 -29
  173. package/{pages/SelectTokenPage → components/ChainSelect}/ChainSelect.d.ts +0 -0
  174. package/components/ChainSelect/ChainSelect.js +31 -0
  175. package/components/{SwapsInProgress/SwapsInProgress.style.d.ts → ChainSelect/ChainSelect.style.d.ts} +10 -19
  176. package/components/ChainSelect/ChainSelect.style.js +16 -0
  177. package/components/ChainSelect/index.d.ts +2 -0
  178. package/components/ChainSelect/index.js +2 -0
  179. package/components/ChainSelect/useChainSelect.d.ts +8 -0
  180. package/components/ChainSelect/useChainSelect.js +29 -0
  181. package/components/GasSufficiencyMessage/GasSufficiencyMessage.js +3 -3
  182. package/components/Header/Header.js +1 -9
  183. package/components/Header/NavigationHeader.js +6 -11
  184. package/components/Header/useHeaderActionStore.d.ts +0 -2
  185. package/components/Header/useHeaderActionStore.js +0 -3
  186. package/components/PoweredBy/PoweredBy.style.d.ts +1 -1
  187. package/components/PoweredBy/PoweredBy.style.js +1 -0
  188. package/components/SelectChainAndToken.js +1 -1
  189. package/components/SendToWallet/SendToWallet.js +6 -6
  190. package/components/Step/CircularProgress.js +3 -3
  191. package/components/Step/CircularProgress.style.js +1 -1
  192. package/components/Step/StepProcess.js +2 -6
  193. package/components/Step/StepProcess.style.d.ts +1 -1
  194. package/components/Step/StepTimer.d.ts +1 -0
  195. package/components/Step/StepTimer.js +6 -6
  196. package/components/SwapButton/SwapButton.js +7 -34
  197. package/components/SwapButton/types.d.ts +2 -2
  198. package/components/SwapRouteCard/SwapRouteCard.js +1 -1
  199. package/components/TokenAvatar/TokenAvatar.style.js +0 -3
  200. package/components/TokenList/TokenList.js +7 -3
  201. package/components/TokenList/TokenList.style.js +4 -3
  202. package/components/TokenList/TokenListItem.js +1 -1
  203. package/components/TokenList/TokenNotFound.d.ts +2 -1
  204. package/components/TokenList/TokenNotFound.js +12 -2
  205. package/components/TokenList/types.d.ts +2 -2
  206. package/config/theme.js +24 -23
  207. package/config/version.d.ts +1 -1
  208. package/config/version.js +1 -1
  209. package/hooks/index.d.ts +2 -0
  210. package/hooks/index.js +2 -0
  211. package/hooks/useChains.d.ts +1 -97
  212. package/hooks/useChains.js +26 -20
  213. package/hooks/useFeaturedTokens.d.ts +1 -1
  214. package/hooks/useFeaturedTokens.js +6 -3
  215. package/hooks/useGasSufficiency.d.ts +1 -1
  216. package/hooks/useGasSufficiency.js +32 -24
  217. package/hooks/useInitializer.js +6 -0
  218. package/{components/Step/utils.d.ts → hooks/useProcessMessage.d.ts} +4 -0
  219. package/{pages/SwapPage/utils.js → hooks/useProcessMessage.js} +15 -10
  220. package/hooks/useRouteExecution.d.ts +1 -1
  221. package/hooks/useRouteExecution.js +26 -35
  222. package/hooks/useSwapRoutes.js +3 -4
  223. package/hooks/useToken.d.ts +0 -1
  224. package/hooks/useToken.js +1 -2
  225. package/hooks/useTokenBalances.d.ts +1 -2
  226. package/hooks/useTokenBalances.js +4 -5
  227. package/hooks/useTokenSearch.js +3 -2
  228. package/hooks/useTokens.d.ts +1 -2
  229. package/hooks/useTokens.js +32 -9
  230. package/hooks/useTools.js +11 -5
  231. package/hooks/useWidgetEvents.d.ts +3 -0
  232. package/hooks/useWidgetEvents.js +6 -0
  233. package/i18n/en/translation.json +14 -10
  234. package/i18n/index.d.ts +11 -7
  235. package/index.d.ts +1 -0
  236. package/index.js +1 -0
  237. package/package.json +15 -14
  238. package/pages/ActiveSwapsPage/ActiveSwapsEmpty.d.ts +2 -0
  239. package/pages/ActiveSwapsPage/ActiveSwapsEmpty.js +14 -0
  240. package/pages/ActiveSwapsPage/ActiveSwapsPage.d.ts +2 -0
  241. package/pages/ActiveSwapsPage/ActiveSwapsPage.js +17 -0
  242. package/pages/ActiveSwapsPage/index.d.ts +1 -0
  243. package/pages/ActiveSwapsPage/index.js +1 -0
  244. package/pages/MainPage/MainPage.js +2 -3
  245. package/pages/MainPage/MainSwapButton.js +3 -1
  246. package/pages/MainPage/SwapRoutes.js +4 -1
  247. package/pages/SelectChainPage/SelectChainPage.d.ts +3 -0
  248. package/pages/SelectChainPage/SelectChainPage.js +29 -0
  249. package/pages/SelectChainPage/SelectChainPage.style.d.ts +21 -0
  250. package/pages/SelectChainPage/SelectChainPage.style.js +17 -0
  251. package/pages/SelectChainPage/index.d.ts +1 -0
  252. package/pages/SelectChainPage/index.js +1 -0
  253. package/pages/SelectTokenPage/SelectTokenPage.d.ts +2 -4
  254. package/pages/SelectTokenPage/SelectTokenPage.js +2 -2
  255. package/pages/SelectWalletPage/SelectWalletPage.js +5 -5
  256. package/pages/SelectWalletPage/SelectWalletPage.style.d.ts +2 -27
  257. package/pages/SelectWalletPage/SelectWalletPage.style.js +4 -14
  258. package/pages/SettingsPage/AdvancedPreferences.js +2 -2
  259. package/pages/SettingsPage/ColorSchemeButtonGroup.style.d.ts +1 -1
  260. package/pages/SettingsPage/EnabledBridgesSelect.js +4 -7
  261. package/pages/SettingsPage/EnabledExchangesSelect.js +4 -6
  262. package/pages/SettingsPage/GasPriceSelect.js +2 -2
  263. package/pages/SettingsPage/RoutePrioritySelect.js +7 -3
  264. package/pages/SettingsPage/ShowDestinationWallet.js +2 -2
  265. package/pages/SettingsPage/SlippageInput.js +2 -2
  266. package/pages/SwapDetailsPage/SwapDetailsPage.js +4 -5
  267. package/pages/SwapHistoryPage/SwapHistoryPage.js +3 -4
  268. package/pages/SwapPage/StatusBottomSheet.js +27 -38
  269. package/pages/SwapPage/SwapPage.js +16 -3
  270. package/pages/SwapRoutesPage/SwapRoutesPage.js +5 -4
  271. package/providers/SDKProvider/SDKProvider.d.ts +4 -0
  272. package/providers/SDKProvider/SDKProvider.js +19 -0
  273. package/providers/SDKProvider/index.d.ts +1 -0
  274. package/providers/SDKProvider/index.js +1 -0
  275. package/providers/SwapFormProvider/SwapFormProvider.js +4 -30
  276. package/providers/SwapFormProvider/types.d.ts +5 -5
  277. package/providers/TelemetryProvider/TelemetryProvider.d.ts +4 -0
  278. package/providers/TelemetryProvider/TelemetryProvider.js +7 -0
  279. package/providers/TelemetryProvider/index.d.ts +1 -0
  280. package/providers/TelemetryProvider/index.js +1 -0
  281. package/providers/WalletProvider/WalletProvider.d.ts +1 -4
  282. package/providers/WalletProvider/WalletProvider.js +59 -1
  283. package/providers/WidgetProvider/WidgetProvider.js +3 -18
  284. package/providers/WidgetProvider/index.d.ts +1 -0
  285. package/providers/WidgetProvider/index.js +1 -0
  286. package/providers/WidgetProvider/utils.d.ts +4 -0
  287. package/providers/WidgetProvider/utils.js +9 -0
  288. package/providers/index.d.ts +2 -0
  289. package/providers/index.js +2 -0
  290. package/stores/chains/index.d.ts +3 -0
  291. package/stores/chains/index.js +3 -0
  292. package/stores/chains/types.d.ts +8 -0
  293. package/stores/chains/types.js +1 -0
  294. package/stores/chains/useChainOrder.d.ts +1 -0
  295. package/stores/chains/useChainOrder.js +5 -0
  296. package/stores/chains/useChainOrderStore.d.ts +19 -0
  297. package/stores/chains/useChainOrderStore.js +39 -0
  298. package/stores/route/index.d.ts +2 -1
  299. package/stores/route/index.js +2 -1
  300. package/stores/route/useExecutingRoutesIds.d.ts +1 -0
  301. package/stores/route/useExecutingRoutesIds.js +13 -0
  302. package/stores/route/useRouteStore.js +5 -4
  303. package/stores/route/utils.d.ts +4 -0
  304. package/stores/route/utils.js +15 -0
  305. package/stores/settings/index.d.ts +0 -1
  306. package/stores/settings/index.js +0 -1
  307. package/stores/settings/useAppearance.js +3 -1
  308. package/stores/settings/useSettingsStore.js +5 -2
  309. package/tsconfig.cjs.tsbuildinfo +1 -1
  310. package/types/events.d.ts +5 -0
  311. package/types/events.js +6 -0
  312. package/types/index.d.ts +1 -0
  313. package/types/index.js +1 -0
  314. package/types/widget.d.ts +31 -23
  315. package/utils/colors.d.ts +1 -1
  316. package/utils/navigationRoutes.d.ts +5 -0
  317. package/utils/navigationRoutes.js +30 -3
  318. package/cjs/components/SwapButton/SwapButton.style.d.ts +0 -65
  319. package/cjs/components/SwapButton/SwapButton.style.js +0 -15
  320. package/cjs/components/SwapsInProgress/SwapsInProgress.js +0 -29
  321. package/cjs/components/SwapsInProgress/SwapsInProgress.style.js +0 -17
  322. package/cjs/components/SwapsInProgress/index.d.ts +0 -1
  323. package/cjs/config/lifi.d.ts +0 -4
  324. package/cjs/config/lifi.js +0 -14
  325. package/cjs/pages/SelectTokenPage/ChainSelect.js +0 -31
  326. package/cjs/pages/SwapPage/utils.d.ts +0 -6
  327. package/cjs/pages/SwapPage/utils.js +0 -93
  328. package/cjs/stores/route/useExecutingRoutes.d.ts +0 -2
  329. package/cjs/stores/route/useExecutingRoutes.js +0 -13
  330. package/cjs/stores/settings/useSetSettings.d.ts +0 -5
  331. package/cjs/stores/settings/useSetSettings.js +0 -12
  332. package/components/Step/utils.js +0 -89
  333. package/components/SwapButton/SwapButton.style.d.ts +0 -65
  334. package/components/SwapButton/SwapButton.style.js +0 -12
  335. package/components/SwapsInProgress/SwapsInProgress.js +0 -25
  336. package/components/SwapsInProgress/SwapsInProgress.style.js +0 -14
  337. package/components/SwapsInProgress/index.d.ts +0 -1
  338. package/components/SwapsInProgress/index.js +0 -1
  339. package/config/lifi.d.ts +0 -4
  340. package/config/lifi.js +0 -7
  341. package/pages/SelectTokenPage/ChainSelect.js +0 -27
  342. package/pages/SwapPage/utils.d.ts +0 -6
  343. package/stores/route/useExecutingRoutes.d.ts +0 -2
  344. package/stores/route/useExecutingRoutes.js +0 -6
  345. package/stores/settings/useSetSettings.d.ts +0 -5
  346. package/stores/settings/useSetSettings.js +0 -5
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const ActiveSwapsPage: () => JSX.Element;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ActiveSwapsPage = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const material_1 = require("@mui/material");
6
+ const ActiveSwaps_1 = require("../../components/ActiveSwaps");
7
+ const providers_1 = require("../../providers");
8
+ const stores_1 = require("../../stores");
9
+ const ActiveSwapsEmpty_1 = require("./ActiveSwapsEmpty");
10
+ const ActiveSwapsPage = () => {
11
+ const { account } = (0, providers_1.useWallet)();
12
+ const executingRoutes = (0, stores_1.useExecutingRoutesIds)(account.address);
13
+ if (!executingRoutes.length) {
14
+ return (0, jsx_runtime_1.jsx)(ActiveSwapsEmpty_1.ActiveSwapsEmpty, {});
15
+ }
16
+ return ((0, jsx_runtime_1.jsx)(material_1.Container, Object.assign({ disableGutters: true }, { children: (0, jsx_runtime_1.jsx)(material_1.List, Object.assign({ sx: {
17
+ paddingLeft: 1.5,
18
+ paddingRight: 1.5,
19
+ } }, { children: executingRoutes.map((routeId) => ((0, jsx_runtime_1.jsx)(ActiveSwaps_1.ActiveSwapItem, { routeId: routeId }, routeId))) })) })));
20
+ };
21
+ exports.ActiveSwapsPage = ActiveSwapsPage;
@@ -0,0 +1 @@
1
+ export * from './ActiveSwapsPage';
@@ -14,4 +14,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./SwapsInProgress"), exports);
17
+ __exportStar(require("./ActiveSwapsPage"), exports);
@@ -3,14 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MainPage = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const material_1 = require("@mui/material");
6
+ const ActiveSwaps_1 = require("../../components/ActiveSwaps");
6
7
  const SelectChainAndToken_1 = require("../../components/SelectChainAndToken");
7
- const SendToWallet_1 = require("../../components/SendToWallet");
8
8
  const SwapInput_1 = require("../../components/SwapInput");
9
- const SwapsInProgress_1 = require("../../components/SwapsInProgress");
10
9
  const MainPage_style_1 = require("./MainPage.style");
11
10
  const MainSwapButton_1 = require("./MainSwapButton");
12
11
  const SwapRoutes_1 = require("./SwapRoutes");
13
12
  const MainPage = () => {
14
- return ((0, jsx_runtime_1.jsxs)(MainPage_style_1.FormContainer, Object.assign({ disableGutters: true }, { children: [(0, jsx_runtime_1.jsx)(SwapsInProgress_1.SwapsInProgress, { mx: 3, mt: 1, mb: 2 }), (0, jsx_runtime_1.jsx)(SelectChainAndToken_1.SelectChainAndToken, { mt: 1, mx: 3, mb: 3 }), (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ mx: 3, mb: 3 }, { children: (0, jsx_runtime_1.jsx)(SwapInput_1.SwapInput, { formType: "from" }) })), (0, jsx_runtime_1.jsx)(SendToWallet_1.SendToWallet, { mx: 3, mb: 3 }), (0, jsx_runtime_1.jsx)(SwapRoutes_1.SwapRoutes, { mx: 3, mb: 3 }), (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ mx: 3, mb: 1 }, { children: (0, jsx_runtime_1.jsx)(MainSwapButton_1.MainSwapButton, {}) }))] })));
13
+ return ((0, jsx_runtime_1.jsxs)(MainPage_style_1.FormContainer, Object.assign({ disableGutters: true }, { children: [(0, jsx_runtime_1.jsx)(ActiveSwaps_1.ActiveSwaps, { mx: 3, mt: 1, mb: 2 }), (0, jsx_runtime_1.jsx)(SelectChainAndToken_1.SelectChainAndToken, { mt: 1, mx: 3, mb: 3 }), (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ mx: 3, mb: 3 }, { children: (0, jsx_runtime_1.jsx)(SwapInput_1.SwapInput, { formType: "from" }) })), (0, jsx_runtime_1.jsx)(SwapRoutes_1.SwapRoutes, { mx: 3, mb: 3 }), (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ mx: 3, mb: 1 }, { children: (0, jsx_runtime_1.jsx)(MainSwapButton_1.MainSwapButton, {}) }))] })));
15
14
  };
16
15
  exports.MainPage = MainPage;
@@ -11,6 +11,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.MainSwapButton = void 0;
13
13
  const jsx_runtime_1 = require("react/jsx-runtime");
14
+ const react_hook_form_1 = require("react-hook-form");
14
15
  const react_router_dom_1 = require("react-router-dom");
15
16
  const SwapButton_1 = require("../../components/SwapButton");
16
17
  const hooks_1 = require("../../hooks");
@@ -18,6 +19,7 @@ const stores_1 = require("../../stores");
18
19
  const utils_1 = require("../../utils");
19
20
  const MainSwapButton = () => {
20
21
  const navigate = (0, react_router_dom_1.useNavigate)();
22
+ const { isValid, isValidating } = (0, react_hook_form_1.useFormState)();
21
23
  const setExecutableRoute = (0, stores_1.useSetExecutableRoute)();
22
24
  const { routes: swapRoutes, isLoading, isFetching } = (0, hooks_1.useSwapRoutes)();
23
25
  const currentRoute = swapRoutes === null || swapRoutes === void 0 ? void 0 : swapRoutes[0];
@@ -29,6 +31,6 @@ const MainSwapButton = () => {
29
31
  });
30
32
  }
31
33
  });
32
- return ((0, jsx_runtime_1.jsx)(SwapButton_1.SwapButton, { onClick: handleClick, currentRoute: currentRoute, loading: isLoading || isFetching || !currentRoute }));
34
+ return ((0, jsx_runtime_1.jsx)(SwapButton_1.SwapButton, { onClick: handleClick, currentRoute: currentRoute, disable: isLoading || isFetching || isValidating || !isValid }));
33
35
  };
34
36
  exports.MainSwapButton = MainSwapButton;
@@ -6,11 +6,13 @@ const jsx_runtime_1 = require("react/jsx-runtime");
6
6
  const icons_material_1 = require("@mui/icons-material");
7
7
  const material_1 = require("@mui/material");
8
8
  const react_1 = require("react");
9
+ const react_hook_form_1 = require("react-hook-form");
9
10
  const react_i18next_1 = require("react-i18next");
10
11
  const react_router_dom_1 = require("react-router-dom");
11
12
  const Card_1 = require("../../components/Card");
12
13
  const GasSufficiencyMessage_1 = require("../../components/GasSufficiencyMessage");
13
14
  const ProgressToNextUpdate_1 = require("../../components/ProgressToNextUpdate");
15
+ const SendToWallet_1 = require("../../components/SendToWallet");
14
16
  const SwapRouteCard_1 = require("../../components/SwapRouteCard");
15
17
  const hooks_1 = require("../../hooks");
16
18
  const utils_1 = require("../../utils");
@@ -18,6 +20,7 @@ const SwapRoutes_style_1 = require("./SwapRoutes.style");
18
20
  const SwapRoutes = (props) => {
19
21
  const { t } = (0, react_i18next_1.useTranslation)();
20
22
  const navigate = (0, react_router_dom_1.useNavigate)();
23
+ const { isValid, isValidating } = (0, react_hook_form_1.useFormState)();
21
24
  const { routes, isLoading, isFetching, isFetched, dataUpdatedAt, refetchTime, refetch, } = (0, hooks_1.useSwapRoutes)();
22
25
  const handleCardClick = (0, react_1.useCallback)(() => {
23
26
  navigate(utils_1.navigationRoutes.swapRoutes);
@@ -35,6 +38,6 @@ const SwapRoutes = (props) => {
35
38
  borderWidth: !routeNotFound && (isFetching || (routes && routes.length > 1))
36
39
  ? 1
37
40
  : 0,
38
- } }, { children: isLoading || isFetching ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(SwapRouteCard_1.SwapRouteCardSkeleton, { minWidth: "80%", dense: true }), (0, jsx_runtime_1.jsx)(SwapRouteCard_1.SwapRouteCardSkeleton, { minWidth: "80%", dense: true })] })) : !currentRoute ? ((0, jsx_runtime_1.jsx)(SwapRouteCard_1.SwapRouteNotFoundCard, { minWidth: "100%", dense: true })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(SwapRouteCard_1.SwapRouteCard, { minWidth: routes.length > 1 ? '80%' : '100%', route: currentRoute, active: true, dense: true }), routes.length > 1 ? ((0, jsx_runtime_1.jsx)(SwapRouteCard_1.SwapRouteCard, { minWidth: "80%", route: routes[1], dense: true })) : null] })) })), (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ sx: { display: 'flex', alignItems: 'center' } }, { children: !routeNotFound ? ((0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ py: 1, pr: 1 }, { children: (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ onClick: handleCardClick, size: "medium", "aria-label": "swap-routes" }, { children: (0, jsx_runtime_1.jsx)(icons_material_1.KeyboardArrowRight, {}) })) }))) : null }))] }))] })), (0, jsx_runtime_1.jsx)(GasSufficiencyMessage_1.GasSufficiencyMessage, Object.assign({ route: !isFetching ? currentRoute : undefined }, props))] }));
41
+ } }, { children: isLoading || isFetching ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(SwapRouteCard_1.SwapRouteCardSkeleton, { minWidth: "80%", dense: true }), (0, jsx_runtime_1.jsx)(SwapRouteCard_1.SwapRouteCardSkeleton, { minWidth: "80%", dense: true })] })) : !currentRoute ? ((0, jsx_runtime_1.jsx)(SwapRouteCard_1.SwapRouteNotFoundCard, { minWidth: "100%", dense: true })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(SwapRouteCard_1.SwapRouteCard, { minWidth: routes.length > 1 ? '80%' : '100%', route: currentRoute, active: true, dense: true }), routes.length > 1 ? ((0, jsx_runtime_1.jsx)(SwapRouteCard_1.SwapRouteCard, { minWidth: "80%", route: routes[1], dense: true })) : null] })) })), (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ sx: { display: 'flex', alignItems: 'center' } }, { children: !routeNotFound ? ((0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ py: 1, pr: 1 }, { children: (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ onClick: handleCardClick, size: "medium", "aria-label": "swap-routes", disabled: isValidating || !isValid }, { children: (0, jsx_runtime_1.jsx)(icons_material_1.KeyboardArrowRight, {}) })) }))) : null }))] }))] })), (0, jsx_runtime_1.jsx)(GasSufficiencyMessage_1.GasSufficiencyMessage, Object.assign({ route: !isFetching ? currentRoute : undefined }, props)), (0, jsx_runtime_1.jsx)(SendToWallet_1.SendToWallet, { mx: 3, mb: 3 })] }));
39
42
  };
40
43
  exports.SwapRoutes = SwapRoutes;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import type { SwapFormTypeProps } from '../../providers';
3
+ export declare const SelectChainPage: React.FC<Partial<SwapFormTypeProps>>;
@@ -0,0 +1,33 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.SelectChainPage = void 0;
13
+ const jsx_runtime_1 = require("react/jsx-runtime");
14
+ const material_1 = require("@mui/material");
15
+ const react_router_dom_1 = require("react-router-dom");
16
+ const ChainSelect_1 = require("../../components/ChainSelect");
17
+ const hooks_1 = require("../../hooks");
18
+ const SelectChainPage_style_1 = require("./SelectChainPage.style");
19
+ const SelectChainPage = ({ formType, }) => {
20
+ const { navigateBack } = (0, hooks_1.useNavigateBack)();
21
+ const { state } = (0, react_router_dom_1.useLocation)();
22
+ const formTypeState = (state === null || state === void 0 ? void 0 : state.formType) || formType;
23
+ const { chains, setCurrentChain } = (0, ChainSelect_1.useChainSelect)(formTypeState);
24
+ const handleClick = (chainId) => __awaiter(void 0, void 0, void 0, function* () {
25
+ setCurrentChain(chainId);
26
+ navigateBack();
27
+ });
28
+ return ((0, jsx_runtime_1.jsx)(material_1.Container, Object.assign({ disableGutters: true }, { children: (0, jsx_runtime_1.jsx)(material_1.List, Object.assign({ sx: {
29
+ paddingLeft: 1.5,
30
+ paddingRight: 1.5,
31
+ } }, { children: chains === null || chains === void 0 ? void 0 : chains.map((chain) => ((0, jsx_runtime_1.jsxs)(SelectChainPage_style_1.ListItemButton, Object.assign({ onClick: () => handleClick(chain.id), disableRipple: true }, { children: [(0, jsx_runtime_1.jsx)(material_1.ListItemAvatar, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, Object.assign({ src: chain.logoURI, alt: chain.name }, { children: chain.name[0] })) }), (0, jsx_runtime_1.jsx)(SelectChainPage_style_1.ListItemText, { primary: chain.name })] }), chain.id))) })) })));
32
+ };
33
+ exports.SelectChainPage = SelectChainPage;
@@ -0,0 +1,21 @@
1
+ /// <reference types="react" />
2
+ export declare const ListItemButton: import("@emotion/styled").StyledComponent<import("@mui/material").ListItemButtonBaseProps & Omit<{
3
+ action?: import("react").Ref<import("@mui/material").ButtonBaseActions> | undefined;
4
+ centerRipple?: boolean | undefined;
5
+ children?: import("react").ReactNode;
6
+ classes?: Partial<import("@mui/material").ButtonBaseClasses> | undefined;
7
+ disabled?: boolean | undefined;
8
+ disableRipple?: boolean | undefined;
9
+ disableTouchRipple?: boolean | undefined;
10
+ focusRipple?: boolean | undefined;
11
+ focusVisibleClassName?: string | undefined;
12
+ LinkComponent?: import("react").ElementType<any> | undefined;
13
+ onFocusVisible?: import("react").FocusEventHandler<any> | undefined;
14
+ sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
15
+ tabIndex?: number | undefined;
16
+ TouchRippleProps?: Partial<import("@mui/material/ButtonBase/TouchRipple").TouchRippleProps> | undefined;
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>> & {
19
+ ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
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
+ export declare const ListItemText: import("@emotion/styled").StyledComponent<import("@mui/material").ListItemTextProps<import("react").ElementType<any>, import("react").ElementType<any>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ListItemText = exports.ListItemButton = void 0;
4
+ const material_1 = require("@mui/material");
5
+ const ListItemText_1 = require("@mui/material/ListItemText");
6
+ const styles_1 = require("@mui/material/styles");
7
+ const utils_1 = require("../../utils");
8
+ exports.ListItemButton = (0, styles_1.styled)(material_1.ListItemButton)(({ theme }) => ({
9
+ borderRadius: theme.shape.borderRadiusSecondary,
10
+ paddingLeft: theme.spacing(1.5),
11
+ height: 56,
12
+ '&:hover': {
13
+ backgroundColor: (0, utils_1.getContrastAlphaColor)(theme, '4%'),
14
+ },
15
+ }));
16
+ exports.ListItemText = (0, styles_1.styled)(material_1.ListItemText)(({ theme }) => ({
17
+ [`.${ListItemText_1.listItemTextClasses.primary}`]: {
18
+ fontWeight: 400,
19
+ },
20
+ }));
@@ -0,0 +1 @@
1
+ export * from './SelectChainPage';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./SelectChainPage"), exports);
@@ -1,5 +1,3 @@
1
1
  import type { FC } from 'react';
2
- import type { SwapFormDirection } from '../../providers';
3
- export declare const SelectTokenPage: FC<{
4
- formType: SwapFormDirection;
5
- }>;
2
+ import type { SwapFormTypeProps } from '../../providers';
3
+ export declare const SelectTokenPage: FC<SwapFormTypeProps>;
@@ -4,11 +4,11 @@ exports.SelectTokenPage = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const material_1 = require("@mui/material");
6
6
  const react_1 = require("react");
7
+ const ChainSelect_1 = require("../../components/ChainSelect");
7
8
  const TokenList_1 = require("../../components/TokenList");
8
9
  const hooks_1 = require("../../hooks");
9
- const ChainSelect_1 = require("./ChainSelect");
10
10
  const SearchTokenInput_1 = require("./SearchTokenInput");
11
- const SelectTokenPage = ({ formType, }) => {
11
+ const SelectTokenPage = ({ formType }) => {
12
12
  (0, hooks_1.useScrollableOverflowHidden)();
13
13
  const { navigateBack } = (0, hooks_1.useNavigateBack)();
14
14
  const headerRef = (0, react_1.useRef)(null);
@@ -28,7 +28,7 @@ const SelectWalletPage = () => {
28
28
  const closeDialog = () => {
29
29
  setWalletIdentity((state) => (Object.assign(Object.assign({}, state), { show: false })));
30
30
  };
31
- const handleConnect = (0, react_1.useCallback)((event, wallet) => __awaiter(void 0, void 0, void 0, function* () {
31
+ const handleConnect = (0, react_1.useCallback)((wallet) => __awaiter(void 0, void 0, void 0, function* () {
32
32
  const { ethereum } = window;
33
33
  const identityCheckPassed = wallet.checkProviderIdentity({
34
34
  provider: ethereum,
@@ -44,9 +44,9 @@ const SelectWalletPage = () => {
44
44
  yield connect(wallet);
45
45
  }), [connect, navigateBack]);
46
46
  return ((0, jsx_runtime_1.jsxs)(material_1.Container, Object.assign({ disableGutters: true }, { children: [(0, jsx_runtime_1.jsx)(material_1.List, Object.assign({ sx: {
47
- paddingLeft: 2,
48
- paddingRight: 2,
49
- } }, { children: wallet_management_1.supportedWallets.map((wallet) => ((0, jsx_runtime_1.jsxs)(SelectWalletPage_style_1.WalletListItemButton, Object.assign({ onClick: (event) => handleConnect(event, wallet), disableRipple: true }, { children: [(0, jsx_runtime_1.jsx)(material_1.ListItemAvatar, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, Object.assign({ src: wallet.icon.src || wallet.icon, alt: wallet.name }, { children: wallet.name[0] })) }), (0, jsx_runtime_1.jsx)(SelectWalletPage_style_1.WalletListItemText, { primary: wallet.name })] }), wallet.name))) })), (0, jsx_runtime_1.jsxs)(Dialog_1.Dialog, Object.assign({ open: walletIdentity.show, onClose: closeDialog }, { children: [(0, jsx_runtime_1.jsx)(material_1.DialogContent, { children: (0, jsx_runtime_1.jsx)(material_1.DialogContentText, { children: t('wallet.extensionNotFound', {
47
+ paddingLeft: 1.5,
48
+ paddingRight: 1.5,
49
+ } }, { children: wallet_management_1.supportedWallets.map((wallet) => ((0, jsx_runtime_1.jsxs)(SelectWalletPage_style_1.ListItemButton, Object.assign({ onClick: () => handleConnect(wallet), disableRipple: true }, { children: [(0, jsx_runtime_1.jsx)(material_1.ListItemAvatar, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, Object.assign({ src: wallet.icon.src || wallet.icon, alt: wallet.name }, { children: wallet.name[0] })) }), (0, jsx_runtime_1.jsx)(SelectWalletPage_style_1.ListItemText, { primary: wallet.name })] }), wallet.name))) })), (0, jsx_runtime_1.jsxs)(Dialog_1.Dialog, Object.assign({ open: walletIdentity.show, onClose: closeDialog }, { children: [(0, jsx_runtime_1.jsx)(material_1.DialogContent, { children: (0, jsx_runtime_1.jsx)(material_1.DialogContentText, { children: t('wallet.extensionNotFound', {
50
50
  name: (_a = walletIdentity.wallet) === null || _a === void 0 ? void 0 : _a.name,
51
51
  }) }) }), (0, jsx_runtime_1.jsx)(material_1.DialogActions, { children: (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ onClick: closeDialog, autoFocus: true }, { children: t('button.ok') })) })] }))] })));
52
52
  };
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- export declare const WalletListItemButton: import("@emotion/styled").StyledComponent<import("@mui/material").ListItemButtonBaseProps & Omit<{
2
+ export declare const ListItemButton: import("@emotion/styled").StyledComponent<import("@mui/material").ListItemButtonBaseProps & Omit<{
3
3
  action?: import("react").Ref<import("@mui/material").ButtonBaseActions> | undefined;
4
4
  centerRipple?: boolean | undefined;
5
5
  children?: import("react").ReactNode;
@@ -18,29 +18,4 @@ export declare const WalletListItemButton: import("@emotion/styled").StyledCompo
18
18
  }, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
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
- export declare const WalletListItem: import("@emotion/styled").StyledComponent<{
22
- button?: false | undefined;
23
- } & import("@mui/material").ListItemBaseProps & {
24
- components?: {
25
- Root?: import("react").ElementType<any> | undefined;
26
- } | undefined;
27
- componentsProps?: {
28
- root?: (import("react").HTMLAttributes<HTMLDivElement> & import("@mui/material").ListItemComponentsPropsOverrides) | undefined;
29
- } | undefined;
30
- } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "key" | keyof import("react").LiHTMLAttributes<HTMLLIElement>> & {
31
- ref?: ((instance: HTMLLIElement | null) => void) | import("react").RefObject<HTMLLIElement> | null | undefined;
32
- }, "button" | "className" | "style" | "classes" | "children" | "disabled" | "sx" | "alignItems" | "autoFocus" | "dense" | "divider" | "components" | "componentsProps" | "selected" | "disableGutters" | "ContainerComponent" | "ContainerProps" | "disablePadding" | "secondaryAction"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
33
- export declare const WalletListItemText: import("@emotion/styled").StyledComponent<import("@mui/material").ListItemTextProps<import("react").ElementType<any>, import("react").ElementType<any>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
34
- export declare const WalletIdentityPopoverContent: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material").Theme> & {
35
- align?: "inherit" | "left" | "right" | "center" | "justify" | undefined;
36
- children?: import("react").ReactNode;
37
- classes?: Partial<import("@mui/material").TypographyClasses> | undefined;
38
- gutterBottom?: boolean | undefined;
39
- noWrap?: boolean | undefined;
40
- paragraph?: boolean | undefined;
41
- sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
42
- variant?: "button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "subtitle1" | "subtitle2" | "body1" | "body2" | "overline" | "@supports (font-variation-settings: normal)" | undefined;
43
- variantMapping?: Partial<Record<"button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "subtitle1" | "subtitle2" | "body1" | "body2" | "overline" | "@supports (font-variation-settings: normal)", string>> | undefined;
44
- } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof import("react").HTMLAttributes<HTMLSpanElement>> & {
45
- ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
46
- }, 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>, {}, {}>;
21
+ export declare const ListItemText: import("@emotion/styled").StyledComponent<import("@mui/material").ListItemTextProps<import("react").ElementType<any>, import("react").ElementType<any>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
@@ -1,30 +1,20 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WalletIdentityPopoverContent = exports.WalletListItemText = exports.WalletListItem = exports.WalletListItemButton = void 0;
3
+ exports.ListItemText = exports.ListItemButton = void 0;
4
4
  const material_1 = require("@mui/material");
5
- const ListItemSecondaryAction_1 = require("@mui/material/ListItemSecondaryAction");
6
5
  const ListItemText_1 = require("@mui/material/ListItemText");
7
6
  const styles_1 = require("@mui/material/styles");
8
7
  const utils_1 = require("../../utils");
9
- exports.WalletListItemButton = (0, styles_1.styled)(material_1.ListItemButton)(({ theme }) => ({
8
+ exports.ListItemButton = (0, styles_1.styled)(material_1.ListItemButton)(({ theme }) => ({
10
9
  borderRadius: theme.shape.borderRadiusSecondary,
11
10
  paddingLeft: theme.spacing(1.5),
12
- height: 64,
11
+ height: 56,
13
12
  '&:hover': {
14
13
  backgroundColor: (0, utils_1.getContrastAlphaColor)(theme, '4%'),
15
14
  },
16
15
  }));
17
- exports.WalletListItem = (0, styles_1.styled)(material_1.ListItem)(({ theme }) => ({
18
- padding: theme.spacing(1.5),
19
- [`.${ListItemSecondaryAction_1.listItemSecondaryActionClasses.root}`]: {
20
- right: theme.spacing(3),
21
- },
22
- }));
23
- exports.WalletListItemText = (0, styles_1.styled)(material_1.ListItemText)(({ theme }) => ({
16
+ exports.ListItemText = (0, styles_1.styled)(material_1.ListItemText)(({ theme }) => ({
24
17
  [`.${ListItemText_1.listItemTextClasses.primary}`]: {
25
18
  fontWeight: 400,
26
19
  },
27
20
  }));
28
- exports.WalletIdentityPopoverContent = (0, styles_1.styled)(material_1.Typography)({
29
- maxWidth: 400,
30
- });
@@ -10,7 +10,7 @@ const EnabledBridgesSelect_1 = require("./EnabledBridgesSelect");
10
10
  const EnabledExchangesSelect_1 = require("./EnabledExchangesSelect");
11
11
  const AdvancedPreferences = () => {
12
12
  const { t } = (0, react_i18next_1.useTranslation)();
13
- const [setValue] = (0, stores_1.useSetSettings)();
13
+ const setValue = (0, stores_1.useSettingsStore)((state) => state.setValue);
14
14
  const { advancedPreferences } = (0, stores_1.useSettings)(['advancedPreferences']);
15
15
  const handleAdvancedPreferences = (_, checked) => {
16
16
  setValue('advancedPreferences', checked);
@@ -11,7 +11,7 @@ export declare const ToggleButton: import("@emotion/styled").StyledComponent<{
11
11
  selected?: boolean | undefined;
12
12
  size?: "small" | "medium" | "large" | undefined;
13
13
  sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
14
- value: unknown;
14
+ value: {};
15
15
  } & Omit<{
16
16
  action?: import("react").Ref<import("@mui/material").ButtonBaseActions> | undefined;
17
17
  centerRipple?: boolean | undefined;
@@ -14,17 +14,14 @@ const Select_1 = require("../../components/Select");
14
14
  const hooks_1 = require("../../hooks");
15
15
  const stores_1 = require("../../stores");
16
16
  const EnabledBridgesSelect = () => {
17
- var _a;
18
17
  const { t } = (0, react_i18next_1.useTranslation)();
19
18
  const { tools, formattedTools } = (0, hooks_1.useTools)();
20
19
  const [enabledBridges, setTools] = (0, stores_1.useSettingsStore)((state) => [state.enabledBridges, state.setTools], shallow_1.default);
21
- return (tools === null || tools === void 0 ? void 0 : tools.bridges.length) ? ((0, jsx_runtime_1.jsxs)(Card_1.Card, { children: [(0, jsx_runtime_1.jsx)(Card_1.CardTitle, { children: t(`settings.enabledBridges`) }), (0, jsx_runtime_1.jsx)(material_1.FormControl, Object.assign({ fullWidth: true }, { children: (0, jsx_runtime_1.jsx)(Select_1.Select, Object.assign({ multiple: true, placeholder: t(`settings.selectEnabledBridges`), MenuProps: { elevation: 2 }, IconComponent: icons_material_1.KeyboardArrowDown, value: enabledBridges !== null && enabledBridges !== void 0 ? enabledBridges : [], onChange: (event) => {
22
- if (tools === null || tools === void 0 ? void 0 : tools.bridges) {
23
- setTools('Bridges', event.target.value, tools.bridges);
24
- }
20
+ return (tools === null || tools === void 0 ? void 0 : tools.bridges.length) ? ((0, jsx_runtime_1.jsxs)(Card_1.Card, { children: [(0, jsx_runtime_1.jsx)(Card_1.CardTitle, { children: t(`settings.enabledBridges`) }), (0, jsx_runtime_1.jsx)(material_1.FormControl, Object.assign({ fullWidth: true }, { children: (0, jsx_runtime_1.jsx)(Select_1.Select, Object.assign({ multiple: true, placeholder: t(`settings.selectEnabledBridges`), MenuProps: { elevation: 2, PaperProps: { sx: { maxHeight: 320 } } }, IconComponent: icons_material_1.KeyboardArrowDown, value: enabledBridges !== null && enabledBridges !== void 0 ? enabledBridges : [], onChange: (event) => {
21
+ setTools('Bridges', event.target.value, tools.bridges);
25
22
  }, renderValue: (selected) => ((0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ sx: { display: 'flex', flexWrap: 'wrap', gap: 0.5 } }, { children: selected.map((value) => {
26
23
  var _a, _b, _c;
27
24
  return ((0, jsx_runtime_1.jsx)(material_1.Chip, { label: (_c = (_b = (_a = formattedTools.bridges) === null || _a === void 0 ? void 0 : _a[value]) === null || _b === void 0 ? void 0 : _b.name) !== null && _c !== void 0 ? _c : value }, value));
28
- }) }))) }, { children: (_a = tools === null || tools === void 0 ? void 0 : tools.bridges) === null || _a === void 0 ? void 0 : _a.map((bridge) => ((0, jsx_runtime_1.jsx)(material_1.MenuItem, Object.assign({ value: bridge.key }, { children: bridge.name }), bridge.key))) })) }))] })) : ((0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rectangular", width: "100%", height: 134, sx: { borderRadius: 1 } }));
25
+ }) }))) }, { children: tools.bridges.map((bridge) => ((0, jsx_runtime_1.jsxs)(material_1.MenuItem, Object.assign({ value: bridge.key, sx: { paddingTop: 0, paddingBottom: 0 } }, { children: [(0, jsx_runtime_1.jsx)(material_1.Checkbox, { checked: enabledBridges === null || enabledBridges === void 0 ? void 0 : enabledBridges.includes(bridge.key) }), bridge.name] }), bridge.key))) })) }))] })) : ((0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rectangular", width: "100%", height: 134, sx: { borderRadius: 1 } }));
29
26
  };
30
27
  exports.EnabledBridgesSelect = EnabledBridgesSelect;
@@ -18,12 +18,10 @@ const EnabledExchangesSelect = () => {
18
18
  const { tools, formattedTools } = (0, hooks_1.useTools)();
19
19
  const [enabledExchanges, setTools] = (0, stores_1.useSettingsStore)((state) => [state.enabledExchanges, state.setTools], shallow_1.default);
20
20
  return (tools === null || tools === void 0 ? void 0 : tools.exchanges.length) ? ((0, jsx_runtime_1.jsxs)(Card_1.Card, { children: [(0, jsx_runtime_1.jsx)(Card_1.CardTitle, { children: t(`settings.enabledExchanges`) }), (0, jsx_runtime_1.jsx)(material_1.FormControl, Object.assign({ fullWidth: true }, { children: (0, jsx_runtime_1.jsx)(Select_1.Select, Object.assign({ multiple: true, placeholder: t(`settings.selectEnabledExchanges`), value: enabledExchanges !== null && enabledExchanges !== void 0 ? enabledExchanges : [], onChange: (event) => {
21
- if (tools === null || tools === void 0 ? void 0 : tools.exchanges) {
22
- setTools('Exchanges', event.target.value, tools.exchanges);
23
- }
24
- }, MenuProps: { elevation: 2 }, IconComponent: icons_material_1.KeyboardArrowDown, renderValue: (selected) => ((0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ sx: { display: 'flex', flexWrap: 'wrap', gap: 0.5 } }, { children: selected.map((value) => {
21
+ setTools('Exchanges', event.target.value, tools.exchanges);
22
+ }, MenuProps: { elevation: 2, PaperProps: { sx: { maxHeight: 320 } } }, IconComponent: icons_material_1.KeyboardArrowDown, renderValue: (selected) => ((0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ sx: { display: 'flex', flexWrap: 'wrap', gap: 0.5 } }, { children: selected.map((value) => {
25
23
  var _a, _b, _c;
26
24
  return ((0, jsx_runtime_1.jsx)(material_1.Chip, { label: (_c = (_b = (_a = formattedTools.exchanges) === null || _a === void 0 ? void 0 : _a[value]) === null || _b === void 0 ? void 0 : _b.name) !== null && _c !== void 0 ? _c : value }, value));
27
- }) }))) }, { children: tools === null || tools === void 0 ? void 0 : tools.exchanges.map((exchange) => ((0, jsx_runtime_1.jsx)(material_1.MenuItem, Object.assign({ value: exchange.key }, { children: exchange.key }), exchange.key))) })) }))] })) : ((0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rectangular", width: "100%", height: 206, sx: { borderRadius: 1 } }));
25
+ }) }))) }, { children: tools.exchanges.map((exchange) => ((0, jsx_runtime_1.jsxs)(material_1.MenuItem, Object.assign({ value: exchange.key, sx: { paddingTop: 0, paddingBottom: 0 } }, { children: [(0, jsx_runtime_1.jsx)(material_1.Checkbox, { checked: enabledExchanges === null || enabledExchanges === void 0 ? void 0 : enabledExchanges.includes(exchange.key) }), exchange.name] }), exchange.key))) })) }))] })) : ((0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rectangular", width: "100%", height: 206, sx: { borderRadius: 1 } }));
28
26
  };
29
27
  exports.EnabledExchangesSelect = EnabledExchangesSelect;
@@ -10,7 +10,7 @@ const Select_1 = require("../../components/Select");
10
10
  const stores_1 = require("../../stores");
11
11
  const GasPriceSelect = () => {
12
12
  const { t } = (0, react_i18next_1.useTranslation)();
13
- const [setValue] = (0, stores_1.useSetSettings)();
13
+ const setValue = (0, stores_1.useSettingsStore)((state) => state.setValue);
14
14
  const { gasPrice } = (0, stores_1.useSettings)(['gasPrice']);
15
15
  return ((0, jsx_runtime_1.jsxs)(Card_1.Card, Object.assign({ flex: 1 }, { children: [(0, jsx_runtime_1.jsx)(Card_1.CardTitle, { children: t(`settings.gasPrice.title`) }), (0, jsx_runtime_1.jsx)(material_1.FormControl, Object.assign({ fullWidth: true }, { children: (0, jsx_runtime_1.jsxs)(Select_1.Select, Object.assign({ MenuProps: { elevation: 2 }, value: gasPrice, onChange: (event) => setValue('gasPrice', event.target.value), IconComponent: icons_material_1.KeyboardArrowDown, dense: true }, { children: [(0, jsx_runtime_1.jsx)(material_1.MenuItem, Object.assign({ value: "slow" }, { children: t(`settings.gasPrice.slow`) })), (0, jsx_runtime_1.jsx)(material_1.MenuItem, Object.assign({ value: "normal" }, { children: t(`settings.gasPrice.normal`) })), (0, jsx_runtime_1.jsx)(material_1.MenuItem, Object.assign({ value: "fast" }, { children: t(`settings.gasPrice.fast`) }))] })) }))] })));
16
16
  };
@@ -11,8 +11,12 @@ const Select_1 = require("../../components/Select");
11
11
  const stores_1 = require("../../stores");
12
12
  const RoutePrioritySelect = () => {
13
13
  const { t } = (0, react_i18next_1.useTranslation)();
14
- const [setValue] = (0, stores_1.useSetSettings)();
14
+ const setValue = (0, stores_1.useSettingsStore)((state) => state.setValue);
15
15
  const { routePriority } = (0, stores_1.useSettings)(['routePriority']);
16
- return ((0, jsx_runtime_1.jsxs)(Card_1.Card, { children: [(0, jsx_runtime_1.jsx)(Card_1.CardTitle, { children: t(`settings.routePriority`) }), (0, jsx_runtime_1.jsx)(material_1.FormControl, Object.assign({ fullWidth: true }, { children: (0, jsx_runtime_1.jsx)(Select_1.Select, Object.assign({ MenuProps: { elevation: 2 }, value: routePriority, onChange: (event) => setValue('routePriority', event.target.value), IconComponent: icons_material_1.KeyboardArrowDown, dense: true }, { children: sdk_1.Orders.map((order) => ((0, jsx_runtime_1.jsx)(material_1.MenuItem, Object.assign({ value: order }, { children: t(`swap.tags.${order.toLowerCase()}`) }), order))) })) }))] }));
16
+ return ((0, jsx_runtime_1.jsxs)(Card_1.Card, { children: [(0, jsx_runtime_1.jsx)(Card_1.CardTitle, { children: t(`settings.routePriority`) }), (0, jsx_runtime_1.jsx)(material_1.FormControl, Object.assign({ fullWidth: true }, { children: (0, jsx_runtime_1.jsx)(Select_1.Select, Object.assign({ MenuProps: { elevation: 2 }, value: routePriority, onChange: (event) => setValue('routePriority', event.target.value), IconComponent: icons_material_1.KeyboardArrowDown, dense: true }, { children: sdk_1.Orders.map((order) => {
17
+ const tag = t(`swap.tags.${order.toUpperCase()}`);
18
+ const tagName = `${tag[0]}${tag.slice(1).toLowerCase()}`;
19
+ return ((0, jsx_runtime_1.jsx)(material_1.MenuItem, Object.assign({ value: order }, { children: tagName }), order));
20
+ }) })) }))] }));
17
21
  };
18
22
  exports.RoutePrioritySelect = RoutePrioritySelect;
@@ -8,7 +8,7 @@ const Switch_1 = require("../../components/Switch");
8
8
  const stores_1 = require("../../stores");
9
9
  const ShowDestinationWallet = () => {
10
10
  const { t } = (0, react_i18next_1.useTranslation)();
11
- const [setValue] = (0, stores_1.useSetSettings)();
11
+ const setValue = (0, stores_1.useSettingsStore)((state) => state.setValue);
12
12
  const { showDestinationWallet } = (0, stores_1.useSettings)(['showDestinationWallet']);
13
13
  const onChange = (_, checked) => {
14
14
  setValue('showDestinationWallet', checked);
@@ -11,8 +11,8 @@ const stores_1 = require("../../stores");
11
11
  const utils_1 = require("../../utils");
12
12
  const SlippageInput = () => {
13
13
  const { t } = (0, react_i18next_1.useTranslation)();
14
- const [setValue] = (0, stores_1.useSetSettings)();
15
14
  const { slippage } = (0, stores_1.useSettings)(['slippage']);
15
+ const setValue = (0, stores_1.useSettingsStore)((state) => state.setValue);
16
16
  const defaultValue = (0, react_1.useRef)(slippage);
17
17
  const handleChange = (event) => {
18
18
  const { value } = event.target;
@@ -32,7 +32,6 @@ const SwapDetailsPage = () => {
32
32
  var _a, _b;
33
33
  const { t } = (0, react_i18next_1.useTranslation)();
34
34
  const { navigateBack } = (0, hooks_1.useNavigateBack)();
35
- const setHeaderAction = (0, Header_1.useSetHeaderAction)();
36
35
  const { state } = (0, react_router_dom_1.useLocation)();
37
36
  const [routeExecution, deleteRoute] = (0, stores_1.useRouteStore)((store) => [store.routes[state === null || state === void 0 ? void 0 : state.routeId], store.deleteRoute], shallow_1.default);
38
37
  const [open, setOpen] = (0, react_1.useState)(false);
@@ -50,8 +49,8 @@ const SwapDetailsPage = () => {
50
49
  yield navigator.clipboard.writeText((_c = routeExecution === null || routeExecution === void 0 ? void 0 : routeExecution.route.id) !== null && _c !== void 0 ? _c : '');
51
50
  });
52
51
  (0, react_1.useEffect)(() => {
53
- return setHeaderAction((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ size: "medium", "aria-label": "settings", edge: "end", onClick: toggleDialog }, { children: (0, jsx_runtime_1.jsx)(icons_material_1.DeleteOutline, {}) })));
54
- }, [setHeaderAction, toggleDialog]);
52
+ return Header_1.useHeaderActionStore.getState().setAction((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ size: "medium", "aria-label": "settings", edge: "end", onClick: toggleDialog }, { children: (0, jsx_runtime_1.jsx)(icons_material_1.DeleteOutline, {}) })));
53
+ }, [toggleDialog]);
55
54
  const startedAt = new Date((_b = (_a = routeExecution === null || routeExecution === void 0 ? void 0 : routeExecution.route.steps[0].execution) === null || _a === void 0 ? void 0 : _a.process[0].startedAt) !== null && _b !== void 0 ? _b : 0);
56
55
  return ((0, jsx_runtime_1.jsxs)(SwapDetailsPage_style_1.Container, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ sx: {
57
56
  display: 'flex',
@@ -65,6 +64,6 @@ const SwapDetailsPage = () => {
65
64
  }), (0, jsx_runtime_1.jsxs)(Card_1.Card, Object.assign({ mt: 2 }, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ sx: {
66
65
  display: 'flex',
67
66
  flex: 1,
68
- } }, { children: [(0, jsx_runtime_1.jsx)(Card_1.CardTitle, Object.assign({ flex: 1 }, { children: t('swap.routeId') })), (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ mr: 1, mt: 1 }, { children: (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ size: "medium", "aria-label": "settings", onClick: copyRouteId }, { children: (0, jsx_runtime_1.jsx)(icons_material_1.ContentCopy, { fontSize: "small" }) })) }))] })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2", pt: 1, pb: 2, px: 2, sx: { wordBreak: 'break-all' } }, { children: routeExecution === null || routeExecution === void 0 ? void 0 : routeExecution.route.id }))] })), (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ mt: 2 }, { children: (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ variant: "contained", href: "https://discord.com/channels/849912621360218112/863689862514343946", target: "_blank", rel: "nofollow noreferrer", fullWidth: true }, { children: t('button.contactSupport') })) })), (0, jsx_runtime_1.jsxs)(Dialog_1.Dialog, Object.assign({ open: open, onClose: toggleDialog }, { children: [(0, jsx_runtime_1.jsx)(material_1.DialogTitle, { children: t('swap.warning.title.deleteSwap') }), (0, jsx_runtime_1.jsx)(material_1.DialogContent, { children: (0, jsx_runtime_1.jsx)(material_1.DialogContentText, { children: t('swap.warning.message.deleteSwap') }) }), (0, jsx_runtime_1.jsxs)(material_1.DialogActions, { children: [(0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ onClick: toggleDialog }, { children: t('button.cancel') })), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ onClick: handleDeleteRoute, autoFocus: true }, { children: t('button.delete') }))] })] }))] }));
67
+ } }, { children: [(0, jsx_runtime_1.jsx)(Card_1.CardTitle, Object.assign({ flex: 1 }, { children: t('swap.supportId') })), (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ mr: 1, mt: 1 }, { children: (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ size: "medium", "aria-label": "settings", onClick: copyRouteId }, { children: (0, jsx_runtime_1.jsx)(icons_material_1.ContentCopy, { fontSize: "small" }) })) }))] })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2", pt: 1, pb: 2, px: 2, sx: { wordBreak: 'break-all' } }, { children: routeExecution === null || routeExecution === void 0 ? void 0 : routeExecution.route.id }))] })), (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ mt: 2 }, { children: (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ variant: "contained", href: "https://discord.com/channels/849912621360218112/863689862514343946", target: "_blank", rel: "nofollow noreferrer", fullWidth: true }, { children: t('button.contactSupport') })) })), (0, jsx_runtime_1.jsxs)(Dialog_1.Dialog, Object.assign({ open: open, onClose: toggleDialog }, { children: [(0, jsx_runtime_1.jsx)(material_1.DialogTitle, { children: t('swap.warning.title.deleteSwap') }), (0, jsx_runtime_1.jsx)(material_1.DialogContent, { children: (0, jsx_runtime_1.jsx)(material_1.DialogContentText, { children: t('swap.warning.message.deleteSwap') }) }), (0, jsx_runtime_1.jsxs)(material_1.DialogActions, { children: [(0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ onClick: toggleDialog }, { children: t('button.cancel') })), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ onClick: handleDeleteRoute, autoFocus: true }, { children: t('button.delete') }))] })] }))] }));
69
68
  };
70
69
  exports.SwapDetailsPage = SwapDetailsPage;
@@ -18,14 +18,13 @@ const SwapHistoryPage = () => {
18
18
  const { account } = (0, providers_1.useWallet)();
19
19
  const swaps = (0, route_1.useSwapHistory)(account.address);
20
20
  const deleteRoutes = (0, stores_1.useRouteStore)((store) => store.deleteRoutes);
21
- const setHeaderAction = (0, Header_1.useSetHeaderAction)();
22
21
  const [open, setOpen] = (0, react_1.useState)(false);
23
22
  const toggleDialog = (0, react_1.useCallback)(() => {
24
23
  setOpen((open) => !open);
25
24
  }, []);
26
25
  (0, react_1.useEffect)(() => {
27
- return setHeaderAction((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ size: "medium", "aria-label": "settings", edge: "end", onClick: toggleDialog }, { children: (0, jsx_runtime_1.jsx)(icons_material_1.DeleteOutline, {}) })));
28
- }, [setHeaderAction, toggleDialog]);
26
+ return Header_1.useHeaderActionStore.getState().setAction((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ size: "medium", "aria-label": "settings", edge: "end", onClick: toggleDialog }, { children: (0, jsx_runtime_1.jsx)(icons_material_1.DeleteOutline, {}) })));
27
+ }, [toggleDialog]);
29
28
  if (!swaps.length) {
30
29
  return (0, jsx_runtime_1.jsx)(SwapHistoryEmpty_1.SwapHistoryEmpty, {});
31
30
  }