@lifi/widget 1.31.0 → 1.32.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 (413) hide show
  1. package/App.js +4 -16
  2. package/AppDrawer.js +13 -7
  3. package/AppDrawer.style.d.ts +2 -2
  4. package/AppDrawer.style.js +1 -1
  5. package/AppProvider.js +2 -2
  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 +2 -2
  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 +3 -3
  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 +3 -3
  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 +1 -1
  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 +1 -1
  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 +2 -2
  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 +1 -1
  72. package/cjs/components/SwapInput/SwapInputAdornment.style.d.ts +1 -1
  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 +2 -2
  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 +2 -2
  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 +17 -28
  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 +10 -19
  120. package/cjs/i18n/en.json +8 -4
  121. package/cjs/icons/LiFiFullLogo.js +1 -1
  122. package/cjs/icons/LiFiLogo.js +1 -1
  123. package/cjs/icons/LiFiToolLogo.js +1 -1
  124. package/cjs/index.d.ts +1 -0
  125. package/cjs/index.js +2 -0
  126. package/cjs/pages/ActiveSwapsPage/ActiveSwapsEmpty.js +2 -2
  127. package/cjs/pages/ActiveSwapsPage/ActiveSwapsPage.d.ts +0 -1
  128. package/cjs/pages/ActiveSwapsPage/ActiveSwapsPage.js +3 -3
  129. package/cjs/pages/MainPage/MainPage.js +1 -1
  130. package/cjs/pages/MainPage/MainPage.style.d.ts +1 -1
  131. package/cjs/pages/MainPage/MainSwapButton.js +3 -12
  132. package/cjs/pages/SelectChainPage/SelectChainPage.js +6 -14
  133. package/cjs/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.d.ts +4 -0
  134. package/cjs/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.js +51 -0
  135. package/cjs/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.style.d.ts +20 -0
  136. package/cjs/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.style.js +8 -0
  137. package/cjs/pages/SelectEnabledToolsPage/index.d.ts +1 -0
  138. package/cjs/pages/SelectEnabledToolsPage/index.js +17 -0
  139. package/cjs/pages/SelectNativeTokenPage/SelectNativeTokenPage.js +4 -3
  140. package/cjs/pages/SelectTokenPage/SearchTokenInput.d.ts +0 -1
  141. package/cjs/pages/SelectTokenPage/SearchTokenInput.js +4 -1
  142. package/cjs/pages/SelectTokenPage/SelectTokenPage.js +2 -3
  143. package/cjs/pages/SelectWalletPage/SelectWalletPage.d.ts +0 -1
  144. package/cjs/pages/SelectWalletPage/SelectWalletPage.js +13 -19
  145. package/cjs/pages/SettingsPage/ColorSchemeButtonGroup.js +3 -3
  146. package/cjs/pages/SettingsPage/ColorSchemeButtonGroup.style.d.ts +1 -1
  147. package/cjs/pages/SettingsPage/EnabledToolsButton.d.ts +4 -0
  148. package/cjs/pages/SettingsPage/EnabledToolsButton.js +25 -0
  149. package/cjs/pages/{SelectChainPage/SelectChainPage.style.d.ts → SettingsPage/EnabledToolsButton.style.d.ts} +1 -1
  150. package/cjs/pages/{SelectChainPage/SelectChainPage.style.js → SettingsPage/EnabledToolsButton.style.js} +7 -10
  151. package/cjs/pages/SettingsPage/GasPriceSelect.d.ts +0 -1
  152. package/cjs/pages/SettingsPage/GasPriceSelect.js +1 -1
  153. package/cjs/pages/SettingsPage/LanguageSelect.js +5 -6
  154. package/cjs/pages/SettingsPage/ResetSettingsButton.d.ts +2 -0
  155. package/cjs/pages/SettingsPage/ResetSettingsButton.js +27 -0
  156. package/cjs/pages/SettingsPage/RoutePrioritySelect.js +4 -4
  157. package/cjs/pages/SettingsPage/SettingsPage.d.ts +0 -1
  158. package/cjs/pages/SettingsPage/SettingsPage.js +3 -2
  159. package/cjs/pages/SettingsPage/ShowDestinationWallet.d.ts +0 -1
  160. package/cjs/pages/SettingsPage/ShowDestinationWallet.js +3 -3
  161. package/cjs/pages/SettingsPage/SlippageInput.d.ts +0 -1
  162. package/cjs/pages/SettingsPage/SlippageInput.js +3 -3
  163. package/cjs/pages/SwapDetailsPage/SwapDetailsPage.js +14 -22
  164. package/cjs/pages/SwapDetailsPage/SwapDetailsPage.style.d.ts +1 -1
  165. package/cjs/pages/SwapHistoryPage/SwapHistoryEmpty.js +2 -2
  166. package/cjs/pages/SwapHistoryPage/SwapHistoryItem.js +9 -7
  167. package/cjs/pages/SwapHistoryPage/SwapHistoryPage.js +2 -2
  168. package/cjs/pages/SwapPage/ExchangeRateBottomSheet.js +21 -26
  169. package/cjs/pages/SwapPage/StartSwapButton.js +1 -1
  170. package/cjs/pages/SwapPage/StatusBottomSheet.js +21 -19
  171. package/cjs/pages/SwapPage/StatusBottomSheet.style.d.ts +2 -2
  172. package/cjs/pages/SwapPage/SwapPage.js +9 -21
  173. package/cjs/pages/SwapPage/SwapPage.style.d.ts +1 -1
  174. package/cjs/pages/SwapPage/TokenValueBottomSheet.js +8 -9
  175. package/cjs/pages/SwapRoutesPage/SwapRoutesPage.js +3 -3
  176. package/cjs/pages/SwapRoutesPage/SwapRoutesPage.style.d.ts +1 -1
  177. package/cjs/providers/I18nProvider/I18nProvider.js +7 -8
  178. package/cjs/providers/SDKProvider/SDKProvider.js +15 -4
  179. package/cjs/providers/SwapFormProvider/SwapFormProvider.js +12 -6
  180. package/cjs/providers/SwapFormProvider/URLSearchParamsBuilder.js +3 -12
  181. package/cjs/providers/TelemetryProvider/TelemetryProvider.js +1 -1
  182. package/cjs/providers/ThemeProvider/ThemeProvider.js +2 -2
  183. package/cjs/providers/WalletProvider/WalletProvider.js +30 -39
  184. package/cjs/providers/WidgetProvider/WidgetProvider.js +18 -23
  185. package/cjs/providers/WidgetProvider/utils.js +2 -3
  186. package/cjs/stores/StoreProvider.js +2 -2
  187. package/cjs/stores/chains/ChainOrderStore.js +2 -14
  188. package/cjs/stores/routes/RouteExecutionStore.js +2 -14
  189. package/cjs/stores/routes/createRouteExecutionStore.js +27 -16
  190. package/cjs/stores/routes/useExecutingRoutesIds.js +2 -5
  191. package/cjs/stores/routes/useSwapHistory.js +3 -6
  192. package/cjs/stores/routes/utils.js +4 -4
  193. package/cjs/stores/settings/SettingsStore.js +10 -20
  194. package/cjs/stores/settings/createSettingsStore.js +29 -25
  195. package/cjs/stores/settings/types.d.ts +6 -6
  196. package/cjs/utils/colors.js +1 -1
  197. package/cjs/utils/format.js +3 -3
  198. package/cjs/utils/index.d.ts +0 -1
  199. package/cjs/utils/index.js +0 -1
  200. package/cjs/utils/navigationRoutes.d.ts +2 -0
  201. package/cjs/utils/navigationRoutes.js +6 -0
  202. package/components/ActiveSwaps/ActiveSwapItem.js +9 -7
  203. package/components/ActiveSwaps/ActiveSwaps.js +3 -3
  204. package/components/ActiveSwaps/ActiveSwaps.style.d.ts +3 -3
  205. package/components/AppContainer.d.ts +2 -2
  206. package/components/AppContainer.js +1 -1
  207. package/components/BottomSheet/BottomSheet.d.ts +1 -1
  208. package/components/BottomSheet/BottomSheet.js +2 -2
  209. package/components/Card/Card.d.ts +2 -2
  210. package/components/Card/CardHeader.d.ts +1 -1
  211. package/components/Card/CardTitle.d.ts +1 -1
  212. package/components/ChainSelect/ChainSelect.d.ts +0 -1
  213. package/components/ChainSelect/ChainSelect.js +3 -4
  214. package/components/ChainSelect/ChainSelect.style.d.ts +3 -3
  215. package/components/ContractComponent/ContractComponent.js +1 -1
  216. package/components/Dialog.js +1 -1
  217. package/components/GasSufficiencyMessage/GasSufficiencyMessage.js +13 -28
  218. package/components/GasSufficiencyMessage/GasSufficiencyMessage.style.d.ts +1 -1
  219. package/components/Header/Header.js +1 -1
  220. package/components/Header/Header.style.d.ts +3 -3
  221. package/components/Header/NavigationHeader.js +6 -2
  222. package/components/Header/WalletHeader.js +12 -22
  223. package/{pages/SelectChainPage/SelectChainPage.style.d.ts → components/ListItemButton.d.ts} +1 -2
  224. package/components/ListItemButton.js +11 -0
  225. package/components/ListItemText.d.ts +2 -0
  226. package/components/ListItemText.js +8 -0
  227. package/components/NFT/NFT.js +2 -14
  228. package/components/NFT/NFT.style.d.ts +1 -1
  229. package/components/NotFound.js +2 -2
  230. package/components/PoweredBy/PoweredBy.js +2 -2
  231. package/components/PoweredBy/PoweredBy.style.d.ts +1 -1
  232. package/components/ProgressToNextUpdate/ProgressToNextUpdate.js +5 -17
  233. package/components/ReverseTokensButton/ReverseTokensButton.js +1 -1
  234. package/components/ReverseTokensButton/ReverseTokensButton.style.d.ts +1 -1
  235. package/components/Select.js +1 -0
  236. package/components/SelectChainAndToken.js +4 -4
  237. package/components/SelectTokenButton/SelectTokenButton.js +2 -2
  238. package/components/SelectTokenButton/SelectTokenButton.style.d.ts +1 -1
  239. package/components/SendToWallet/SendToWallet.js +9 -19
  240. package/components/SendToWallet/SendToWallet.style.d.ts +1 -1
  241. package/components/SendToWallet/SendToWalletButton.js +5 -5
  242. package/components/SmallAvatar.d.ts +3 -3
  243. package/components/Step/CircularProgress.d.ts +0 -1
  244. package/components/Step/CircularProgress.js +2 -2
  245. package/components/Step/CircularProgress.style.d.ts +1 -1
  246. package/components/Step/DestinationWalletAddress.js +6 -7
  247. package/components/Step/GasStepProcess.js +8 -8
  248. package/components/Step/Step.js +4 -5
  249. package/components/Step/StepList.d.ts +0 -1
  250. package/components/Step/StepList.js +8 -4
  251. package/components/Step/StepProcess.js +3 -3
  252. package/components/Step/StepProcess.style.d.ts +2 -2
  253. package/components/Step/StepTimer.js +4 -8
  254. package/components/StepActions/StepActions.js +20 -37
  255. package/components/StepActions/StepActions.style.d.ts +1 -1
  256. package/components/StepDivider/StepDivider.style.d.ts +1 -1
  257. package/components/SwapButton/SwapButton.js +5 -14
  258. package/components/SwapInput/FormPriceHelperText.js +6 -6
  259. package/components/SwapInput/SwapInput.js +4 -16
  260. package/components/SwapInput/SwapInput.style.d.ts +1 -1
  261. package/components/SwapInput/SwapInputAdornment.style.d.ts +1 -1
  262. package/components/SwapInput/SwapInputEndAdornment.d.ts +0 -1
  263. package/components/SwapInput/SwapInputEndAdornment.js +2 -3
  264. package/components/SwapRouteCard/SwapRouteCard.js +9 -25
  265. package/components/SwapRouteCard/SwapRouteCard.style.d.ts +2 -2
  266. package/components/SwapRouteCard/SwapRouteCardSkeleton.js +4 -16
  267. package/components/SwapRouteCard/SwapRouteNotFoundCard.js +2 -2
  268. package/components/SwapRouteCard/utils.js +1 -1
  269. package/components/SwapRoutes/SwapRoutes.js +4 -4
  270. package/components/SwapRoutes/SwapRoutes.style.d.ts +5 -5
  271. package/components/SwapRoutes/SwapRoutesExpanded.d.ts +0 -1
  272. package/components/SwapRoutes/SwapRoutesExpanded.js +3 -3
  273. package/components/TextFitter/TextFitter.js +3 -3
  274. package/components/Token/Token.js +19 -33
  275. package/components/Token/Token.style.d.ts +3 -3
  276. package/components/TokenAvatar/TokenAvatar.js +6 -7
  277. package/components/TokenAvatar/TokenAvatar.style.d.ts +2 -2
  278. package/components/TokenList/TokenList.js +3 -4
  279. package/components/TokenList/TokenList.style.d.ts +2 -2
  280. package/components/TokenList/TokenList.style.js +3 -7
  281. package/components/TokenList/TokenListItem.js +9 -9
  282. package/components/TokenList/TokenNotFound.js +4 -5
  283. package/components/TokenList/VirtualizedTokenList.js +10 -11
  284. package/components/TokenList/useTokenSelect.js +2 -2
  285. package/config/env.js +1 -1
  286. package/config/sentry.js +3 -12
  287. package/config/theme.js +44 -16
  288. package/config/version.d.ts +1 -1
  289. package/config/version.js +1 -1
  290. package/hooks/useChain.js +1 -1
  291. package/hooks/useChains.js +5 -14
  292. package/hooks/useContentHeight.js +1 -2
  293. package/hooks/useFeaturedTokens.js +1 -4
  294. package/hooks/useGasSufficiency.js +28 -34
  295. package/hooks/useProcessMessage.js +7 -11
  296. package/hooks/useRouteExecution.js +17 -28
  297. package/hooks/useSwapRoutes.js +16 -26
  298. package/hooks/useToken.js +2 -2
  299. package/hooks/useTokenAddressBalance.js +1 -2
  300. package/hooks/useTokenBalance.js +24 -27
  301. package/hooks/useTokenBalances.d.ts +1 -1
  302. package/hooks/useTokenBalances.js +8 -20
  303. package/hooks/useTokenSearch.d.ts +1 -1
  304. package/hooks/useTokenSearch.js +12 -21
  305. package/hooks/useTokens.d.ts +1 -1
  306. package/hooks/useTokens.js +36 -38
  307. package/hooks/useTools.d.ts +2 -11
  308. package/hooks/useTools.js +10 -19
  309. package/i18n/en.json +8 -4
  310. package/icons/LiFiFullLogo.js +1 -1
  311. package/icons/LiFiLogo.js +1 -1
  312. package/icons/LiFiToolLogo.js +1 -1
  313. package/index.d.ts +1 -0
  314. package/index.js +2 -0
  315. package/package.json +9 -9
  316. package/pages/ActiveSwapsPage/ActiveSwapsEmpty.js +2 -2
  317. package/pages/ActiveSwapsPage/ActiveSwapsPage.d.ts +0 -1
  318. package/pages/ActiveSwapsPage/ActiveSwapsPage.js +3 -3
  319. package/pages/MainPage/MainPage.js +1 -1
  320. package/pages/MainPage/MainPage.style.d.ts +1 -1
  321. package/pages/MainPage/MainSwapButton.js +3 -12
  322. package/pages/SelectChainPage/SelectChainPage.js +6 -14
  323. package/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.d.ts +4 -0
  324. package/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.js +47 -0
  325. package/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.style.d.ts +20 -0
  326. package/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.style.js +5 -0
  327. package/pages/SelectEnabledToolsPage/index.d.ts +1 -0
  328. package/pages/SelectEnabledToolsPage/index.js +1 -0
  329. package/pages/SelectNativeTokenPage/SelectNativeTokenPage.js +4 -3
  330. package/pages/SelectTokenPage/SearchTokenInput.d.ts +0 -1
  331. package/pages/SelectTokenPage/SearchTokenInput.js +4 -1
  332. package/pages/SelectTokenPage/SelectTokenPage.js +2 -3
  333. package/pages/SelectWalletPage/SelectWalletPage.d.ts +0 -1
  334. package/pages/SelectWalletPage/SelectWalletPage.js +13 -19
  335. package/pages/SettingsPage/ColorSchemeButtonGroup.js +3 -3
  336. package/pages/SettingsPage/ColorSchemeButtonGroup.style.d.ts +1 -1
  337. package/pages/SettingsPage/EnabledToolsButton.d.ts +4 -0
  338. package/pages/SettingsPage/EnabledToolsButton.js +21 -0
  339. package/{cjs/pages/SelectWalletPage/SelectWalletPage.style.d.ts → pages/SettingsPage/EnabledToolsButton.style.d.ts} +1 -1
  340. package/pages/SettingsPage/EnabledToolsButton.style.js +14 -0
  341. package/pages/SettingsPage/GasPriceSelect.d.ts +0 -1
  342. package/pages/SettingsPage/GasPriceSelect.js +1 -1
  343. package/pages/SettingsPage/LanguageSelect.js +5 -6
  344. package/pages/SettingsPage/ResetSettingsButton.d.ts +2 -0
  345. package/pages/SettingsPage/ResetSettingsButton.js +23 -0
  346. package/pages/SettingsPage/RoutePrioritySelect.js +4 -4
  347. package/pages/SettingsPage/SettingsPage.d.ts +0 -1
  348. package/pages/SettingsPage/SettingsPage.js +3 -2
  349. package/pages/SettingsPage/ShowDestinationWallet.d.ts +0 -1
  350. package/pages/SettingsPage/ShowDestinationWallet.js +3 -3
  351. package/pages/SettingsPage/SlippageInput.d.ts +0 -1
  352. package/pages/SettingsPage/SlippageInput.js +3 -3
  353. package/pages/SwapDetailsPage/SwapDetailsPage.js +14 -22
  354. package/pages/SwapDetailsPage/SwapDetailsPage.style.d.ts +1 -1
  355. package/pages/SwapHistoryPage/SwapHistoryEmpty.js +2 -2
  356. package/pages/SwapHistoryPage/SwapHistoryItem.js +9 -7
  357. package/pages/SwapHistoryPage/SwapHistoryPage.js +2 -2
  358. package/pages/SwapPage/ExchangeRateBottomSheet.js +21 -26
  359. package/pages/SwapPage/StartSwapButton.js +1 -1
  360. package/pages/SwapPage/StatusBottomSheet.js +21 -19
  361. package/pages/SwapPage/StatusBottomSheet.style.d.ts +2 -2
  362. package/pages/SwapPage/SwapPage.js +9 -21
  363. package/pages/SwapPage/SwapPage.style.d.ts +1 -1
  364. package/pages/SwapPage/TokenValueBottomSheet.js +8 -9
  365. package/pages/SwapRoutesPage/SwapRoutesPage.js +3 -3
  366. package/pages/SwapRoutesPage/SwapRoutesPage.style.d.ts +1 -1
  367. package/providers/I18nProvider/I18nProvider.js +7 -8
  368. package/providers/SDKProvider/SDKProvider.js +15 -4
  369. package/providers/SwapFormProvider/SwapFormProvider.js +12 -6
  370. package/providers/SwapFormProvider/URLSearchParamsBuilder.js +3 -12
  371. package/providers/TelemetryProvider/TelemetryProvider.js +1 -1
  372. package/providers/ThemeProvider/ThemeProvider.js +2 -2
  373. package/providers/WalletProvider/WalletProvider.js +30 -39
  374. package/providers/WidgetProvider/WidgetProvider.js +18 -23
  375. package/providers/WidgetProvider/utils.js +2 -3
  376. package/stores/StoreProvider.js +2 -2
  377. package/stores/chains/ChainOrderStore.js +2 -14
  378. package/stores/routes/RouteExecutionStore.js +2 -14
  379. package/stores/routes/createRouteExecutionStore.js +27 -16
  380. package/stores/routes/useExecutingRoutesIds.js +2 -5
  381. package/stores/routes/useSwapHistory.js +3 -6
  382. package/stores/routes/utils.js +4 -4
  383. package/stores/settings/SettingsStore.js +10 -20
  384. package/stores/settings/createSettingsStore.js +29 -25
  385. package/stores/settings/types.d.ts +6 -6
  386. package/tsconfig.cjs.tsbuildinfo +1 -1
  387. package/utils/colors.js +1 -1
  388. package/utils/format.js +3 -3
  389. package/utils/index.d.ts +0 -1
  390. package/utils/index.js +0 -1
  391. package/utils/navigationRoutes.d.ts +2 -0
  392. package/utils/navigationRoutes.js +6 -0
  393. package/cjs/pages/SettingsPage/AdvancedPreferences.d.ts +0 -2
  394. package/cjs/pages/SettingsPage/AdvancedPreferences.js +0 -24
  395. package/cjs/pages/SettingsPage/EnabledBridgesSelect.d.ts +0 -2
  396. package/cjs/pages/SettingsPage/EnabledBridgesSelect.js +0 -24
  397. package/cjs/pages/SettingsPage/EnabledExchangesSelect.d.ts +0 -2
  398. package/cjs/pages/SettingsPage/EnabledExchangesSelect.js +0 -24
  399. package/cjs/utils/deepClone.d.ts +0 -1
  400. package/cjs/utils/deepClone.js +0 -7
  401. package/pages/SelectChainPage/SelectChainPage.style.js +0 -17
  402. package/pages/SelectNativeTokenPage/SelectNativeTokenPage.style.d.ts +0 -21
  403. package/pages/SelectNativeTokenPage/SelectNativeTokenPage.style.js +0 -17
  404. package/pages/SelectWalletPage/SelectWalletPage.style.d.ts +0 -21
  405. package/pages/SelectWalletPage/SelectWalletPage.style.js +0 -17
  406. package/pages/SettingsPage/AdvancedPreferences.d.ts +0 -2
  407. package/pages/SettingsPage/AdvancedPreferences.js +0 -20
  408. package/pages/SettingsPage/EnabledBridgesSelect.d.ts +0 -2
  409. package/pages/SettingsPage/EnabledBridgesSelect.js +0 -20
  410. package/pages/SettingsPage/EnabledExchangesSelect.d.ts +0 -2
  411. package/pages/SettingsPage/EnabledExchangesSelect.js +0 -20
  412. package/utils/deepClone.d.ts +0 -1
  413. package/utils/deepClone.js +0 -3
@@ -1,12 +1,3 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
11
2
  import { ContentCopy as ContentCopyIcon, ExpandMore as ExpandMoreIcon, OpenInNewOutlined as OpenInNewOutlinedIcon, PowerSettingsNewRounded as PowerSettingsIcon, WalletOutlined as WalletOutlinedIcon, } from '@mui/icons-material';
12
3
  import { Avatar, Button, MenuItem } from '@mui/material';
@@ -20,7 +11,7 @@ import { HeaderAppBar, WalletButton } from './Header.style';
20
11
  import { WalletMenu } from './WalletMenu';
21
12
  export const WalletHeader = () => {
22
13
  const { account } = useWallet();
23
- return (_jsx(HeaderAppBar, Object.assign({ elevation: 0, sx: { justifyContent: 'flex-end' } }, { children: account.isActive ? _jsx(ConnectedButton, {}) : _jsx(ConnectButton, {}) })));
14
+ return (_jsx(HeaderAppBar, { elevation: 0, sx: { justifyContent: 'flex-end' }, children: account.isActive ? _jsx(ConnectedButton, {}) : _jsx(ConnectButton, {}) }));
24
15
  };
25
16
  const ConnectButton = () => {
26
17
  const { t } = useTranslation();
@@ -28,16 +19,16 @@ const ConnectButton = () => {
28
19
  const config = useWidgetConfig();
29
20
  const { connect: connectWallet } = useWallet();
30
21
  const navigate = useNavigate();
31
- const connect = () => __awaiter(void 0, void 0, void 0, function* () {
22
+ const connect = async () => {
32
23
  if (config.walletManagement) {
33
- yield connectWallet();
24
+ await connectWallet();
34
25
  return;
35
26
  }
36
27
  navigate(navigationRoutes.selectWallet);
37
- });
38
- return (_jsx(WalletButton, Object.assign({ endIcon: _jsx(WalletOutlinedIcon, {}), onClick: !pathname.includes(navigationRoutes.selectWallet) ? connect : undefined, sx: {
28
+ };
29
+ return (_jsx(WalletButton, { endIcon: _jsx(WalletOutlinedIcon, {}), onClick: !pathname.includes(navigationRoutes.selectWallet) ? connect : undefined, sx: {
39
30
  marginRight: -1.25,
40
- } }, { children: t(`button.connectWallet`) })));
31
+ }, children: t(`button.connectWallet`) }));
41
32
  };
42
33
  const ConnectedButton = () => {
43
34
  const { t } = useTranslation();
@@ -55,14 +46,13 @@ const ConnectedButton = () => {
55
46
  disconnect();
56
47
  handleClose();
57
48
  };
58
- const handleCopyAddress = () => __awaiter(void 0, void 0, void 0, function* () {
59
- var _a;
60
- yield navigator.clipboard.writeText((_a = account.address) !== null && _a !== void 0 ? _a : '');
49
+ const handleCopyAddress = async () => {
50
+ await navigator.clipboard.writeText(account.address ?? '');
61
51
  handleClose();
62
- });
63
- return (_jsxs(_Fragment, { children: [_jsx(WalletButton, Object.assign({ endIcon: _jsx(ExpandMoreIcon, {}), startIcon: _jsx(Avatar, Object.assign({ src: chain === null || chain === void 0 ? void 0 : chain.logoURI, alt: chain === null || chain === void 0 ? void 0 : chain.key, sx: { width: 24, height: 24 } }, { children: chain === null || chain === void 0 ? void 0 : chain.name[0] })), sx: {
52
+ };
53
+ return (_jsxs(_Fragment, { children: [_jsx(WalletButton, { endIcon: _jsx(ExpandMoreIcon, {}), startIcon: _jsx(Avatar, { src: chain?.logoURI, alt: chain?.key, sx: { width: 24, height: 24 }, children: chain?.name[0] }), sx: {
64
54
  marginRight: -1.25,
65
- }, onClick: handleClick }, { children: walletAddress })), _jsxs(WalletMenu, Object.assign({ anchorEl: anchorEl, open: Boolean(anchorEl), onClose: handleClose }, { children: [_jsxs(MenuItem, Object.assign({ onClick: handleCopyAddress, disableRipple: true }, { children: [_jsx(ContentCopyIcon, {}), t(`button.copyAddress`)] })), _jsxs(MenuItem, Object.assign({ component: "a", onClick: handleClose, href: `${chain === null || chain === void 0 ? void 0 : chain.metamask.blockExplorerUrls[0]}address/${account.address}`, target: "_blank", disableRipple: true }, { children: [_jsx(OpenInNewOutlinedIcon, {}), t(`button.viewOnExplorer`)] })), _jsx(Button, Object.assign({ onClick: handleDisconnect, fullWidth: true, startIcon: _jsx(PowerSettingsIcon, {}), sx: {
55
+ }, onClick: handleClick, children: walletAddress }), _jsxs(WalletMenu, { anchorEl: anchorEl, open: Boolean(anchorEl), onClose: handleClose, children: [_jsxs(MenuItem, { onClick: handleCopyAddress, disableRipple: true, children: [_jsx(ContentCopyIcon, {}), t(`button.copyAddress`)] }), _jsxs(MenuItem, { component: "a", onClick: handleClose, href: `${chain?.metamask.blockExplorerUrls[0]}address/${account.address}`, target: "_blank", disableRipple: true, children: [_jsx(OpenInNewOutlinedIcon, {}), t(`button.viewOnExplorer`)] }), _jsx(Button, { onClick: handleDisconnect, fullWidth: true, startIcon: _jsx(PowerSettingsIcon, {}), sx: {
66
56
  marginTop: 1,
67
- } }, { children: t(`button.disconnect`) }))] }))] }));
57
+ }, children: t(`button.disconnect`) })] })] }));
68
58
  };
@@ -15,7 +15,6 @@ export declare const ListItemButton: import("@emotion/styled").StyledComponent<i
15
15
  tabIndex?: number | undefined;
16
16
  TouchRippleProps?: Partial<import("@mui/material/ButtonBase/TouchRipple").TouchRippleProps> | undefined;
17
17
  touchRippleRef?: import("react").Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions> | undefined;
18
- }, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
18
+ }, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
19
19
  ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
20
20
  }, "className" | "style" | "classes" | "tabIndex" | "children" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "TouchRippleProps" | "touchRippleRef" | "alignItems" | "autoFocus" | "dense" | "divider" | "selected" | "disableGutters"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
21
- 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,11 @@
1
+ import { ListItemButton as MuiListItemButton } from '@mui/material';
2
+ import { styled } from '@mui/material/styles';
3
+ import { getContrastAlphaColor } from '../utils';
4
+ export const ListItemButton = styled(MuiListItemButton)(({ theme }) => ({
5
+ borderRadius: theme.shape.borderRadius,
6
+ paddingLeft: theme.spacing(1.5),
7
+ height: 56,
8
+ '&:hover': {
9
+ backgroundColor: getContrastAlphaColor(theme, '4%'),
10
+ },
11
+ }));
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ 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,8 @@
1
+ import { ListItemText as MuiListItemText } from '@mui/material';
2
+ import { listItemTextClasses } from '@mui/material/ListItemText';
3
+ import { styled } from '@mui/material/styles';
4
+ export const ListItemText = styled(MuiListItemText)(({ theme }) => ({
5
+ [`.${listItemTextClasses.primary}`]: {
6
+ fontWeight: 400,
7
+ },
8
+ }));
@@ -1,14 +1,3 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
11
- };
12
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
2
  import { Box, Link, Skeleton, Typography } from '@mui/material';
14
3
  import { useEffect } from 'react';
@@ -17,8 +6,7 @@ import { useTranslation } from 'react-i18next';
17
6
  import { SwapFormKey } from '../../providers';
18
7
  import { Token } from '../Token';
19
8
  import { PreviewAvatar } from './NFT.style';
20
- export const NFT = (_a) => {
21
- var { imageUrl, isLoading, collectonName, assetName, owner, token, contract } = _a, props = __rest(_a, ["imageUrl", "isLoading", "collectonName", "assetName", "owner", "token", "contract"]);
9
+ export const NFT = ({ imageUrl, isLoading, collectonName, assetName, owner, token, contract, ...props }) => {
22
10
  const { t } = useTranslation();
23
11
  const { setValue } = useFormContext();
24
12
  useEffect(() => {
@@ -33,5 +21,5 @@ export const NFT = (_a) => {
33
21
  setValue(SwapFormKey.ToContractGasLimit, contract.gasLimit);
34
22
  }
35
23
  }, [contract, setValue, token]);
36
- return (_jsxs(Box, Object.assign({ p: 2 }, { children: [_jsxs(Box, Object.assign({ display: "flex" }, { children: [isLoading ? (_jsx(Skeleton, { width: 96, height: 96, variant: "rectangular", sx: { borderRadius: 1 } })) : (_jsx(PreviewAvatar, { src: imageUrl })), _jsxs(Box, Object.assign({ ml: 2 }, { children: [isLoading ? (_jsx(Skeleton, { width: 144, height: 21, variant: "text" })) : (_jsx(Typography, Object.assign({ fontSize: 14, color: "text.secondary" }, { children: collectonName }))), isLoading ? (_jsx(Skeleton, { width: 112, height: 27, variant: "text" })) : (_jsx(Typography, Object.assign({ fontSize: 18, fontWeight: 600 }, { children: assetName }))), isLoading ? (_jsx(Skeleton, { width: 128, height: 21, variant: "text" })) : owner ? (_jsxs(Typography, Object.assign({ fontSize: 14, color: "text.secondary" }, { children: [t('swap.ownedBy'), ' ', _jsx(Link, Object.assign({ href: owner.url, target: "_blank", underline: "none", color: "primary" }, { children: owner.name }))] }))) : null] }))] })), _jsx(Token, { token: token, isLoading: isLoading, mt: 2 })] })));
24
+ return (_jsxs(Box, { p: 2, children: [_jsxs(Box, { display: "flex", children: [isLoading ? (_jsx(Skeleton, { width: 96, height: 96, variant: "rectangular", sx: { borderRadius: 1 } })) : (_jsx(PreviewAvatar, { src: imageUrl })), _jsxs(Box, { ml: 2, children: [isLoading ? (_jsx(Skeleton, { width: 144, height: 21, variant: "text" })) : (_jsx(Typography, { fontSize: 14, color: "text.secondary", children: collectonName })), isLoading ? (_jsx(Skeleton, { width: 112, height: 27, variant: "text" })) : (_jsx(Typography, { fontSize: 18, fontWeight: 600, children: assetName })), isLoading ? (_jsx(Skeleton, { width: 128, height: 21, variant: "text" })) : owner ? (_jsxs(Typography, { fontSize: 14, color: "text.secondary", children: [t('swap.ownedBy'), ' ', _jsx(Link, { href: owner.url, target: "_blank", underline: "none", color: "primary", children: owner.name })] })) : null] })] }), _jsx(Token, { token: token, isLoading: isLoading, mt: 2 })] }));
37
25
  };
@@ -11,6 +11,6 @@ export declare const PreviewAvatar: import("@emotion/styled").StyledComponent<{
11
11
  srcSet?: string | undefined;
12
12
  sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
13
13
  variant?: "square" | "circular" | "rounded" | undefined;
14
- } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
14
+ } & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
15
15
  ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
16
16
  }, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "variant" | "alt" | "imgProps" | "sizes" | "src" | "srcSet"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
@@ -4,12 +4,12 @@ import { Box, Typography } from '@mui/material';
4
4
  import { useTranslation } from 'react-i18next';
5
5
  export const NotFound = () => {
6
6
  const { t } = useTranslation();
7
- return (_jsxs(Box, Object.assign({ sx: {
7
+ return (_jsxs(Box, { sx: {
8
8
  display: 'flex',
9
9
  justifyContent: 'center',
10
10
  alignItems: 'center',
11
11
  flexDirection: 'column',
12
12
  flex: 1,
13
13
  padding: 3,
14
- } }, { children: [_jsx(Typography, Object.assign({ fontSize: 48 }, { children: _jsx(BlockIcon, { fontSize: "inherit" }) })), _jsx(Typography, Object.assign({ fontSize: 18, fontWeight: 700 }, { children: t('tooltip.notFound.title') })), _jsx(Typography, Object.assign({ fontSize: 14, color: "text.secondary", textAlign: "center", mt: 2 }, { children: t('tooltip.notFound.text') }))] })));
14
+ }, children: [_jsx(Typography, { fontSize: 48, children: _jsx(BlockIcon, { fontSize: "inherit" }) }), _jsx(Typography, { fontSize: 18, fontWeight: 700, children: t('tooltip.notFound.title') }), _jsx(Typography, { fontSize: 14, color: "text.secondary", textAlign: "center", mt: 2, children: t('tooltip.notFound.text') })] }));
15
15
  };
@@ -14,9 +14,9 @@ export const PoweredBy = () => {
14
14
  pathname.includes(navigationRoutes.toToken)) {
15
15
  return null;
16
16
  }
17
- return (_jsx(Box, Object.assign({ px: 3, py: (hiddenUI === null || hiddenUI === void 0 ? void 0 : hiddenUI.includes(HiddenUI.PoweredBy)) ? 1 : 2, sx: {
17
+ return (_jsx(Box, { px: 3, py: hiddenUI?.includes(HiddenUI.PoweredBy) ? 1 : 2, sx: {
18
18
  display: 'flex',
19
19
  alignItems: 'flex-end',
20
20
  justifyContent: 'flex-end',
21
- } }, { children: !(hiddenUI === null || hiddenUI === void 0 ? void 0 : hiddenUI.includes(HiddenUI.PoweredBy)) ? (_jsx(Tooltip, Object.assign({ title: `v${version}`, placement: "top", enterDelay: 3000, arrow: true }, { children: _jsxs(Link, Object.assign({ href: "https://li.fi", target: "_blank", underline: "none", color: "text.primary" }, { children: [_jsx(Typography, Object.assign({ color: "text.secondary", fontSize: 12, px: 0.5 }, { children: "Powered by" })), _jsx(LiFiLogo, { variant: "full", style: { height: 16, width: 42 } })] })) }))) : null })));
21
+ }, children: !hiddenUI?.includes(HiddenUI.PoweredBy) ? (_jsx(Tooltip, { title: `v${version}`, placement: "top", enterDelay: 3000, arrow: true, children: _jsxs(Link, { href: "https://li.fi", target: "_blank", underline: "none", color: "text.primary", children: [_jsx(Typography, { color: "text.secondary", fontSize: 12, px: 0.5, children: "Powered by" }), _jsx(LiFiLogo, { variant: "full", style: { height: 16, width: 42 } })] }) })) : null }));
22
22
  };
@@ -7,6 +7,6 @@ export declare const Link: import("@emotion/styled").StyledComponent<Omit<import
7
7
  TypographyClasses?: (Partial<import("@mui/material").TypographyClasses> & Partial<import("@mui/material").ClassNameMap<never>>) | undefined;
8
8
  underline?: "none" | "always" | "hover" | undefined;
9
9
  variant?: "button" | "caption" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "inherit" | "subtitle1" | "subtitle2" | "body1" | "body2" | "overline" | "@supports (font-variation-settings: normal)" | undefined;
10
- } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "key" | keyof import("react").AnchorHTMLAttributes<HTMLAnchorElement>> & {
10
+ } & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
11
11
  ref?: ((instance: HTMLAnchorElement | null) => void) | import("react").RefObject<HTMLAnchorElement> | null | undefined;
12
12
  }, keyof import("@mui/material/OverridableComponent").CommonProps | "p" | "slot" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "children" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "sx" | "key" | "download" | "href" | "hrefLang" | "media" | "ping" | "rel" | "target" | "type" | "referrerPolicy" | "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" | "variant" | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping" | "underline" | "TypographyClasses"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
@@ -1,14 +1,3 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
11
- };
12
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
2
  import { Box, CircularProgress, IconButton, Tooltip } from '@mui/material';
14
3
  import { useEffect, useState } from 'react';
@@ -17,8 +6,7 @@ const getProgressValue = (updatedAt, timeToUpdate) => updatedAt
17
6
  ? Math.min(100, ((Date.now() - updatedAt) / timeToUpdate) * 100)
18
7
  : 0;
19
8
  const getSecondsToUpdate = (updatedAt, timeToUpdate) => Math.max(Math.round((timeToUpdate - (Date.now() - updatedAt)) / 1000), 0);
20
- export const ProgressToNextUpdate = (_a) => {
21
- var { updatedAt, timeToUpdate, isLoading, onClick } = _a, other = __rest(_a, ["updatedAt", "timeToUpdate", "isLoading", "onClick"]);
9
+ export const ProgressToNextUpdate = ({ updatedAt, timeToUpdate, isLoading, onClick, ...other }) => {
22
10
  const { t } = useTranslation();
23
11
  const [value, setValue] = useState(() => getProgressValue(updatedAt, timeToUpdate));
24
12
  useEffect(() => {
@@ -37,15 +25,15 @@ export const ProgressToNextUpdate = (_a) => {
37
25
  setValue(0);
38
26
  }
39
27
  }, [isLoading]);
40
- return (_jsx(IconButton, Object.assign({ onClick: onClick, disabled: isLoading }, other, { children: _jsx(Tooltip, Object.assign({ title: t('tooltip.progressToNextUpdate', {
28
+ return (_jsx(IconButton, { onClick: onClick, disabled: isLoading, ...other, children: _jsx(Tooltip, { title: t('tooltip.progressToNextUpdate', {
41
29
  value: getSecondsToUpdate(updatedAt, timeToUpdate),
42
- }), placement: "top", enterDelay: 400, arrow: true }, { children: _jsxs(Box, Object.assign({ sx: {
30
+ }), placement: "top", enterDelay: 400, arrow: true, children: _jsxs(Box, { sx: {
43
31
  display: 'grid',
44
32
  position: 'relative',
45
33
  placeItems: 'center',
46
34
  width: 24,
47
35
  height: 24,
48
- } }, { children: [_jsx(CircularProgress, { variant: "determinate", size: 24, value: 100, sx: (theme) => ({
36
+ }, children: [_jsx(CircularProgress, { variant: "determinate", size: 24, value: 100, sx: (theme) => ({
49
37
  position: 'absolute',
50
38
  color: theme.palette.mode === 'light'
51
39
  ? theme.palette.grey[300]
@@ -55,5 +43,5 @@ export const ProgressToNextUpdate = (_a) => {
55
43
  color: theme.palette.mode === 'light'
56
44
  ? theme.palette.primary.main
57
45
  : theme.palette.primary.light,
58
- }) })] })) })) })));
46
+ }) })] }) }) }));
59
47
  };
@@ -18,5 +18,5 @@ export const ReverseTokensButton = ({ vertical, }) => {
18
18
  setValue(SwapFormKey.ToChain, fromChain, { shouldTouch: true });
19
19
  setValue(SwapFormKey.ToToken, fromToken, { shouldTouch: true });
20
20
  };
21
- return (_jsx(IconButton, Object.assign({ onClick: handleClick, size: "small" }, { children: vertical ? _jsx(SwapVertIcon, {}) : _jsx(SwapHorizIcon, {}) })));
21
+ return (_jsx(IconButton, { onClick: handleClick, size: "small", children: vertical ? _jsx(SwapVertIcon, {}) : _jsx(SwapHorizIcon, {}) }));
22
22
  };
@@ -24,6 +24,6 @@ export declare const IconButton: import("@emotion/styled").StyledComponent<{
24
24
  tabIndex?: number | undefined;
25
25
  TouchRippleProps?: Partial<import("@mui/material/ButtonBase/TouchRipple").TouchRippleProps> | undefined;
26
26
  touchRippleRef?: import("react").Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions> | undefined;
27
- }, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "key" | keyof import("react").ButtonHTMLAttributes<HTMLButtonElement>> & {
27
+ }, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
28
28
  ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
29
29
  }, keyof import("@mui/material/OverridableComponent").CommonProps | "tabIndex" | "color" | "children" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "size" | "edge"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
@@ -17,6 +17,7 @@ export const Select = styled(MuiSelect, {
17
17
  },
18
18
  [`.${selectClasses.icon}`]: {
19
19
  right: 10,
20
+ color: theme.palette.text.primary,
20
21
  },
21
22
  [`.${listItemIconClasses.root}`]: {
22
23
  minWidth: 38,
@@ -17,8 +17,8 @@ export const SelectChainAndToken = (props) => {
17
17
  ],
18
18
  });
19
19
  const disabledReverse = variant === 'refuel' ||
20
- (disabledUI === null || disabledUI === void 0 ? void 0 : disabledUI.includes(DisabledUI.FromToken)) ||
21
- (disabledUI === null || disabledUI === void 0 ? void 0 : disabledUI.includes(DisabledUI.ToToken));
20
+ disabledUI?.includes(DisabledUI.FromToken) ||
21
+ disabledUI?.includes(DisabledUI.ToToken);
22
22
  const nftVariant = variant === 'nft';
23
23
  const isCompact = fromChain &&
24
24
  toChain &&
@@ -26,9 +26,9 @@ export const SelectChainAndToken = (props) => {
26
26
  toToken &&
27
27
  !prefersNarrowView &&
28
28
  !nftVariant;
29
- return (_jsxs(Box, Object.assign({ sx: { display: 'flex', flexDirection: isCompact ? 'row' : 'column' } }, props, { children: [_jsx(SelectTokenButton, { formType: "from", compact: isCompact }), !nftVariant ? (_jsx(Box, Object.assign({ sx: {
29
+ return (_jsxs(Box, { sx: { display: 'flex', flexDirection: isCompact ? 'row' : 'column' }, ...props, children: [_jsx(SelectTokenButton, { formType: "from", compact: isCompact }), !nftVariant ? (_jsx(Box, { sx: {
30
30
  display: 'flex',
31
31
  justifyContent: 'center',
32
32
  alignItems: 'center',
33
- }, m: !disabledReverse ? -1.125 : 1 }, { children: !disabledReverse ? (_jsx(ReverseTokensButton, { vertical: !isCompact })) : null }))) : null, !nftVariant ? (_jsx(SelectTokenButton, { formType: "to", compact: isCompact })) : null] })));
33
+ }, m: !disabledReverse ? -1.125 : 1, children: !disabledReverse ? (_jsx(ReverseTokensButton, { vertical: !isCompact })) : null })) : null, !nftVariant ? (_jsx(SelectTokenButton, { formType: "to", compact: isCompact })) : null] }));
34
34
  };
@@ -27,12 +27,12 @@ export const SelectTokenButton = ({ formType, compact }) => {
27
27
  : navigationRoutes.toToken);
28
28
  };
29
29
  const isSelected = !!(chain && token);
30
- const onClick = !(disabledUI === null || disabledUI === void 0 ? void 0 : disabledUI.includes(tokenKey)) ? handleClick : undefined;
30
+ const onClick = !disabledUI?.includes(tokenKey) ? handleClick : undefined;
31
31
  const defaultPlaceholder = formType === 'to' && variant === 'refuel'
32
32
  ? t(`header.selectChain`)
33
33
  : t(`swap.selectChainAndToken`);
34
34
  const cardTitle = formType === 'from' && variant === 'nft'
35
35
  ? t(`swap.payWith`)
36
36
  : t(`swap.${formType}`);
37
- return (_jsxs(Card, Object.assign({ flex: 1, onClick: onClick }, { children: [_jsx(CardTitle, { children: cardTitle }), chainId && tokenAddress && (isChainLoading || isTokenLoading) ? (_jsx(SelectTokenCardHeader, { avatar: _jsx(Skeleton, { variant: "circular", width: 32, height: 32 }), title: _jsx(Skeleton, { variant: "text", width: 64, height: 24 }), subheader: _jsx(Skeleton, { variant: "text", width: 64, height: 16 }), compact: compact })) : (_jsx(SelectTokenCardHeader, { avatar: isSelected ? (_jsx(TokenAvatar, { token: token, chain: chain })) : (_jsx(TokenAvatarDefault, {})), title: isSelected ? token.symbol : defaultPlaceholder, subheader: isSelected ? t(`swap.onChain`, { chainName: chain.name }) : null, selected: isSelected, compact: compact }))] })));
37
+ return (_jsxs(Card, { flex: 1, onClick: onClick, children: [_jsx(CardTitle, { children: cardTitle }), chainId && tokenAddress && (isChainLoading || isTokenLoading) ? (_jsx(SelectTokenCardHeader, { avatar: _jsx(Skeleton, { variant: "circular", width: 32, height: 32 }), title: _jsx(Skeleton, { variant: "text", width: 64, height: 24 }), subheader: _jsx(Skeleton, { variant: "text", width: 64, height: 16 }), compact: compact })) : (_jsx(SelectTokenCardHeader, { avatar: isSelected ? (_jsx(TokenAvatar, { token: token, chain: chain })) : (_jsx(TokenAvatarDefault, {})), title: isSelected ? token.symbol : defaultPlaceholder, subheader: isSelected ? t(`swap.onChain`, { chainName: chain.name }) : null, selected: isSelected, compact: compact }))] }));
38
38
  };
@@ -13,7 +13,7 @@ export declare const SelectTokenCardHeader: import("@emotion/styled").StyledComp
13
13
  titleTypographyProps?: import("@mui/material").TypographyProps<"span", {
14
14
  component?: "span" | undefined;
15
15
  }> | undefined;
16
- } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
16
+ } & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
17
17
  ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
18
18
  }, keyof import("@mui/material/OverridableComponent").CommonProps | "title" | "action" | "sx" | "disableTypography" | "avatar" | "subheader" | "subheaderTypographyProps" | "titleTypographyProps"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
19
19
  selected?: boolean | undefined;
@@ -1,12 +1,3 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
2
  import { isAddress } from '@ethersproject/address';
12
3
  import { Collapse, FormHelperText } from '@mui/material';
@@ -25,9 +16,9 @@ export const SendToWallet = forwardRef((props, ref) => {
25
16
  const { disabledUI, hiddenUI, requiredUI, toAddress } = useWidgetConfig();
26
17
  const { showSendToWallet, showSendToWalletDirty, setSendToWallet } = useSendToWalletStore();
27
18
  const { showDestinationWallet } = useSettings(['showDestinationWallet']);
28
- const hiddenToAddress = hiddenUI === null || hiddenUI === void 0 ? void 0 : hiddenUI.includes(HiddenUI.ToAddress);
29
- const disabledToAddress = disabledUI === null || disabledUI === void 0 ? void 0 : disabledUI.includes(DisabledUI.ToAddress);
30
- const requiredToAddress = requiredUI === null || requiredUI === void 0 ? void 0 : requiredUI.includes(DisabledUI.ToAddress);
19
+ const hiddenToAddress = hiddenUI?.includes(HiddenUI.ToAddress);
20
+ const disabledToAddress = disabledUI?.includes(DisabledUI.ToAddress);
21
+ const requiredToAddress = requiredUI?.includes(DisabledUI.ToAddress);
31
22
  // We want to show toAddress field if it is set via widget configuration and not hidden
32
23
  const showInstantly = Boolean(!showSendToWalletDirty &&
33
24
  showDestinationWallet &&
@@ -53,25 +44,24 @@ export const SendToWallet = forwardRef((props, ref) => {
53
44
  const { onChange, onBlur, name, ref: inputRef, } = register(SwapFormKey.ToAddress, {
54
45
  required: requiredToAddress &&
55
46
  t('swap.error.title.walletAddressRequired'),
56
- validate: (value) => __awaiter(void 0, void 0, void 0, function* () {
47
+ validate: async (value) => {
57
48
  try {
58
49
  if (!value) {
59
50
  return true;
60
51
  }
61
- const address = yield (provider === null || provider === void 0 ? void 0 : provider.resolveName(value));
52
+ const address = await provider?.resolveName(value);
62
53
  return (isAddress(address || value) ||
63
54
  t('swap.error.title.walletAddressInvalid'));
64
55
  }
65
- catch (_a) {
56
+ catch {
66
57
  return t('swap.error.title.walletEnsAddressInvalid');
67
58
  }
68
- }),
59
+ },
69
60
  onBlur: () => trigger(SwapFormKey.ToAddress),
70
61
  });
71
- return (_jsx(Collapse, Object.assign({ timeout: showInstantly ? 0 : 225, in: showSendToWallet || showInstantly, mountOnEnter: true, unmountOnExit: true }, { children: _jsxs(Card, Object.assign({}, props, { ref: ref }, { children: [_jsx(CardTitle, Object.assign({ required: requiredToAddress }, { children: t('swap.sendToWallet') })), _jsxs(FormControl, Object.assign({ fullWidth: true, sx: { paddingTop: '6px', paddingBottom: '5px' } }, { children: [_jsx(Input, { ref: inputRef, size: "small", autoComplete: "off", autoCorrect: "off", autoCapitalize: "off", spellCheck: "false", onChange: onChange, onBlur: onBlur, name: name, placeholder: t('swap.walletAddressOrEns'), disabled: Boolean(toAddress && disabledToAddress) }), _jsx(SendToWalletFormHelperText, {})] }))] })) })));
62
+ return (_jsx(Collapse, { timeout: showInstantly ? 0 : 225, in: showSendToWallet || showInstantly, mountOnEnter: true, unmountOnExit: true, children: _jsxs(Card, { ...props, ref: ref, children: [_jsx(CardTitle, { required: requiredToAddress, children: t('swap.sendToWallet') }), _jsxs(FormControl, { fullWidth: true, sx: { paddingTop: '6px', paddingBottom: '5px' }, children: [_jsx(Input, { ref: inputRef, size: "small", autoComplete: "off", autoCorrect: "off", autoCapitalize: "off", spellCheck: "false", onChange: onChange, onBlur: onBlur, name: name, placeholder: t('swap.walletAddressOrEns'), disabled: Boolean(toAddress && disabledToAddress) }), _jsx(SendToWalletFormHelperText, {})] })] }) }));
72
63
  });
73
64
  export const SendToWalletFormHelperText = () => {
74
- var _a;
75
65
  const { errors } = useFormState();
76
- return (_jsx(FormHelperText, Object.assign({ error: !!errors.toAddress }, { children: (_a = errors.toAddress) === null || _a === void 0 ? void 0 : _a.message })));
66
+ return (_jsx(FormHelperText, { error: !!errors.toAddress, children: errors.toAddress?.message }));
77
67
  };
@@ -13,7 +13,7 @@ export declare const FormControl: import("@emotion/styled").StyledComponent<{
13
13
  size?: "small" | "medium" | undefined;
14
14
  sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
15
15
  variant?: "outlined" | "filled" | "standard" | undefined;
16
- } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
16
+ } & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
17
17
  ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
18
18
  }, keyof import("@mui/material/OverridableComponent").CommonProps | "color" | "children" | "disabled" | "sx" | "margin" | "fullWidth" | "size" | "variant" | "error" | "required" | "focused" | "hiddenLabel"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
19
19
  export declare const Input: import("@emotion/styled").StyledComponent<import("@mui/material").InputBaseProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
@@ -15,18 +15,18 @@ export const SendToWalletButton = () => {
15
15
  const { showDestinationWallet } = useSettings(['showDestinationWallet']);
16
16
  if (!showDestinationWallet ||
17
17
  !account.isActive ||
18
- (hiddenUI === null || hiddenUI === void 0 ? void 0 : hiddenUI.includes(HiddenUI.ToAddress)) ||
19
- (requiredUI === null || requiredUI === void 0 ? void 0 : requiredUI.includes(HiddenUI.ToAddress))) {
18
+ hiddenUI?.includes(HiddenUI.ToAddress) ||
19
+ requiredUI?.includes(HiddenUI.ToAddress)) {
20
20
  return null;
21
21
  }
22
22
  const handleClick = () => {
23
- if (showSendToWallet && !(disabledUI === null || disabledUI === void 0 ? void 0 : disabledUI.includes(DisabledUI.ToAddress))) {
23
+ if (showSendToWallet && !disabledUI?.includes(DisabledUI.ToAddress)) {
24
24
  setValue(SwapFormKey.ToAddress, '', { shouldTouch: true });
25
25
  }
26
26
  toggleSendToWallet();
27
27
  };
28
- return (_jsx(Tooltip, Object.assign({ title: t('swap.sendToWallet'), placement: "bottom-end", enterDelay: 400, arrow: true }, { children: _jsx(Button, Object.assign({ variant: showSendToWallet ? 'contained' : 'text', onClick: handleClick, sx: {
28
+ return (_jsx(Tooltip, { title: t('swap.sendToWallet'), placement: "bottom-end", enterDelay: 400, arrow: true, children: _jsx(Button, { variant: showSendToWallet ? 'contained' : 'text', onClick: handleClick, sx: {
29
29
  minWidth: 48,
30
30
  marginLeft: 1,
31
- } }, { children: _jsx(WalletOutlinedIcon, {}) })) })));
31
+ }, children: _jsx(WalletOutlinedIcon, {}) }) }));
32
32
  };
@@ -11,7 +11,7 @@ export declare const SmallAvatar: import("@emotion/styled").StyledComponent<{
11
11
  srcSet?: string | undefined;
12
12
  sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
13
13
  variant?: "square" | "circular" | "rounded" | undefined;
14
- } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
14
+ } & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
15
15
  ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
16
16
  }, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "variant" | "alt" | "imgProps" | "sizes" | "src" | "srcSet"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
17
17
  export declare const SmallAvatarSkeletonBase: import("@emotion/styled").StyledComponent<{
@@ -22,7 +22,7 @@ export declare const SmallAvatarSkeletonBase: import("@emotion/styled").StyledCo
22
22
  sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
23
23
  variant?: "text" | "circular" | "rounded" | "rectangular" | undefined;
24
24
  width?: string | number | undefined;
25
- } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof import("react").HTMLAttributes<HTMLSpanElement>> & {
25
+ } & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
26
26
  ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
27
27
  }, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "height" | "width" | "animation" | "variant"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
28
28
  export declare const SmallAvatarSkeletonContainer: import("@emotion/styled").StyledComponent<import("@mui/system").SystemProps<import("@mui/material").Theme> & {
@@ -30,7 +30,7 @@ export declare const SmallAvatarSkeletonContainer: import("@emotion/styled").Sty
30
30
  component?: import("react").ElementType<any> | undefined;
31
31
  ref?: import("react").Ref<unknown> | undefined;
32
32
  sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
33
- } & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
33
+ } & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
34
34
  ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
35
35
  }, "children" | "sx" | "ref" | ("p" | "color" | "border" | "boxShadow" | "fontWeight" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint") | "component"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
36
36
  export declare const SmallAvatarSkeleton: () => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { Process } from '@lifi/sdk';
3
2
  export declare function CircularProgress({ process }: {
4
3
  process: Process;
@@ -3,7 +3,7 @@ import { Done as DoneIcon, ErrorRounded as ErrorIcon, InfoRounded as InfoIcon, W
3
3
  import { darken } from '@mui/material/styles';
4
4
  import { CircularIcon, CircularProgressPending } from './CircularProgress.style';
5
5
  export function CircularProgress({ process }) {
6
- return (_jsxs(CircularIcon, Object.assign({ status: process.status, substatus: process.substatus }, { children: [process.status === 'STARTED' || process.status === 'PENDING' ? (_jsx(CircularProgressPending, { size: 32, thickness: 3 })) : null, process.status === 'ACTION_REQUIRED' ? (_jsx(InfoIcon, { color: "info", sx: {
6
+ return (_jsxs(CircularIcon, { status: process.status, substatus: process.substatus, children: [process.status === 'STARTED' || process.status === 'PENDING' ? (_jsx(CircularProgressPending, { size: 32, thickness: 3 })) : null, process.status === 'ACTION_REQUIRED' ? (_jsx(InfoIcon, { color: "info", sx: {
7
7
  position: 'absolute',
8
8
  fontSize: '1rem',
9
9
  } })) : null, process.status === 'DONE' &&
@@ -17,5 +17,5 @@ export function CircularProgress({ process }) {
17
17
  } })) : null, process.status === 'FAILED' ? (_jsx(ErrorIcon, { color: "error", sx: {
18
18
  position: 'absolute',
19
19
  fontSize: '1rem',
20
- } })) : null] })));
20
+ } })) : null] }));
21
21
  }
@@ -6,7 +6,7 @@ export declare const CircularIcon: import("@emotion/styled").StyledComponent<imp
6
6
  component?: import("react").ElementType<any> | undefined;
7
7
  ref?: import("react").Ref<unknown> | undefined;
8
8
  sx?: import("@mui/material").SxProps<Theme> | undefined;
9
- } & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
9
+ } & 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
  }, "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> & {
12
12
  status: Status;
@@ -5,24 +5,23 @@ import { useTranslation } from 'react-i18next';
5
5
  import { CircularIcon } from './CircularProgress.style';
6
6
  import { LinkButton } from './StepProcess.style';
7
7
  export const DestinationWalletAddress = ({ step, toAddress, toAddressLink }) => {
8
- var _a;
9
8
  const { t } = useTranslation();
10
- const isDone = ((_a = step.execution) === null || _a === void 0 ? void 0 : _a.status) === 'DONE';
11
- return (_jsx(Box, Object.assign({ px: 2, py: 1 }, { children: _jsxs(Box, Object.assign({ sx: {
9
+ const isDone = step.execution?.status === 'DONE';
10
+ return (_jsx(Box, { px: 2, py: 1, children: _jsxs(Box, { sx: {
12
11
  display: 'flex',
13
12
  alignItems: 'center',
14
- } }, { children: [_jsx(CircularIcon, Object.assign({ status: isDone ? 'DONE' : 'NOT_STARTED' }, { children: _jsx(WalletOutlinedIcon, { color: isDone ? 'success' : 'inherit', sx: {
13
+ }, children: [_jsx(CircularIcon, { status: isDone ? 'DONE' : 'NOT_STARTED', children: _jsx(WalletOutlinedIcon, { color: isDone ? 'success' : 'inherit', sx: {
15
14
  position: 'absolute',
16
15
  fontSize: '1rem',
17
- } }) })), _jsx(Typography, Object.assign({ ml: 2, fontSize: 14, fontWeight: 400 }, { children: isDone
16
+ } }) }), _jsx(Typography, { ml: 2, fontSize: 14, fontWeight: 400, children: isDone
18
17
  ? t('swap.sentToAddress', {
19
18
  address: toAddress,
20
19
  })
21
20
  : t('swap.sendToAddress', {
22
21
  address: toAddress,
23
- }) })), _jsx(Box, Object.assign({ ml: 2, sx: {
22
+ }) }), _jsx(Box, { ml: 2, sx: {
24
23
  display: 'flex',
25
24
  flex: 1,
26
25
  justifyContent: 'flex-end',
27
- } }, { children: _jsx(LinkButton, Object.assign({ size: "small", edge: "end", LinkComponent: Link, href: toAddressLink, target: "_blank", rel: "nofollow noreferrer" }, { children: _jsx(LinkIcon, {}) })) }))] })) })));
26
+ }, children: _jsx(LinkButton, { size: "small", edge: "end", LinkComponent: Link, href: toAddressLink, target: "_blank", rel: "nofollow noreferrer", children: _jsx(LinkIcon, {}) }) })] }) }));
28
27
  };
@@ -4,17 +4,17 @@ import { Box, Typography } from '@mui/material';
4
4
  import { useTranslation } from 'react-i18next';
5
5
  import { CircularIcon } from './CircularProgress.style';
6
6
  export const GasStepProcess = ({ step }) => {
7
- var _a, _b, _c, _d;
8
7
  const { t } = useTranslation();
9
- const isDone = ((_a = step.execution) === null || _a === void 0 ? void 0 : _a.status) === 'DONE';
10
- return (_jsx(Box, Object.assign({ px: 2, py: 1 }, { children: _jsxs(Box, Object.assign({ sx: {
8
+ const isDone = step.execution?.status === 'DONE';
9
+ return (_jsx(Box, { px: 2, py: 1, children: _jsxs(Box, { sx: {
11
10
  display: 'flex',
12
11
  alignItems: 'center',
13
- } }, { children: [_jsx(CircularIcon, Object.assign({ status: isDone ? 'DONE' : 'NOT_STARTED' }, { children: _jsx(EvStationIcon, { color: isDone ? 'success' : 'inherit', sx: {
12
+ }, children: [_jsx(CircularIcon, { status: isDone ? 'DONE' : 'NOT_STARTED', children: _jsx(EvStationIcon, { color: isDone ? 'success' : 'inherit', sx: {
14
13
  position: 'absolute',
15
14
  fontSize: '1rem',
16
- } }) })), _jsxs(Typography, Object.assign({ ml: 2, fontSize: 14, fontWeight: 400 }, { children: [t('format.currency', {
17
- value: (_d = (((_b = step.execution) === null || _b === void 0 ? void 0 : _b.gasAmountUSD) ||
18
- ((_c = step.estimate.gasCosts) === null || _c === void 0 ? void 0 : _c.reduce((amount, gasCost) => amount + parseFloat(gasCost.amountUSD || '0'), 0)))) !== null && _d !== void 0 ? _d : 0,
19
- }), ' ', isDone ? t('swap.gasFeePaid') : t('swap.gasFeeEstimated')] }))] })) })));
15
+ } }) }), _jsxs(Typography, { ml: 2, fontSize: 14, fontWeight: 400, children: [t('format.currency', {
16
+ value: (step.execution?.gasAmountUSD ||
17
+ step.estimate.gasCosts?.reduce((amount, gasCost) => amount + parseFloat(gasCost.amountUSD || '0'), 0)) ??
18
+ 0,
19
+ }), ' ', isDone ? t('swap.gasFeePaid') : t('swap.gasFeeEstimated')] })] }) }));
20
20
  };