@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
@@ -3,14 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SettingsPage = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const material_1 = require("@mui/material");
6
- const AdvancedPreferences_1 = require("./AdvancedPreferences");
7
6
  const ColorSchemeButtonGroup_1 = require("./ColorSchemeButtonGroup");
7
+ const EnabledToolsButton_1 = require("./EnabledToolsButton");
8
8
  const GasPriceSelect_1 = require("./GasPriceSelect");
9
9
  const LanguageSelect_1 = require("./LanguageSelect");
10
+ const ResetSettingsButton_1 = require("./ResetSettingsButton");
10
11
  const RoutePrioritySelect_1 = require("./RoutePrioritySelect");
11
12
  const ShowDestinationWallet_1 = require("./ShowDestinationWallet");
12
13
  const SlippageInput_1 = require("./SlippageInput");
13
14
  const SettingsPage = () => {
14
- return ((0, jsx_runtime_1.jsxs)(material_1.Container, Object.assign({ disableGutters: true }, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ px: 3, pt: 1 }, { children: [(0, jsx_runtime_1.jsx)(ColorSchemeButtonGroup_1.ColorSchemeButtonGroup, {}), (0, jsx_runtime_1.jsx)(LanguageSelect_1.LanguageSelect, {}), (0, jsx_runtime_1.jsx)(RoutePrioritySelect_1.RoutePrioritySelect, {}), (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ sx: { display: 'flex', alignItems: 'center' }, mt: 2 }, { children: [(0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ pr: 2, flex: 1 }, { children: (0, jsx_runtime_1.jsx)(SlippageInput_1.SlippageInput, {}) })), (0, jsx_runtime_1.jsx)(GasPriceSelect_1.GasPriceSelect, {})] }))] })), (0, jsx_runtime_1.jsx)(ShowDestinationWallet_1.ShowDestinationWallet, {}), (0, jsx_runtime_1.jsx)(AdvancedPreferences_1.AdvancedPreferences, {})] })));
15
+ return ((0, jsx_runtime_1.jsxs)(material_1.Container, { disableGutters: true, children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { px: 3, pt: 1, children: [(0, jsx_runtime_1.jsx)(ColorSchemeButtonGroup_1.ColorSchemeButtonGroup, {}), (0, jsx_runtime_1.jsx)(LanguageSelect_1.LanguageSelect, {}), (0, jsx_runtime_1.jsx)(RoutePrioritySelect_1.RoutePrioritySelect, {}), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: { display: 'flex', alignItems: 'center' }, mt: 2, children: [(0, jsx_runtime_1.jsx)(material_1.Box, { pr: 2, flex: 1, children: (0, jsx_runtime_1.jsx)(SlippageInput_1.SlippageInput, {}) }), (0, jsx_runtime_1.jsx)(GasPriceSelect_1.GasPriceSelect, {})] })] }), (0, jsx_runtime_1.jsx)(ShowDestinationWallet_1.ShowDestinationWallet, {}), (0, jsx_runtime_1.jsxs)(material_1.Box, { px: 1.5, children: [(0, jsx_runtime_1.jsx)(EnabledToolsButton_1.EnabledToolsButton, { type: "Bridges" }), (0, jsx_runtime_1.jsx)(EnabledToolsButton_1.EnabledToolsButton, { type: "Exchanges" })] }), (0, jsx_runtime_1.jsx)(ResetSettingsButton_1.ResetSettingsButton, {})] }));
15
16
  };
16
17
  exports.SettingsPage = SettingsPage;
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const ShowDestinationWallet: () => JSX.Element | null;
@@ -14,17 +14,17 @@ const ShowDestinationWallet = () => {
14
14
  const setSendToWallet = (0, stores_1.useSendToWalletStore)((state) => state.setSendToWallet);
15
15
  const setValue = (0, stores_1.useSettingsStore)((state) => state.setValue);
16
16
  const { showDestinationWallet } = (0, stores_1.useSettings)(['showDestinationWallet']);
17
- if (hiddenUI === null || hiddenUI === void 0 ? void 0 : hiddenUI.includes(types_1.HiddenUI.ToAddress)) {
17
+ if (hiddenUI?.includes(types_1.HiddenUI.ToAddress)) {
18
18
  return null;
19
19
  }
20
20
  const onChange = (_, checked) => {
21
21
  setValue('showDestinationWallet', checked);
22
22
  setSendToWallet(false);
23
23
  };
24
- return ((0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ px: 3, pt: 2 }, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ sx: {
24
+ return ((0, jsx_runtime_1.jsx)(material_1.Box, { px: 3, pt: 2, pb: 1.5, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
25
25
  display: 'flex',
26
26
  justifyContent: 'space-between',
27
27
  alignItems: 'center',
28
- } }, { children: [(0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ sx: { display: 'flex', alignItems: 'center' } }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "subtitle1", color: "text.primary", lineHeight: "normal" }, { children: t(`settings.showDestinationWallet`) })) })), (0, jsx_runtime_1.jsx)(Switch_1.Switch, { checked: showDestinationWallet, onChange: onChange })] })) })));
28
+ }, children: [(0, jsx_runtime_1.jsx)(material_1.Box, { sx: { display: 'flex', alignItems: 'center' }, children: (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "subtitle1", color: "text.primary", lineHeight: "normal", children: t(`settings.showDestinationWallet`) }) }), (0, jsx_runtime_1.jsx)(Switch_1.Switch, { checked: showDestinationWallet, onChange: onChange })] }) }));
29
29
  };
30
30
  exports.ShowDestinationWallet = ShowDestinationWallet;
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const SlippageInput: () => JSX.Element;
@@ -22,9 +22,9 @@ const SlippageInput = () => {
22
22
  const { value } = event.target;
23
23
  setValue('slippage', (0, utils_1.formatSlippage)(value, defaultValue.current));
24
24
  };
25
- const value = slippage !== null && slippage !== void 0 ? slippage : '';
26
- return ((0, jsx_runtime_1.jsxs)(Card_1.Card, { children: [(0, jsx_runtime_1.jsx)(Card_1.CardTitle, { children: t(`settings.slippage`) }), (0, jsx_runtime_1.jsx)(material_1.FormControl, Object.assign({ fullWidth: true }, { children: (0, jsx_runtime_1.jsx)(Input_1.Input, { size: "small", placeholder: t(`settings.slippage`), endAdornment: (0, jsx_runtime_1.jsx)(material_1.InputAdornment, Object.assign({ position: "end" }, { children: "%" })), autoComplete: "off", inputProps: {
25
+ const value = slippage ?? '';
26
+ return ((0, jsx_runtime_1.jsxs)(Card_1.Card, { children: [(0, jsx_runtime_1.jsx)(Card_1.CardTitle, { children: t(`settings.slippage`) }), (0, jsx_runtime_1.jsx)(material_1.FormControl, { fullWidth: true, children: (0, jsx_runtime_1.jsx)(Input_1.Input, { size: "small", placeholder: t(`settings.slippage`), endAdornment: (0, jsx_runtime_1.jsx)(material_1.InputAdornment, { position: "end", children: "%" }), autoComplete: "off", inputProps: {
27
27
  inputMode: 'decimal',
28
- }, onChange: handleChange, onBlur: handleBlur, value: value }) }))] }));
28
+ }, onChange: handleChange, onBlur: handleBlur, value: value }) })] }));
29
29
  };
30
30
  exports.SlippageInput = SlippageInput;
@@ -1,13 +1,4 @@
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.SwapDetailsPage = void 0;
13
4
  const jsx_runtime_1 = require("react/jsx-runtime");
@@ -25,11 +16,10 @@ const hooks_1 = require("../../hooks");
25
16
  const stores_1 = require("../../stores");
26
17
  const SwapDetailsPage_style_1 = require("./SwapDetailsPage.style");
27
18
  const SwapDetailsPage = () => {
28
- var _a, _b, _c, _d, _e, _f;
29
19
  const { t, i18n } = (0, react_i18next_1.useTranslation)();
30
20
  const { navigateBack } = (0, hooks_1.useNavigateBack)();
31
21
  const { state } = (0, react_router_dom_1.useLocation)();
32
- const [routeExecution, deleteRoute] = (0, stores_1.useRouteExecutionStore)((store) => [store.routes[state === null || state === void 0 ? void 0 : state.routeId], store.deleteRoute], shallow_1.shallow);
22
+ const [routeExecution, deleteRoute] = (0, stores_1.useRouteExecutionStore)((store) => [store.routes[state?.routeId], store.deleteRoute], shallow_1.shallow);
33
23
  const [open, setOpen] = (0, react_1.useState)(false);
34
24
  const toggleDialog = (0, react_1.useCallback)(() => {
35
25
  setOpen((open) => !open);
@@ -40,26 +30,28 @@ const SwapDetailsPage = () => {
40
30
  deleteRoute(routeExecution.route.id);
41
31
  }
42
32
  };
43
- let supportId = (_d = (_c = (_b = (_a = routeExecution === null || routeExecution === void 0 ? void 0 : routeExecution.route.steps[0].execution) === null || _a === void 0 ? void 0 : _a.process.find((process) => process.txHash)) === null || _b === void 0 ? void 0 : _b.txHash) !== null && _c !== void 0 ? _c : routeExecution === null || routeExecution === void 0 ? void 0 : routeExecution.route.id) !== null && _d !== void 0 ? _d : '';
33
+ let supportId = routeExecution?.route.steps[0].execution?.process.find((process) => process.txHash)?.txHash ??
34
+ routeExecution?.route.id ??
35
+ '';
44
36
  if (process.env.NODE_ENV === 'development') {
45
- supportId += `_${routeExecution === null || routeExecution === void 0 ? void 0 : routeExecution.route.id}`;
37
+ supportId += `_${routeExecution?.route.id}`;
46
38
  }
47
- const copySupportId = () => __awaiter(void 0, void 0, void 0, function* () {
48
- yield navigator.clipboard.writeText(supportId);
49
- });
39
+ const copySupportId = async () => {
40
+ await navigator.clipboard.writeText(supportId);
41
+ };
50
42
  (0, react_1.useEffect)(() => {
51
- return Header_1.useHeaderActionStore.getState().setAction((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ size: "medium", edge: "end", onClick: toggleDialog }, { children: (0, jsx_runtime_1.jsx)(icons_material_1.DeleteOutline, {}) })));
43
+ return Header_1.useHeaderActionStore.getState().setAction((0, jsx_runtime_1.jsx)(material_1.IconButton, { size: "medium", edge: "end", onClick: toggleDialog, children: (0, jsx_runtime_1.jsx)(icons_material_1.DeleteOutline, {}) }));
52
44
  }, [toggleDialog]);
53
- const startedAt = new Date((_f = (_e = routeExecution === null || routeExecution === void 0 ? void 0 : routeExecution.route.steps[0].execution) === null || _e === void 0 ? void 0 : _e.process[0].startedAt) !== null && _f !== void 0 ? _f : 0);
54
- return ((0, jsx_runtime_1.jsxs)(SwapDetailsPage_style_1.Container, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ sx: {
45
+ const startedAt = new Date(routeExecution?.route.steps[0].execution?.process[0].startedAt ?? 0);
46
+ return ((0, jsx_runtime_1.jsxs)(SwapDetailsPage_style_1.Container, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
55
47
  display: 'flex',
56
48
  flex: 1,
57
49
  justifyContent: 'space-between',
58
- }, pb: 1 }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ fontSize: 12 }, { children: new Intl.DateTimeFormat(i18n.language, { dateStyle: 'long' }).format(startedAt) })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ fontSize: 12 }, { children: new Intl.DateTimeFormat(i18n.language, {
50
+ }, pb: 1, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { fontSize: 12, children: new Intl.DateTimeFormat(i18n.language, { dateStyle: 'long' }).format(startedAt) }), (0, jsx_runtime_1.jsx)(material_1.Typography, { fontSize: 12, children: new Intl.DateTimeFormat(i18n.language, {
59
51
  timeStyle: 'short',
60
- }).format(startedAt) }))] })), (0, Step_1.getStepList)(routeExecution === null || routeExecution === void 0 ? void 0 : routeExecution.route), (0, jsx_runtime_1.jsxs)(Card_1.Card, Object.assign({ mt: 2 }, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ sx: {
52
+ }).format(startedAt) })] }), (0, Step_1.getStepList)(routeExecution?.route), (0, jsx_runtime_1.jsxs)(Card_1.Card, { mt: 2, children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
61
53
  display: 'flex',
62
54
  flex: 1,
63
- } }, { 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", onClick: copySupportId }, { 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: supportId }))] })), (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ mt: 2 }, { children: (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ 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.deleteSwapHistory') }) }), (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({ variant: "contained", onClick: handleDeleteRoute, autoFocus: true }, { children: t('button.delete') }))] })] }))] }));
55
+ }, children: [(0, jsx_runtime_1.jsx)(Card_1.CardTitle, { flex: 1, children: t('swap.supportId') }), (0, jsx_runtime_1.jsx)(material_1.Box, { mr: 1, mt: 1, children: (0, jsx_runtime_1.jsx)(material_1.IconButton, { size: "medium", onClick: copySupportId, children: (0, jsx_runtime_1.jsx)(icons_material_1.ContentCopy, { fontSize: "small" }) }) })] }), (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", pt: 1, pb: 2, px: 2, sx: { wordBreak: 'break-all' }, children: supportId })] }), (0, jsx_runtime_1.jsx)(material_1.Box, { mt: 2, children: (0, jsx_runtime_1.jsx)(material_1.Button, { 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, { 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.deleteSwapHistory') }) }), (0, jsx_runtime_1.jsxs)(material_1.DialogActions, { children: [(0, jsx_runtime_1.jsx)(material_1.Button, { onClick: toggleDialog, children: t('button.cancel') }), (0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", onClick: handleDeleteRoute, autoFocus: true, children: t('button.delete') })] })] })] }));
64
56
  };
65
57
  exports.SwapDetailsPage = SwapDetailsPage;
@@ -6,6 +6,6 @@ export declare const Container: import("@emotion/styled").StyledComponent<{
6
6
  fixed?: boolean | undefined;
7
7
  maxWidth?: false | import("@mui/material").Breakpoint | undefined;
8
8
  sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
9
- } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
9
+ } & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
10
10
  ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
11
11
  }, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "maxWidth" | "fixed" | "disableGutters"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
@@ -7,13 +7,13 @@ const material_1 = require("@mui/material");
7
7
  const react_i18next_1 = require("react-i18next");
8
8
  const SwapHistoryEmpty = () => {
9
9
  const { t } = (0, react_i18next_1.useTranslation)();
10
- return ((0, jsx_runtime_1.jsxs)(material_1.Container, Object.assign({ sx: {
10
+ return ((0, jsx_runtime_1.jsxs)(material_1.Container, { sx: {
11
11
  display: 'flex',
12
12
  flex: 1,
13
13
  flexDirection: 'column',
14
14
  alignItems: 'center',
15
15
  justifyContent: 'center',
16
16
  paddingY: 12,
17
- } }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ fontSize: 48 }, { children: (0, jsx_runtime_1.jsx)(icons_material_1.ReceiptLongRounded, { fontSize: "inherit" }) })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ fontSize: 18, fontWeight: 700 }, { children: t('swap.info.title.emptySwapHistory') })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ fontSize: 14, color: "text.secondary", textAlign: "center", mt: 2 }, { children: t('swap.info.message.emptySwapHistory') }))] })));
17
+ }, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { fontSize: 48, children: (0, jsx_runtime_1.jsx)(icons_material_1.ReceiptLongRounded, { fontSize: "inherit" }) }), (0, jsx_runtime_1.jsx)(material_1.Typography, { fontSize: 18, fontWeight: 700, children: t('swap.info.title.emptySwapHistory') }), (0, jsx_runtime_1.jsx)(material_1.Typography, { fontSize: 14, color: "text.secondary", textAlign: "center", mt: 2, children: t('swap.info.message.emptySwapHistory') })] }));
18
18
  };
19
19
  exports.SwapHistoryEmpty = SwapHistoryEmpty;
@@ -9,7 +9,6 @@ const Card_1 = require("../../components/Card");
9
9
  const Token_1 = require("../../components/Token");
10
10
  const utils_1 = require("../../utils");
11
11
  const SwapHistoryItem = ({ route }) => {
12
- var _a, _b, _c, _d, _e, _f, _g, _h;
13
12
  const { i18n } = (0, react_i18next_1.useTranslation)();
14
13
  const navigate = (0, react_router_dom_1.useNavigate)();
15
14
  const handleClick = () => {
@@ -17,15 +16,18 @@ const SwapHistoryItem = ({ route }) => {
17
16
  state: { routeId: route.id },
18
17
  });
19
18
  };
20
- const startedAt = new Date((_b = (_a = route.steps[0].execution) === null || _a === void 0 ? void 0 : _a.process[0].startedAt) !== null && _b !== void 0 ? _b : 0);
21
- const fromToken = Object.assign(Object.assign({}, route.fromToken), { amount: route.fromAmount });
22
- const toToken = Object.assign(Object.assign({}, ((_e = (_d = (_c = route.steps.at(-1)) === null || _c === void 0 ? void 0 : _c.execution) === null || _d === void 0 ? void 0 : _d.toToken) !== null && _e !== void 0 ? _e : route.toToken)), { amount: (_h = (_g = (_f = route.steps.at(-1)) === null || _f === void 0 ? void 0 : _f.execution) === null || _g === void 0 ? void 0 : _g.toAmount) !== null && _h !== void 0 ? _h : route.toAmount });
23
- return ((0, jsx_runtime_1.jsxs)(Card_1.Card, Object.assign({ onClick: handleClick }, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ sx: {
19
+ const startedAt = new Date(route.steps[0].execution?.process[0].startedAt ?? 0);
20
+ const fromToken = { ...route.fromToken, amount: route.fromAmount };
21
+ const toToken = {
22
+ ...(route.steps.at(-1)?.execution?.toToken ?? route.toToken),
23
+ amount: route.steps.at(-1)?.execution?.toAmount ?? route.toAmount,
24
+ };
25
+ return ((0, jsx_runtime_1.jsxs)(Card_1.Card, { onClick: handleClick, children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
24
26
  display: 'flex',
25
27
  flex: 1,
26
28
  justifyContent: 'space-between',
27
- }, pt: 1.75, px: 2 }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ fontSize: 12 }, { children: new Intl.DateTimeFormat(i18n.language, { dateStyle: 'long' }).format(startedAt) })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ fontSize: 12 }, { children: new Intl.DateTimeFormat(i18n.language, {
29
+ }, pt: 1.75, px: 2, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { fontSize: 12, children: new Intl.DateTimeFormat(i18n.language, { dateStyle: 'long' }).format(startedAt) }), (0, jsx_runtime_1.jsx)(material_1.Typography, { fontSize: 12, children: new Intl.DateTimeFormat(i18n.language, {
28
30
  timeStyle: 'short',
29
- }).format(startedAt) }))] })), (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ py: 1 }, { children: [(0, jsx_runtime_1.jsx)(Token_1.Token, { token: fromToken, px: 2, pt: 1, connected: true }), (0, jsx_runtime_1.jsx)(Token_1.TokenDivider, {}), (0, jsx_runtime_1.jsx)(Token_1.Token, { token: toToken, px: 2, pt: 0.5, pb: 1 })] }))] })));
31
+ }).format(startedAt) })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { py: 1, children: [(0, jsx_runtime_1.jsx)(Token_1.Token, { token: fromToken, px: 2, pt: 1, connected: true }), (0, jsx_runtime_1.jsx)(Token_1.TokenDivider, {}), (0, jsx_runtime_1.jsx)(Token_1.Token, { token: toToken, px: 2, pt: 0.5, pb: 1 })] })] }));
30
32
  };
31
33
  exports.SwapHistoryItem = SwapHistoryItem;
@@ -25,12 +25,12 @@ const SwapHistoryPage = () => {
25
25
  }, []);
26
26
  (0, react_1.useEffect)(() => {
27
27
  if (swaps.length) {
28
- return Header_1.useHeaderActionStore.getState().setAction((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ size: "medium", edge: "end", onClick: toggleDialog }, { children: (0, jsx_runtime_1.jsx)(icons_material_1.DeleteOutline, {}) })));
28
+ return Header_1.useHeaderActionStore.getState().setAction((0, jsx_runtime_1.jsx)(material_1.IconButton, { size: "medium", edge: "end", onClick: toggleDialog, children: (0, jsx_runtime_1.jsx)(icons_material_1.DeleteOutline, {}) }));
29
29
  }
30
30
  }, [swaps.length, toggleDialog]);
31
31
  if (!swaps.length) {
32
32
  return (0, jsx_runtime_1.jsx)(SwapHistoryEmpty_1.SwapHistoryEmpty, {});
33
33
  }
34
- return ((0, jsx_runtime_1.jsxs)(material_1.Container, { children: [(0, jsx_runtime_1.jsx)(material_1.Stack, Object.assign({ spacing: 2, mt: 1 }, { children: swaps.length ? (swaps.map(({ route }) => ((0, jsx_runtime_1.jsx)(SwapHistoryItem_1.SwapHistoryItem, { route: route }, route.id)))) : ((0, jsx_runtime_1.jsx)(SwapHistoryEmpty_1.SwapHistoryEmpty, {})) })), (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.deleteSwapHistory') }), (0, jsx_runtime_1.jsx)(material_1.DialogContent, { children: (0, jsx_runtime_1.jsx)(material_1.DialogContentText, { children: t('swap.warning.message.deleteSwapHistory') }) }), (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({ variant: "contained", onClick: () => deleteRoutes('completed'), autoFocus: true }, { children: t('button.delete') }))] })] }))] }));
34
+ return ((0, jsx_runtime_1.jsxs)(material_1.Container, { children: [(0, jsx_runtime_1.jsx)(material_1.Stack, { spacing: 2, mt: 1, children: swaps.length ? (swaps.map(({ route }) => ((0, jsx_runtime_1.jsx)(SwapHistoryItem_1.SwapHistoryItem, { route: route }, route.id)))) : ((0, jsx_runtime_1.jsx)(SwapHistoryEmpty_1.SwapHistoryEmpty, {})) }), (0, jsx_runtime_1.jsxs)(Dialog_1.Dialog, { open: open, onClose: toggleDialog, children: [(0, jsx_runtime_1.jsx)(material_1.DialogTitle, { children: t('swap.warning.title.deleteSwapHistory') }), (0, jsx_runtime_1.jsx)(material_1.DialogContent, { children: (0, jsx_runtime_1.jsx)(material_1.DialogContentText, { children: t('swap.warning.message.deleteSwapHistory') }) }), (0, jsx_runtime_1.jsxs)(material_1.DialogActions, { children: [(0, jsx_runtime_1.jsx)(material_1.Button, { onClick: toggleDialog, children: t('button.cancel') }), (0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", onClick: () => deleteRoutes('completed'), autoFocus: true, children: t('button.delete') })] })] })] }));
35
35
  };
36
36
  exports.SwapHistoryPage = SwapHistoryPage;
@@ -16,60 +16,55 @@ exports.ExchangeRateBottomSheet = (0, react_1.forwardRef)(({ onContinue, onCance
16
16
  const bottomSheetRef = (0, react_1.useRef)(null);
17
17
  const resolverRef = (0, react_1.useRef)();
18
18
  const handleContinue = () => {
19
- var _a;
20
- (_a = ref.current) === null || _a === void 0 ? void 0 : _a.close(true);
21
- onContinue === null || onContinue === void 0 ? void 0 : onContinue();
19
+ ref.current?.close(true);
20
+ onContinue?.();
22
21
  };
23
22
  const handleCancel = (0, react_1.useCallback)(() => {
24
- var _a;
25
- (_a = ref.current) === null || _a === void 0 ? void 0 : _a.close(false);
26
- onCancel === null || onCancel === void 0 ? void 0 : onCancel();
23
+ ref.current?.close(false);
24
+ onCancel?.();
27
25
  }, [onCancel, ref]);
28
26
  const handleClose = (0, react_1.useCallback)(() => {
29
- var _a;
30
- (_a = ref.current) === null || _a === void 0 ? void 0 : _a.close(false, false);
31
- onCancel === null || onCancel === void 0 ? void 0 : onCancel();
27
+ ref.current?.close(false, false);
28
+ onCancel?.();
32
29
  }, [onCancel, ref]);
33
30
  (0, react_1.useImperativeHandle)(ref, () => ({
34
- isOpen: () => { var _a; return (_a = bottomSheetRef.current) === null || _a === void 0 ? void 0 : _a.isOpen(); },
31
+ isOpen: () => bottomSheetRef.current?.isOpen(),
35
32
  open: (resolver, data) => {
36
- var _a;
37
33
  setData(data);
38
34
  resolverRef.current = resolver;
39
- (_a = bottomSheetRef.current) === null || _a === void 0 ? void 0 : _a.open();
35
+ bottomSheetRef.current?.open();
40
36
  },
41
37
  close: (value = false, bottomSheetClose = true) => {
42
- var _a, _b;
43
- (_a = resolverRef.current) === null || _a === void 0 ? void 0 : _a.call(resolverRef, value);
38
+ resolverRef.current?.(value);
44
39
  if (bottomSheetClose) {
45
- (_b = bottomSheetRef.current) === null || _b === void 0 ? void 0 : _b.close();
40
+ bottomSheetRef.current?.close();
46
41
  }
47
42
  },
48
43
  }), []);
49
- return ((0, jsx_runtime_1.jsx)(BottomSheet_1.BottomSheet, Object.assign({ ref: bottomSheetRef, onClose: handleClose }, { children: (0, jsx_runtime_1.jsx)(ExchangeRateBottomSheetContent, { data: data, onContinue: handleContinue, onCancel: handleCancel }) })));
44
+ return ((0, jsx_runtime_1.jsx)(BottomSheet_1.BottomSheet, { ref: bottomSheetRef, onClose: handleClose, children: (0, jsx_runtime_1.jsx)(ExchangeRateBottomSheetContent, { data: data, onContinue: handleContinue, onCancel: handleCancel }) }));
50
45
  });
51
46
  const ExchangeRateBottomSheetContent = ({ data, onCancel, onContinue }) => {
52
47
  const { t } = (0, react_i18next_1.useTranslation)();
53
48
  const ref = (0, react_1.useRef)();
54
49
  (0, hooks_1.useSetContentHeight)(ref);
55
- return ((0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ p: 3, ref: ref }, { children: [(0, jsx_runtime_1.jsxs)(StatusBottomSheet_style_1.IconContainer, { children: [(0, jsx_runtime_1.jsx)(StatusBottomSheet_style_1.IconCircle, Object.assign({ status: "warning", mb: 1 }, { children: (0, jsx_runtime_1.jsx)(icons_material_1.WarningRounded, { color: "warning" }) })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ py: 1, fontSize: 18, fontWeight: 700 }, { children: t('swap.warning.title.rateChanged') }))] }), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ py: 1 }, { children: t('swap.warning.message.rateChanged') })), (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ display: "flex", justifyContent: "space-between", mt: 1 }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { children: t('swap.quotedAmount') }), (0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ fontWeight: 600 }, { children: [t('format.number', {
56
- value: (0, utils_1.formatTokenAmount)(data === null || data === void 0 ? void 0 : data.oldToAmount, data === null || data === void 0 ? void 0 : data.toToken.decimals, 5),
57
- }), ' ', data === null || data === void 0 ? void 0 : data.toToken.symbol] }))] })), (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ display: "flex", justifyContent: "space-between", mt: 0.25 }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { children: t('swap.currentAmount') }), (0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ fontWeight: 600 }, { children: [t('format.number', {
58
- value: (0, utils_1.formatTokenAmount)(data === null || data === void 0 ? void 0 : data.newToAmount, data === null || data === void 0 ? void 0 : data.toToken.decimals, 5),
59
- }), ' ', data === null || data === void 0 ? void 0 : data.toToken.symbol] }))] })), (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ display: "flex", justifyContent: "space-between", mt: 0.25 }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { children: t('swap.rateChange') }), (0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ fontWeight: 600 }, { children: [(0, big_js_1.default)((data === null || data === void 0 ? void 0 : data.newToAmount) || 0)
60
- .div((0, big_js_1.default)((data === null || data === void 0 ? void 0 : data.oldToAmount) || 0))
50
+ return ((0, jsx_runtime_1.jsxs)(material_1.Box, { p: 3, ref: ref, children: [(0, jsx_runtime_1.jsxs)(StatusBottomSheet_style_1.IconContainer, { children: [(0, jsx_runtime_1.jsx)(StatusBottomSheet_style_1.IconCircle, { status: "warning", mb: 1, children: (0, jsx_runtime_1.jsx)(icons_material_1.WarningRounded, { color: "warning" }) }), (0, jsx_runtime_1.jsx)(material_1.Typography, { py: 1, fontSize: 18, fontWeight: 700, children: t('swap.warning.title.rateChanged') })] }), (0, jsx_runtime_1.jsx)(material_1.Typography, { py: 1, children: t('swap.warning.message.rateChanged') }), (0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", justifyContent: "space-between", mt: 1, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { children: t('swap.quotedAmount') }), (0, jsx_runtime_1.jsxs)(material_1.Typography, { fontWeight: 600, children: [t('format.number', {
51
+ value: (0, utils_1.formatTokenAmount)(data?.oldToAmount, data?.toToken.decimals, 5),
52
+ }), ' ', data?.toToken.symbol] })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", justifyContent: "space-between", mt: 0.25, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { children: t('swap.currentAmount') }), (0, jsx_runtime_1.jsxs)(material_1.Typography, { fontWeight: 600, children: [t('format.number', {
53
+ value: (0, utils_1.formatTokenAmount)(data?.newToAmount, data?.toToken.decimals, 5),
54
+ }), ' ', data?.toToken.symbol] })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", justifyContent: "space-between", mt: 0.25, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { children: t('swap.rateChange') }), (0, jsx_runtime_1.jsxs)(material_1.Typography, { fontWeight: 600, children: [(0, big_js_1.default)(data?.newToAmount || 0)
55
+ .div((0, big_js_1.default)(data?.oldToAmount || 0))
61
56
  .minus(1)
62
57
  .mul(100)
63
58
  .round(2, big_js_1.default.roundUp)
64
- .toString(), "%"] }))] })), (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ display: "flex", mt: 3 }, { children: [(0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ variant: "text", onClick: onCancel, fullWidth: true }, { children: t('button.cancel') })), (0, jsx_runtime_1.jsx)(material_1.Box, { display: "flex", p: 1 }), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ variant: "contained", onClick: onContinue, fullWidth: true }, { children: t('button.continue') }))] }))] })));
59
+ .toString(), "%"] })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", mt: 3, children: [(0, jsx_runtime_1.jsx)(material_1.Button, { variant: "text", onClick: onCancel, fullWidth: true, children: t('button.cancel') }), (0, jsx_runtime_1.jsx)(material_1.Box, { display: "flex", p: 1 }), (0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", onClick: onContinue, fullWidth: true, children: t('button.continue') })] })] }));
65
60
  };
66
61
  const getTokenValueLossThreshold = (route) => {
67
62
  if (!route) {
68
63
  return false;
69
64
  }
70
- const fromAmountUSD = (0, big_js_1.default)((route === null || route === void 0 ? void 0 : route.fromAmountUSD) || 0);
71
- const toAmountUSD = (0, big_js_1.default)((route === null || route === void 0 ? void 0 : route.toAmountUSD) || 0);
72
- const gasCostUSD = (0, big_js_1.default)((route === null || route === void 0 ? void 0 : route.gasCostUSD) || 0);
65
+ const fromAmountUSD = (0, big_js_1.default)(route?.fromAmountUSD || 0);
66
+ const toAmountUSD = (0, big_js_1.default)(route?.toAmountUSD || 0);
67
+ const gasCostUSD = (0, big_js_1.default)(route?.gasCostUSD || 0);
73
68
  if (fromAmountUSD.eq(0) && toAmountUSD.eq(0)) {
74
69
  return false;
75
70
  }
@@ -6,6 +6,6 @@ const SwapButton_1 = require("../../components/SwapButton");
6
6
  const hooks_1 = require("../../hooks");
7
7
  const StartSwapButton = ({ onClick, currentRoute, text, }) => {
8
8
  const { insufficientFunds, insufficientGas, isLoading: isGasSufficiencyLoading, } = (0, hooks_1.useGasSufficiency)(currentRoute);
9
- return ((0, jsx_runtime_1.jsx)(SwapButton_1.SwapButton, { onClick: onClick, text: text, currentRoute: currentRoute, disabled: insufficientFunds || !!(insufficientGas === null || insufficientGas === void 0 ? void 0 : insufficientGas.length), loading: isGasSufficiencyLoading }));
9
+ return ((0, jsx_runtime_1.jsx)(SwapButton_1.SwapButton, { onClick: onClick, text: text, currentRoute: currentRoute, disabled: insufficientFunds || !!insufficientGas?.length, loading: isGasSufficiencyLoading }));
10
10
  };
11
11
  exports.StartSwapButton = StartSwapButton;
@@ -16,13 +16,17 @@ const stores_1 = require("../../stores");
16
16
  const utils_1 = require("../../utils");
17
17
  const StatusBottomSheet_style_1 = require("./StatusBottomSheet.style");
18
18
  const StatusBottomSheet = ({ status, route, }) => {
19
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
20
19
  const { t } = (0, react_i18next_1.useTranslation)();
21
20
  const { navigateBack, navigate } = (0, hooks_1.useNavigateBack)();
22
21
  const ref = (0, react_1.useRef)(null);
23
22
  const { getChainById } = (0, hooks_1.useChains)();
24
23
  const { setValue } = (0, react_hook_form_1.useFormContext)();
25
- const toToken = Object.assign(Object.assign({}, ((_c = (_b = (_a = route.steps.at(-1)) === null || _a === void 0 ? void 0 : _a.execution) === null || _b === void 0 ? void 0 : _b.toToken) !== null && _c !== void 0 ? _c : route.toToken)), { amount: (_h = (_f = (_e = (_d = route.steps.at(-1)) === null || _d === void 0 ? void 0 : _d.execution) === null || _e === void 0 ? void 0 : _e.toAmount) !== null && _f !== void 0 ? _f : (_g = route.steps.at(-1)) === null || _g === void 0 ? void 0 : _g.estimate.toAmount) !== null && _h !== void 0 ? _h : route.toAmount });
24
+ const toToken = {
25
+ ...(route.steps.at(-1)?.execution?.toToken ?? route.toToken),
26
+ amount: route.steps.at(-1)?.execution?.toAmount ??
27
+ route.steps.at(-1)?.estimate.toAmount ??
28
+ route.toAmount,
29
+ };
26
30
  const { token, refetch, refetchNewBalance, refetchAllBalances } = (0, hooks_1.useTokenBalance)(toToken, route.toAddress);
27
31
  const clearFromAmount = () => {
28
32
  refetchAllBalances();
@@ -49,9 +53,8 @@ const StatusBottomSheet = ({ status, route, }) => {
49
53
  navigateBack();
50
54
  };
51
55
  const handleClose = () => {
52
- var _a;
53
56
  clearFromAmount();
54
- (_a = ref.current) === null || _a === void 0 ? void 0 : _a.close();
57
+ ref.current?.close();
55
58
  };
56
59
  const handleSeeDetails = () => {
57
60
  handleClose();
@@ -71,7 +74,7 @@ const StatusBottomSheet = ({ status, route, }) => {
71
74
  primaryMessage = t('swap.success.message.swapSuccessful', {
72
75
  amount: token.amount,
73
76
  tokenSymbol: token.symbol,
74
- chainName: (_j = getChainById(token.chainId)) === null || _j === void 0 ? void 0 : _j.name,
77
+ chainName: getChainById(token.chainId)?.name,
75
78
  walletAddress: (0, utils_1.shortenWalletAddress)(route.toAddress),
76
79
  });
77
80
  }
@@ -81,14 +84,14 @@ const StatusBottomSheet = ({ status, route, }) => {
81
84
  case stores_1.RouteExecutionStatus.Done | stores_1.RouteExecutionStatus.Partial: {
82
85
  title = t('swap.success.title.swapPartiallySuccessful');
83
86
  primaryMessage = t('swap.success.message.swapPartiallySuccessful', {
84
- tool: (_k = route.steps.at(-1)) === null || _k === void 0 ? void 0 : _k.toolDetails.name,
85
- tokenSymbol: (_l = route.steps.at(-1)) === null || _l === void 0 ? void 0 : _l.action.toToken.symbol,
87
+ tool: route.steps.at(-1)?.toolDetails.name,
88
+ tokenSymbol: route.steps.at(-1)?.action.toToken.symbol,
86
89
  });
87
90
  if (token) {
88
91
  secondaryMessage = t('swap.success.message.swapSuccessful', {
89
92
  amount: token.amount,
90
93
  tokenSymbol: token.symbol,
91
- chainName: (_m = getChainById(token.chainId)) === null || _m === void 0 ? void 0 : _m.name,
94
+ chainName: getChainById(token.chainId)?.name,
92
95
  walletAddress: (0, utils_1.shortenWalletAddress)(route.toAddress),
93
96
  });
94
97
  }
@@ -98,22 +101,22 @@ const StatusBottomSheet = ({ status, route, }) => {
98
101
  case stores_1.RouteExecutionStatus.Done | stores_1.RouteExecutionStatus.Refunded: {
99
102
  title = t('swap.success.title.refundIssued');
100
103
  primaryMessage = t('swap.success.message.swapPartiallySuccessful', {
101
- tool: (_o = route.steps.at(-1)) === null || _o === void 0 ? void 0 : _o.toolDetails.name,
102
- tokenSymbol: (_p = route.steps.at(-1)) === null || _p === void 0 ? void 0 : _p.action.toToken.symbol,
104
+ tool: route.steps.at(-1)?.toolDetails.name,
105
+ tokenSymbol: route.steps.at(-1)?.action.toToken.symbol,
103
106
  });
104
107
  if (token) {
105
108
  secondaryMessage = t('swap.success.message.swapSuccessful', {
106
109
  amount: token.amount,
107
110
  tokenSymbol: token.symbol,
108
- chainName: (_q = getChainById(token.chainId)) === null || _q === void 0 ? void 0 : _q.name,
111
+ chainName: getChainById(token.chainId)?.name,
109
112
  walletAddress: (0, utils_1.shortenWalletAddress)(route.toAddress),
110
113
  });
111
114
  }
112
115
  break;
113
116
  }
114
117
  case stores_1.RouteExecutionStatus.Failed: {
115
- const step = route.steps.find((step) => { var _a; return ((_a = step.execution) === null || _a === void 0 ? void 0 : _a.status) === 'FAILED'; });
116
- const process = (_r = step === null || step === void 0 ? void 0 : step.execution) === null || _r === void 0 ? void 0 : _r.process.find((process) => process.status === 'FAILED');
118
+ const step = route.steps.find((step) => step.execution?.status === 'FAILED');
119
+ const process = step?.execution?.process.find((process) => process.status === 'FAILED');
117
120
  if (!step || !process) {
118
121
  break;
119
122
  }
@@ -127,22 +130,21 @@ const StatusBottomSheet = ({ status, route, }) => {
127
130
  break;
128
131
  }
129
132
  (0, react_1.useEffect)(() => {
130
- var _a, _b;
131
133
  const hasSuccessFlag = (0, utils_1.hasEnumFlag)(status, stores_1.RouteExecutionStatus.Done);
132
134
  if ((hasSuccessFlag || (0, utils_1.hasEnumFlag)(status, stores_1.RouteExecutionStatus.Failed)) &&
133
- !((_a = ref.current) === null || _a === void 0 ? void 0 : _a.isOpen())) {
135
+ !ref.current?.isOpen()) {
134
136
  if (hasSuccessFlag) {
135
137
  refetchNewBalance();
136
138
  refetch();
137
139
  }
138
- (_b = ref.current) === null || _b === void 0 ? void 0 : _b.open();
140
+ ref.current?.open();
139
141
  }
140
142
  }, [refetch, refetchNewBalance, status]);
141
- return ((0, jsx_runtime_1.jsx)(BottomSheet_1.BottomSheet, Object.assign({ ref: ref }, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ p: 3 }, { children: [(0, jsx_runtime_1.jsxs)(StatusBottomSheet_style_1.IconContainer, { children: [(0, jsx_runtime_1.jsxs)(StatusBottomSheet_style_1.IconCircle, Object.assign({ status: status, mb: 1 }, { children: [status === stores_1.RouteExecutionStatus.Idle ? ((0, jsx_runtime_1.jsx)(icons_material_1.InfoRounded, { color: "primary" })) : null, status === stores_1.RouteExecutionStatus.Done ? ((0, jsx_runtime_1.jsx)(icons_material_1.Done, { color: "success" })) : null, (0, utils_1.hasEnumFlag)(status, stores_1.RouteExecutionStatus.Partial) ||
142
- (0, utils_1.hasEnumFlag)(status, stores_1.RouteExecutionStatus.Refunded) ? ((0, jsx_runtime_1.jsx)(icons_material_1.WarningRounded, { color: "warning" })) : null, (0, utils_1.hasEnumFlag)(status, stores_1.RouteExecutionStatus.Failed) ? ((0, jsx_runtime_1.jsx)(icons_material_1.ErrorRounded, { color: "error" })) : null] })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ py: 1, fontSize: 18, fontWeight: 700 }, { children: title })), (0, utils_1.hasEnumFlag)(status, stores_1.RouteExecutionStatus.Done) ? ((0, jsx_runtime_1.jsx)(Token_1.Token, { token: toToken, py: 1, disableDescription: true })) : null] }), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ py: 1 }, { children: primaryMessage })), secondaryMessage ? ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ py: 1 }, { children: secondaryMessage }))) : null, (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ mt: 2 }, { children: (0, jsx_runtime_1.jsxs)(material_1.Button, Object.assign({ variant: "contained", fullWidth: true, onClick: handlePrimaryButton }, { children: [status === stores_1.RouteExecutionStatus.Idle ? t('button.ok') : null, (0, utils_1.hasEnumFlag)(status, stores_1.RouteExecutionStatus.Done)
143
+ return ((0, jsx_runtime_1.jsx)(BottomSheet_1.BottomSheet, { ref: ref, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { p: 3, children: [(0, jsx_runtime_1.jsxs)(StatusBottomSheet_style_1.IconContainer, { children: [(0, jsx_runtime_1.jsxs)(StatusBottomSheet_style_1.IconCircle, { status: status, mb: 1, children: [status === stores_1.RouteExecutionStatus.Idle ? ((0, jsx_runtime_1.jsx)(icons_material_1.InfoRounded, { color: "primary" })) : null, status === stores_1.RouteExecutionStatus.Done ? ((0, jsx_runtime_1.jsx)(icons_material_1.Done, { color: "success" })) : null, (0, utils_1.hasEnumFlag)(status, stores_1.RouteExecutionStatus.Partial) ||
144
+ (0, utils_1.hasEnumFlag)(status, stores_1.RouteExecutionStatus.Refunded) ? ((0, jsx_runtime_1.jsx)(icons_material_1.WarningRounded, { color: "warning" })) : null, (0, utils_1.hasEnumFlag)(status, stores_1.RouteExecutionStatus.Failed) ? ((0, jsx_runtime_1.jsx)(icons_material_1.ErrorRounded, { color: "error" })) : null] }), (0, jsx_runtime_1.jsx)(material_1.Typography, { py: 1, fontSize: 18, fontWeight: 700, children: title }), (0, utils_1.hasEnumFlag)(status, stores_1.RouteExecutionStatus.Done) ? ((0, jsx_runtime_1.jsx)(Token_1.Token, { token: toToken, py: 1, disableDescription: true })) : null] }), (0, jsx_runtime_1.jsx)(material_1.Typography, { py: 1, children: primaryMessage }), secondaryMessage ? ((0, jsx_runtime_1.jsx)(material_1.Typography, { py: 1, children: secondaryMessage })) : null, (0, jsx_runtime_1.jsx)(material_1.Box, { mt: 2, children: (0, jsx_runtime_1.jsxs)(material_1.Button, { variant: "contained", fullWidth: true, onClick: handlePrimaryButton, children: [status === stores_1.RouteExecutionStatus.Idle ? t('button.ok') : null, (0, utils_1.hasEnumFlag)(status, stores_1.RouteExecutionStatus.Done)
143
145
  ? t('button.done')
144
146
  : null, status === stores_1.RouteExecutionStatus.Failed
145
147
  ? t('button.seeDetails')
146
- : null] })) })), (0, utils_1.hasEnumFlag)(status, stores_1.RouteExecutionStatus.Done) ? ((0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ mt: 2 }, { children: (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ variant: "text", onClick: handleSeeDetails, fullWidth: true }, { children: t('button.seeDetails') })) }))) : null] })) })));
148
+ : null] }) }), (0, utils_1.hasEnumFlag)(status, stores_1.RouteExecutionStatus.Done) ? ((0, jsx_runtime_1.jsx)(material_1.Box, { mt: 2, children: (0, jsx_runtime_1.jsx)(material_1.Button, { variant: "text", onClick: handleSeeDetails, fullWidth: true, children: t('button.seeDetails') }) })) : null] }) }));
147
149
  };
148
150
  exports.StatusBottomSheet = StatusBottomSheet;
@@ -7,7 +7,7 @@ export declare const IconContainer: import("@emotion/styled").StyledComponent<im
7
7
  component?: import("react").ElementType<any> | undefined;
8
8
  ref?: import("react").Ref<unknown> | undefined;
9
9
  sx?: import("@mui/material").SxProps<Theme> | undefined;
10
- } & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
10
+ } & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
11
11
  ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
12
12
  }, "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<Theme>, {}, {}>;
13
13
  export declare const IconCircle: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<Theme> & {
@@ -15,7 +15,7 @@ export declare const IconCircle: import("@emotion/styled").StyledComponent<impor
15
15
  component?: import("react").ElementType<any> | undefined;
16
16
  ref?: import("react").Ref<unknown> | undefined;
17
17
  sx?: import("@mui/material").SxProps<Theme> | undefined;
18
- } & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
18
+ } & 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
  }, "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<Theme> & {
21
21
  status: StatusColor;
@@ -1,13 +1,4 @@
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.SwapPage = void 0;
13
4
  const jsx_runtime_1 = require("react/jsx-runtime");
@@ -28,7 +19,6 @@ const StatusBottomSheet_1 = require("./StatusBottomSheet");
28
19
  const SwapPage_style_1 = require("./SwapPage.style");
29
20
  const TokenValueBottomSheet_1 = require("./TokenValueBottomSheet");
30
21
  const SwapPage = () => {
31
- var _a;
32
22
  const { t } = (0, react_i18next_1.useTranslation)();
33
23
  const { variant } = (0, providers_1.useWidgetConfig)();
34
24
  const { state } = (0, react_router_dom_1.useLocation)();
@@ -37,23 +27,21 @@ const SwapPage = () => {
37
27
  const exchangeRateBottomSheetRef = (0, react_1.useRef)(null);
38
28
  const { setValue } = (0, react_hook_form_1.useFormContext)();
39
29
  const { route, status, executeRoute, restartRoute, deleteRoute } = (0, hooks_1.useRouteExecution)({
40
- routeId: state === null || state === void 0 ? void 0 : state.routeId,
41
- onAcceptExchangeRateUpdate: (_a = exchangeRateBottomSheetRef.current) === null || _a === void 0 ? void 0 : _a.open,
30
+ routeId: state?.routeId,
31
+ onAcceptExchangeRateUpdate: exchangeRateBottomSheetRef.current?.open,
42
32
  });
43
33
  const handleExecuteRoute = (0, react_1.useCallback)(() => {
44
- var _a, _b;
45
- if ((_a = tokenValueBottomSheetRef.current) === null || _a === void 0 ? void 0 : _a.isOpen()) {
46
- (_b = tokenValueBottomSheetRef.current) === null || _b === void 0 ? void 0 : _b.close();
34
+ if (tokenValueBottomSheetRef.current?.isOpen()) {
35
+ tokenValueBottomSheetRef.current?.close();
47
36
  }
48
37
  executeRoute();
49
38
  setValue(providers_1.SwapFormKey.FromAmount, '');
50
39
  }, [executeRoute, setValue]);
51
- const handleSwapClick = () => __awaiter(void 0, void 0, void 0, function* () {
52
- var _b;
40
+ const handleSwapClick = async () => {
53
41
  if (status === stores_1.RouteExecutionStatus.Idle) {
54
42
  const thresholdExceeded = (0, TokenValueBottomSheet_1.getTokenValueLossThreshold)(route);
55
43
  if (thresholdExceeded) {
56
- (_b = tokenValueBottomSheetRef.current) === null || _b === void 0 ? void 0 : _b.open();
44
+ tokenValueBottomSheetRef.current?.open();
57
45
  }
58
46
  else {
59
47
  handleExecuteRoute();
@@ -62,7 +50,7 @@ const SwapPage = () => {
62
50
  if (status === stores_1.RouteExecutionStatus.Failed) {
63
51
  restartRoute();
64
52
  }
65
- });
53
+ };
66
54
  const handleRemoveRoute = () => {
67
55
  navigateBack();
68
56
  deleteRoute();
@@ -80,9 +68,9 @@ const SwapPage = () => {
80
68
  }
81
69
  };
82
70
  return ((0, jsx_runtime_1.jsxs)(SwapPage_style_1.Container, { children: [(0, Step_1.getStepList)(route), status === stores_1.RouteExecutionStatus.Idle ||
83
- status === stores_1.RouteExecutionStatus.Failed ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(GasSufficiencyMessage_1.GasSufficiencyMessage, { route: route, mt: 2 }), (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ mt: 2, display: "flex" }, { children: [(0, jsx_runtime_1.jsx)(StartSwapButton_1.StartSwapButton, { text: getSwapButtonText(), onClick: handleSwapClick, currentRoute: route }), status === stores_1.RouteExecutionStatus.Failed ? ((0, jsx_runtime_1.jsx)(material_1.Tooltip, Object.assign({ title: t('button.removeSwap'), placement: "bottom-end", enterDelay: 400, arrow: true }, { children: (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ onClick: handleRemoveRoute, sx: {
71
+ status === stores_1.RouteExecutionStatus.Failed ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(GasSufficiencyMessage_1.GasSufficiencyMessage, { route: route, mt: 2 }), (0, jsx_runtime_1.jsxs)(material_1.Box, { mt: 2, display: "flex", children: [(0, jsx_runtime_1.jsx)(StartSwapButton_1.StartSwapButton, { text: getSwapButtonText(), onClick: handleSwapClick, currentRoute: route }), status === stores_1.RouteExecutionStatus.Failed ? ((0, jsx_runtime_1.jsx)(material_1.Tooltip, { title: t('button.removeSwap'), placement: "bottom-end", enterDelay: 400, arrow: true, children: (0, jsx_runtime_1.jsx)(material_1.Button, { onClick: handleRemoveRoute, sx: {
84
72
  minWidth: 48,
85
73
  marginLeft: 1,
86
- } }, { children: (0, jsx_runtime_1.jsx)(icons_material_1.Delete, {}) })) }))) : null] }))] })) : null, route && status ? ((0, jsx_runtime_1.jsx)(StatusBottomSheet_1.StatusBottomSheet, { status: status, route: route })) : null, route ? ((0, jsx_runtime_1.jsx)(TokenValueBottomSheet_1.TokenValueBottomSheet, { route: route, ref: tokenValueBottomSheetRef, onContinue: handleExecuteRoute })) : null, route ? ((0, jsx_runtime_1.jsx)(ExchangeRateBottomSheet_1.ExchangeRateBottomSheet, { ref: exchangeRateBottomSheetRef })) : null] }));
74
+ }, children: (0, jsx_runtime_1.jsx)(icons_material_1.Delete, {}) }) })) : null] })] })) : null, route && status ? ((0, jsx_runtime_1.jsx)(StatusBottomSheet_1.StatusBottomSheet, { status: status, route: route })) : null, route ? ((0, jsx_runtime_1.jsx)(TokenValueBottomSheet_1.TokenValueBottomSheet, { route: route, ref: tokenValueBottomSheetRef, onContinue: handleExecuteRoute })) : null, route ? ((0, jsx_runtime_1.jsx)(ExchangeRateBottomSheet_1.ExchangeRateBottomSheet, { ref: exchangeRateBottomSheetRef })) : null] }));
87
75
  };
88
76
  exports.SwapPage = SwapPage;
@@ -6,6 +6,6 @@ export declare const Container: import("@emotion/styled").StyledComponent<{
6
6
  fixed?: boolean | undefined;
7
7
  maxWidth?: false | import("@mui/material").Breakpoint | undefined;
8
8
  sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
9
- } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
9
+ } & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
10
10
  ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
11
11
  }, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "maxWidth" | "fixed" | "disableGutters"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;