@lifi/widget 2.0.0-beta.9 → 2.0.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 (601) hide show
  1. package/App.js +2 -2
  2. package/AppDrawer.d.ts +3 -2
  3. package/AppDrawer.js +7 -3
  4. package/AppDrawer.style.d.ts +2 -2
  5. package/AppDrawer.style.js +5 -0
  6. package/AppProvider.js +4 -4
  7. package/AppRoutes.js +16 -16
  8. package/cjs/App.js +2 -2
  9. package/cjs/AppDrawer.d.ts +3 -2
  10. package/cjs/AppDrawer.js +7 -3
  11. package/cjs/AppDrawer.style.d.ts +2 -2
  12. package/cjs/AppDrawer.style.js +5 -0
  13. package/cjs/AppProvider.js +3 -3
  14. package/cjs/AppRoutes.js +16 -16
  15. package/cjs/components/{ActiveSwaps/ActiveSwapItem.d.ts → ActiveTransactions/ActiveTransactionItem.d.ts} +1 -1
  16. package/cjs/components/{ActiveSwaps/ActiveSwapItem.js → ActiveTransactions/ActiveTransactionItem.js} +6 -6
  17. package/cjs/{pages/SwapRoutesPage/SwapRoutesPage.d.ts → components/ActiveTransactions/ActiveTransactions.d.ts} +1 -1
  18. package/cjs/components/{ActiveSwaps/ActiveSwaps.js → ActiveTransactions/ActiveTransactions.js} +7 -7
  19. package/cjs/components/{ActiveSwaps/ActiveSwaps.style.d.ts → ActiveTransactions/ActiveTransactions.style.d.ts} +4 -4
  20. package/cjs/components/ActiveTransactions/index.d.ts +2 -0
  21. package/cjs/components/{ActiveSwaps → ActiveTransactions}/index.js +2 -2
  22. package/cjs/components/AmountInput/AmountInput.d.ts +12 -0
  23. package/cjs/components/AmountInput/AmountInput.js +57 -0
  24. package/{components/SwapInput/SwapInput.style.d.ts → cjs/components/AmountInput/AmountInput.style.d.ts} +1 -1
  25. package/{components/SwapInput/SwapInputAdornment.style.d.ts → cjs/components/AmountInput/AmountInputAdornment.style.d.ts} +2 -2
  26. package/cjs/components/AmountInput/AmountInputEndAdornment.d.ts +2 -0
  27. package/cjs/components/{SwapInput/SwapInputEndAdornment.js → AmountInput/AmountInputEndAdornment.js} +9 -9
  28. package/cjs/components/AmountInput/AmountInputStartAdornment.d.ts +3 -0
  29. package/cjs/components/{SwapInput/SwapInputStartAdornment.js → AmountInput/AmountInputStartAdornment.js} +5 -5
  30. package/cjs/components/AmountInput/FormPriceHelperText.d.ts +9 -0
  31. package/cjs/components/{SwapInput → AmountInput}/FormPriceHelperText.js +15 -9
  32. package/cjs/components/AmountInput/index.d.ts +1 -0
  33. package/cjs/{pages/SwapPage → components/AmountInput}/index.js +1 -1
  34. package/cjs/components/Card/CardIconButton.d.ts +2 -2
  35. package/cjs/components/Card/CardLabel.d.ts +1 -1
  36. package/cjs/components/ChainSelect/ChainSelect.d.ts +2 -2
  37. package/cjs/components/ChainSelect/ChainSelect.js +1 -1
  38. package/cjs/components/ChainSelect/useChainSelect.d.ts +2 -2
  39. package/cjs/components/ChainSelect/useChainSelect.js +5 -5
  40. package/cjs/components/ContractComponent/ContractComponent.d.ts +2 -2
  41. package/cjs/components/ContractComponent/ContractComponent.js +3 -5
  42. package/cjs/components/DefaultTransactionButton/DefaultTransactionButton.d.ts +3 -0
  43. package/cjs/components/DefaultTransactionButton/DefaultTransactionButton.js +36 -0
  44. package/cjs/components/DefaultTransactionButton/index.d.ts +2 -0
  45. package/cjs/components/{SwapButton → DefaultTransactionButton}/index.js +3 -3
  46. package/cjs/components/{SwapButton → DefaultTransactionButton}/types.d.ts +1 -2
  47. package/cjs/components/GasMessage/FundsSufficiencyMessage.js +1 -1
  48. package/cjs/components/GasMessage/GasRefuelMessage.js +1 -1
  49. package/cjs/components/GasMessage/GasSufficiencyMessage.js +2 -2
  50. package/cjs/components/Header/Header.style.d.ts +2 -2
  51. package/cjs/components/Header/NavigationHeader.js +19 -19
  52. package/cjs/components/Header/NavigationTabs.js +3 -3
  53. package/cjs/components/Header/NavigationTabs.style.js +3 -3
  54. package/cjs/components/Header/index.d.ts +1 -1
  55. package/cjs/components/Header/index.js +1 -1
  56. package/cjs/components/Header/types.d.ts +5 -2
  57. package/cjs/components/Header/useHeaderStore.d.ts +2 -0
  58. package/cjs/components/Header/{useHeaderActionStore.js → useHeaderStore.js} +13 -2
  59. package/cjs/components/Insurance/Insurance.js +2 -2
  60. package/cjs/components/Insurance/InsuranceCard.js +10 -7
  61. package/cjs/components/Insurance/InsuranceCollapsed.js +7 -3
  62. package/cjs/components/Insurance/index.d.ts +1 -0
  63. package/cjs/components/Insurance/index.js +1 -0
  64. package/cjs/components/Insurance/types.d.ts +11 -7
  65. package/cjs/components/ListItemButton.d.ts +1 -1
  66. package/cjs/components/NFT/NFT.d.ts +1 -2
  67. package/cjs/components/NFT/NFT.js +15 -13
  68. package/cjs/components/NFT/NFT.style.d.ts +1 -1
  69. package/cjs/components/NFT/NFTBase.d.ts +3 -0
  70. package/cjs/components/NFT/NFTBase.js +13 -0
  71. package/cjs/components/NFT/index.d.ts +1 -0
  72. package/cjs/components/NFT/index.js +1 -0
  73. package/cjs/components/NFT/types.d.ts +3 -1
  74. package/cjs/components/ProgressToNextUpdate/ProgressToNextUpdate.js +3 -3
  75. package/cjs/components/ReverseTokensButton/ReverseTokensButton.js +9 -9
  76. package/cjs/components/ReverseTokensButton/ReverseTokensButton.style.d.ts +2 -2
  77. package/cjs/components/RouteCard/RouteCard.d.ts +4 -0
  78. package/cjs/components/{SwapRouteCard/SwapRouteCard.js → RouteCard/RouteCard.js} +16 -12
  79. package/cjs/components/RouteCard/RouteCardEssentials.d.ts +3 -0
  80. package/cjs/components/{SwapRouteCard/SwapRouteCardEssentials.js → RouteCard/RouteCardEssentials.js} +7 -7
  81. package/cjs/components/RouteCard/RouteCardSkeleton.d.ts +4 -0
  82. package/cjs/components/{SwapRouteCard/SwapRouteCardSkeleton.js → RouteCard/RouteCardSkeleton.js} +6 -6
  83. package/cjs/components/RouteCard/RouteNotFoundCard.d.ts +2 -0
  84. package/cjs/components/{SwapRouteCard/SwapRouteNotFoundCard.js → RouteCard/RouteNotFoundCard.js} +4 -4
  85. package/cjs/components/RouteCard/index.d.ts +3 -0
  86. package/cjs/components/{SwapRoutes → RouteCard}/index.js +3 -2
  87. package/cjs/components/{SwapRouteCard → RouteCard}/types.d.ts +3 -3
  88. package/cjs/components/{SwapRoutes/SwapRoutes.d.ts → Routes/Routes.d.ts} +1 -1
  89. package/cjs/components/Routes/Routes.js +37 -0
  90. package/cjs/components/Routes/RoutesExpanded.d.ts +2 -0
  91. package/cjs/components/Routes/RoutesExpanded.js +44 -0
  92. package/cjs/components/Routes/index.d.ts +2 -0
  93. package/cjs/components/Routes/index.js +18 -0
  94. package/cjs/components/SelectChainAndToken.js +7 -7
  95. package/cjs/components/SelectTokenButton/SelectTokenButton.d.ts +2 -2
  96. package/cjs/components/SelectTokenButton/SelectTokenButton.js +11 -11
  97. package/cjs/components/SendToWallet/SendToWallet.js +9 -10
  98. package/cjs/components/SendToWallet/SendToWallet.style.d.ts +1 -1
  99. package/cjs/components/SendToWallet/SendToWalletButton.js +2 -2
  100. package/cjs/components/SmallAvatar.d.ts +1 -1
  101. package/cjs/components/Step/DestinationWalletAddress.js +2 -2
  102. package/cjs/components/Step/GasStepProcess.js +1 -1
  103. package/cjs/components/Step/Step.js +13 -13
  104. package/cjs/components/Step/StepTimer.js +2 -2
  105. package/cjs/components/StepActions/StepActions.d.ts +3 -3
  106. package/cjs/components/StepActions/StepActions.js +20 -16
  107. package/cjs/components/StepActions/StepActions.style.d.ts +1 -1
  108. package/cjs/components/StepActions/types.d.ts +2 -2
  109. package/cjs/components/Token/Token.js +1 -1
  110. package/cjs/components/TokenList/TokenList.js +2 -2
  111. package/cjs/components/TokenList/TokenList.style.d.ts +4 -4
  112. package/cjs/components/TokenList/TokenList.style.js +11 -8
  113. package/cjs/components/TokenList/TokenListItem.js +5 -9
  114. package/cjs/components/TokenList/TokenNotFound.d.ts +2 -2
  115. package/cjs/components/TokenList/TokenNotFound.js +2 -2
  116. package/cjs/components/TokenList/VirtualizedTokenList.js +2 -2
  117. package/cjs/components/TokenList/types.d.ts +2 -2
  118. package/cjs/components/TokenList/useTokenSelect.d.ts +2 -2
  119. package/cjs/components/TokenList/useTokenSelect.js +11 -9
  120. package/cjs/config/theme.js +1 -2
  121. package/cjs/config/version.d.ts +1 -1
  122. package/cjs/config/version.js +1 -1
  123. package/cjs/hooks/index.d.ts +1 -1
  124. package/cjs/hooks/index.js +1 -1
  125. package/cjs/hooks/useChains.js +4 -4
  126. package/cjs/hooks/useFundsSufficiency.js +1 -5
  127. package/cjs/hooks/useGasRecommendation.d.ts +1 -1
  128. package/cjs/hooks/useGasRecommendation.js +5 -0
  129. package/cjs/hooks/useGasRefuel.js +4 -4
  130. package/cjs/hooks/useProcessMessage.d.ts +2 -2
  131. package/cjs/hooks/useProcessMessage.js +46 -46
  132. package/cjs/hooks/useRouteExecution.js +3 -4
  133. package/cjs/hooks/{useSwapRoutes.d.ts → useRoutes.d.ts} +2 -2
  134. package/cjs/hooks/{useSwapRoutes.js → useRoutes.js} +24 -24
  135. package/cjs/hooks/useTokenBalance.js +4 -5
  136. package/cjs/hooks/useTokenBalances.js +1 -5
  137. package/cjs/hooks/useTokens.js +21 -9
  138. package/cjs/i18n/bn.json +80 -80
  139. package/cjs/i18n/de.json +74 -74
  140. package/cjs/i18n/en.json +132 -131
  141. package/cjs/i18n/es.json +72 -72
  142. package/cjs/i18n/fr.json +102 -85
  143. package/cjs/i18n/id.json +102 -85
  144. package/cjs/i18n/it.json +112 -84
  145. package/cjs/i18n/ko.json +102 -85
  146. package/cjs/i18n/pt.json +89 -87
  147. package/cjs/i18n/th.json +102 -85
  148. package/cjs/i18n/tr.json +72 -72
  149. package/cjs/i18n/uk.json +98 -96
  150. package/cjs/i18n/vi.json +104 -79
  151. package/cjs/i18n/zh.json +104 -87
  152. package/cjs/index.d.ts +2 -0
  153. package/cjs/index.js +5 -1
  154. package/cjs/pages/ActiveTransactionsPage/ActiveTransactionsEmpty.d.ts +2 -0
  155. package/cjs/pages/{ActiveSwapsPage/ActiveSwapsEmpty.js → ActiveTransactionsPage/ActiveTransactionsEmpty.js} +4 -4
  156. package/cjs/pages/ActiveTransactionsPage/ActiveTransactionsPage.d.ts +1 -0
  157. package/cjs/pages/{ActiveSwapsPage/ActiveSwapsPage.js → ActiveTransactionsPage/ActiveTransactionsPage.js} +8 -8
  158. package/cjs/pages/ActiveTransactionsPage/index.d.ts +1 -0
  159. package/cjs/pages/{ActiveSwapsPage → ActiveTransactionsPage}/index.js +1 -1
  160. package/cjs/pages/MainPage/MainGasMessage.js +1 -1
  161. package/cjs/pages/MainPage/MainPage.js +7 -7
  162. package/cjs/pages/MainPage/ReviewButton.d.ts +2 -0
  163. package/cjs/pages/MainPage/ReviewButton.js +62 -0
  164. package/{components/SwapRoutes/SwapRoutes.d.ts → cjs/pages/RoutesPage/RoutesPage.d.ts} +1 -1
  165. package/cjs/pages/{SwapRoutesPage/SwapRoutesPage.js → RoutesPage/RoutesPage.js} +11 -11
  166. package/cjs/pages/RoutesPage/index.d.ts +1 -0
  167. package/cjs/{components/SwapInput → pages/RoutesPage}/index.js +1 -1
  168. package/cjs/pages/SelectChainPage/types.d.ts +2 -2
  169. package/cjs/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.js +1 -1
  170. package/cjs/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.style.d.ts +1 -1
  171. package/cjs/pages/SelectNativeTokenPage/SelectNativeTokenPage.d.ts +2 -2
  172. package/cjs/pages/SelectNativeTokenPage/SelectNativeTokenPage.js +1 -1
  173. package/cjs/pages/SelectTokenPage/SearchTokenInput.js +3 -3
  174. package/cjs/pages/SelectTokenPage/SelectTokenPage.d.ts +2 -2
  175. package/cjs/pages/SelectTokenPage/types.js +1 -1
  176. package/cjs/pages/SettingsPage/ColorSchemeButtonGroup.style.d.ts +2 -2
  177. package/cjs/pages/SettingsPage/EnabledToolsButton.style.d.ts +1 -1
  178. package/cjs/pages/SettingsPage/LanguageSelect.js +1 -1
  179. package/cjs/pages/SettingsPage/ResetSettingsButton.js +1 -1
  180. package/cjs/pages/SettingsPage/RoutePrioritySelect.js +1 -1
  181. package/cjs/pages/TransactionDetailsPage/TransactionDetailsPage.d.ts +2 -0
  182. package/cjs/pages/{SwapDetailsPage/SwapDetailsPage.js → TransactionDetailsPage/TransactionDetailsPage.js} +10 -9
  183. package/cjs/pages/TransactionDetailsPage/index.d.ts +1 -0
  184. package/cjs/pages/{SwapDetailsPage → TransactionDetailsPage}/index.js +1 -1
  185. package/cjs/pages/TransactionHistoryPage/TransactionHistoryEmpty.d.ts +2 -0
  186. package/cjs/pages/{SwapHistoryPage/SwapHistoryEmpty.js → TransactionHistoryPage/TransactionHistoryEmpty.js} +4 -4
  187. package/cjs/pages/{SwapHistoryPage/SwapHistoryItem.d.ts → TransactionHistoryPage/TransactionHistoryItem.d.ts} +1 -1
  188. package/cjs/pages/{SwapHistoryPage/SwapHistoryItem.js → TransactionHistoryPage/TransactionHistoryItem.js} +4 -4
  189. package/cjs/pages/TransactionHistoryPage/TransactionHistoryPage.d.ts +2 -0
  190. package/cjs/pages/TransactionHistoryPage/TransactionHistoryPage.js +35 -0
  191. package/cjs/pages/TransactionHistoryPage/index.d.ts +1 -0
  192. package/cjs/pages/TransactionHistoryPage/index.js +17 -0
  193. package/cjs/pages/{SwapPage → TransactionPage}/ExchangeRateBottomSheet.js +3 -3
  194. package/cjs/pages/TransactionPage/StartTransactionButton.d.ts +4 -0
  195. package/cjs/pages/TransactionPage/StartTransactionButton.js +21 -0
  196. package/cjs/pages/{SwapPage → TransactionPage}/StatusBottomSheet.js +27 -24
  197. package/cjs/pages/TransactionPage/TokenValueBottomSheet.js +38 -0
  198. package/cjs/pages/TransactionPage/TransactionPage.d.ts +2 -0
  199. package/cjs/pages/TransactionPage/TransactionPage.js +125 -0
  200. package/cjs/pages/TransactionPage/index.d.ts +1 -0
  201. package/cjs/pages/{SwapHistoryPage → TransactionPage}/index.js +1 -1
  202. package/cjs/pages/TransactionPage/types.d.ts +6 -0
  203. package/cjs/pages/TransactionPage/utils.d.ts +2 -0
  204. package/cjs/pages/TransactionPage/utils.js +10 -0
  205. package/cjs/providers/{SwapFormProvider/SwapFormProvider.d.ts → FormProvider/FormProvider.d.ts} +1 -1
  206. package/cjs/providers/{SwapFormProvider/SwapFormProvider.js → FormProvider/FormProvider.js} +11 -11
  207. package/cjs/providers/FormProvider/FormUpdater.d.ts +5 -0
  208. package/cjs/providers/{SwapFormProvider → FormProvider}/FormUpdater.js +14 -14
  209. package/cjs/providers/{SwapFormProvider → FormProvider}/URLSearchParamsBuilder.js +6 -6
  210. package/cjs/providers/{SwapFormProvider → FormProvider}/index.d.ts +1 -1
  211. package/cjs/providers/{SwapFormProvider → FormProvider}/index.js +1 -1
  212. package/cjs/providers/FormProvider/types.d.ts +37 -0
  213. package/cjs/providers/FormProvider/types.js +23 -0
  214. package/cjs/providers/WalletProvider/WalletProvider.js +5 -3
  215. package/cjs/providers/WalletProvider/types.d.ts +1 -1
  216. package/cjs/providers/WidgetProvider/WidgetProvider.js +1 -1
  217. package/cjs/providers/index.d.ts +1 -1
  218. package/cjs/providers/index.js +1 -1
  219. package/cjs/stores/routes/createRouteExecutionStore.js +1 -1
  220. package/cjs/stores/routes/index.d.ts +1 -1
  221. package/cjs/stores/routes/index.js +1 -1
  222. package/cjs/stores/routes/types.js +1 -1
  223. package/cjs/stores/routes/useTransactionHistory.d.ts +2 -0
  224. package/cjs/stores/routes/{useSwapHistory.js → useTransactionHistory.js} +3 -3
  225. package/cjs/types/events.d.ts +9 -1
  226. package/cjs/types/events.js +2 -1
  227. package/cjs/types/widget.d.ts +6 -4
  228. package/cjs/types/widget.js +3 -3
  229. package/cjs/utils/elements.js +1 -1
  230. package/cjs/utils/format.d.ts +1 -1
  231. package/cjs/utils/format.js +13 -15
  232. package/cjs/utils/navigationRoutes.d.ts +5 -5
  233. package/cjs/utils/navigationRoutes.js +15 -15
  234. package/components/{ActiveSwaps/ActiveSwapItem.d.ts → ActiveTransactions/ActiveTransactionItem.d.ts} +1 -1
  235. package/components/{ActiveSwaps/ActiveSwapItem.js → ActiveTransactions/ActiveTransactionItem.js} +3 -3
  236. package/components/ActiveTransactions/ActiveTransactions.d.ts +3 -0
  237. package/components/{ActiveSwaps/ActiveSwaps.js → ActiveTransactions/ActiveTransactions.js} +5 -5
  238. package/components/{ActiveSwaps/ActiveSwaps.style.d.ts → ActiveTransactions/ActiveTransactions.style.d.ts} +4 -4
  239. package/components/ActiveTransactions/index.d.ts +2 -0
  240. package/components/ActiveTransactions/index.js +2 -0
  241. package/components/AmountInput/AmountInput.d.ts +12 -0
  242. package/components/AmountInput/AmountInput.js +52 -0
  243. package/{cjs/components/SwapInput/SwapInput.style.d.ts → components/AmountInput/AmountInput.style.d.ts} +1 -1
  244. package/{cjs/components/SwapInput/SwapInputAdornment.style.d.ts → components/AmountInput/AmountInputAdornment.style.d.ts} +2 -2
  245. package/components/AmountInput/AmountInputEndAdornment.d.ts +2 -0
  246. package/components/{SwapInput/SwapInputEndAdornment.js → AmountInput/AmountInputEndAdornment.js} +7 -7
  247. package/components/AmountInput/AmountInputStartAdornment.d.ts +3 -0
  248. package/components/{SwapInput/SwapInputStartAdornment.js → AmountInput/AmountInputStartAdornment.js} +4 -4
  249. package/components/AmountInput/FormPriceHelperText.d.ts +9 -0
  250. package/components/{SwapInput → AmountInput}/FormPriceHelperText.js +14 -9
  251. package/components/AmountInput/index.d.ts +1 -0
  252. package/components/AmountInput/index.js +1 -0
  253. package/components/Card/CardIconButton.d.ts +2 -2
  254. package/components/Card/CardLabel.d.ts +1 -1
  255. package/components/ChainSelect/ChainSelect.d.ts +2 -2
  256. package/components/ChainSelect/ChainSelect.js +2 -2
  257. package/components/ChainSelect/useChainSelect.d.ts +2 -2
  258. package/components/ChainSelect/useChainSelect.js +6 -6
  259. package/components/ContractComponent/ContractComponent.d.ts +2 -2
  260. package/components/ContractComponent/ContractComponent.js +3 -5
  261. package/components/DefaultTransactionButton/DefaultTransactionButton.d.ts +3 -0
  262. package/components/DefaultTransactionButton/DefaultTransactionButton.js +32 -0
  263. package/components/DefaultTransactionButton/index.d.ts +2 -0
  264. package/components/DefaultTransactionButton/index.js +2 -0
  265. package/components/{SwapButton → DefaultTransactionButton}/types.d.ts +1 -2
  266. package/components/GasMessage/FundsSufficiencyMessage.js +1 -1
  267. package/components/GasMessage/GasRefuelMessage.js +1 -1
  268. package/components/GasMessage/GasSufficiencyMessage.js +2 -2
  269. package/components/Header/Header.style.d.ts +2 -2
  270. package/components/Header/NavigationHeader.js +19 -19
  271. package/components/Header/NavigationTabs.js +4 -4
  272. package/components/Header/NavigationTabs.style.js +3 -3
  273. package/components/Header/index.d.ts +1 -1
  274. package/components/Header/index.js +1 -1
  275. package/components/Header/types.d.ts +5 -2
  276. package/components/Header/useHeaderStore.d.ts +2 -0
  277. package/components/Header/useHeaderStore.js +25 -0
  278. package/components/Insurance/Insurance.js +2 -2
  279. package/components/Insurance/InsuranceCard.js +11 -8
  280. package/components/Insurance/InsuranceCollapsed.js +8 -4
  281. package/components/Insurance/index.d.ts +1 -0
  282. package/components/Insurance/index.js +1 -0
  283. package/components/Insurance/types.d.ts +11 -7
  284. package/components/ListItemButton.d.ts +1 -1
  285. package/components/NFT/NFT.d.ts +1 -2
  286. package/components/NFT/NFT.js +17 -15
  287. package/components/NFT/NFT.style.d.ts +1 -1
  288. package/components/NFT/NFTBase.d.ts +3 -0
  289. package/components/NFT/NFTBase.js +9 -0
  290. package/components/NFT/index.d.ts +1 -0
  291. package/components/NFT/index.js +1 -0
  292. package/components/NFT/types.d.ts +3 -1
  293. package/components/ProgressToNextUpdate/ProgressToNextUpdate.js +4 -4
  294. package/components/ReverseTokensButton/ReverseTokensButton.js +10 -10
  295. package/components/ReverseTokensButton/ReverseTokensButton.style.d.ts +2 -2
  296. package/components/RouteCard/RouteCard.d.ts +4 -0
  297. package/components/{SwapRouteCard/SwapRouteCard.js → RouteCard/RouteCard.js} +15 -11
  298. package/components/RouteCard/RouteCardEssentials.d.ts +3 -0
  299. package/components/{SwapRouteCard/SwapRouteCardEssentials.js → RouteCard/RouteCardEssentials.js} +3 -3
  300. package/components/RouteCard/RouteCardSkeleton.d.ts +4 -0
  301. package/components/{SwapRouteCard/SwapRouteCardSkeleton.js → RouteCard/RouteCardSkeleton.js} +4 -4
  302. package/components/RouteCard/RouteNotFoundCard.d.ts +2 -0
  303. package/components/{SwapRouteCard/SwapRouteNotFoundCard.js → RouteCard/RouteNotFoundCard.js} +2 -2
  304. package/components/RouteCard/index.d.ts +3 -0
  305. package/components/RouteCard/index.js +3 -0
  306. package/components/{SwapRouteCard → RouteCard}/types.d.ts +3 -3
  307. package/{cjs/components/ActiveSwaps/ActiveSwaps.d.ts → components/Routes/Routes.d.ts} +1 -1
  308. package/components/Routes/Routes.js +33 -0
  309. package/components/Routes/RoutesExpanded.d.ts +2 -0
  310. package/components/{SwapRoutes/SwapRoutesExpanded.js → Routes/RoutesExpanded.js} +12 -10
  311. package/components/Routes/index.d.ts +2 -0
  312. package/components/Routes/index.js +2 -0
  313. package/components/SelectChainAndToken.js +8 -8
  314. package/components/SelectTokenButton/SelectTokenButton.d.ts +2 -2
  315. package/components/SelectTokenButton/SelectTokenButton.js +12 -12
  316. package/components/SendToWallet/SendToWallet.js +10 -11
  317. package/components/SendToWallet/SendToWallet.style.d.ts +1 -1
  318. package/components/SendToWallet/SendToWalletButton.js +3 -3
  319. package/components/SmallAvatar.d.ts +1 -1
  320. package/components/Step/DestinationWalletAddress.js +2 -2
  321. package/components/Step/GasStepProcess.js +1 -1
  322. package/components/Step/Step.js +13 -13
  323. package/components/Step/StepTimer.js +2 -2
  324. package/components/StepActions/StepActions.d.ts +3 -3
  325. package/components/StepActions/StepActions.js +20 -16
  326. package/components/StepActions/StepActions.style.d.ts +1 -1
  327. package/components/StepActions/types.d.ts +2 -2
  328. package/components/Token/Token.js +1 -1
  329. package/components/TokenList/TokenList.js +3 -3
  330. package/components/TokenList/TokenList.style.d.ts +4 -4
  331. package/components/TokenList/TokenList.style.js +11 -8
  332. package/components/TokenList/TokenListItem.js +7 -11
  333. package/components/TokenList/TokenNotFound.d.ts +2 -2
  334. package/components/TokenList/TokenNotFound.js +3 -3
  335. package/components/TokenList/VirtualizedTokenList.js +2 -2
  336. package/components/TokenList/types.d.ts +2 -2
  337. package/components/TokenList/useTokenSelect.d.ts +2 -2
  338. package/components/TokenList/useTokenSelect.js +12 -10
  339. package/config/theme.js +1 -2
  340. package/config/version.d.ts +1 -1
  341. package/config/version.js +1 -1
  342. package/hooks/index.d.ts +1 -1
  343. package/hooks/index.js +1 -1
  344. package/hooks/useChains.js +5 -5
  345. package/hooks/useFundsSufficiency.js +2 -6
  346. package/hooks/useGasRecommendation.d.ts +1 -1
  347. package/hooks/useGasRecommendation.js +5 -0
  348. package/hooks/useGasRefuel.js +5 -5
  349. package/hooks/useProcessMessage.d.ts +2 -2
  350. package/hooks/useProcessMessage.js +46 -46
  351. package/hooks/useRouteExecution.js +3 -4
  352. package/hooks/{useSwapRoutes.d.ts → useRoutes.d.ts} +2 -2
  353. package/hooks/{useSwapRoutes.js → useRoutes.js} +23 -23
  354. package/hooks/useTokenBalance.js +4 -5
  355. package/hooks/useTokenBalances.js +1 -5
  356. package/hooks/useTokens.js +21 -9
  357. package/i18n/bn.json +80 -80
  358. package/i18n/de.json +74 -74
  359. package/i18n/en.json +132 -131
  360. package/i18n/es.json +72 -72
  361. package/i18n/fr.json +102 -85
  362. package/i18n/id.json +102 -85
  363. package/i18n/it.json +112 -84
  364. package/i18n/ko.json +102 -85
  365. package/i18n/pt.json +89 -87
  366. package/i18n/th.json +102 -85
  367. package/i18n/tr.json +72 -72
  368. package/i18n/uk.json +98 -96
  369. package/i18n/vi.json +104 -79
  370. package/i18n/zh.json +104 -87
  371. package/index.d.ts +2 -0
  372. package/index.js +2 -0
  373. package/package.json +31 -17
  374. package/pages/ActiveTransactionsPage/ActiveTransactionsEmpty.d.ts +2 -0
  375. package/pages/{ActiveSwapsPage/ActiveSwapsEmpty.js → ActiveTransactionsPage/ActiveTransactionsEmpty.js} +2 -2
  376. package/pages/ActiveTransactionsPage/ActiveTransactionsPage.d.ts +1 -0
  377. package/pages/{ActiveSwapsPage/ActiveSwapsPage.js → ActiveTransactionsPage/ActiveTransactionsPage.js} +7 -7
  378. package/pages/ActiveTransactionsPage/index.d.ts +1 -0
  379. package/pages/ActiveTransactionsPage/index.js +1 -0
  380. package/pages/MainPage/MainGasMessage.js +2 -2
  381. package/pages/MainPage/MainPage.js +7 -7
  382. package/pages/MainPage/ReviewButton.d.ts +2 -0
  383. package/pages/MainPage/ReviewButton.js +58 -0
  384. package/{components/ActiveSwaps/ActiveSwaps.d.ts → pages/RoutesPage/RoutesPage.d.ts} +1 -1
  385. package/pages/{SwapRoutesPage/SwapRoutesPage.js → RoutesPage/RoutesPage.js} +11 -11
  386. package/pages/RoutesPage/index.d.ts +1 -0
  387. package/pages/RoutesPage/index.js +1 -0
  388. package/pages/SelectChainPage/types.d.ts +2 -2
  389. package/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.js +2 -2
  390. package/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.style.d.ts +1 -1
  391. package/pages/SelectNativeTokenPage/SelectNativeTokenPage.d.ts +2 -2
  392. package/pages/SelectNativeTokenPage/SelectNativeTokenPage.js +1 -1
  393. package/pages/SelectTokenPage/SearchTokenInput.js +4 -4
  394. package/pages/SelectTokenPage/SelectTokenPage.d.ts +2 -2
  395. package/pages/SettingsPage/ColorSchemeButtonGroup.style.d.ts +2 -2
  396. package/pages/SettingsPage/EnabledToolsButton.style.d.ts +1 -1
  397. package/pages/SettingsPage/LanguageSelect.js +1 -1
  398. package/pages/SettingsPage/ResetSettingsButton.js +1 -1
  399. package/pages/SettingsPage/RoutePrioritySelect.js +1 -1
  400. package/pages/TransactionDetailsPage/TransactionDetailsPage.d.ts +2 -0
  401. package/pages/{SwapDetailsPage/SwapDetailsPage.js → TransactionDetailsPage/TransactionDetailsPage.js} +8 -7
  402. package/pages/TransactionDetailsPage/index.d.ts +1 -0
  403. package/pages/TransactionDetailsPage/index.js +1 -0
  404. package/pages/TransactionHistoryPage/TransactionHistoryEmpty.d.ts +2 -0
  405. package/pages/{SwapHistoryPage/SwapHistoryEmpty.js → TransactionHistoryPage/TransactionHistoryEmpty.js} +2 -2
  406. package/pages/{SwapHistoryPage/SwapHistoryItem.d.ts → TransactionHistoryPage/TransactionHistoryItem.d.ts} +1 -1
  407. package/pages/{SwapHistoryPage/SwapHistoryItem.js → TransactionHistoryPage/TransactionHistoryItem.js} +2 -2
  408. package/pages/TransactionHistoryPage/TransactionHistoryPage.d.ts +2 -0
  409. package/pages/TransactionHistoryPage/TransactionHistoryPage.js +31 -0
  410. package/pages/TransactionHistoryPage/index.d.ts +1 -0
  411. package/pages/TransactionHistoryPage/index.js +1 -0
  412. package/pages/{SwapPage → TransactionPage}/ExchangeRateBottomSheet.js +3 -3
  413. package/pages/TransactionPage/StartTransactionButton.d.ts +4 -0
  414. package/pages/TransactionPage/StartTransactionButton.js +16 -0
  415. package/pages/{SwapPage → TransactionPage}/StatusBottomSheet.js +28 -25
  416. package/pages/TransactionPage/TokenValueBottomSheet.js +34 -0
  417. package/pages/TransactionPage/TransactionPage.d.ts +2 -0
  418. package/pages/TransactionPage/TransactionPage.js +121 -0
  419. package/pages/TransactionPage/index.d.ts +1 -0
  420. package/pages/TransactionPage/index.js +1 -0
  421. package/pages/TransactionPage/types.d.ts +6 -0
  422. package/pages/TransactionPage/utils.d.ts +2 -0
  423. package/pages/TransactionPage/utils.js +6 -0
  424. package/providers/{SwapFormProvider/SwapFormProvider.d.ts → FormProvider/FormProvider.d.ts} +1 -1
  425. package/providers/{SwapFormProvider/SwapFormProvider.js → FormProvider/FormProvider.js} +12 -12
  426. package/providers/FormProvider/FormUpdater.d.ts +5 -0
  427. package/providers/{SwapFormProvider → FormProvider}/FormUpdater.js +14 -14
  428. package/providers/{SwapFormProvider → FormProvider}/URLSearchParamsBuilder.js +7 -7
  429. package/providers/{SwapFormProvider → FormProvider}/index.d.ts +1 -1
  430. package/providers/{SwapFormProvider → FormProvider}/index.js +1 -1
  431. package/providers/FormProvider/types.d.ts +37 -0
  432. package/providers/FormProvider/types.js +20 -0
  433. package/providers/WalletProvider/WalletProvider.js +5 -3
  434. package/providers/WalletProvider/types.d.ts +1 -1
  435. package/providers/WidgetProvider/WidgetProvider.js +2 -2
  436. package/providers/index.d.ts +1 -1
  437. package/providers/index.js +1 -1
  438. package/stores/routes/createRouteExecutionStore.js +1 -1
  439. package/stores/routes/index.d.ts +1 -1
  440. package/stores/routes/index.js +1 -1
  441. package/stores/routes/useTransactionHistory.d.ts +2 -0
  442. package/stores/routes/{useSwapHistory.js → useTransactionHistory.js} +1 -1
  443. package/tsconfig.cjs.tsbuildinfo +1 -1
  444. package/types/events.d.ts +9 -1
  445. package/types/events.js +1 -0
  446. package/types/widget.d.ts +6 -4
  447. package/utils/format.d.ts +1 -1
  448. package/utils/format.js +11 -13
  449. package/utils/navigationRoutes.d.ts +5 -5
  450. package/utils/navigationRoutes.js +15 -15
  451. package/cjs/components/ActiveSwaps/index.d.ts +0 -2
  452. package/cjs/components/Header/useHeaderActionStore.d.ts +0 -2
  453. package/cjs/components/SwapButton/SwapButton.d.ts +0 -3
  454. package/cjs/components/SwapButton/SwapButton.js +0 -56
  455. package/cjs/components/SwapButton/index.d.ts +0 -2
  456. package/cjs/components/SwapInput/FitInputText.d.ts +0 -3
  457. package/cjs/components/SwapInput/FitInputText.js +0 -19
  458. package/cjs/components/SwapInput/FormPriceHelperText.d.ts +0 -3
  459. package/cjs/components/SwapInput/SwapInput.d.ts +0 -4
  460. package/cjs/components/SwapInput/SwapInput.js +0 -41
  461. package/cjs/components/SwapInput/SwapInputEndAdornment.d.ts +0 -2
  462. package/cjs/components/SwapInput/SwapInputStartAdornment.d.ts +0 -3
  463. package/cjs/components/SwapInput/index.d.ts +0 -1
  464. package/cjs/components/SwapRouteCard/SwapRouteCard.d.ts +0 -4
  465. package/cjs/components/SwapRouteCard/SwapRouteCardEssentials.d.ts +0 -3
  466. package/cjs/components/SwapRouteCard/SwapRouteCardSkeleton.d.ts +0 -4
  467. package/cjs/components/SwapRouteCard/SwapRouteNotFoundCard.d.ts +0 -2
  468. package/cjs/components/SwapRouteCard/index.d.ts +0 -3
  469. package/cjs/components/SwapRouteCard/index.js +0 -19
  470. package/cjs/components/SwapRoutes/SwapRoutes.js +0 -37
  471. package/cjs/components/SwapRoutes/SwapRoutesExpanded.d.ts +0 -2
  472. package/cjs/components/SwapRoutes/SwapRoutesExpanded.js +0 -42
  473. package/cjs/components/SwapRoutes/index.d.ts +0 -2
  474. package/cjs/pages/ActiveSwapsPage/ActiveSwapsEmpty.d.ts +0 -2
  475. package/cjs/pages/ActiveSwapsPage/ActiveSwapsPage.d.ts +0 -1
  476. package/cjs/pages/ActiveSwapsPage/index.d.ts +0 -1
  477. package/cjs/pages/MainPage/MainSwapButton.d.ts +0 -2
  478. package/cjs/pages/MainPage/MainSwapButton.js +0 -27
  479. package/cjs/pages/SwapDetailsPage/SwapDetailsPage.d.ts +0 -2
  480. package/cjs/pages/SwapDetailsPage/index.d.ts +0 -1
  481. package/cjs/pages/SwapHistoryPage/SwapHistoryEmpty.d.ts +0 -2
  482. package/cjs/pages/SwapHistoryPage/SwapHistoryPage.d.ts +0 -2
  483. package/cjs/pages/SwapHistoryPage/SwapHistoryPage.js +0 -35
  484. package/cjs/pages/SwapHistoryPage/index.d.ts +0 -1
  485. package/cjs/pages/SwapPage/StartSwapButton.d.ts +0 -4
  486. package/cjs/pages/SwapPage/StartSwapButton.js +0 -21
  487. package/cjs/pages/SwapPage/SwapPage.d.ts +0 -2
  488. package/cjs/pages/SwapPage/SwapPage.js +0 -99
  489. package/cjs/pages/SwapPage/TokenValueBottomSheet.js +0 -43
  490. package/cjs/pages/SwapPage/index.d.ts +0 -1
  491. package/cjs/pages/SwapPage/types.d.ts +0 -9
  492. package/cjs/pages/SwapRoutesPage/index.d.ts +0 -1
  493. package/cjs/pages/SwapRoutesPage/index.js +0 -17
  494. package/cjs/providers/SwapFormProvider/FormUpdater.d.ts +0 -5
  495. package/cjs/providers/SwapFormProvider/types.d.ts +0 -37
  496. package/cjs/providers/SwapFormProvider/types.js +0 -23
  497. package/cjs/stores/routes/useSwapHistory.d.ts +0 -2
  498. package/components/ActiveSwaps/index.d.ts +0 -2
  499. package/components/ActiveSwaps/index.js +0 -2
  500. package/components/Header/useHeaderActionStore.d.ts +0 -2
  501. package/components/Header/useHeaderActionStore.js +0 -14
  502. package/components/SwapButton/SwapButton.d.ts +0 -3
  503. package/components/SwapButton/SwapButton.js +0 -52
  504. package/components/SwapButton/index.d.ts +0 -2
  505. package/components/SwapButton/index.js +0 -2
  506. package/components/SwapInput/FitInputText.d.ts +0 -3
  507. package/components/SwapInput/FitInputText.js +0 -16
  508. package/components/SwapInput/FormPriceHelperText.d.ts +0 -3
  509. package/components/SwapInput/SwapInput.d.ts +0 -4
  510. package/components/SwapInput/SwapInput.js +0 -37
  511. package/components/SwapInput/SwapInputEndAdornment.d.ts +0 -2
  512. package/components/SwapInput/SwapInputStartAdornment.d.ts +0 -3
  513. package/components/SwapInput/index.d.ts +0 -1
  514. package/components/SwapInput/index.js +0 -1
  515. package/components/SwapRouteCard/SwapRouteCard.d.ts +0 -4
  516. package/components/SwapRouteCard/SwapRouteCardEssentials.d.ts +0 -3
  517. package/components/SwapRouteCard/SwapRouteCardSkeleton.d.ts +0 -4
  518. package/components/SwapRouteCard/SwapRouteNotFoundCard.d.ts +0 -2
  519. package/components/SwapRouteCard/index.d.ts +0 -3
  520. package/components/SwapRouteCard/index.js +0 -3
  521. package/components/SwapRoutes/SwapRoutes.js +0 -33
  522. package/components/SwapRoutes/SwapRoutesExpanded.d.ts +0 -2
  523. package/components/SwapRoutes/index.d.ts +0 -2
  524. package/components/SwapRoutes/index.js +0 -2
  525. package/pages/ActiveSwapsPage/ActiveSwapsEmpty.d.ts +0 -2
  526. package/pages/ActiveSwapsPage/ActiveSwapsPage.d.ts +0 -1
  527. package/pages/ActiveSwapsPage/index.d.ts +0 -1
  528. package/pages/ActiveSwapsPage/index.js +0 -1
  529. package/pages/MainPage/MainSwapButton.d.ts +0 -2
  530. package/pages/MainPage/MainSwapButton.js +0 -23
  531. package/pages/SwapDetailsPage/SwapDetailsPage.d.ts +0 -2
  532. package/pages/SwapDetailsPage/index.d.ts +0 -1
  533. package/pages/SwapDetailsPage/index.js +0 -1
  534. package/pages/SwapHistoryPage/SwapHistoryEmpty.d.ts +0 -2
  535. package/pages/SwapHistoryPage/SwapHistoryPage.d.ts +0 -2
  536. package/pages/SwapHistoryPage/SwapHistoryPage.js +0 -31
  537. package/pages/SwapHistoryPage/index.d.ts +0 -1
  538. package/pages/SwapHistoryPage/index.js +0 -1
  539. package/pages/SwapPage/StartSwapButton.d.ts +0 -4
  540. package/pages/SwapPage/StartSwapButton.js +0 -16
  541. package/pages/SwapPage/SwapPage.d.ts +0 -2
  542. package/pages/SwapPage/SwapPage.js +0 -95
  543. package/pages/SwapPage/TokenValueBottomSheet.js +0 -39
  544. package/pages/SwapPage/index.d.ts +0 -1
  545. package/pages/SwapPage/index.js +0 -1
  546. package/pages/SwapPage/types.d.ts +0 -9
  547. package/pages/SwapRoutesPage/SwapRoutesPage.d.ts +0 -3
  548. package/pages/SwapRoutesPage/index.d.ts +0 -1
  549. package/pages/SwapRoutesPage/index.js +0 -1
  550. package/providers/SwapFormProvider/FormUpdater.d.ts +0 -5
  551. package/providers/SwapFormProvider/types.d.ts +0 -37
  552. package/providers/SwapFormProvider/types.js +0 -20
  553. package/stores/routes/useSwapHistory.d.ts +0 -2
  554. /package/cjs/components/{ActiveSwaps/ActiveSwaps.style.js → ActiveTransactions/ActiveTransactions.style.js} +0 -0
  555. /package/cjs/components/{SwapInput/SwapInput.style.js → AmountInput/AmountInput.style.js} +0 -0
  556. /package/cjs/components/{SwapInput/SwapInputAdornment.style.js → AmountInput/AmountInputAdornment.style.js} +0 -0
  557. /package/cjs/components/{SwapButton → DefaultTransactionButton}/types.js +0 -0
  558. /package/cjs/components/{SwapRouteCard/SwapRouteCard.style.d.ts → RouteCard/RouteCard.style.d.ts} +0 -0
  559. /package/cjs/components/{SwapRouteCard/SwapRouteCard.style.js → RouteCard/RouteCard.style.js} +0 -0
  560. /package/cjs/components/{SwapRouteCard → RouteCard}/types.js +0 -0
  561. /package/cjs/components/{SwapRouteCard → RouteCard}/utils.d.ts +0 -0
  562. /package/cjs/components/{SwapRouteCard → RouteCard}/utils.js +0 -0
  563. /package/cjs/components/{SwapRoutes/SwapRoutesExpanded.style.d.ts → Routes/RoutesExpanded.style.d.ts} +0 -0
  564. /package/cjs/components/{SwapRoutes/SwapRoutesExpanded.style.js → Routes/RoutesExpanded.style.js} +0 -0
  565. /package/cjs/pages/{SwapRoutesPage/SwapRoutesPage.style.d.ts → RoutesPage/RoutesPage.style.d.ts} +0 -0
  566. /package/cjs/pages/{SwapRoutesPage/SwapRoutesPage.style.js → RoutesPage/RoutesPage.style.js} +0 -0
  567. /package/cjs/pages/{SwapDetailsPage/SwapDetailsPage.style.d.ts → TransactionDetailsPage/TransactionDetailsPage.style.d.ts} +0 -0
  568. /package/cjs/pages/{SwapDetailsPage/SwapDetailsPage.style.js → TransactionDetailsPage/TransactionDetailsPage.style.js} +0 -0
  569. /package/cjs/pages/{SwapPage → TransactionPage}/ExchangeRateBottomSheet.d.ts +0 -0
  570. /package/cjs/pages/{SwapPage → TransactionPage}/StatusBottomSheet.d.ts +0 -0
  571. /package/cjs/pages/{SwapPage → TransactionPage}/StatusBottomSheet.style.d.ts +0 -0
  572. /package/cjs/pages/{SwapPage → TransactionPage}/StatusBottomSheet.style.js +0 -0
  573. /package/cjs/pages/{SwapPage → TransactionPage}/TokenValueBottomSheet.d.ts +0 -0
  574. /package/cjs/pages/{SwapPage/SwapPage.style.d.ts → TransactionPage/TransactionPage.style.d.ts} +0 -0
  575. /package/cjs/pages/{SwapPage/SwapPage.style.js → TransactionPage/TransactionPage.style.js} +0 -0
  576. /package/cjs/pages/{SwapPage → TransactionPage}/types.js +0 -0
  577. /package/cjs/providers/{SwapFormProvider → FormProvider}/URLSearchParamsBuilder.d.ts +0 -0
  578. /package/components/{ActiveSwaps/ActiveSwaps.style.js → ActiveTransactions/ActiveTransactions.style.js} +0 -0
  579. /package/components/{SwapInput/SwapInput.style.js → AmountInput/AmountInput.style.js} +0 -0
  580. /package/components/{SwapInput/SwapInputAdornment.style.js → AmountInput/AmountInputAdornment.style.js} +0 -0
  581. /package/components/{SwapButton → DefaultTransactionButton}/types.js +0 -0
  582. /package/components/{SwapRouteCard/SwapRouteCard.style.d.ts → RouteCard/RouteCard.style.d.ts} +0 -0
  583. /package/components/{SwapRouteCard/SwapRouteCard.style.js → RouteCard/RouteCard.style.js} +0 -0
  584. /package/components/{SwapRouteCard → RouteCard}/types.js +0 -0
  585. /package/components/{SwapRouteCard → RouteCard}/utils.d.ts +0 -0
  586. /package/components/{SwapRouteCard → RouteCard}/utils.js +0 -0
  587. /package/components/{SwapRoutes/SwapRoutesExpanded.style.d.ts → Routes/RoutesExpanded.style.d.ts} +0 -0
  588. /package/components/{SwapRoutes/SwapRoutesExpanded.style.js → Routes/RoutesExpanded.style.js} +0 -0
  589. /package/pages/{SwapRoutesPage/SwapRoutesPage.style.d.ts → RoutesPage/RoutesPage.style.d.ts} +0 -0
  590. /package/pages/{SwapRoutesPage/SwapRoutesPage.style.js → RoutesPage/RoutesPage.style.js} +0 -0
  591. /package/pages/{SwapDetailsPage/SwapDetailsPage.style.d.ts → TransactionDetailsPage/TransactionDetailsPage.style.d.ts} +0 -0
  592. /package/pages/{SwapDetailsPage/SwapDetailsPage.style.js → TransactionDetailsPage/TransactionDetailsPage.style.js} +0 -0
  593. /package/pages/{SwapPage → TransactionPage}/ExchangeRateBottomSheet.d.ts +0 -0
  594. /package/pages/{SwapPage → TransactionPage}/StatusBottomSheet.d.ts +0 -0
  595. /package/pages/{SwapPage → TransactionPage}/StatusBottomSheet.style.d.ts +0 -0
  596. /package/pages/{SwapPage → TransactionPage}/StatusBottomSheet.style.js +0 -0
  597. /package/pages/{SwapPage → TransactionPage}/TokenValueBottomSheet.d.ts +0 -0
  598. /package/pages/{SwapPage/SwapPage.style.d.ts → TransactionPage/TransactionPage.style.d.ts} +0 -0
  599. /package/pages/{SwapPage/SwapPage.style.js → TransactionPage/TransactionPage.style.js} +0 -0
  600. /package/pages/{SwapPage → TransactionPage}/types.js +0 -0
  601. /package/providers/{SwapFormProvider → FormProvider}/URLSearchParamsBuilder.d.ts +0 -0
@@ -1,18 +1,18 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ActiveSwapsPage = void 0;
3
+ exports.ActiveTransactionsPage = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const DeleteOutline_1 = require("@mui/icons-material/DeleteOutline");
6
6
  const material_1 = require("@mui/material");
7
7
  const react_1 = require("react");
8
8
  const react_i18next_1 = require("react-i18next");
9
- const ActiveSwaps_1 = require("../../components/ActiveSwaps");
9
+ const ActiveTransactions_1 = require("../../components/ActiveTransactions");
10
10
  const Dialog_1 = require("../../components/Dialog");
11
11
  const Header_1 = require("../../components/Header");
12
12
  const providers_1 = require("../../providers");
13
13
  const stores_1 = require("../../stores");
14
- const ActiveSwapsEmpty_1 = require("./ActiveSwapsEmpty");
15
- const ActiveSwapsPage = () => {
14
+ const ActiveTransactionsEmpty_1 = require("./ActiveTransactionsEmpty");
15
+ const ActiveTransactionsPage = () => {
16
16
  const { t } = (0, react_i18next_1.useTranslation)();
17
17
  const { account } = (0, providers_1.useWallet)();
18
18
  const executingRoutes = (0, stores_1.useExecutingRoutesIds)(account.address);
@@ -23,15 +23,15 @@ const ActiveSwapsPage = () => {
23
23
  }, []);
24
24
  (0, react_1.useEffect)(() => {
25
25
  if (executingRoutes.length) {
26
- 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)(DeleteOutline_1.default, {}) }));
26
+ return Header_1.useHeaderStore.getState().setAction((0, jsx_runtime_1.jsx)(material_1.IconButton, { size: "medium", edge: "end", onClick: toggleDialog, children: (0, jsx_runtime_1.jsx)(DeleteOutline_1.default, {}) }));
27
27
  }
28
28
  }, [executingRoutes.length, toggleDialog]);
29
29
  if (!executingRoutes.length) {
30
- return (0, jsx_runtime_1.jsx)(ActiveSwapsEmpty_1.ActiveSwapsEmpty, {});
30
+ return (0, jsx_runtime_1.jsx)(ActiveTransactionsEmpty_1.ActiveTransactionsEmpty, {});
31
31
  }
32
32
  return ((0, jsx_runtime_1.jsxs)(material_1.Container, { disableGutters: true, children: [(0, jsx_runtime_1.jsx)(material_1.List, { sx: {
33
33
  paddingLeft: 1.5,
34
34
  paddingRight: 1.5,
35
- }, children: executingRoutes.map((routeId) => ((0, jsx_runtime_1.jsx)(ActiveSwaps_1.ActiveSwapItem, { routeId: routeId }, routeId))) }), (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.deleteActiveSwaps') }), (0, jsx_runtime_1.jsx)(material_1.DialogContent, { children: (0, jsx_runtime_1.jsx)(material_1.DialogContentText, { children: t('swap.warning.message.deleteActiveSwaps') }) }), (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('active'), autoFocus: true, children: t('button.delete') })] })] })] }));
35
+ }, children: executingRoutes.map((routeId) => ((0, jsx_runtime_1.jsx)(ActiveTransactions_1.ActiveTransactionItem, { routeId: routeId }, routeId))) }), (0, jsx_runtime_1.jsxs)(Dialog_1.Dialog, { open: open, onClose: toggleDialog, children: [(0, jsx_runtime_1.jsx)(material_1.DialogTitle, { children: t('warning.title.deleteActiveTransactions') }), (0, jsx_runtime_1.jsx)(material_1.DialogContent, { children: (0, jsx_runtime_1.jsx)(material_1.DialogContentText, { children: t('warning.message.deleteActiveTransactions') }) }), (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('active'), autoFocus: true, children: t('button.delete') })] })] })] }));
36
36
  };
37
- exports.ActiveSwapsPage = ActiveSwapsPage;
37
+ exports.ActiveTransactionsPage = ActiveTransactionsPage;
@@ -0,0 +1 @@
1
+ export * from './ActiveTransactionsPage';
@@ -14,4 +14,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./ActiveSwapsPage"), exports);
17
+ __exportStar(require("./ActiveTransactionsPage"), exports);
@@ -5,7 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const GasMessage_1 = require("../../components/GasMessage");
6
6
  const hooks_1 = require("../../hooks");
7
7
  const MainGasMessage = (props) => {
8
- const { routes } = (0, hooks_1.useSwapRoutes)();
8
+ const { routes } = (0, hooks_1.useRoutes)();
9
9
  const currentRoute = routes?.[0];
10
10
  return (0, jsx_runtime_1.jsx)(GasMessage_1.GasMessage, { route: currentRoute, ...props });
11
11
  };
@@ -3,22 +3,22 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MainPage = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const material_1 = require("@mui/material");
6
- const ActiveSwaps_1 = require("../../components/ActiveSwaps");
6
+ const ActiveTransactions_1 = require("../../components/ActiveTransactions");
7
+ const AmountInput_1 = require("../../components/AmountInput");
7
8
  const ContractComponent_1 = require("../../components/ContractComponent");
8
9
  const GasMessage_1 = require("../../components/GasMessage");
10
+ const Routes_1 = require("../../components/Routes");
9
11
  const SelectChainAndToken_1 = require("../../components/SelectChainAndToken");
10
12
  const SendToWallet_1 = require("../../components/SendToWallet");
11
- const SwapInput_1 = require("../../components/SwapInput");
12
- const SwapRoutes_1 = require("../../components/SwapRoutes");
13
13
  const hooks_1 = require("../../hooks");
14
14
  const providers_1 = require("../../providers");
15
15
  const MainGasMessage_1 = require("./MainGasMessage");
16
16
  const MainPage_style_1 = require("./MainPage.style");
17
- const MainSwapButton_1 = require("./MainSwapButton");
17
+ const ReviewButton_1 = require("./ReviewButton");
18
18
  const MainPage = () => {
19
19
  const expandable = (0, hooks_1.useExpandableVariant)();
20
- const { variant } = (0, providers_1.useWidgetConfig)();
21
- const nft = variant === 'nft';
22
- return ((0, jsx_runtime_1.jsxs)(MainPage_style_1.FormContainer, { disableGutters: true, children: [(0, jsx_runtime_1.jsx)(ActiveSwaps_1.ActiveSwaps, { mx: 3, mt: 1, mb: 1 }), nft ? (0, jsx_runtime_1.jsx)(ContractComponent_1.ContractComponent, { mx: 3, mt: 1, mb: 1 }) : null, (0, jsx_runtime_1.jsx)(SelectChainAndToken_1.SelectChainAndToken, { mt: 1, mx: 3, mb: 2 }), !nft ? (0, jsx_runtime_1.jsx)(SwapInput_1.SwapInput, { formType: "from", mx: 3, mb: 2 }) : null, !expandable ? (0, jsx_runtime_1.jsx)(SwapRoutes_1.SwapRoutes, { mx: 3, mb: 2 }) : null, (0, jsx_runtime_1.jsx)(SendToWallet_1.SendToWallet, { mx: 3, mb: 2 }), (0, jsx_runtime_1.jsx)(GasMessage_1.GasRefuelMessage, { mx: 3, mb: 2 }), (0, jsx_runtime_1.jsx)(MainGasMessage_1.MainGasMessage, { mx: 3, mb: 2 }), (0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", mx: 3, mb: 1, children: [(0, jsx_runtime_1.jsx)(MainSwapButton_1.MainSwapButton, {}), (0, jsx_runtime_1.jsx)(SendToWallet_1.SendToWalletButton, {})] })] }));
20
+ const { subvariant, contractComponent } = (0, providers_1.useWidgetConfig)();
21
+ const nft = subvariant === 'nft';
22
+ return ((0, jsx_runtime_1.jsxs)(MainPage_style_1.FormContainer, { disableGutters: true, children: [(0, jsx_runtime_1.jsx)(ActiveTransactions_1.ActiveTransactions, { mx: 3, mt: 1, mb: 1 }), nft ? ((0, jsx_runtime_1.jsx)(ContractComponent_1.ContractComponent, { mx: 3, mt: 1, mb: 1, children: contractComponent })) : null, (0, jsx_runtime_1.jsx)(SelectChainAndToken_1.SelectChainAndToken, { mt: 1, mx: 3, mb: 2 }), !nft ? (0, jsx_runtime_1.jsx)(AmountInput_1.AmountInput, { formType: "from", mx: 3, mb: 2 }) : null, !expandable ? (0, jsx_runtime_1.jsx)(Routes_1.Routes, { mx: 3, mb: 2 }) : null, (0, jsx_runtime_1.jsx)(SendToWallet_1.SendToWallet, { mx: 3, mb: 2 }), (0, jsx_runtime_1.jsx)(GasMessage_1.GasRefuelMessage, { mx: 3, mb: 2 }), (0, jsx_runtime_1.jsx)(MainGasMessage_1.MainGasMessage, { mx: 3, mb: 2 }), (0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", mx: 3, mb: 1, children: [(0, jsx_runtime_1.jsx)(ReviewButton_1.ReviewButton, {}), (0, jsx_runtime_1.jsx)(SendToWallet_1.SendToWalletButton, {})] })] }));
23
23
  };
24
24
  exports.MainPage = MainPage;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const ReviewButton: React.FC;
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ReviewButton = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_hook_form_1 = require("react-hook-form");
6
+ const react_i18next_1 = require("react-i18next");
7
+ const react_router_dom_1 = require("react-router-dom");
8
+ const DefaultTransactionButton_1 = require("../../components/DefaultTransactionButton");
9
+ const hooks_1 = require("../../hooks");
10
+ const providers_1 = require("../../providers");
11
+ const stores_1 = require("../../stores");
12
+ const utils_1 = require("../../utils");
13
+ const ReviewButton = () => {
14
+ const { t } = (0, react_i18next_1.useTranslation)();
15
+ const navigate = (0, react_router_dom_1.useNavigate)();
16
+ const { isValid, isValidating } = (0, react_hook_form_1.useFormState)();
17
+ const setExecutableRoute = (0, stores_1.useSetExecutableRoute)();
18
+ const { subvariant } = (0, providers_1.useWidgetConfig)();
19
+ const splitState = (0, stores_1.useSplitSubvariantStore)((state) => state.state);
20
+ const { routes } = (0, hooks_1.useRoutes)();
21
+ const currentRoute = routes?.[0];
22
+ const handleClick = async () => {
23
+ if (currentRoute) {
24
+ setExecutableRoute(currentRoute);
25
+ navigate(utils_1.navigationRoutes.transactionExecution, {
26
+ state: { routeId: currentRoute.id },
27
+ });
28
+ }
29
+ };
30
+ const getButtonText = () => {
31
+ if (currentRoute) {
32
+ switch (subvariant) {
33
+ case 'nft':
34
+ return t(`button.reviewPurchase`);
35
+ case 'refuel':
36
+ return t(`button.reviewBridge`);
37
+ default:
38
+ const transactionType = currentRoute.fromChainId === currentRoute.toChainId
39
+ ? 'Swap'
40
+ : 'Bridge';
41
+ return t(`button.review${transactionType}`);
42
+ }
43
+ }
44
+ else {
45
+ switch (subvariant) {
46
+ case 'nft':
47
+ return t(`button.buy`);
48
+ case 'refuel':
49
+ return t(`button.getGas`);
50
+ case 'split':
51
+ if (splitState) {
52
+ return t(`button.${splitState}`);
53
+ }
54
+ return t(`button.exchange`);
55
+ default:
56
+ return t(`button.exchange`);
57
+ }
58
+ }
59
+ };
60
+ return ((0, jsx_runtime_1.jsx)(DefaultTransactionButton_1.DefaultTransactionButton, { text: getButtonText(), onClick: handleClick, disabled: currentRoute && (isValidating || !isValid) }));
61
+ };
62
+ exports.ReviewButton = ReviewButton;
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
2
  import type { BoxProps } from '@mui/material';
3
- export declare const SwapRoutes: React.FC<BoxProps>;
3
+ export declare const RoutesPage: React.FC<BoxProps>;
@@ -1,38 +1,38 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SwapRoutesPage = void 0;
3
+ exports.RoutesPage = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const Header_1 = require("../../components/Header");
7
7
  const ProgressToNextUpdate_1 = require("../../components/ProgressToNextUpdate");
8
- const SwapRouteCard_1 = require("../../components/SwapRouteCard");
8
+ const RouteCard_1 = require("../../components/RouteCard");
9
9
  const hooks_1 = require("../../hooks");
10
10
  const stores_1 = require("../../stores");
11
11
  const utils_1 = require("../../utils");
12
- const SwapRoutesPage_style_1 = require("./SwapRoutesPage.style");
13
- const SwapRoutesPage = () => {
12
+ const RoutesPage_style_1 = require("./RoutesPage.style");
13
+ const RoutesPage = () => {
14
14
  const { navigateBack, navigate } = (0, hooks_1.useNavigateBack)();
15
- const { routes: swapRoutes, isLoading, isFetching, dataUpdatedAt, refetchTime, refetch, } = (0, hooks_1.useSwapRoutes)();
15
+ const { routes, isLoading, isFetching, dataUpdatedAt, refetchTime, refetch } = (0, hooks_1.useRoutes)();
16
16
  const setExecutableRoute = (0, stores_1.useSetExecutableRoute)();
17
17
  const handleRouteClick = (route) => {
18
18
  setExecutableRoute(route);
19
- navigate(utils_1.navigationRoutes.swapExecution, {
19
+ navigate(utils_1.navigationRoutes.transactionExecution, {
20
20
  state: { routeId: route.id },
21
21
  });
22
22
  };
23
23
  (0, react_1.useEffect)(() => {
24
- if (!swapRoutes?.length && !isLoading && !isFetching) {
24
+ if (!routes?.length && !isLoading && !isFetching) {
25
25
  navigateBack();
26
26
  }
27
27
  // redirect to the home page if no routes are found on page reload
28
28
  // eslint-disable-next-line react-hooks/exhaustive-deps
29
29
  }, []);
30
30
  (0, react_1.useEffect)(() => {
31
- return Header_1.useHeaderActionStore
31
+ return Header_1.useHeaderStore
32
32
  .getState()
33
33
  .setAction((0, jsx_runtime_1.jsx)(ProgressToNextUpdate_1.ProgressToNextUpdate, { updatedAt: dataUpdatedAt || new Date().getTime(), timeToUpdate: refetchTime, isLoading: isFetching, onClick: () => refetch(), sx: { marginRight: -1 }, size: "medium", edge: "end" }));
34
34
  }, [dataUpdatedAt, isFetching, refetch, refetchTime]);
35
- const routeNotFound = !swapRoutes?.length && !isLoading && !isFetching;
36
- return ((0, jsx_runtime_1.jsx)(SwapRoutesPage_style_1.Stack, { direction: "column", spacing: 2, flex: 1, children: routeNotFound ? ((0, jsx_runtime_1.jsx)(SwapRouteCard_1.SwapRouteNotFoundCard, {})) : isLoading ? (Array.from({ length: 3 }).map((_, index) => ((0, jsx_runtime_1.jsx)(SwapRouteCard_1.SwapRouteCardSkeleton, {}, index)))) : (swapRoutes?.map((route, index) => ((0, jsx_runtime_1.jsx)(SwapRouteCard_1.SwapRouteCard, { route: route, onClick: () => handleRouteClick(route), active: index === 0, expanded: swapRoutes?.length <= 2 }, route.id)))) }));
35
+ const routeNotFound = !routes?.length && !isLoading && !isFetching;
36
+ return ((0, jsx_runtime_1.jsx)(RoutesPage_style_1.Stack, { direction: "column", spacing: 2, flex: 1, children: routeNotFound ? ((0, jsx_runtime_1.jsx)(RouteCard_1.RouteNotFoundCard, {})) : isLoading ? (Array.from({ length: 3 }).map((_, index) => ((0, jsx_runtime_1.jsx)(RouteCard_1.RouteCardSkeleton, {}, index)))) : (routes?.map((route, index) => ((0, jsx_runtime_1.jsx)(RouteCard_1.RouteCard, { route: route, onClick: () => handleRouteClick(route), active: index === 0, expanded: routes?.length <= 2 }, route.id)))) }));
37
37
  };
38
- exports.SwapRoutesPage = SwapRoutesPage;
38
+ exports.RoutesPage = RoutesPage;
@@ -0,0 +1 @@
1
+ export * from './RoutesPage';
@@ -14,4 +14,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./SwapInput"), exports);
17
+ __exportStar(require("./RoutesPage"), exports);
@@ -1,4 +1,4 @@
1
- import type { SwapFormTypeProps } from '../../providers';
2
- export interface SelectChainPageProps extends SwapFormTypeProps {
1
+ import type { FormTypeProps } from '../../providers';
2
+ export interface SelectChainPageProps extends FormTypeProps {
3
3
  selectNativeToken?: boolean;
4
4
  }
@@ -44,7 +44,7 @@ const SelectEnabledToolsPage = ({ type }) => {
44
44
  setTools(type, toolKeys, toolKeys);
45
45
  }
46
46
  };
47
- return Header_1.useHeaderActionStore.getState().setAction((0, jsx_runtime_1.jsx)(material_1.IconButton, { size: "medium", edge: "end", onClick: toggleCheckboxes, children: allToolsSelected ? ((0, jsx_runtime_1.jsx)(CheckBoxOutlined_1.default, {})) : enabledTools.length ? ((0, jsx_runtime_1.jsx)(IndeterminateCheckBoxOutlined_1.default, {})) : ((0, jsx_runtime_1.jsx)(CheckBoxOutlineBlankOutlined_1.default, {})) }));
47
+ return Header_1.useHeaderStore.getState().setAction((0, jsx_runtime_1.jsx)(material_1.IconButton, { size: "medium", edge: "end", onClick: toggleCheckboxes, children: allToolsSelected ? ((0, jsx_runtime_1.jsx)(CheckBoxOutlined_1.default, {})) : enabledTools.length ? ((0, jsx_runtime_1.jsx)(IndeterminateCheckBoxOutlined_1.default, {})) : ((0, jsx_runtime_1.jsx)(CheckBoxOutlineBlankOutlined_1.default, {})) }));
48
48
  }, [enabledTools.length, setTools, tools, type, typeKey]);
49
49
  return ((0, jsx_runtime_1.jsx)(material_1.Container, { disableGutters: true, children: (0, jsx_runtime_1.jsx)(material_1.List, { sx: {
50
50
  paddingLeft: 1.5,
@@ -17,4 +17,4 @@ export declare const ListItemButton: import("@emotion/styled").StyledComponent<i
17
17
  touchRippleRef?: import("react").Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions> | undefined;
18
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
- }, "className" | "style" | "classes" | "autoFocus" | "tabIndex" | "children" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "TouchRippleProps" | "touchRippleRef" | "alignItems" | "dense" | "divider" | "selected" | "disableGutters"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
20
+ }, "className" | "style" | "classes" | "autoFocus" | "tabIndex" | "children" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "TouchRippleProps" | "touchRippleRef" | "alignItems" | "divider" | "dense" | "selected" | "disableGutters"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
- import type { SwapFormTypeProps } from '../../providers';
3
- export declare const SelectNativeTokenPage: React.FC<SwapFormTypeProps>;
2
+ import type { FormTypeProps } from '../../providers';
3
+ export declare const SelectNativeTokenPage: React.FC<FormTypeProps>;
@@ -17,6 +17,6 @@ const SelectNativeTokenPage = ({ formType, }) => {
17
17
  return ((0, jsx_runtime_1.jsx)(material_1.Container, { disableGutters: true, children: (0, jsx_runtime_1.jsx)(material_1.List, { sx: {
18
18
  paddingLeft: 1.5,
19
19
  paddingRight: 1.5,
20
- }, children: chains?.map((chain) => ((0, jsx_runtime_1.jsxs)(ListItemButton_1.ListItemButton, { onClick: () => selectToken(chain.nativeToken.address, chain.id), children: [(0, jsx_runtime_1.jsx)(material_1.ListItemAvatar, { children: (0, jsx_runtime_1.jsx)(TokenAvatar_1.TokenAvatar, { token: chain.nativeToken, chain: chain }) }), (0, jsx_runtime_1.jsx)(ListItemText_1.ListItemText, { primary: chain.nativeToken.symbol, secondary: t('swap.onChain', { chainName: chain.name }) })] }, chain.id))) }) }));
20
+ }, children: chains?.map((chain) => ((0, jsx_runtime_1.jsxs)(ListItemButton_1.ListItemButton, { onClick: () => selectToken(chain.nativeToken.address, chain.id), children: [(0, jsx_runtime_1.jsx)(material_1.ListItemAvatar, { children: (0, jsx_runtime_1.jsx)(TokenAvatar_1.TokenAvatar, { token: chain.nativeToken, chain: chain }) }), (0, jsx_runtime_1.jsx)(ListItemText_1.ListItemText, { primary: chain.nativeToken.symbol, secondary: t('main.onChain', { chainName: chain.name }) })] }, chain.id))) }) }));
21
21
  };
22
22
  exports.SelectNativeTokenPage = SelectNativeTokenPage;
@@ -14,11 +14,11 @@ const SearchTokenInput = () => {
14
14
  const { t } = (0, react_i18next_1.useTranslation)();
15
15
  const { register, setValue } = (0, react_hook_form_1.useFormContext)();
16
16
  (0, react_1.useEffect)(() => () => {
17
- setValue(providers_1.SwapFormKey.TokenSearchFilter, '');
17
+ setValue(providers_1.FormKey.TokenSearchFilter, '');
18
18
  }, [setValue]);
19
- return ((0, jsx_runtime_1.jsx)(Card_1.Card, { children: (0, jsx_runtime_1.jsx)(material_1.FormControl, { fullWidth: true, children: (0, jsx_runtime_1.jsx)(SearchTokenInput_style_1.Input, { size: "small", placeholder: t(`swap.tokenSearch`), defaultValue: "", endAdornment: (0, jsx_runtime_1.jsx)(material_1.InputAdornment, { position: "end", children: (0, jsx_runtime_1.jsx)(Search_1.default, {}) }), inputProps: {
19
+ return ((0, jsx_runtime_1.jsx)(Card_1.Card, { children: (0, jsx_runtime_1.jsx)(material_1.FormControl, { fullWidth: true, children: (0, jsx_runtime_1.jsx)(SearchTokenInput_style_1.Input, { size: "small", placeholder: t(`main.tokenSearch`), defaultValue: "", endAdornment: (0, jsx_runtime_1.jsx)(material_1.InputAdornment, { position: "end", children: (0, jsx_runtime_1.jsx)(Search_1.default, {}) }), inputProps: {
20
20
  inputMode: 'search',
21
- ...register(providers_1.SwapFormKey.TokenSearchFilter),
21
+ ...register(providers_1.FormKey.TokenSearchFilter),
22
22
  }, autoComplete: "off" }) }) }));
23
23
  };
24
24
  exports.SearchTokenInput = SearchTokenInput;
@@ -1,3 +1,3 @@
1
1
  import type { FC } from 'react';
2
- import type { SwapFormTypeProps } from '../../providers';
3
- export declare const SelectTokenPage: FC<SwapFormTypeProps>;
2
+ import type { FormTypeProps } from '../../providers';
3
+ export declare const SelectTokenPage: FC<FormTypeProps>;
@@ -5,4 +5,4 @@ var TokenFilterType;
5
5
  (function (TokenFilterType) {
6
6
  TokenFilterType[TokenFilterType["My"] = 0] = "My";
7
7
  TokenFilterType[TokenFilterType["All"] = 1] = "All";
8
- })(TokenFilterType = exports.TokenFilterType || (exports.TokenFilterType = {}));
8
+ })(TokenFilterType || (exports.TokenFilterType = TokenFilterType = {}));
@@ -2,14 +2,14 @@
2
2
  export declare const ToggleButton: import("@emotion/styled").StyledComponent<{
3
3
  children?: import("react").ReactNode;
4
4
  classes?: Partial<import("@mui/material").ToggleButtonClasses> | undefined;
5
- color?: import("@mui/types").OverridableStringUnion<"success" | "warning" | "error" | "primary" | "secondary" | "info" | "standard", import("@mui/material").ToggleButtonPropsColorOverrides> | undefined;
5
+ color?: import("@mui/types").OverridableStringUnion<"primary" | "secondary" | "error" | "warning" | "info" | "success" | "standard", import("@mui/material").ToggleButtonPropsColorOverrides> | undefined;
6
6
  disabled?: boolean | undefined;
7
7
  disableFocusRipple?: boolean | undefined;
8
8
  fullWidth?: boolean | undefined;
9
9
  onChange?: ((event: import("react").MouseEvent<HTMLElement, MouseEvent>, value: any) => void) | undefined;
10
10
  onClick?: ((event: import("react").MouseEvent<HTMLElement, MouseEvent>, value: any) => void) | undefined;
11
11
  selected?: boolean | undefined;
12
- size?: import("@mui/types").OverridableStringUnion<"small" | "medium" | "large", import("@mui/material").ToggleButtonPropsSizeOverrides> | undefined;
12
+ size?: import("@mui/types").OverridableStringUnion<"small" | "large" | "medium", import("@mui/material").ToggleButtonPropsSizeOverrides> | undefined;
13
13
  sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
14
14
  value: {};
15
15
  } & Omit<{
@@ -17,5 +17,5 @@ export declare const ListItemButton: import("@emotion/styled").StyledComponent<i
17
17
  touchRippleRef?: import("react").Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions> | undefined;
18
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
- }, "className" | "style" | "classes" | "autoFocus" | "tabIndex" | "children" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "TouchRippleProps" | "touchRippleRef" | "alignItems" | "dense" | "divider" | "selected" | "disableGutters"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
20
+ }, "className" | "style" | "classes" | "autoFocus" | "tabIndex" | "children" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "TouchRippleProps" | "touchRippleRef" | "alignItems" | "divider" | "dense" | "selected" | "disableGutters"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
21
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>, {}, {}>;
@@ -27,7 +27,7 @@ const LanguageSelect = () => {
27
27
  if (filteredLanguages.length <= 1) {
28
28
  return null;
29
29
  }
30
- const value = filteredLanguages.includes(language || i18n.resolvedLanguage)
30
+ const value = filteredLanguages.includes(language || i18n.resolvedLanguage || '')
31
31
  ? language || i18n.resolvedLanguage
32
32
  : languages?.default || languages?.allow?.[0];
33
33
  return ((0, jsx_runtime_1.jsxs)(Card_1.Card, { mb: 2, children: [(0, jsx_runtime_1.jsx)(Card_1.CardTitle, { children: t(`language.title`) }), (0, jsx_runtime_1.jsx)(material_1.FormControl, { fullWidth: true, children: (0, jsx_runtime_1.jsx)(Select_1.Select, { MenuProps: { elevation: 2 }, value: value, onChange: handleChangeLanguage, IconComponent: KeyboardArrowDown_1.default, dense: true, children: filteredLanguages.map((lng) => {
@@ -24,6 +24,6 @@ const ResetSettingsButton = () => {
24
24
  }
25
25
  toggleDialog();
26
26
  };
27
- return ((0, jsx_runtime_1.jsxs)(material_1.Box, { px: 3, mt: 1.5, children: [(0, jsx_runtime_1.jsx)(material_1.Button, { onClick: toggleDialog, fullWidth: true, children: t('button.resetSettings') }), (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.resetSettings') }), (0, jsx_runtime_1.jsx)(material_1.DialogContent, { children: (0, jsx_runtime_1.jsx)(material_1.DialogContentText, { children: t('swap.warning.message.resetSettings') }) }), (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: handleReset, autoFocus: true, children: t('button.reset') })] })] })] }));
27
+ return ((0, jsx_runtime_1.jsxs)(material_1.Box, { px: 3, mt: 1.5, mb: 1, children: [(0, jsx_runtime_1.jsx)(material_1.Button, { onClick: toggleDialog, fullWidth: true, children: t('button.resetSettings') }), (0, jsx_runtime_1.jsxs)(Dialog_1.Dialog, { open: open, onClose: toggleDialog, children: [(0, jsx_runtime_1.jsx)(material_1.DialogTitle, { children: t('warning.title.resetSettings') }), (0, jsx_runtime_1.jsx)(material_1.DialogContent, { children: (0, jsx_runtime_1.jsx)(material_1.DialogContentText, { children: t('warning.message.resetSettings') }) }), (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: handleReset, autoFocus: true, children: t('button.reset') })] })] })] }));
28
28
  };
29
29
  exports.ResetSettingsButton = ResetSettingsButton;
@@ -15,7 +15,7 @@ const RoutePrioritySelect = () => {
15
15
  const { routePriority } = (0, stores_1.useSettings)(['routePriority']);
16
16
  const value = routePriority ?? '';
17
17
  return ((0, jsx_runtime_1.jsxs)(Card_1.Card, { children: [(0, jsx_runtime_1.jsx)(Card_1.CardTitle, { children: t(`settings.routePriority`) }), (0, jsx_runtime_1.jsx)(material_1.FormControl, { fullWidth: true, children: (0, jsx_runtime_1.jsx)(Select_1.Select, { MenuProps: { elevation: 2 }, value: value, onChange: (event) => setValue('routePriority', event.target.value), IconComponent: KeyboardArrowDown_1.default, dense: true, children: sdk_1.Orders.map((order) => {
18
- const tag = t(`swap.tags.${order.toLowerCase()}`);
18
+ const tag = t(`main.tags.${order.toLowerCase()}`);
19
19
  const tagName = `${tag[0]}${tag.slice(1).toLowerCase()}`;
20
20
  return ((0, jsx_runtime_1.jsx)(material_1.MenuItem, { value: order, children: tagName }, order));
21
21
  }) }) })] }));
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const TransactionDetailsPage: React.FC;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SwapDetailsPage = void 0;
3
+ exports.TransactionDetailsPage = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const ContentCopyRounded_1 = require("@mui/icons-material/ContentCopyRounded");
6
6
  const DeleteOutline_1 = require("@mui/icons-material/DeleteOutline");
@@ -18,11 +18,12 @@ const Step_1 = require("../../components/Step");
18
18
  const hooks_1 = require("../../hooks");
19
19
  const providers_1 = require("../../providers");
20
20
  const stores_1 = require("../../stores");
21
- const SwapDetailsPage_style_1 = require("./SwapDetailsPage.style");
22
- const SwapDetailsPage = () => {
21
+ const utils_1 = require("../../utils");
22
+ const TransactionDetailsPage_style_1 = require("./TransactionDetailsPage.style");
23
+ const TransactionDetailsPage = () => {
23
24
  const { t, i18n } = (0, react_i18next_1.useTranslation)();
24
25
  const { navigateBack } = (0, hooks_1.useNavigateBack)();
25
- const { variant } = (0, providers_1.useWidgetConfig)();
26
+ const { subvariant, contractComponent, contractSecondaryComponent } = (0, providers_1.useWidgetConfig)();
26
27
  const { state } = (0, react_router_dom_1.useLocation)();
27
28
  const [routeExecution, deleteRoute] = (0, stores_1.useRouteExecutionStore)((store) => [store.routes[state?.routeId], store.deleteRoute], shallow_1.shallow);
28
29
  const [open, setOpen] = (0, react_1.useState)(false);
@@ -47,18 +48,18 @@ const SwapDetailsPage = () => {
47
48
  await navigator.clipboard.writeText(supportId);
48
49
  };
49
50
  (0, react_1.useEffect)(() => {
50
- 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)(DeleteOutline_1.default, {}) }));
51
+ return Header_1.useHeaderStore.getState().setAction((0, jsx_runtime_1.jsx)(material_1.IconButton, { size: "medium", edge: "end", onClick: toggleDialog, children: (0, jsx_runtime_1.jsx)(DeleteOutline_1.default, {}) }));
51
52
  }, [toggleDialog]);
52
53
  const startedAt = new Date(routeExecution?.route.steps[0].execution?.process[0].startedAt ?? 0);
53
- return ((0, jsx_runtime_1.jsxs)(SwapDetailsPage_style_1.Container, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
54
+ return ((0, jsx_runtime_1.jsxs)(TransactionDetailsPage_style_1.Container, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
54
55
  display: 'flex',
55
56
  flex: 1,
56
57
  justifyContent: 'space-between',
57
58
  }, 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, {
58
59
  timeStyle: 'short',
59
- }).format(startedAt) })] }), (0, Step_1.getStepList)(routeExecution?.route), variant === 'nft' ? (0, jsx_runtime_1.jsx)(ContractComponent_1.ContractComponent, { mt: 2 }) : null, routeExecution?.route?.insurance?.state === 'INSURED' ? ((0, jsx_runtime_1.jsx)(Insurance_1.Insurance, { mt: 2, status: routeExecution.status, feeAmountUsd: routeExecution.route.insurance.feeAmountUsd, insurableRouteId: routeExecution.route.id, insuranceCoverageId: insuranceCoverageId })) : null, (0, jsx_runtime_1.jsxs)(Card_1.Card, { mt: 2, children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
60
+ }).format(startedAt) })] }), (0, Step_1.getStepList)(routeExecution?.route), subvariant === 'nft' ? ((0, jsx_runtime_1.jsx)(ContractComponent_1.ContractComponent, { mt: 2, children: contractSecondaryComponent || contractComponent })) : null, routeExecution?.route?.insurance?.state === 'INSURED' ? ((0, jsx_runtime_1.jsx)(Insurance_1.Insurance, { mt: 2, status: routeExecution.status, feeAmountUsd: routeExecution.route.insurance.feeAmountUsd, insuredAmount: (0, utils_1.formatTokenAmount)(routeExecution.route.toAmountMin, routeExecution.route.toToken.decimals), insuredTokenSymbol: routeExecution.route.toToken.symbol, insurableRouteId: routeExecution.route.id, insuranceCoverageId: insuranceCoverageId })) : null, (0, jsx_runtime_1.jsxs)(Card_1.Card, { mt: 2, children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
60
61
  display: 'flex',
61
62
  flex: 1,
62
- }, 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)(ContentCopyRounded_1.default, { 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.gg/lifi", 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') })] })] })] }));
63
+ }, children: [(0, jsx_runtime_1.jsx)(Card_1.CardTitle, { flex: 1, children: t('main.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)(ContentCopyRounded_1.default, { 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.gg/lifi", 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('warning.title.deleteTransaction') }), (0, jsx_runtime_1.jsx)(material_1.DialogContent, { children: (0, jsx_runtime_1.jsx)(material_1.DialogContentText, { children: t('warning.message.deleteTransactionHistory') }) }), (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') })] })] })] }));
63
64
  };
64
- exports.SwapDetailsPage = SwapDetailsPage;
65
+ exports.TransactionDetailsPage = TransactionDetailsPage;
@@ -0,0 +1 @@
1
+ export * from './TransactionDetailsPage';
@@ -14,4 +14,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./SwapDetailsPage"), exports);
17
+ __exportStar(require("./TransactionDetailsPage"), exports);
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const TransactionHistoryEmpty: React.FC;
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SwapHistoryEmpty = void 0;
3
+ exports.TransactionHistoryEmpty = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const ReceiptLongRounded_1 = require("@mui/icons-material/ReceiptLongRounded");
6
6
  const material_1 = require("@mui/material");
7
7
  const react_i18next_1 = require("react-i18next");
8
- const SwapHistoryEmpty = () => {
8
+ const TransactionHistoryEmpty = () => {
9
9
  const { t } = (0, react_i18next_1.useTranslation)();
10
10
  return ((0, jsx_runtime_1.jsxs)(material_1.Container, { sx: {
11
11
  display: 'flex',
@@ -14,6 +14,6 @@ const SwapHistoryEmpty = () => {
14
14
  alignItems: 'center',
15
15
  justifyContent: 'center',
16
16
  paddingY: 12,
17
- }, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { fontSize: 48, children: (0, jsx_runtime_1.jsx)(ReceiptLongRounded_1.default, { 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') })] }));
17
+ }, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { fontSize: 48, children: (0, jsx_runtime_1.jsx)(ReceiptLongRounded_1.default, { fontSize: "inherit" }) }), (0, jsx_runtime_1.jsx)(material_1.Typography, { fontSize: 18, fontWeight: 700, children: t('info.title.emptyTransactionHistory') }), (0, jsx_runtime_1.jsx)(material_1.Typography, { fontSize: 14, color: "text.secondary", textAlign: "center", mt: 2, children: t('info.message.emptyTransactionHistory') })] }));
18
18
  };
19
- exports.SwapHistoryEmpty = SwapHistoryEmpty;
19
+ exports.TransactionHistoryEmpty = TransactionHistoryEmpty;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import type { Route } from '@lifi/sdk';
3
- export declare const SwapHistoryItem: React.FC<{
3
+ export declare const TransactionHistoryItem: React.FC<{
4
4
  route: Route;
5
5
  }>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SwapHistoryItem = void 0;
3
+ exports.TransactionHistoryItem = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const material_1 = require("@mui/material");
6
6
  const react_i18next_1 = require("react-i18next");
@@ -8,11 +8,11 @@ const react_router_dom_1 = require("react-router-dom");
8
8
  const Card_1 = require("../../components/Card");
9
9
  const Token_1 = require("../../components/Token");
10
10
  const utils_1 = require("../../utils");
11
- const SwapHistoryItem = ({ route }) => {
11
+ const TransactionHistoryItem = ({ route }) => {
12
12
  const { i18n } = (0, react_i18next_1.useTranslation)();
13
13
  const navigate = (0, react_router_dom_1.useNavigate)();
14
14
  const handleClick = () => {
15
- navigate(utils_1.navigationRoutes.swapDetails, {
15
+ navigate(utils_1.navigationRoutes.transactionDetails, {
16
16
  state: { routeId: route.id },
17
17
  });
18
18
  };
@@ -30,4 +30,4 @@ const SwapHistoryItem = ({ route }) => {
30
30
  timeStyle: 'short',
31
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 })] })] }));
32
32
  };
33
- exports.SwapHistoryItem = SwapHistoryItem;
33
+ exports.TransactionHistoryItem = TransactionHistoryItem;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const TransactionHistoryPage: React.FC;
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TransactionHistoryPage = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const DeleteOutline_1 = require("@mui/icons-material/DeleteOutline");
6
+ const material_1 = require("@mui/material");
7
+ const react_1 = require("react");
8
+ const react_i18next_1 = require("react-i18next");
9
+ const Dialog_1 = require("../../components/Dialog");
10
+ const Header_1 = require("../../components/Header");
11
+ const providers_1 = require("../../providers");
12
+ const stores_1 = require("../../stores");
13
+ const routes_1 = require("../../stores/routes");
14
+ const TransactionHistoryEmpty_1 = require("./TransactionHistoryEmpty");
15
+ const TransactionHistoryItem_1 = require("./TransactionHistoryItem");
16
+ const TransactionHistoryPage = () => {
17
+ const { t } = (0, react_i18next_1.useTranslation)();
18
+ const { account } = (0, providers_1.useWallet)();
19
+ const transactions = (0, routes_1.useTransactionHistory)(account.address);
20
+ const deleteRoutes = (0, stores_1.useRouteExecutionStore)((store) => store.deleteRoutes);
21
+ const [open, setOpen] = (0, react_1.useState)(false);
22
+ const toggleDialog = (0, react_1.useCallback)(() => {
23
+ setOpen((open) => !open);
24
+ }, []);
25
+ (0, react_1.useEffect)(() => {
26
+ if (transactions.length) {
27
+ return Header_1.useHeaderStore.getState().setAction((0, jsx_runtime_1.jsx)(material_1.IconButton, { size: "medium", edge: "end", onClick: toggleDialog, children: (0, jsx_runtime_1.jsx)(DeleteOutline_1.default, {}) }));
28
+ }
29
+ }, [transactions.length, toggleDialog]);
30
+ if (!transactions.length) {
31
+ return (0, jsx_runtime_1.jsx)(TransactionHistoryEmpty_1.TransactionHistoryEmpty, {});
32
+ }
33
+ return ((0, jsx_runtime_1.jsxs)(material_1.Container, { children: [(0, jsx_runtime_1.jsx)(material_1.Stack, { spacing: 2, mt: 1, children: transactions.length ? (transactions.map(({ route }) => ((0, jsx_runtime_1.jsx)(TransactionHistoryItem_1.TransactionHistoryItem, { route: route }, route.id)))) : ((0, jsx_runtime_1.jsx)(TransactionHistoryEmpty_1.TransactionHistoryEmpty, {})) }), (0, jsx_runtime_1.jsxs)(Dialog_1.Dialog, { open: open, onClose: toggleDialog, children: [(0, jsx_runtime_1.jsx)(material_1.DialogTitle, { children: t('warning.title.deleteTransactionHistory') }), (0, jsx_runtime_1.jsx)(material_1.DialogContent, { children: (0, jsx_runtime_1.jsx)(material_1.DialogContentText, { children: t('warning.message.deleteTransactionHistory') }) }), (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') })] })] })] }));
34
+ };
35
+ exports.TransactionHistoryPage = TransactionHistoryPage;
@@ -0,0 +1 @@
1
+ export * from './TransactionHistoryPage';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./TransactionHistoryPage"), exports);