@lifi/widget 2.0.0-beta.14 → 2.0.0-beta.15

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 (529) 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 +1 -1
  5. package/AppProvider.js +4 -4
  6. package/AppRoutes.js +16 -16
  7. package/cjs/App.js +2 -2
  8. package/cjs/AppDrawer.d.ts +3 -2
  9. package/cjs/AppDrawer.js +7 -3
  10. package/cjs/AppDrawer.style.d.ts +1 -1
  11. package/cjs/AppProvider.js +3 -3
  12. package/cjs/AppRoutes.js +16 -16
  13. package/cjs/components/{ActiveSwaps/ActiveSwapItem.d.ts → ActiveTransactions/ActiveTransactionItem.d.ts} +1 -1
  14. package/cjs/components/{ActiveSwaps/ActiveSwapItem.js → ActiveTransactions/ActiveTransactionItem.js} +6 -6
  15. package/cjs/{pages/SwapRoutesPage/SwapRoutesPage.d.ts → components/ActiveTransactions/ActiveTransactions.d.ts} +1 -1
  16. package/cjs/components/{ActiveSwaps/ActiveSwaps.js → ActiveTransactions/ActiveTransactions.js} +7 -7
  17. package/cjs/components/{ActiveSwaps/ActiveSwaps.style.d.ts → ActiveTransactions/ActiveTransactions.style.d.ts} +1 -1
  18. package/cjs/components/ActiveTransactions/index.d.ts +2 -0
  19. package/cjs/components/{ActiveSwaps → ActiveTransactions}/index.js +2 -2
  20. package/cjs/components/{SwapInput/SwapInput.d.ts → AmountInput/AmountInput.d.ts} +3 -3
  21. package/cjs/components/{SwapInput/SwapInput.js → AmountInput/AmountInput.js} +14 -14
  22. package/{components/SwapInput/SwapInput.style.d.ts → cjs/components/AmountInput/AmountInput.style.d.ts} +1 -1
  23. package/{components/SwapInput/SwapInputAdornment.style.d.ts → cjs/components/AmountInput/AmountInputAdornment.style.d.ts} +1 -1
  24. package/cjs/components/AmountInput/AmountInputEndAdornment.d.ts +2 -0
  25. package/cjs/components/{SwapInput/SwapInputEndAdornment.js → AmountInput/AmountInputEndAdornment.js} +8 -8
  26. package/cjs/components/AmountInput/AmountInputStartAdornment.d.ts +3 -0
  27. package/cjs/components/{SwapInput/SwapInputStartAdornment.js → AmountInput/AmountInputStartAdornment.js} +5 -5
  28. package/cjs/components/AmountInput/FormPriceHelperText.d.ts +9 -0
  29. package/cjs/components/{SwapInput → AmountInput}/FormPriceHelperText.js +4 -4
  30. package/cjs/components/AmountInput/index.d.ts +1 -0
  31. package/cjs/{pages/SwapPage → components/AmountInput}/index.js +1 -1
  32. package/cjs/components/Card/CardIconButton.d.ts +1 -1
  33. package/cjs/components/Card/CardLabel.d.ts +1 -1
  34. package/cjs/components/ChainSelect/ChainSelect.d.ts +2 -2
  35. package/cjs/components/ChainSelect/ChainSelect.js +1 -1
  36. package/cjs/components/ChainSelect/useChainSelect.d.ts +2 -2
  37. package/cjs/components/ChainSelect/useChainSelect.js +5 -5
  38. package/cjs/components/ContractComponent/ContractComponent.d.ts +2 -2
  39. package/cjs/components/ContractComponent/ContractComponent.js +3 -5
  40. package/cjs/components/DefaultTransactionButton/DefaultTransactionButton.d.ts +3 -0
  41. package/cjs/components/DefaultTransactionButton/DefaultTransactionButton.js +36 -0
  42. package/cjs/components/DefaultTransactionButton/index.d.ts +2 -0
  43. package/cjs/components/{SwapButton → DefaultTransactionButton}/index.js +3 -3
  44. package/cjs/components/{SwapButton → DefaultTransactionButton}/types.d.ts +1 -2
  45. package/cjs/components/GasMessage/FundsSufficiencyMessage.js +1 -1
  46. package/cjs/components/GasMessage/GasRefuelMessage.js +1 -1
  47. package/cjs/components/GasMessage/GasSufficiencyMessage.js +2 -2
  48. package/cjs/components/Header/Header.style.d.ts +1 -1
  49. package/cjs/components/Header/NavigationHeader.js +19 -19
  50. package/cjs/components/Header/NavigationTabs.js +3 -3
  51. package/cjs/components/Header/index.d.ts +1 -1
  52. package/cjs/components/Header/index.js +1 -1
  53. package/cjs/components/Header/types.d.ts +5 -2
  54. package/cjs/components/Header/useHeaderStore.d.ts +2 -0
  55. package/cjs/components/Header/{useHeaderActionStore.js → useHeaderStore.js} +13 -2
  56. package/cjs/components/Insurance/InsuranceCard.js +9 -12
  57. package/cjs/components/Insurance/InsuranceCollapsed.js +1 -1
  58. package/cjs/components/NFT/NFT.d.ts +1 -2
  59. package/cjs/components/NFT/NFT.js +15 -13
  60. package/cjs/components/NFT/NFTBase.d.ts +3 -0
  61. package/cjs/components/NFT/NFTBase.js +13 -0
  62. package/cjs/components/NFT/index.d.ts +1 -0
  63. package/cjs/components/NFT/index.js +1 -0
  64. package/cjs/components/NFT/types.d.ts +3 -1
  65. package/cjs/components/ProgressToNextUpdate/ProgressToNextUpdate.js +3 -3
  66. package/cjs/components/ReverseTokensButton/ReverseTokensButton.js +9 -9
  67. package/cjs/components/ReverseTokensButton/ReverseTokensButton.style.d.ts +1 -1
  68. package/cjs/components/RouteCard/RouteCard.d.ts +4 -0
  69. package/cjs/components/{SwapRouteCard/SwapRouteCard.js → RouteCard/RouteCard.js} +14 -14
  70. package/cjs/components/RouteCard/RouteCardEssentials.d.ts +3 -0
  71. package/cjs/components/{SwapRouteCard/SwapRouteCardEssentials.js → RouteCard/RouteCardEssentials.js} +7 -7
  72. package/cjs/components/RouteCard/RouteCardSkeleton.d.ts +4 -0
  73. package/cjs/components/{SwapRouteCard/SwapRouteCardSkeleton.js → RouteCard/RouteCardSkeleton.js} +6 -6
  74. package/cjs/components/RouteCard/RouteNotFoundCard.d.ts +2 -0
  75. package/cjs/components/{SwapRouteCard/SwapRouteNotFoundCard.js → RouteCard/RouteNotFoundCard.js} +4 -4
  76. package/cjs/components/RouteCard/index.d.ts +3 -0
  77. package/cjs/components/{SwapRoutes → RouteCard}/index.js +3 -2
  78. package/cjs/components/{SwapRouteCard → RouteCard}/types.d.ts +3 -3
  79. package/cjs/components/{SwapRoutes/SwapRoutes.d.ts → Routes/Routes.d.ts} +1 -1
  80. package/cjs/components/Routes/Routes.js +37 -0
  81. package/cjs/components/Routes/RoutesExpanded.d.ts +2 -0
  82. package/cjs/components/Routes/RoutesExpanded.js +44 -0
  83. package/cjs/components/Routes/index.d.ts +2 -0
  84. package/cjs/components/Routes/index.js +18 -0
  85. package/cjs/components/SelectChainAndToken.js +7 -7
  86. package/cjs/components/SelectTokenButton/SelectTokenButton.d.ts +2 -2
  87. package/cjs/components/SelectTokenButton/SelectTokenButton.js +11 -11
  88. package/cjs/components/SendToWallet/SendToWallet.js +9 -10
  89. package/cjs/components/SendToWallet/SendToWallet.style.d.ts +1 -1
  90. package/cjs/components/SendToWallet/SendToWalletButton.js +2 -2
  91. package/cjs/components/Step/DestinationWalletAddress.js +2 -2
  92. package/cjs/components/Step/GasStepProcess.js +1 -1
  93. package/cjs/components/Step/Step.js +13 -13
  94. package/cjs/components/Step/StepTimer.js +2 -2
  95. package/cjs/components/StepActions/StepActions.d.ts +3 -3
  96. package/cjs/components/StepActions/StepActions.js +20 -16
  97. package/cjs/components/StepActions/types.d.ts +2 -2
  98. package/cjs/components/Token/Token.js +1 -1
  99. package/cjs/components/TokenList/TokenList.js +2 -2
  100. package/cjs/components/TokenList/TokenNotFound.d.ts +2 -2
  101. package/cjs/components/TokenList/TokenNotFound.js +2 -2
  102. package/cjs/components/TokenList/VirtualizedTokenList.js +2 -2
  103. package/cjs/components/TokenList/types.d.ts +2 -2
  104. package/cjs/components/TokenList/useTokenSelect.d.ts +2 -2
  105. package/cjs/components/TokenList/useTokenSelect.js +11 -9
  106. package/cjs/config/version.d.ts +1 -1
  107. package/cjs/config/version.js +1 -1
  108. package/cjs/hooks/index.d.ts +1 -1
  109. package/cjs/hooks/index.js +1 -1
  110. package/cjs/hooks/useChains.js +4 -4
  111. package/cjs/hooks/useFundsSufficiency.js +1 -5
  112. package/cjs/hooks/useGasRefuel.js +4 -4
  113. package/cjs/hooks/useProcessMessage.d.ts +2 -2
  114. package/cjs/hooks/useProcessMessage.js +46 -46
  115. package/cjs/hooks/useRouteExecution.js +0 -2
  116. package/cjs/hooks/{useSwapRoutes.d.ts → useRoutes.d.ts} +2 -2
  117. package/cjs/hooks/{useSwapRoutes.js → useRoutes.js} +24 -24
  118. package/cjs/i18n/bn.json +80 -80
  119. package/cjs/i18n/de.json +74 -74
  120. package/cjs/i18n/en.json +132 -131
  121. package/cjs/i18n/es.json +72 -72
  122. package/cjs/i18n/fr.json +86 -86
  123. package/cjs/i18n/id.json +86 -86
  124. package/cjs/i18n/it.json +86 -86
  125. package/cjs/i18n/ko.json +86 -86
  126. package/cjs/i18n/pt.json +86 -86
  127. package/cjs/i18n/th.json +86 -86
  128. package/cjs/i18n/tr.json +72 -72
  129. package/cjs/i18n/uk.json +97 -97
  130. package/cjs/i18n/vi.json +86 -86
  131. package/cjs/i18n/zh.json +86 -86
  132. package/cjs/index.d.ts +2 -0
  133. package/cjs/index.js +5 -1
  134. package/cjs/pages/ActiveTransactionsPage/ActiveTransactionsEmpty.d.ts +2 -0
  135. package/cjs/pages/{ActiveSwapsPage/ActiveSwapsEmpty.js → ActiveTransactionsPage/ActiveTransactionsEmpty.js} +4 -4
  136. package/cjs/pages/ActiveTransactionsPage/ActiveTransactionsPage.d.ts +1 -0
  137. package/cjs/pages/{ActiveSwapsPage/ActiveSwapsPage.js → ActiveTransactionsPage/ActiveTransactionsPage.js} +8 -8
  138. package/cjs/pages/ActiveTransactionsPage/index.d.ts +1 -0
  139. package/cjs/pages/{ActiveSwapsPage → ActiveTransactionsPage}/index.js +1 -1
  140. package/cjs/pages/MainPage/MainGasMessage.js +1 -1
  141. package/cjs/pages/MainPage/MainPage.js +7 -7
  142. package/cjs/pages/MainPage/ReviewButton.d.ts +2 -0
  143. package/cjs/pages/MainPage/ReviewButton.js +62 -0
  144. package/{components/SwapRoutes/SwapRoutes.d.ts → cjs/pages/RoutesPage/RoutesPage.d.ts} +1 -1
  145. package/cjs/pages/{SwapRoutesPage/SwapRoutesPage.js → RoutesPage/RoutesPage.js} +11 -11
  146. package/cjs/pages/RoutesPage/index.d.ts +1 -0
  147. package/cjs/{components/SwapInput → pages/RoutesPage}/index.js +1 -1
  148. package/cjs/pages/SelectChainPage/types.d.ts +2 -2
  149. package/cjs/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.js +1 -1
  150. package/cjs/pages/SelectNativeTokenPage/SelectNativeTokenPage.d.ts +2 -2
  151. package/cjs/pages/SelectNativeTokenPage/SelectNativeTokenPage.js +1 -1
  152. package/cjs/pages/SelectTokenPage/SearchTokenInput.js +3 -3
  153. package/cjs/pages/SelectTokenPage/SelectTokenPage.d.ts +2 -2
  154. package/cjs/pages/SettingsPage/ColorSchemeButtonGroup.style.d.ts +1 -1
  155. package/cjs/pages/SettingsPage/ResetSettingsButton.js +1 -1
  156. package/cjs/pages/SettingsPage/RoutePrioritySelect.js +1 -1
  157. package/cjs/pages/TransactionDetailsPage/TransactionDetailsPage.d.ts +2 -0
  158. package/cjs/pages/{SwapDetailsPage/SwapDetailsPage.js → TransactionDetailsPage/TransactionDetailsPage.js} +9 -9
  159. package/cjs/pages/TransactionDetailsPage/index.d.ts +1 -0
  160. package/cjs/pages/{SwapDetailsPage → TransactionDetailsPage}/index.js +1 -1
  161. package/cjs/pages/TransactionHistoryPage/TransactionHistoryEmpty.d.ts +2 -0
  162. package/cjs/pages/{SwapHistoryPage/SwapHistoryEmpty.js → TransactionHistoryPage/TransactionHistoryEmpty.js} +4 -4
  163. package/{pages/SwapHistoryPage/SwapHistoryItem.d.ts → cjs/pages/TransactionHistoryPage/TransactionHistoryItem.d.ts} +1 -1
  164. package/cjs/pages/{SwapHistoryPage/SwapHistoryItem.js → TransactionHistoryPage/TransactionHistoryItem.js} +4 -4
  165. package/cjs/pages/TransactionHistoryPage/TransactionHistoryPage.d.ts +2 -0
  166. package/cjs/pages/TransactionHistoryPage/TransactionHistoryPage.js +35 -0
  167. package/cjs/pages/TransactionHistoryPage/index.d.ts +1 -0
  168. package/cjs/pages/TransactionHistoryPage/index.js +17 -0
  169. package/cjs/pages/{SwapPage → TransactionPage}/ExchangeRateBottomSheet.js +3 -3
  170. package/cjs/pages/TransactionPage/StartTransactionButton.d.ts +4 -0
  171. package/cjs/pages/TransactionPage/StartTransactionButton.js +21 -0
  172. package/cjs/pages/{SwapPage → TransactionPage}/StatusBottomSheet.js +24 -21
  173. package/cjs/pages/{SwapPage → TransactionPage}/TokenValueBottomSheet.js +1 -1
  174. package/cjs/pages/TransactionPage/TransactionPage.d.ts +2 -0
  175. package/cjs/pages/TransactionPage/TransactionPage.js +125 -0
  176. package/cjs/pages/TransactionPage/index.d.ts +1 -0
  177. package/cjs/pages/{SwapHistoryPage → TransactionPage}/index.js +1 -1
  178. package/cjs/pages/TransactionPage/types.d.ts +6 -0
  179. package/cjs/providers/{SwapFormProvider/SwapFormProvider.d.ts → FormProvider/FormProvider.d.ts} +1 -1
  180. package/cjs/providers/{SwapFormProvider/SwapFormProvider.js → FormProvider/FormProvider.js} +11 -11
  181. package/cjs/providers/FormProvider/FormUpdater.d.ts +5 -0
  182. package/cjs/providers/{SwapFormProvider → FormProvider}/FormUpdater.js +14 -14
  183. package/cjs/providers/{SwapFormProvider → FormProvider}/URLSearchParamsBuilder.js +6 -6
  184. package/cjs/providers/{SwapFormProvider → FormProvider}/index.d.ts +1 -1
  185. package/cjs/providers/{SwapFormProvider → FormProvider}/index.js +1 -1
  186. package/cjs/providers/FormProvider/types.d.ts +37 -0
  187. package/cjs/providers/FormProvider/types.js +23 -0
  188. package/cjs/providers/index.d.ts +1 -1
  189. package/cjs/providers/index.js +1 -1
  190. package/cjs/stores/routes/createRouteExecutionStore.js +1 -1
  191. package/cjs/stores/routes/index.d.ts +1 -1
  192. package/cjs/stores/routes/index.js +1 -1
  193. package/cjs/stores/routes/useTransactionHistory.d.ts +2 -0
  194. package/cjs/stores/routes/{useSwapHistory.js → useTransactionHistory.js} +3 -3
  195. package/cjs/types/widget.d.ts +4 -3
  196. package/cjs/utils/navigationRoutes.d.ts +5 -5
  197. package/cjs/utils/navigationRoutes.js +15 -15
  198. package/components/{ActiveSwaps/ActiveSwapItem.d.ts → ActiveTransactions/ActiveTransactionItem.d.ts} +1 -1
  199. package/components/{ActiveSwaps/ActiveSwapItem.js → ActiveTransactions/ActiveTransactionItem.js} +3 -3
  200. package/components/ActiveTransactions/ActiveTransactions.d.ts +3 -0
  201. package/components/{ActiveSwaps/ActiveSwaps.js → ActiveTransactions/ActiveTransactions.js} +5 -5
  202. package/components/{ActiveSwaps/ActiveSwaps.style.d.ts → ActiveTransactions/ActiveTransactions.style.d.ts} +1 -1
  203. package/components/ActiveTransactions/index.d.ts +2 -0
  204. package/components/ActiveTransactions/index.js +2 -0
  205. package/components/{SwapInput/SwapInput.d.ts → AmountInput/AmountInput.d.ts} +3 -3
  206. package/components/{SwapInput/SwapInput.js → AmountInput/AmountInput.js} +11 -11
  207. package/{cjs/components/SwapInput/SwapInput.style.d.ts → components/AmountInput/AmountInput.style.d.ts} +1 -1
  208. package/{cjs/components/SwapInput/SwapInputAdornment.style.d.ts → components/AmountInput/AmountInputAdornment.style.d.ts} +1 -1
  209. package/components/AmountInput/AmountInputEndAdornment.d.ts +2 -0
  210. package/components/{SwapInput/SwapInputEndAdornment.js → AmountInput/AmountInputEndAdornment.js} +6 -6
  211. package/components/AmountInput/AmountInputStartAdornment.d.ts +3 -0
  212. package/components/{SwapInput/SwapInputStartAdornment.js → AmountInput/AmountInputStartAdornment.js} +4 -4
  213. package/components/AmountInput/FormPriceHelperText.d.ts +9 -0
  214. package/components/{SwapInput → AmountInput}/FormPriceHelperText.js +5 -5
  215. package/components/AmountInput/index.d.ts +1 -0
  216. package/components/AmountInput/index.js +1 -0
  217. package/components/Card/CardIconButton.d.ts +1 -1
  218. package/components/Card/CardLabel.d.ts +1 -1
  219. package/components/ChainSelect/ChainSelect.d.ts +2 -2
  220. package/components/ChainSelect/ChainSelect.js +2 -2
  221. package/components/ChainSelect/useChainSelect.d.ts +2 -2
  222. package/components/ChainSelect/useChainSelect.js +6 -6
  223. package/components/ContractComponent/ContractComponent.d.ts +2 -2
  224. package/components/ContractComponent/ContractComponent.js +3 -5
  225. package/components/DefaultTransactionButton/DefaultTransactionButton.d.ts +3 -0
  226. package/components/DefaultTransactionButton/DefaultTransactionButton.js +32 -0
  227. package/components/DefaultTransactionButton/index.d.ts +2 -0
  228. package/components/DefaultTransactionButton/index.js +2 -0
  229. package/components/{SwapButton → DefaultTransactionButton}/types.d.ts +1 -2
  230. package/components/GasMessage/FundsSufficiencyMessage.js +1 -1
  231. package/components/GasMessage/GasRefuelMessage.js +1 -1
  232. package/components/GasMessage/GasSufficiencyMessage.js +2 -2
  233. package/components/Header/Header.style.d.ts +1 -1
  234. package/components/Header/NavigationHeader.js +19 -19
  235. package/components/Header/NavigationTabs.js +4 -4
  236. package/components/Header/index.d.ts +1 -1
  237. package/components/Header/index.js +1 -1
  238. package/components/Header/types.d.ts +5 -2
  239. package/components/Header/useHeaderStore.d.ts +2 -0
  240. package/components/Header/useHeaderStore.js +25 -0
  241. package/components/Insurance/InsuranceCard.js +9 -12
  242. package/components/Insurance/InsuranceCollapsed.js +2 -2
  243. package/components/NFT/NFT.d.ts +1 -2
  244. package/components/NFT/NFT.js +17 -15
  245. package/components/NFT/NFTBase.d.ts +3 -0
  246. package/components/NFT/NFTBase.js +9 -0
  247. package/components/NFT/index.d.ts +1 -0
  248. package/components/NFT/index.js +1 -0
  249. package/components/NFT/types.d.ts +3 -1
  250. package/components/ProgressToNextUpdate/ProgressToNextUpdate.js +4 -4
  251. package/components/ReverseTokensButton/ReverseTokensButton.js +10 -10
  252. package/components/ReverseTokensButton/ReverseTokensButton.style.d.ts +1 -1
  253. package/components/RouteCard/RouteCard.d.ts +4 -0
  254. package/components/{SwapRouteCard/SwapRouteCard.js → RouteCard/RouteCard.js} +13 -13
  255. package/components/RouteCard/RouteCardEssentials.d.ts +3 -0
  256. package/components/{SwapRouteCard/SwapRouteCardEssentials.js → RouteCard/RouteCardEssentials.js} +3 -3
  257. package/components/RouteCard/RouteCardSkeleton.d.ts +4 -0
  258. package/components/{SwapRouteCard/SwapRouteCardSkeleton.js → RouteCard/RouteCardSkeleton.js} +4 -4
  259. package/components/RouteCard/RouteNotFoundCard.d.ts +2 -0
  260. package/components/{SwapRouteCard/SwapRouteNotFoundCard.js → RouteCard/RouteNotFoundCard.js} +2 -2
  261. package/components/RouteCard/index.d.ts +3 -0
  262. package/components/RouteCard/index.js +3 -0
  263. package/components/{SwapRouteCard → RouteCard}/types.d.ts +3 -3
  264. package/{cjs/components/ActiveSwaps/ActiveSwaps.d.ts → components/Routes/Routes.d.ts} +1 -1
  265. package/components/Routes/Routes.js +33 -0
  266. package/components/Routes/RoutesExpanded.d.ts +2 -0
  267. package/components/{SwapRoutes/SwapRoutesExpanded.js → Routes/RoutesExpanded.js} +12 -10
  268. package/components/Routes/index.d.ts +2 -0
  269. package/components/Routes/index.js +2 -0
  270. package/components/SelectChainAndToken.js +8 -8
  271. package/components/SelectTokenButton/SelectTokenButton.d.ts +2 -2
  272. package/components/SelectTokenButton/SelectTokenButton.js +12 -12
  273. package/components/SendToWallet/SendToWallet.js +10 -11
  274. package/components/SendToWallet/SendToWallet.style.d.ts +1 -1
  275. package/components/SendToWallet/SendToWalletButton.js +3 -3
  276. package/components/Step/DestinationWalletAddress.js +2 -2
  277. package/components/Step/GasStepProcess.js +1 -1
  278. package/components/Step/Step.js +13 -13
  279. package/components/Step/StepTimer.js +2 -2
  280. package/components/StepActions/StepActions.d.ts +3 -3
  281. package/components/StepActions/StepActions.js +20 -16
  282. package/components/StepActions/types.d.ts +2 -2
  283. package/components/Token/Token.js +1 -1
  284. package/components/TokenList/TokenList.js +3 -3
  285. package/components/TokenList/TokenNotFound.d.ts +2 -2
  286. package/components/TokenList/TokenNotFound.js +3 -3
  287. package/components/TokenList/VirtualizedTokenList.js +2 -2
  288. package/components/TokenList/types.d.ts +2 -2
  289. package/components/TokenList/useTokenSelect.d.ts +2 -2
  290. package/components/TokenList/useTokenSelect.js +12 -10
  291. package/config/version.d.ts +1 -1
  292. package/config/version.js +1 -1
  293. package/hooks/index.d.ts +1 -1
  294. package/hooks/index.js +1 -1
  295. package/hooks/useChains.js +5 -5
  296. package/hooks/useFundsSufficiency.js +2 -6
  297. package/hooks/useGasRefuel.js +5 -5
  298. package/hooks/useProcessMessage.d.ts +2 -2
  299. package/hooks/useProcessMessage.js +46 -46
  300. package/hooks/useRouteExecution.js +0 -2
  301. package/hooks/{useSwapRoutes.d.ts → useRoutes.d.ts} +2 -2
  302. package/hooks/{useSwapRoutes.js → useRoutes.js} +23 -23
  303. package/i18n/bn.json +80 -80
  304. package/i18n/de.json +74 -74
  305. package/i18n/en.json +132 -131
  306. package/i18n/es.json +72 -72
  307. package/i18n/fr.json +86 -86
  308. package/i18n/id.json +86 -86
  309. package/i18n/it.json +86 -86
  310. package/i18n/ko.json +86 -86
  311. package/i18n/pt.json +86 -86
  312. package/i18n/th.json +86 -86
  313. package/i18n/tr.json +72 -72
  314. package/i18n/uk.json +97 -97
  315. package/i18n/vi.json +86 -86
  316. package/i18n/zh.json +86 -86
  317. package/index.d.ts +2 -0
  318. package/index.js +2 -0
  319. package/package.json +27 -13
  320. package/pages/ActiveTransactionsPage/ActiveTransactionsEmpty.d.ts +2 -0
  321. package/pages/{ActiveSwapsPage/ActiveSwapsEmpty.js → ActiveTransactionsPage/ActiveTransactionsEmpty.js} +2 -2
  322. package/pages/ActiveTransactionsPage/ActiveTransactionsPage.d.ts +1 -0
  323. package/pages/{ActiveSwapsPage/ActiveSwapsPage.js → ActiveTransactionsPage/ActiveTransactionsPage.js} +7 -7
  324. package/pages/ActiveTransactionsPage/index.d.ts +1 -0
  325. package/pages/ActiveTransactionsPage/index.js +1 -0
  326. package/pages/MainPage/MainGasMessage.js +2 -2
  327. package/pages/MainPage/MainPage.js +7 -7
  328. package/pages/MainPage/ReviewButton.d.ts +2 -0
  329. package/pages/MainPage/ReviewButton.js +58 -0
  330. package/{components/ActiveSwaps/ActiveSwaps.d.ts → pages/RoutesPage/RoutesPage.d.ts} +1 -1
  331. package/pages/{SwapRoutesPage/SwapRoutesPage.js → RoutesPage/RoutesPage.js} +11 -11
  332. package/pages/RoutesPage/index.d.ts +1 -0
  333. package/pages/RoutesPage/index.js +1 -0
  334. package/pages/SelectChainPage/types.d.ts +2 -2
  335. package/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.js +2 -2
  336. package/pages/SelectNativeTokenPage/SelectNativeTokenPage.d.ts +2 -2
  337. package/pages/SelectNativeTokenPage/SelectNativeTokenPage.js +1 -1
  338. package/pages/SelectTokenPage/SearchTokenInput.js +4 -4
  339. package/pages/SelectTokenPage/SelectTokenPage.d.ts +2 -2
  340. package/pages/SettingsPage/ColorSchemeButtonGroup.style.d.ts +1 -1
  341. package/pages/SettingsPage/ResetSettingsButton.js +1 -1
  342. package/pages/SettingsPage/RoutePrioritySelect.js +1 -1
  343. package/pages/TransactionDetailsPage/TransactionDetailsPage.d.ts +2 -0
  344. package/pages/{SwapDetailsPage/SwapDetailsPage.js → TransactionDetailsPage/TransactionDetailsPage.js} +7 -7
  345. package/pages/TransactionDetailsPage/index.d.ts +1 -0
  346. package/pages/TransactionDetailsPage/index.js +1 -0
  347. package/pages/TransactionHistoryPage/TransactionHistoryEmpty.d.ts +2 -0
  348. package/pages/{SwapHistoryPage/SwapHistoryEmpty.js → TransactionHistoryPage/TransactionHistoryEmpty.js} +2 -2
  349. package/{cjs/pages/SwapHistoryPage/SwapHistoryItem.d.ts → pages/TransactionHistoryPage/TransactionHistoryItem.d.ts} +1 -1
  350. package/pages/{SwapHistoryPage/SwapHistoryItem.js → TransactionHistoryPage/TransactionHistoryItem.js} +2 -2
  351. package/pages/TransactionHistoryPage/TransactionHistoryPage.d.ts +2 -0
  352. package/pages/TransactionHistoryPage/TransactionHistoryPage.js +31 -0
  353. package/pages/TransactionHistoryPage/index.d.ts +1 -0
  354. package/pages/TransactionHistoryPage/index.js +1 -0
  355. package/pages/{SwapPage → TransactionPage}/ExchangeRateBottomSheet.js +3 -3
  356. package/pages/TransactionPage/StartTransactionButton.d.ts +4 -0
  357. package/pages/TransactionPage/StartTransactionButton.js +16 -0
  358. package/pages/{SwapPage → TransactionPage}/StatusBottomSheet.js +25 -22
  359. package/pages/{SwapPage → TransactionPage}/TokenValueBottomSheet.js +1 -1
  360. package/pages/TransactionPage/TransactionPage.d.ts +2 -0
  361. package/pages/TransactionPage/TransactionPage.js +121 -0
  362. package/pages/TransactionPage/index.d.ts +1 -0
  363. package/pages/TransactionPage/index.js +1 -0
  364. package/pages/TransactionPage/types.d.ts +6 -0
  365. package/providers/{SwapFormProvider/SwapFormProvider.d.ts → FormProvider/FormProvider.d.ts} +1 -1
  366. package/providers/{SwapFormProvider/SwapFormProvider.js → FormProvider/FormProvider.js} +12 -12
  367. package/providers/FormProvider/FormUpdater.d.ts +5 -0
  368. package/providers/{SwapFormProvider → FormProvider}/FormUpdater.js +14 -14
  369. package/providers/{SwapFormProvider → FormProvider}/URLSearchParamsBuilder.js +7 -7
  370. package/providers/{SwapFormProvider → FormProvider}/index.d.ts +1 -1
  371. package/providers/{SwapFormProvider → FormProvider}/index.js +1 -1
  372. package/providers/FormProvider/types.d.ts +37 -0
  373. package/providers/FormProvider/types.js +20 -0
  374. package/providers/index.d.ts +1 -1
  375. package/providers/index.js +1 -1
  376. package/stores/routes/createRouteExecutionStore.js +1 -1
  377. package/stores/routes/index.d.ts +1 -1
  378. package/stores/routes/index.js +1 -1
  379. package/stores/routes/useTransactionHistory.d.ts +2 -0
  380. package/stores/routes/{useSwapHistory.js → useTransactionHistory.js} +1 -1
  381. package/tsconfig.cjs.tsbuildinfo +1 -1
  382. package/types/widget.d.ts +4 -3
  383. package/utils/navigationRoutes.d.ts +5 -5
  384. package/utils/navigationRoutes.js +15 -15
  385. package/cjs/components/ActiveSwaps/index.d.ts +0 -2
  386. package/cjs/components/Header/useHeaderActionStore.d.ts +0 -2
  387. package/cjs/components/SwapButton/SwapButton.d.ts +0 -3
  388. package/cjs/components/SwapButton/SwapButton.js +0 -56
  389. package/cjs/components/SwapButton/index.d.ts +0 -2
  390. package/cjs/components/SwapInput/FormPriceHelperText.d.ts +0 -9
  391. package/cjs/components/SwapInput/SwapInputEndAdornment.d.ts +0 -2
  392. package/cjs/components/SwapInput/SwapInputStartAdornment.d.ts +0 -3
  393. package/cjs/components/SwapInput/index.d.ts +0 -1
  394. package/cjs/components/SwapRouteCard/SwapRouteCard.d.ts +0 -4
  395. package/cjs/components/SwapRouteCard/SwapRouteCardEssentials.d.ts +0 -3
  396. package/cjs/components/SwapRouteCard/SwapRouteCardSkeleton.d.ts +0 -4
  397. package/cjs/components/SwapRouteCard/SwapRouteNotFoundCard.d.ts +0 -2
  398. package/cjs/components/SwapRouteCard/index.d.ts +0 -3
  399. package/cjs/components/SwapRouteCard/index.js +0 -19
  400. package/cjs/components/SwapRoutes/SwapRoutes.js +0 -37
  401. package/cjs/components/SwapRoutes/SwapRoutesExpanded.d.ts +0 -2
  402. package/cjs/components/SwapRoutes/SwapRoutesExpanded.js +0 -42
  403. package/cjs/components/SwapRoutes/index.d.ts +0 -2
  404. package/cjs/pages/ActiveSwapsPage/ActiveSwapsEmpty.d.ts +0 -2
  405. package/cjs/pages/ActiveSwapsPage/ActiveSwapsPage.d.ts +0 -1
  406. package/cjs/pages/ActiveSwapsPage/index.d.ts +0 -1
  407. package/cjs/pages/MainPage/MainSwapButton.d.ts +0 -2
  408. package/cjs/pages/MainPage/MainSwapButton.js +0 -27
  409. package/cjs/pages/SwapDetailsPage/SwapDetailsPage.d.ts +0 -2
  410. package/cjs/pages/SwapDetailsPage/index.d.ts +0 -1
  411. package/cjs/pages/SwapHistoryPage/SwapHistoryEmpty.d.ts +0 -2
  412. package/cjs/pages/SwapHistoryPage/SwapHistoryPage.d.ts +0 -2
  413. package/cjs/pages/SwapHistoryPage/SwapHistoryPage.js +0 -35
  414. package/cjs/pages/SwapHistoryPage/index.d.ts +0 -1
  415. package/cjs/pages/SwapPage/StartSwapButton.d.ts +0 -4
  416. package/cjs/pages/SwapPage/StartSwapButton.js +0 -21
  417. package/cjs/pages/SwapPage/SwapPage.d.ts +0 -2
  418. package/cjs/pages/SwapPage/SwapPage.js +0 -111
  419. package/cjs/pages/SwapPage/index.d.ts +0 -1
  420. package/cjs/pages/SwapPage/types.d.ts +0 -9
  421. package/cjs/pages/SwapRoutesPage/index.d.ts +0 -1
  422. package/cjs/pages/SwapRoutesPage/index.js +0 -17
  423. package/cjs/providers/SwapFormProvider/FormUpdater.d.ts +0 -5
  424. package/cjs/providers/SwapFormProvider/types.d.ts +0 -37
  425. package/cjs/providers/SwapFormProvider/types.js +0 -23
  426. package/cjs/stores/routes/useSwapHistory.d.ts +0 -2
  427. package/components/ActiveSwaps/index.d.ts +0 -2
  428. package/components/ActiveSwaps/index.js +0 -2
  429. package/components/Header/useHeaderActionStore.d.ts +0 -2
  430. package/components/Header/useHeaderActionStore.js +0 -14
  431. package/components/SwapButton/SwapButton.d.ts +0 -3
  432. package/components/SwapButton/SwapButton.js +0 -52
  433. package/components/SwapButton/index.d.ts +0 -2
  434. package/components/SwapButton/index.js +0 -2
  435. package/components/SwapInput/FormPriceHelperText.d.ts +0 -9
  436. package/components/SwapInput/SwapInputEndAdornment.d.ts +0 -2
  437. package/components/SwapInput/SwapInputStartAdornment.d.ts +0 -3
  438. package/components/SwapInput/index.d.ts +0 -1
  439. package/components/SwapInput/index.js +0 -1
  440. package/components/SwapRouteCard/SwapRouteCard.d.ts +0 -4
  441. package/components/SwapRouteCard/SwapRouteCardEssentials.d.ts +0 -3
  442. package/components/SwapRouteCard/SwapRouteCardSkeleton.d.ts +0 -4
  443. package/components/SwapRouteCard/SwapRouteNotFoundCard.d.ts +0 -2
  444. package/components/SwapRouteCard/index.d.ts +0 -3
  445. package/components/SwapRouteCard/index.js +0 -3
  446. package/components/SwapRoutes/SwapRoutes.js +0 -33
  447. package/components/SwapRoutes/SwapRoutesExpanded.d.ts +0 -2
  448. package/components/SwapRoutes/index.d.ts +0 -2
  449. package/components/SwapRoutes/index.js +0 -2
  450. package/pages/ActiveSwapsPage/ActiveSwapsEmpty.d.ts +0 -2
  451. package/pages/ActiveSwapsPage/ActiveSwapsPage.d.ts +0 -1
  452. package/pages/ActiveSwapsPage/index.d.ts +0 -1
  453. package/pages/ActiveSwapsPage/index.js +0 -1
  454. package/pages/MainPage/MainSwapButton.d.ts +0 -2
  455. package/pages/MainPage/MainSwapButton.js +0 -23
  456. package/pages/SwapDetailsPage/SwapDetailsPage.d.ts +0 -2
  457. package/pages/SwapDetailsPage/index.d.ts +0 -1
  458. package/pages/SwapDetailsPage/index.js +0 -1
  459. package/pages/SwapHistoryPage/SwapHistoryEmpty.d.ts +0 -2
  460. package/pages/SwapHistoryPage/SwapHistoryPage.d.ts +0 -2
  461. package/pages/SwapHistoryPage/SwapHistoryPage.js +0 -31
  462. package/pages/SwapHistoryPage/index.d.ts +0 -1
  463. package/pages/SwapHistoryPage/index.js +0 -1
  464. package/pages/SwapPage/StartSwapButton.d.ts +0 -4
  465. package/pages/SwapPage/StartSwapButton.js +0 -16
  466. package/pages/SwapPage/SwapPage.d.ts +0 -2
  467. package/pages/SwapPage/SwapPage.js +0 -107
  468. package/pages/SwapPage/index.d.ts +0 -1
  469. package/pages/SwapPage/index.js +0 -1
  470. package/pages/SwapPage/types.d.ts +0 -9
  471. package/pages/SwapRoutesPage/SwapRoutesPage.d.ts +0 -3
  472. package/pages/SwapRoutesPage/index.d.ts +0 -1
  473. package/pages/SwapRoutesPage/index.js +0 -1
  474. package/providers/SwapFormProvider/FormUpdater.d.ts +0 -5
  475. package/providers/SwapFormProvider/types.d.ts +0 -37
  476. package/providers/SwapFormProvider/types.js +0 -20
  477. package/stores/routes/useSwapHistory.d.ts +0 -2
  478. /package/cjs/components/{ActiveSwaps/ActiveSwaps.style.js → ActiveTransactions/ActiveTransactions.style.js} +0 -0
  479. /package/cjs/components/{SwapInput/SwapInput.style.js → AmountInput/AmountInput.style.js} +0 -0
  480. /package/cjs/components/{SwapInput/SwapInputAdornment.style.js → AmountInput/AmountInputAdornment.style.js} +0 -0
  481. /package/cjs/components/{SwapButton → DefaultTransactionButton}/types.js +0 -0
  482. /package/cjs/components/{SwapRouteCard/SwapRouteCard.style.d.ts → RouteCard/RouteCard.style.d.ts} +0 -0
  483. /package/cjs/components/{SwapRouteCard/SwapRouteCard.style.js → RouteCard/RouteCard.style.js} +0 -0
  484. /package/cjs/components/{SwapRouteCard → RouteCard}/types.js +0 -0
  485. /package/cjs/components/{SwapRouteCard → RouteCard}/utils.d.ts +0 -0
  486. /package/cjs/components/{SwapRouteCard → RouteCard}/utils.js +0 -0
  487. /package/cjs/components/{SwapRoutes/SwapRoutesExpanded.style.d.ts → Routes/RoutesExpanded.style.d.ts} +0 -0
  488. /package/cjs/components/{SwapRoutes/SwapRoutesExpanded.style.js → Routes/RoutesExpanded.style.js} +0 -0
  489. /package/cjs/pages/{SwapRoutesPage/SwapRoutesPage.style.d.ts → RoutesPage/RoutesPage.style.d.ts} +0 -0
  490. /package/cjs/pages/{SwapRoutesPage/SwapRoutesPage.style.js → RoutesPage/RoutesPage.style.js} +0 -0
  491. /package/cjs/pages/{SwapDetailsPage/SwapDetailsPage.style.d.ts → TransactionDetailsPage/TransactionDetailsPage.style.d.ts} +0 -0
  492. /package/cjs/pages/{SwapDetailsPage/SwapDetailsPage.style.js → TransactionDetailsPage/TransactionDetailsPage.style.js} +0 -0
  493. /package/cjs/pages/{SwapPage → TransactionPage}/ExchangeRateBottomSheet.d.ts +0 -0
  494. /package/cjs/pages/{SwapPage → TransactionPage}/StatusBottomSheet.d.ts +0 -0
  495. /package/cjs/pages/{SwapPage → TransactionPage}/StatusBottomSheet.style.d.ts +0 -0
  496. /package/cjs/pages/{SwapPage → TransactionPage}/StatusBottomSheet.style.js +0 -0
  497. /package/cjs/pages/{SwapPage → TransactionPage}/TokenValueBottomSheet.d.ts +0 -0
  498. /package/cjs/pages/{SwapPage/SwapPage.style.d.ts → TransactionPage/TransactionPage.style.d.ts} +0 -0
  499. /package/cjs/pages/{SwapPage/SwapPage.style.js → TransactionPage/TransactionPage.style.js} +0 -0
  500. /package/cjs/pages/{SwapPage → TransactionPage}/types.js +0 -0
  501. /package/cjs/pages/{SwapPage → TransactionPage}/utils.d.ts +0 -0
  502. /package/cjs/pages/{SwapPage → TransactionPage}/utils.js +0 -0
  503. /package/cjs/providers/{SwapFormProvider → FormProvider}/URLSearchParamsBuilder.d.ts +0 -0
  504. /package/components/{ActiveSwaps/ActiveSwaps.style.js → ActiveTransactions/ActiveTransactions.style.js} +0 -0
  505. /package/components/{SwapInput/SwapInput.style.js → AmountInput/AmountInput.style.js} +0 -0
  506. /package/components/{SwapInput/SwapInputAdornment.style.js → AmountInput/AmountInputAdornment.style.js} +0 -0
  507. /package/components/{SwapButton → DefaultTransactionButton}/types.js +0 -0
  508. /package/components/{SwapRouteCard/SwapRouteCard.style.d.ts → RouteCard/RouteCard.style.d.ts} +0 -0
  509. /package/components/{SwapRouteCard/SwapRouteCard.style.js → RouteCard/RouteCard.style.js} +0 -0
  510. /package/components/{SwapRouteCard → RouteCard}/types.js +0 -0
  511. /package/components/{SwapRouteCard → RouteCard}/utils.d.ts +0 -0
  512. /package/components/{SwapRouteCard → RouteCard}/utils.js +0 -0
  513. /package/components/{SwapRoutes/SwapRoutesExpanded.style.d.ts → Routes/RoutesExpanded.style.d.ts} +0 -0
  514. /package/components/{SwapRoutes/SwapRoutesExpanded.style.js → Routes/RoutesExpanded.style.js} +0 -0
  515. /package/pages/{SwapRoutesPage/SwapRoutesPage.style.d.ts → RoutesPage/RoutesPage.style.d.ts} +0 -0
  516. /package/pages/{SwapRoutesPage/SwapRoutesPage.style.js → RoutesPage/RoutesPage.style.js} +0 -0
  517. /package/pages/{SwapDetailsPage/SwapDetailsPage.style.d.ts → TransactionDetailsPage/TransactionDetailsPage.style.d.ts} +0 -0
  518. /package/pages/{SwapDetailsPage/SwapDetailsPage.style.js → TransactionDetailsPage/TransactionDetailsPage.style.js} +0 -0
  519. /package/pages/{SwapPage → TransactionPage}/ExchangeRateBottomSheet.d.ts +0 -0
  520. /package/pages/{SwapPage → TransactionPage}/StatusBottomSheet.d.ts +0 -0
  521. /package/pages/{SwapPage → TransactionPage}/StatusBottomSheet.style.d.ts +0 -0
  522. /package/pages/{SwapPage → TransactionPage}/StatusBottomSheet.style.js +0 -0
  523. /package/pages/{SwapPage → TransactionPage}/TokenValueBottomSheet.d.ts +0 -0
  524. /package/pages/{SwapPage/SwapPage.style.d.ts → TransactionPage/TransactionPage.style.d.ts} +0 -0
  525. /package/pages/{SwapPage/SwapPage.style.js → TransactionPage/TransactionPage.style.js} +0 -0
  526. /package/pages/{SwapPage → TransactionPage}/types.js +0 -0
  527. /package/pages/{SwapPage → TransactionPage}/utils.d.ts +0 -0
  528. /package/pages/{SwapPage → TransactionPage}/utils.js +0 -0
  529. /package/providers/{SwapFormProvider → FormProvider}/URLSearchParamsBuilder.d.ts +0 -0
package/App.js CHANGED
@@ -7,7 +7,7 @@ import { AppContainer, AppExpandedContainer, FlexContainer, } from './components
7
7
  import { Header } from './components/Header';
8
8
  import { Initializer } from './components/Initializer';
9
9
  import { PoweredBy } from './components/PoweredBy';
10
- import { SwapRoutesExpanded } from './components/SwapRoutes';
10
+ import { RoutesExpanded } from './components/Routes';
11
11
  import { useExpandableVariant } from './hooks';
12
12
  export const App = forwardRef(({ elementRef, open, integrator, ...other }, ref) => {
13
13
  const config = useMemo(() => ({ integrator, ...other, ...other.config }), [integrator, other]);
@@ -15,5 +15,5 @@ export const App = forwardRef(({ elementRef, open, integrator, ...other }, ref)
15
15
  });
16
16
  export const AppDefault = () => {
17
17
  const expandable = useExpandableVariant();
18
- return (_jsxs(AppExpandedContainer, { children: [_jsxs(AppContainer, { children: [_jsx(Header, {}), _jsx(FlexContainer, { disableGutters: true, children: _jsx(AppRoutes, {}) }), _jsx(PoweredBy, {}), _jsx(Initializer, {})] }), expandable ? _jsx(SwapRoutesExpanded, {}) : null] }));
18
+ return (_jsxs(AppExpandedContainer, { children: [_jsxs(AppContainer, { children: [_jsx(Header, {}), _jsx(FlexContainer, { disableGutters: true, children: _jsx(AppRoutes, {}) }), _jsx(PoweredBy, {}), _jsx(Initializer, {})] }), expandable ? _jsx(RoutesExpanded, {}) : null] }));
19
19
  };
package/AppDrawer.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import type { WidgetConfig } from './types';
2
+ import type { WidgetConfig, WidgetSubvariant } from './types';
3
3
  export interface WidgetDrawer {
4
4
  isOpen(): void;
5
5
  toggleDrawer(): void;
@@ -7,6 +7,7 @@ export interface WidgetDrawer {
7
7
  closeDrawer(): void;
8
8
  }
9
9
  export declare const AppDrawer: import("react").ForwardRefExoticComponent<import("./types").WidgetDrawerProps & WidgetConfig & import("./types").WidgetConfigPartialProps & import("react").RefAttributes<WidgetDrawer>>;
10
- export declare const DrawerButtonText: ({ open }: {
10
+ export declare const DrawerButtonText: ({ open, subvariant, }: {
11
11
  open: boolean;
12
+ subvariant?: WidgetSubvariant | undefined;
12
13
  }) => import("react/jsx-runtime").JSX.Element;
package/AppDrawer.js CHANGED
@@ -34,7 +34,7 @@ export const AppDrawer = forwardRef(({ elementRef, open, integrator, config }, r
34
34
  height: '100%',
35
35
  },
36
36
  }), [config, integrator]);
37
- return (_jsxs(AppProvider, { config: widgetConfig, children: [!widgetConfig.hiddenUI?.includes(HiddenUI.DrawerButton) ? (_jsxs(DrawerButton, { variant: "contained", onClick: toggleDrawer, open: drawerOpen, drawerProps: config?.containerStyle, children: [drawerOpen ? (_jsx(KeyboardArrowRightIcon, {})) : (_jsx(KeyboardArrowLeftIcon, {})), _jsx(DrawerButtonText, { open: drawerOpen })] })) : null, _jsx(Drawer, { ref: elementRef, anchor: "right", open: drawerOpen, onClose: closeDrawer, BackdropProps: {
37
+ return (_jsxs(AppProvider, { config: widgetConfig, children: [!widgetConfig.hiddenUI?.includes(HiddenUI.DrawerButton) ? (_jsxs(DrawerButton, { variant: "contained", onClick: toggleDrawer, open: drawerOpen, drawerProps: config?.containerStyle, children: [drawerOpen ? (_jsx(KeyboardArrowRightIcon, {})) : (_jsx(KeyboardArrowLeftIcon, {})), _jsx(DrawerButtonText, { open: drawerOpen, subvariant: config?.subvariant })] })) : null, _jsx(Drawer, { ref: elementRef, anchor: "right", open: drawerOpen, onClose: closeDrawer, BackdropProps: {
38
38
  sx: {
39
39
  backgroundColor: 'rgb(0 0 0 / 48%)',
40
40
  backdropFilter: 'blur(3px)',
@@ -47,7 +47,11 @@ export const AppDrawer = forwardRef(({ elementRef, open, integrator, config }, r
47
47
  },
48
48
  }, keepMounted: true, children: _jsx(AppDefault, {}) })] }));
49
49
  });
50
- export const DrawerButtonText = ({ open }) => {
50
+ export const DrawerButtonText = ({ open, subvariant, }) => {
51
51
  const { t } = useTranslation();
52
- return (_jsx(DrawerButtonTypography, { children: open ? t('button.hide') : t('button.lifiSwap') }));
52
+ return (_jsx(DrawerButtonTypography, { children: open
53
+ ? t('button.hide')
54
+ : subvariant === 'nft'
55
+ ? t('button.lifiCheckout')
56
+ : t('button.lifiExchange') }));
53
57
  };
@@ -2,7 +2,7 @@
2
2
  export declare const DrawerButton: import("@emotion/styled").StyledComponent<{
3
3
  children?: import("react").ReactNode;
4
4
  classes?: Partial<import("@mui/material").ButtonClasses> | undefined;
5
- color?: import("@mui/types").OverridableStringUnion<"inherit" | "success" | "warning" | "error" | "primary" | "secondary" | "info", import("@mui/material").ButtonPropsColorOverrides> | undefined;
5
+ color?: import("@mui/types").OverridableStringUnion<"inherit" | "primary" | "secondary" | "error" | "warning" | "info" | "success", import("@mui/material").ButtonPropsColorOverrides> | undefined;
6
6
  disabled?: boolean | undefined;
7
7
  disableElevation?: boolean | undefined;
8
8
  disableFocusRipple?: boolean | undefined;
package/AppProvider.js CHANGED
@@ -3,14 +3,14 @@ import { QueryClientProvider } from '@tanstack/react-query';
3
3
  import { Fragment } from 'react';
4
4
  import { MemoryRouter, useInRouterContext } from 'react-router-dom';
5
5
  import { queryClient } from './config/queryClient';
6
- import { I18nProvider, SDKProvider, SwapFormProvider, ThemeProvider, URLSearchParamsBuilder, WalletProvider, WidgetProvider, useWidgetConfig, } from './providers';
6
+ import { FormProvider, I18nProvider, SDKProvider, ThemeProvider, URLSearchParamsBuilder, WalletProvider, WidgetProvider, useWidgetConfig, } from './providers';
7
7
  import { StoreProvider } from './stores';
8
8
  export const AppProvider = ({ children, config, }) => {
9
- return (_jsx(QueryClientProvider, { client: queryClient, children: _jsx(StoreProvider, { config: config, children: _jsx(WidgetProvider, { config: config, children: _jsx(SDKProvider, { children: _jsx(ThemeProvider, { children: _jsx(I18nProvider, { children: _jsx(WalletProvider, { children: _jsx(SwapFormProvider, { children: _jsx(AppRouter, { children: children }) }) }) }) }) }) }) }) }));
9
+ return (_jsx(QueryClientProvider, { client: queryClient, children: _jsx(StoreProvider, { config: config, children: _jsx(WidgetProvider, { config: config, children: _jsx(SDKProvider, { children: _jsx(ThemeProvider, { children: _jsx(I18nProvider, { children: _jsx(WalletProvider, { children: _jsx(FormProvider, { children: _jsx(AppRouter, { children: children }) }) }) }) }) }) }) }) }));
10
10
  };
11
11
  export const AppRouter = ({ children }) => {
12
- const { buildSwapUrl } = useWidgetConfig();
12
+ const { buildUrl } = useWidgetConfig();
13
13
  const inRouterContext = useInRouterContext();
14
14
  const Router = inRouterContext ? Fragment : MemoryRouter;
15
- return (_jsxs(Router, { children: [children, buildSwapUrl ? _jsx(URLSearchParamsBuilder, {}) : null] }));
15
+ return (_jsxs(Router, { children: [children, buildUrl ? _jsx(URLSearchParamsBuilder, {}) : null] }));
16
16
  };
package/AppRoutes.js CHANGED
@@ -1,17 +1,17 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useRoutes } from 'react-router-dom';
3
3
  import { NotFound } from './components/NotFound';
4
- import { ActiveSwapsPage } from './pages/ActiveSwapsPage';
4
+ import { ActiveTransactionsPage } from './pages/ActiveTransactionsPage';
5
5
  import { MainPage } from './pages/MainPage';
6
+ import { RoutesPage } from './pages/RoutesPage';
6
7
  import { SelectChainPage } from './pages/SelectChainPage';
7
8
  import { SelectEnabledToolsPage } from './pages/SelectEnabledToolsPage';
8
9
  import { SelectTokenPage } from './pages/SelectTokenPage';
9
10
  import { SelectWalletPage } from './pages/SelectWalletPage';
10
11
  import { SettingsPage } from './pages/SettingsPage';
11
- import { SwapDetailsPage } from './pages/SwapDetailsPage';
12
- import { SwapHistoryPage } from './pages/SwapHistoryPage';
13
- import { SwapPage } from './pages/SwapPage';
14
- import { SwapRoutesPage } from './pages/SwapRoutesPage';
12
+ import { TransactionDetailsPage } from './pages/TransactionDetailsPage';
13
+ import { TransactionHistoryPage } from './pages/TransactionHistoryPage';
14
+ import { TransactionPage } from './pages/TransactionPage';
15
15
  import { navigationRoutes } from './utils';
16
16
  export const AppRoutes = () => {
17
17
  const element = useRoutes([
@@ -52,28 +52,28 @@ export const AppRoutes = () => {
52
52
  element: _jsx(SelectChainPage, { formType: "to" }),
53
53
  },
54
54
  {
55
- path: navigationRoutes.swapRoutes,
56
- element: _jsx(SwapRoutesPage, {}),
55
+ path: navigationRoutes.routes,
56
+ element: _jsx(RoutesPage, {}),
57
57
  },
58
58
  {
59
- path: navigationRoutes.activeSwaps,
60
- element: _jsx(ActiveSwapsPage, {}),
59
+ path: navigationRoutes.activeTransactions,
60
+ element: _jsx(ActiveTransactionsPage, {}),
61
61
  },
62
62
  {
63
- path: navigationRoutes.swapHistory,
64
- element: _jsx(SwapHistoryPage, {}),
63
+ path: navigationRoutes.transactionHistory,
64
+ element: _jsx(TransactionHistoryPage, {}),
65
65
  },
66
66
  {
67
- path: `${navigationRoutes.swapHistory}?/${navigationRoutes.swapRoutes}?/${navigationRoutes.swapExecution}?/${navigationRoutes.swapDetails}`,
68
- element: _jsx(SwapDetailsPage, {}),
67
+ path: `${navigationRoutes.transactionHistory}?/${navigationRoutes.routes}?/${navigationRoutes.transactionExecution}?/${navigationRoutes.transactionDetails}`,
68
+ element: _jsx(TransactionDetailsPage, {}),
69
69
  },
70
70
  {
71
- path: `${navigationRoutes.swapRoutes}?/${navigationRoutes.swapExecution}?/${navigationRoutes.selectWallet}`,
71
+ path: `${navigationRoutes.routes}?/${navigationRoutes.transactionExecution}?/${navigationRoutes.selectWallet}`,
72
72
  element: _jsx(SelectWalletPage, {}),
73
73
  },
74
74
  {
75
- path: `${navigationRoutes.swapRoutes}?/${navigationRoutes.activeSwaps}?/${navigationRoutes.swapExecution}`,
76
- element: _jsx(SwapPage, {}),
75
+ path: `${navigationRoutes.routes}?/${navigationRoutes.activeTransactions}?/${navigationRoutes.transactionExecution}`,
76
+ element: _jsx(TransactionPage, {}),
77
77
  },
78
78
  {
79
79
  path: '*',
package/cjs/App.js CHANGED
@@ -10,7 +10,7 @@ const AppContainer_1 = require("./components/AppContainer");
10
10
  const Header_1 = require("./components/Header");
11
11
  const Initializer_1 = require("./components/Initializer");
12
12
  const PoweredBy_1 = require("./components/PoweredBy");
13
- const SwapRoutes_1 = require("./components/SwapRoutes");
13
+ const Routes_1 = require("./components/Routes");
14
14
  const hooks_1 = require("./hooks");
15
15
  exports.App = (0, react_1.forwardRef)(({ elementRef, open, integrator, ...other }, ref) => {
16
16
  const config = (0, react_1.useMemo)(() => ({ integrator, ...other, ...other.config }), [integrator, other]);
@@ -18,6 +18,6 @@ exports.App = (0, react_1.forwardRef)(({ elementRef, open, integrator, ...other
18
18
  });
19
19
  const AppDefault = () => {
20
20
  const expandable = (0, hooks_1.useExpandableVariant)();
21
- return ((0, jsx_runtime_1.jsxs)(AppContainer_1.AppExpandedContainer, { children: [(0, jsx_runtime_1.jsxs)(AppContainer_1.AppContainer, { children: [(0, jsx_runtime_1.jsx)(Header_1.Header, {}), (0, jsx_runtime_1.jsx)(AppContainer_1.FlexContainer, { disableGutters: true, children: (0, jsx_runtime_1.jsx)(AppRoutes_1.AppRoutes, {}) }), (0, jsx_runtime_1.jsx)(PoweredBy_1.PoweredBy, {}), (0, jsx_runtime_1.jsx)(Initializer_1.Initializer, {})] }), expandable ? (0, jsx_runtime_1.jsx)(SwapRoutes_1.SwapRoutesExpanded, {}) : null] }));
21
+ return ((0, jsx_runtime_1.jsxs)(AppContainer_1.AppExpandedContainer, { children: [(0, jsx_runtime_1.jsxs)(AppContainer_1.AppContainer, { children: [(0, jsx_runtime_1.jsx)(Header_1.Header, {}), (0, jsx_runtime_1.jsx)(AppContainer_1.FlexContainer, { disableGutters: true, children: (0, jsx_runtime_1.jsx)(AppRoutes_1.AppRoutes, {}) }), (0, jsx_runtime_1.jsx)(PoweredBy_1.PoweredBy, {}), (0, jsx_runtime_1.jsx)(Initializer_1.Initializer, {})] }), expandable ? (0, jsx_runtime_1.jsx)(Routes_1.RoutesExpanded, {}) : null] }));
22
22
  };
23
23
  exports.AppDefault = AppDefault;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import type { WidgetConfig } from './types';
2
+ import type { WidgetConfig, WidgetSubvariant } from './types';
3
3
  export interface WidgetDrawer {
4
4
  isOpen(): void;
5
5
  toggleDrawer(): void;
@@ -7,6 +7,7 @@ export interface WidgetDrawer {
7
7
  closeDrawer(): void;
8
8
  }
9
9
  export declare const AppDrawer: import("react").ForwardRefExoticComponent<import("./types").WidgetDrawerProps & WidgetConfig & import("./types").WidgetConfigPartialProps & import("react").RefAttributes<WidgetDrawer>>;
10
- export declare const DrawerButtonText: ({ open }: {
10
+ export declare const DrawerButtonText: ({ open, subvariant, }: {
11
11
  open: boolean;
12
+ subvariant?: WidgetSubvariant | undefined;
12
13
  }) => import("react/jsx-runtime").JSX.Element;
package/cjs/AppDrawer.js CHANGED
@@ -37,7 +37,7 @@ exports.AppDrawer = (0, react_1.forwardRef)(({ elementRef, open, integrator, con
37
37
  height: '100%',
38
38
  },
39
39
  }), [config, integrator]);
40
- return ((0, jsx_runtime_1.jsxs)(AppProvider_1.AppProvider, { config: widgetConfig, children: [!widgetConfig.hiddenUI?.includes(types_1.HiddenUI.DrawerButton) ? ((0, jsx_runtime_1.jsxs)(AppDrawer_style_1.DrawerButton, { variant: "contained", onClick: toggleDrawer, open: drawerOpen, drawerProps: config?.containerStyle, children: [drawerOpen ? ((0, jsx_runtime_1.jsx)(KeyboardArrowRight_1.default, {})) : ((0, jsx_runtime_1.jsx)(KeyboardArrowLeft_1.default, {})), (0, jsx_runtime_1.jsx)(exports.DrawerButtonText, { open: drawerOpen })] })) : null, (0, jsx_runtime_1.jsx)(material_1.Drawer, { ref: elementRef, anchor: "right", open: drawerOpen, onClose: closeDrawer, BackdropProps: {
40
+ return ((0, jsx_runtime_1.jsxs)(AppProvider_1.AppProvider, { config: widgetConfig, children: [!widgetConfig.hiddenUI?.includes(types_1.HiddenUI.DrawerButton) ? ((0, jsx_runtime_1.jsxs)(AppDrawer_style_1.DrawerButton, { variant: "contained", onClick: toggleDrawer, open: drawerOpen, drawerProps: config?.containerStyle, children: [drawerOpen ? ((0, jsx_runtime_1.jsx)(KeyboardArrowRight_1.default, {})) : ((0, jsx_runtime_1.jsx)(KeyboardArrowLeft_1.default, {})), (0, jsx_runtime_1.jsx)(exports.DrawerButtonText, { open: drawerOpen, subvariant: config?.subvariant })] })) : null, (0, jsx_runtime_1.jsx)(material_1.Drawer, { ref: elementRef, anchor: "right", open: drawerOpen, onClose: closeDrawer, BackdropProps: {
41
41
  sx: {
42
42
  backgroundColor: 'rgb(0 0 0 / 48%)',
43
43
  backdropFilter: 'blur(3px)',
@@ -50,8 +50,12 @@ exports.AppDrawer = (0, react_1.forwardRef)(({ elementRef, open, integrator, con
50
50
  },
51
51
  }, keepMounted: true, children: (0, jsx_runtime_1.jsx)(App_1.AppDefault, {}) })] }));
52
52
  });
53
- const DrawerButtonText = ({ open }) => {
53
+ const DrawerButtonText = ({ open, subvariant, }) => {
54
54
  const { t } = (0, react_i18next_1.useTranslation)();
55
- return ((0, jsx_runtime_1.jsx)(AppDrawer_style_1.DrawerButtonTypography, { children: open ? t('button.hide') : t('button.lifiSwap') }));
55
+ return ((0, jsx_runtime_1.jsx)(AppDrawer_style_1.DrawerButtonTypography, { children: open
56
+ ? t('button.hide')
57
+ : subvariant === 'nft'
58
+ ? t('button.lifiCheckout')
59
+ : t('button.lifiExchange') }));
56
60
  };
57
61
  exports.DrawerButtonText = DrawerButtonText;
@@ -2,7 +2,7 @@
2
2
  export declare const DrawerButton: import("@emotion/styled").StyledComponent<{
3
3
  children?: import("react").ReactNode;
4
4
  classes?: Partial<import("@mui/material").ButtonClasses> | undefined;
5
- color?: import("@mui/types").OverridableStringUnion<"inherit" | "success" | "warning" | "error" | "primary" | "secondary" | "info", import("@mui/material").ButtonPropsColorOverrides> | undefined;
5
+ color?: import("@mui/types").OverridableStringUnion<"inherit" | "primary" | "secondary" | "error" | "warning" | "info" | "success", import("@mui/material").ButtonPropsColorOverrides> | undefined;
6
6
  disabled?: boolean | undefined;
7
7
  disableElevation?: boolean | undefined;
8
8
  disableFocusRipple?: boolean | undefined;
@@ -9,13 +9,13 @@ const queryClient_1 = require("./config/queryClient");
9
9
  const providers_1 = require("./providers");
10
10
  const stores_1 = require("./stores");
11
11
  const AppProvider = ({ children, config, }) => {
12
- return ((0, jsx_runtime_1.jsx)(react_query_1.QueryClientProvider, { client: queryClient_1.queryClient, children: (0, jsx_runtime_1.jsx)(stores_1.StoreProvider, { config: config, children: (0, jsx_runtime_1.jsx)(providers_1.WidgetProvider, { config: config, children: (0, jsx_runtime_1.jsx)(providers_1.SDKProvider, { children: (0, jsx_runtime_1.jsx)(providers_1.ThemeProvider, { children: (0, jsx_runtime_1.jsx)(providers_1.I18nProvider, { children: (0, jsx_runtime_1.jsx)(providers_1.WalletProvider, { children: (0, jsx_runtime_1.jsx)(providers_1.SwapFormProvider, { children: (0, jsx_runtime_1.jsx)(exports.AppRouter, { children: children }) }) }) }) }) }) }) }) }));
12
+ return ((0, jsx_runtime_1.jsx)(react_query_1.QueryClientProvider, { client: queryClient_1.queryClient, children: (0, jsx_runtime_1.jsx)(stores_1.StoreProvider, { config: config, children: (0, jsx_runtime_1.jsx)(providers_1.WidgetProvider, { config: config, children: (0, jsx_runtime_1.jsx)(providers_1.SDKProvider, { children: (0, jsx_runtime_1.jsx)(providers_1.ThemeProvider, { children: (0, jsx_runtime_1.jsx)(providers_1.I18nProvider, { children: (0, jsx_runtime_1.jsx)(providers_1.WalletProvider, { children: (0, jsx_runtime_1.jsx)(providers_1.FormProvider, { children: (0, jsx_runtime_1.jsx)(exports.AppRouter, { children: children }) }) }) }) }) }) }) }) }));
13
13
  };
14
14
  exports.AppProvider = AppProvider;
15
15
  const AppRouter = ({ children }) => {
16
- const { buildSwapUrl } = (0, providers_1.useWidgetConfig)();
16
+ const { buildUrl } = (0, providers_1.useWidgetConfig)();
17
17
  const inRouterContext = (0, react_router_dom_1.useInRouterContext)();
18
18
  const Router = inRouterContext ? react_1.Fragment : react_router_dom_1.MemoryRouter;
19
- return ((0, jsx_runtime_1.jsxs)(Router, { children: [children, buildSwapUrl ? (0, jsx_runtime_1.jsx)(providers_1.URLSearchParamsBuilder, {}) : null] }));
19
+ return ((0, jsx_runtime_1.jsxs)(Router, { children: [children, buildUrl ? (0, jsx_runtime_1.jsx)(providers_1.URLSearchParamsBuilder, {}) : null] }));
20
20
  };
21
21
  exports.AppRouter = AppRouter;
package/cjs/AppRoutes.js CHANGED
@@ -4,17 +4,17 @@ exports.AppRoutes = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_router_dom_1 = require("react-router-dom");
6
6
  const NotFound_1 = require("./components/NotFound");
7
- const ActiveSwapsPage_1 = require("./pages/ActiveSwapsPage");
7
+ const ActiveTransactionsPage_1 = require("./pages/ActiveTransactionsPage");
8
8
  const MainPage_1 = require("./pages/MainPage");
9
+ const RoutesPage_1 = require("./pages/RoutesPage");
9
10
  const SelectChainPage_1 = require("./pages/SelectChainPage");
10
11
  const SelectEnabledToolsPage_1 = require("./pages/SelectEnabledToolsPage");
11
12
  const SelectTokenPage_1 = require("./pages/SelectTokenPage");
12
13
  const SelectWalletPage_1 = require("./pages/SelectWalletPage");
13
14
  const SettingsPage_1 = require("./pages/SettingsPage");
14
- const SwapDetailsPage_1 = require("./pages/SwapDetailsPage");
15
- const SwapHistoryPage_1 = require("./pages/SwapHistoryPage");
16
- const SwapPage_1 = require("./pages/SwapPage");
17
- const SwapRoutesPage_1 = require("./pages/SwapRoutesPage");
15
+ const TransactionDetailsPage_1 = require("./pages/TransactionDetailsPage");
16
+ const TransactionHistoryPage_1 = require("./pages/TransactionHistoryPage");
17
+ const TransactionPage_1 = require("./pages/TransactionPage");
18
18
  const utils_1 = require("./utils");
19
19
  const AppRoutes = () => {
20
20
  const element = (0, react_router_dom_1.useRoutes)([
@@ -55,28 +55,28 @@ const AppRoutes = () => {
55
55
  element: (0, jsx_runtime_1.jsx)(SelectChainPage_1.SelectChainPage, { formType: "to" }),
56
56
  },
57
57
  {
58
- path: utils_1.navigationRoutes.swapRoutes,
59
- element: (0, jsx_runtime_1.jsx)(SwapRoutesPage_1.SwapRoutesPage, {}),
58
+ path: utils_1.navigationRoutes.routes,
59
+ element: (0, jsx_runtime_1.jsx)(RoutesPage_1.RoutesPage, {}),
60
60
  },
61
61
  {
62
- path: utils_1.navigationRoutes.activeSwaps,
63
- element: (0, jsx_runtime_1.jsx)(ActiveSwapsPage_1.ActiveSwapsPage, {}),
62
+ path: utils_1.navigationRoutes.activeTransactions,
63
+ element: (0, jsx_runtime_1.jsx)(ActiveTransactionsPage_1.ActiveTransactionsPage, {}),
64
64
  },
65
65
  {
66
- path: utils_1.navigationRoutes.swapHistory,
67
- element: (0, jsx_runtime_1.jsx)(SwapHistoryPage_1.SwapHistoryPage, {}),
66
+ path: utils_1.navigationRoutes.transactionHistory,
67
+ element: (0, jsx_runtime_1.jsx)(TransactionHistoryPage_1.TransactionHistoryPage, {}),
68
68
  },
69
69
  {
70
- path: `${utils_1.navigationRoutes.swapHistory}?/${utils_1.navigationRoutes.swapRoutes}?/${utils_1.navigationRoutes.swapExecution}?/${utils_1.navigationRoutes.swapDetails}`,
71
- element: (0, jsx_runtime_1.jsx)(SwapDetailsPage_1.SwapDetailsPage, {}),
70
+ path: `${utils_1.navigationRoutes.transactionHistory}?/${utils_1.navigationRoutes.routes}?/${utils_1.navigationRoutes.transactionExecution}?/${utils_1.navigationRoutes.transactionDetails}`,
71
+ element: (0, jsx_runtime_1.jsx)(TransactionDetailsPage_1.TransactionDetailsPage, {}),
72
72
  },
73
73
  {
74
- path: `${utils_1.navigationRoutes.swapRoutes}?/${utils_1.navigationRoutes.swapExecution}?/${utils_1.navigationRoutes.selectWallet}`,
74
+ path: `${utils_1.navigationRoutes.routes}?/${utils_1.navigationRoutes.transactionExecution}?/${utils_1.navigationRoutes.selectWallet}`,
75
75
  element: (0, jsx_runtime_1.jsx)(SelectWalletPage_1.SelectWalletPage, {}),
76
76
  },
77
77
  {
78
- path: `${utils_1.navigationRoutes.swapRoutes}?/${utils_1.navigationRoutes.activeSwaps}?/${utils_1.navigationRoutes.swapExecution}`,
79
- element: (0, jsx_runtime_1.jsx)(SwapPage_1.SwapPage, {}),
78
+ path: `${utils_1.navigationRoutes.routes}?/${utils_1.navigationRoutes.activeTransactions}?/${utils_1.navigationRoutes.transactionExecution}`,
79
+ element: (0, jsx_runtime_1.jsx)(TransactionPage_1.TransactionPage, {}),
80
80
  },
81
81
  {
82
82
  path: '*',
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- export declare const ActiveSwapItem: React.FC<{
2
+ export declare const ActiveTransactionItem: React.FC<{
3
3
  routeId: string;
4
4
  dense?: boolean;
5
5
  }>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ActiveSwapItem = void 0;
3
+ exports.ActiveTransactionItem = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const ArrowForward_1 = require("@mui/icons-material/ArrowForward");
6
6
  const ErrorRounded_1 = require("@mui/icons-material/ErrorRounded");
@@ -12,8 +12,8 @@ const stores_1 = require("../../stores");
12
12
  const utils_1 = require("../../utils");
13
13
  const StepTimer_1 = require("../Step/StepTimer");
14
14
  const TokenAvatar_1 = require("../TokenAvatar");
15
- const ActiveSwaps_style_1 = require("./ActiveSwaps.style");
16
- const ActiveSwapItem = ({ routeId, dense }) => {
15
+ const ActiveTransactions_style_1 = require("./ActiveTransactions.style");
16
+ const ActiveTransactionItem = ({ routeId, dense }) => {
17
17
  const navigate = (0, react_router_dom_1.useNavigate)();
18
18
  const { route, status } = (0, hooks_1.useRouteExecution)({
19
19
  routeId,
@@ -30,7 +30,7 @@ const ActiveSwapItem = ({ routeId, dense }) => {
30
30
  return null;
31
31
  }
32
32
  const handleClick = () => {
33
- navigate(utils_1.navigationRoutes.swapExecution, { state: { routeId } });
33
+ navigate(utils_1.navigationRoutes.transactionExecution, { state: { routeId } });
34
34
  };
35
35
  const getStatusComponent = () => {
36
36
  switch (lastActiveProcess?.status) {
@@ -42,7 +42,7 @@ const ActiveSwapItem = ({ routeId, dense }) => {
42
42
  return ((0, jsx_runtime_1.jsx)(material_1.Typography, { fontSize: 14, fontWeight: 500, children: (0, jsx_runtime_1.jsx)(StepTimer_1.StepTimer, { step: lastActiveStep, hideInProgress: true }) }));
43
43
  }
44
44
  };
45
- const ListItemComponent = dense ? ActiveSwaps_style_1.ListItem : ActiveSwaps_style_1.ListItemButton;
45
+ const ListItemComponent = dense ? ActiveTransactions_style_1.ListItem : ActiveTransactions_style_1.ListItemButton;
46
46
  return ((0, jsx_runtime_1.jsxs)(ListItemComponent, { onClick: handleClick, dense: true, disableRipple: dense, children: [(0, jsx_runtime_1.jsx)(material_1.ListItemAvatar, { children: (0, jsx_runtime_1.jsxs)(TokenAvatar_1.TokenAvatarGroup, { total: 2, children: [(0, jsx_runtime_1.jsx)(TokenAvatar_1.TokenAvatar, { token: route.fromToken }), (0, jsx_runtime_1.jsx)(TokenAvatar_1.TokenAvatar, { token: route.toToken })] }) }), (0, jsx_runtime_1.jsx)(material_1.ListItemText, { sx: { margin: 0 }, disableTypography: true, primary: (0, jsx_runtime_1.jsxs)(material_1.Typography, { fontWeight: 500, lineHeight: 1, sx: {
47
47
  display: 'flex',
48
48
  alignItems: 'center',
@@ -50,4 +50,4 @@ const ActiveSwapItem = ({ routeId, dense }) => {
50
50
  height: 16,
51
51
  }, children: [route.fromToken.symbol, (0, jsx_runtime_1.jsx)(ArrowForward_1.default, { sx: { paddingX: 0.5 } }), route.toToken.symbol] }), secondary: status !== stores_1.RouteExecutionStatus.Done ? ((0, jsx_runtime_1.jsx)(material_1.Typography, { fontWeight: 400, fontSize: 12, color: "text.secondary", lineHeight: 1, mt: 0.75, ml: 2, children: title })) : null }), getStatusComponent()] }));
52
52
  };
53
- exports.ActiveSwapItem = ActiveSwapItem;
53
+ exports.ActiveTransactionItem = ActiveTransactionItem;
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
2
  import type { BoxProps } from '@mui/material';
3
- export declare const SwapRoutesPage: React.FC<BoxProps>;
3
+ export declare const ActiveTransactions: React.FC<BoxProps>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ActiveSwaps = void 0;
3
+ exports.ActiveTransactions = 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");
@@ -9,9 +9,9 @@ const providers_1 = require("../../providers");
9
9
  const stores_1 = require("../../stores");
10
10
  const utils_1 = require("../../utils");
11
11
  const Card_1 = require("../Card");
12
- const ActiveSwapItem_1 = require("./ActiveSwapItem");
13
- const ActiveSwaps_style_1 = require("./ActiveSwaps.style");
14
- const ActiveSwaps = (props) => {
12
+ const ActiveTransactionItem_1 = require("./ActiveTransactionItem");
13
+ const ActiveTransactions_style_1 = require("./ActiveTransactions.style");
14
+ const ActiveTransactions = (props) => {
15
15
  const { t } = (0, react_i18next_1.useTranslation)();
16
16
  const navigate = (0, react_router_dom_1.useNavigate)();
17
17
  const { account } = (0, providers_1.useWallet)();
@@ -20,9 +20,9 @@ const ActiveSwaps = (props) => {
20
20
  return null;
21
21
  }
22
22
  const handleShowAll = () => {
23
- navigate(utils_1.navigationRoutes.activeSwaps);
23
+ navigate(utils_1.navigationRoutes.activeTransactions);
24
24
  };
25
25
  const hasShowAll = executingRoutes?.length > 2;
26
- return ((0, jsx_runtime_1.jsxs)(Card_1.Card, { variant: "selected", selectionColor: "secondary", ...props, children: [(0, jsx_runtime_1.jsx)(Card_1.CardTitle, { children: t('header.activeSwaps') }), (0, jsx_runtime_1.jsx)(material_1.Stack, { spacing: 1.5, pt: 1.5, pb: hasShowAll ? 0 : 2, children: executingRoutes.slice(0, 2).map((routeId) => ((0, jsx_runtime_1.jsx)(ActiveSwapItem_1.ActiveSwapItem, { routeId: routeId, dense: true }, routeId))) }), hasShowAll ? ((0, jsx_runtime_1.jsx)(ActiveSwaps_style_1.ShowAllButton, { disableRipple: true, fullWidth: true, onClick: handleShowAll, children: t('button.showAll') })) : null] }));
26
+ return ((0, jsx_runtime_1.jsxs)(Card_1.Card, { variant: "selected", selectionColor: "secondary", ...props, children: [(0, jsx_runtime_1.jsx)(Card_1.CardTitle, { children: t('header.activeTransactions') }), (0, jsx_runtime_1.jsx)(material_1.Stack, { spacing: 1.5, pt: 1.5, pb: hasShowAll ? 0 : 2, children: executingRoutes.slice(0, 2).map((routeId) => ((0, jsx_runtime_1.jsx)(ActiveTransactionItem_1.ActiveTransactionItem, { routeId: routeId, dense: true }, routeId))) }), hasShowAll ? ((0, jsx_runtime_1.jsx)(ActiveTransactions_style_1.ShowAllButton, { disableRipple: true, fullWidth: true, onClick: handleShowAll, children: t('button.showAll') })) : null] }));
27
27
  };
28
- exports.ActiveSwaps = ActiveSwaps;
28
+ exports.ActiveTransactions = ActiveTransactions;
@@ -39,7 +39,7 @@ export declare const ListItem: import("@emotion/styled").StyledComponent<{
39
39
  export declare const ShowAllButton: import("@emotion/styled").StyledComponent<{
40
40
  children?: import("react").ReactNode;
41
41
  classes?: Partial<import("@mui/material").ButtonClasses> | undefined;
42
- color?: import("@mui/types").OverridableStringUnion<"inherit" | "success" | "warning" | "error" | "primary" | "secondary" | "info", import("@mui/material").ButtonPropsColorOverrides> | undefined;
42
+ color?: import("@mui/types").OverridableStringUnion<"inherit" | "primary" | "secondary" | "error" | "warning" | "info" | "success", import("@mui/material").ButtonPropsColorOverrides> | undefined;
43
43
  disabled?: boolean | undefined;
44
44
  disableElevation?: boolean | undefined;
45
45
  disableFocusRipple?: boolean | undefined;
@@ -0,0 +1,2 @@
1
+ export * from './ActiveTransactionItem';
2
+ export * from './ActiveTransactions';
@@ -14,5 +14,5 @@ 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("./ActiveSwapItem"), exports);
18
- __exportStar(require("./ActiveSwaps"), exports);
17
+ __exportStar(require("./ActiveTransactionItem"), exports);
18
+ __exportStar(require("./ActiveTransactions"), exports);
@@ -1,9 +1,9 @@
1
1
  import type { Token } from '@lifi/sdk';
2
2
  import type { BoxProps } from '@mui/material';
3
3
  import type { ReactNode } from 'react';
4
- import type { SwapFormTypeProps } from '../../providers';
5
- export declare const SwapInput: React.FC<SwapFormTypeProps & BoxProps>;
6
- export declare const SwapInputBase: React.FC<SwapFormTypeProps & BoxProps & {
4
+ import type { FormTypeProps } from '../../providers';
5
+ export declare const AmountInput: React.FC<FormTypeProps & BoxProps>;
6
+ export declare const AmountInputBase: React.FC<FormTypeProps & BoxProps & {
7
7
  token?: Token;
8
8
  startAdornment?: ReactNode;
9
9
  endAdornment?: ReactNode;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SwapInputBase = exports.SwapInput = void 0;
3
+ exports.AmountInputBase = exports.AmountInput = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const react_hook_form_1 = require("react-hook-form");
@@ -10,26 +10,26 @@ const providers_1 = require("../../providers");
10
10
  const types_1 = require("../../types");
11
11
  const utils_1 = require("../../utils");
12
12
  const Card_1 = require("../Card");
13
+ const AmountInput_style_1 = require("./AmountInput.style");
14
+ const AmountInputEndAdornment_1 = require("./AmountInputEndAdornment");
15
+ const AmountInputStartAdornment_1 = require("./AmountInputStartAdornment");
13
16
  const FormPriceHelperText_1 = require("./FormPriceHelperText");
14
- const SwapInput_style_1 = require("./SwapInput.style");
15
- const SwapInputEndAdornment_1 = require("./SwapInputEndAdornment");
16
- const SwapInputStartAdornment_1 = require("./SwapInputStartAdornment");
17
- const SwapInput = ({ formType, ...props }) => {
17
+ const AmountInput = ({ formType, ...props }) => {
18
18
  const { disabledUI } = (0, providers_1.useWidgetConfig)();
19
19
  const [chainId, tokenAddress] = (0, react_hook_form_1.useWatch)({
20
20
  name: [
21
- providers_1.SwapFormKeyHelper.getChainKey(formType),
22
- providers_1.SwapFormKeyHelper.getTokenKey(formType),
21
+ providers_1.FormKeyHelper.getChainKey(formType),
22
+ providers_1.FormKeyHelper.getTokenKey(formType),
23
23
  ],
24
24
  });
25
25
  const { token } = (0, hooks_1.useToken)(chainId, tokenAddress);
26
26
  const disabled = disabledUI?.includes(types_1.DisabledUI.FromAmount);
27
- return ((0, jsx_runtime_1.jsx)(exports.SwapInputBase, { formType: formType, token: token, startAdornment: (0, jsx_runtime_1.jsx)(SwapInputStartAdornment_1.SwapInputStartAdornment, { formType: formType }), endAdornment: !disabled ? (0, jsx_runtime_1.jsx)(SwapInputEndAdornment_1.SwapInputEndAdornment, { formType: formType }) : undefined, bottomAdornment: (0, jsx_runtime_1.jsx)(FormPriceHelperText_1.FormPriceHelperText, { formType: formType }), disabled: disabled, ...props }));
27
+ return ((0, jsx_runtime_1.jsx)(exports.AmountInputBase, { formType: formType, token: token, startAdornment: (0, jsx_runtime_1.jsx)(AmountInputStartAdornment_1.AmountInputStartAdornment, { formType: formType }), endAdornment: !disabled ? (0, jsx_runtime_1.jsx)(AmountInputEndAdornment_1.AmountInputEndAdornment, { formType: formType }) : undefined, bottomAdornment: (0, jsx_runtime_1.jsx)(FormPriceHelperText_1.FormPriceHelperText, { formType: formType }), disabled: disabled, ...props }));
28
28
  };
29
- exports.SwapInput = SwapInput;
30
- const SwapInputBase = ({ formType, token, startAdornment, endAdornment, bottomAdornment, disabled, ...props }) => {
29
+ exports.AmountInput = AmountInput;
30
+ const AmountInputBase = ({ formType, token, startAdornment, endAdornment, bottomAdornment, disabled, ...props }) => {
31
31
  const { t } = (0, react_i18next_1.useTranslation)();
32
- const amountKey = providers_1.SwapFormKeyHelper.getAmountKey(formType);
32
+ const amountKey = providers_1.FormKeyHelper.getAmountKey(formType);
33
33
  const { field: { onChange, onBlur, value }, } = (0, react_hook_form_1.useController)({
34
34
  name: amountKey,
35
35
  });
@@ -47,11 +47,11 @@ const SwapInputBase = ({ formType, token, startAdornment, endAdornment, bottomAd
47
47
  };
48
48
  (0, react_1.useLayoutEffect)(() => {
49
49
  if (ref.current) {
50
- (0, utils_1.fitInputText)(SwapInput_style_1.maxInputFontSize, SwapInput_style_1.minInputFontSize, ref.current);
50
+ (0, utils_1.fitInputText)(AmountInput_style_1.maxInputFontSize, AmountInput_style_1.minInputFontSize, ref.current);
51
51
  }
52
52
  }, [value, ref]);
53
- return ((0, jsx_runtime_1.jsxs)(Card_1.Card, { ...props, children: [(0, jsx_runtime_1.jsx)(Card_1.CardTitle, { children: t('swap.fromAmount') }), (0, jsx_runtime_1.jsxs)(SwapInput_style_1.FormControl, { fullWidth: true, children: [(0, jsx_runtime_1.jsx)(SwapInput_style_1.Input, { inputRef: ref, size: "small", autoComplete: "off", placeholder: "0", startAdornment: startAdornment, endAdornment: endAdornment, inputProps: {
53
+ return ((0, jsx_runtime_1.jsxs)(Card_1.Card, { ...props, children: [(0, jsx_runtime_1.jsx)(Card_1.CardTitle, { children: t('main.fromAmount') }), (0, jsx_runtime_1.jsxs)(AmountInput_style_1.FormControl, { fullWidth: true, children: [(0, jsx_runtime_1.jsx)(AmountInput_style_1.Input, { inputRef: ref, size: "small", autoComplete: "off", placeholder: "0", startAdornment: startAdornment, endAdornment: endAdornment, inputProps: {
54
54
  inputMode: 'decimal',
55
55
  }, onChange: handleChange, onBlur: handleBlur, value: value, name: amountKey, disabled: disabled, required: true }), bottomAdornment] })] }));
56
56
  };
57
- exports.SwapInputBase = SwapInputBase;
57
+ exports.AmountInputBase = AmountInputBase;
@@ -4,7 +4,7 @@ export declare const minInputFontSize = 14;
4
4
  export declare const FormControl: import("@emotion/styled").StyledComponent<{
5
5
  children?: import("react").ReactNode;
6
6
  classes?: Partial<import("@mui/material").FormControlClasses> | undefined;
7
- color?: import("@mui/types").OverridableStringUnion<"success" | "warning" | "error" | "primary" | "secondary" | "info", import("@mui/material").FormControlPropsColorOverrides> | undefined;
7
+ color?: import("@mui/types").OverridableStringUnion<"primary" | "secondary" | "error" | "warning" | "info" | "success", import("@mui/material").FormControlPropsColorOverrides> | undefined;
8
8
  disabled?: boolean | undefined;
9
9
  error?: boolean | undefined;
10
10
  fullWidth?: boolean | undefined;
@@ -2,7 +2,7 @@
2
2
  export declare const Button: import("@emotion/styled").StyledComponent<{
3
3
  children?: import("react").ReactNode;
4
4
  classes?: Partial<import("@mui/material").ButtonClasses> | undefined;
5
- color?: import("@mui/types").OverridableStringUnion<"inherit" | "success" | "warning" | "error" | "primary" | "secondary" | "info", import("@mui/material").ButtonPropsColorOverrides> | undefined;
5
+ color?: import("@mui/types").OverridableStringUnion<"inherit" | "primary" | "secondary" | "error" | "warning" | "info" | "success", import("@mui/material").ButtonPropsColorOverrides> | undefined;
6
6
  disabled?: boolean | undefined;
7
7
  disableElevation?: boolean | undefined;
8
8
  disableFocusRipple?: boolean | undefined;
@@ -0,0 +1,2 @@
1
+ import type { FormTypeProps } from '../../providers';
2
+ export declare const AmountInputEndAdornment: ({ formType }: FormTypeProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SwapInputEndAdornment = void 0;
3
+ exports.AmountInputEndAdornment = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const material_1 = require("@mui/material");
6
6
  const big_js_1 = require("big.js");
@@ -9,15 +9,15 @@ const react_i18next_1 = require("react-i18next");
9
9
  const hooks_1 = require("../../hooks");
10
10
  const providers_1 = require("../../providers");
11
11
  const utils_1 = require("../../utils");
12
- const SwapInputAdornment_style_1 = require("./SwapInputAdornment.style");
13
- const SwapInputEndAdornment = ({ formType }) => {
12
+ const AmountInputAdornment_style_1 = require("./AmountInputAdornment.style");
13
+ const AmountInputEndAdornment = ({ formType }) => {
14
14
  const { t } = (0, react_i18next_1.useTranslation)();
15
15
  const { setValue } = (0, react_hook_form_1.useFormContext)();
16
16
  const { getChainById } = (0, hooks_1.useChains)();
17
17
  const [chainId, tokenAddress] = (0, react_hook_form_1.useWatch)({
18
18
  name: [
19
- providers_1.SwapFormKeyHelper.getChainKey(formType),
20
- providers_1.SwapFormKeyHelper.getTokenKey(formType),
19
+ providers_1.FormKeyHelper.getChainKey(formType),
20
+ providers_1.FormKeyHelper.getTokenKey(formType),
21
21
  ],
22
22
  });
23
23
  const { data } = (0, hooks_1.useGasRecommendation)(chainId);
@@ -36,10 +36,10 @@ const SwapInputEndAdornment = ({ formType }) => {
36
36
  maxAmount = (0, utils_1.formatTokenAmount)(tokenAmount.minus(recommendedAmount).toString());
37
37
  }
38
38
  }
39
- setValue(providers_1.SwapFormKeyHelper.getAmountKey(formType), maxAmount || '', {
39
+ setValue(providers_1.FormKeyHelper.getAmountKey(formType), maxAmount || '', {
40
40
  shouldTouch: true,
41
41
  });
42
42
  };
43
- return ((0, jsx_runtime_1.jsx)(material_1.InputAdornment, { position: "end", children: isLoading && tokenAddress ? ((0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rectangular", width: 46, height: 24, sx: { borderRadius: 0.5 } })) : formType === 'from' && token?.amount ? ((0, jsx_runtime_1.jsx)(SwapInputAdornment_style_1.Button, { onClick: handleMax, children: t('button.max') })) : null }));
43
+ return ((0, jsx_runtime_1.jsx)(material_1.InputAdornment, { position: "end", children: isLoading && tokenAddress ? ((0, jsx_runtime_1.jsx)(material_1.Skeleton, { variant: "rectangular", width: 46, height: 24, sx: { borderRadius: 0.5 } })) : formType === 'from' && token?.amount ? ((0, jsx_runtime_1.jsx)(AmountInputAdornment_style_1.Button, { onClick: handleMax, children: t('button.max') })) : null }));
44
44
  };
45
- exports.SwapInputEndAdornment = SwapInputEndAdornment;
45
+ exports.AmountInputEndAdornment = AmountInputEndAdornment;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import type { FormTypeProps } from '../../providers';
3
+ export declare const AmountInputStartAdornment: React.FC<FormTypeProps>;
@@ -1,16 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SwapInputStartAdornment = void 0;
3
+ exports.AmountInputStartAdornment = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_hook_form_1 = require("react-hook-form");
6
6
  const hooks_1 = require("../../hooks");
7
7
  const providers_1 = require("../../providers");
8
8
  const TokenAvatar_1 = require("../TokenAvatar");
9
- const SwapInputStartAdornment = ({ formType, }) => {
9
+ const AmountInputStartAdornment = ({ formType, }) => {
10
10
  const [chainId, tokenAddress] = (0, react_hook_form_1.useWatch)({
11
11
  name: [
12
- providers_1.SwapFormKeyHelper.getChainKey(formType),
13
- providers_1.SwapFormKeyHelper.getTokenKey(formType),
12
+ providers_1.FormKeyHelper.getChainKey(formType),
13
+ providers_1.FormKeyHelper.getTokenKey(formType),
14
14
  ],
15
15
  });
16
16
  const { chain } = (0, hooks_1.useChain)(chainId);
@@ -18,4 +18,4 @@ const SwapInputStartAdornment = ({ formType, }) => {
18
18
  const isSelected = !!(chain && token);
19
19
  return isSelected ? ((0, jsx_runtime_1.jsx)(TokenAvatar_1.TokenAvatar, { token: token, chain: chain, sx: { marginLeft: 2 } })) : ((0, jsx_runtime_1.jsx)(TokenAvatar_1.TokenAvatarDefault, { sx: { marginLeft: 2 } }));
20
20
  };
21
- exports.SwapInputStartAdornment = SwapInputStartAdornment;
21
+ exports.AmountInputStartAdornment = AmountInputStartAdornment;