@lifi/widget 1.14.1 → 1.16.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 (311) hide show
  1. package/App.js +21 -0
  2. package/cjs/App.js +21 -0
  3. package/cjs/components/ActiveSwaps/ActiveSwapItem.d.ts +5 -0
  4. package/cjs/components/ActiveSwaps/ActiveSwapItem.js +45 -0
  5. package/cjs/components/{SwapInProgress/SwapInProgress.d.ts → ActiveSwaps/ActiveSwaps.d.ts} +1 -1
  6. package/cjs/components/ActiveSwaps/ActiveSwaps.js +30 -0
  7. package/cjs/components/ActiveSwaps/ActiveSwaps.style.d.ts +78 -0
  8. package/cjs/components/ActiveSwaps/ActiveSwaps.style.js +40 -0
  9. package/cjs/components/ActiveSwaps/index.d.ts +2 -0
  10. package/cjs/components/ActiveSwaps/index.js +18 -0
  11. package/cjs/components/Card/Card.d.ts +7 -4
  12. package/cjs/components/Card/Card.js +38 -28
  13. package/cjs/{pages/SelectTokenPage → components/ChainSelect}/ChainSelect.d.ts +1 -1
  14. package/cjs/components/ChainSelect/ChainSelect.js +35 -0
  15. package/cjs/components/{SwapInProgress/SwapInProgress.style.d.ts → ChainSelect/ChainSelect.style.d.ts} +10 -19
  16. package/cjs/components/ChainSelect/ChainSelect.style.js +19 -0
  17. package/cjs/components/ChainSelect/index.d.ts +2 -0
  18. package/cjs/components/ChainSelect/index.js +18 -0
  19. package/cjs/components/ChainSelect/useChainSelect.d.ts +8 -0
  20. package/cjs/components/ChainSelect/useChainSelect.js +33 -0
  21. package/cjs/components/Header/Header.js +3 -11
  22. package/cjs/components/Header/NavigationHeader.js +10 -17
  23. package/cjs/components/Header/WalletHeader.js +4 -5
  24. package/cjs/components/PoweredBy/PoweredBy.style.d.ts +1 -1
  25. package/cjs/components/PoweredBy/PoweredBy.style.js +1 -0
  26. package/cjs/components/ReverseTokensButton/ReverseTokensButton.js +10 -10
  27. package/cjs/components/SelectTokenButton/SelectTokenButton.d.ts +1 -1
  28. package/cjs/components/SelectTokenButton/SelectTokenButton.js +3 -3
  29. package/{components/SwapInProgress/SwapInProgress.d.ts → cjs/components/SendToWallet/SendToWallet.d.ts} +1 -1
  30. package/cjs/components/SendToWallet/SendToWallet.js +53 -0
  31. package/cjs/components/SendToWallet/SendToWallet.style.d.ts +19 -0
  32. package/cjs/components/SendToWallet/SendToWallet.style.js +15 -0
  33. package/cjs/components/SendToWallet/index.d.ts +1 -0
  34. package/cjs/components/{SwapInProgress → SendToWallet}/index.js +1 -1
  35. package/cjs/components/Step/CircularProgress.js +1 -1
  36. package/cjs/components/Step/CircularProgress.style.js +1 -1
  37. package/cjs/components/Step/StepProcess.js +1 -5
  38. package/cjs/components/Step/StepProcess.style.d.ts +1 -1
  39. package/cjs/components/Step/StepTimer.d.ts +1 -0
  40. package/cjs/components/Step/StepTimer.js +6 -6
  41. package/cjs/components/SwapButton/SwapButton.js +10 -14
  42. package/cjs/components/SwapButton/types.d.ts +2 -2
  43. package/cjs/components/SwapInput/FormPriceHelperText.d.ts +1 -1
  44. package/cjs/components/SwapInput/FormPriceHelperText.js +4 -4
  45. package/cjs/components/SwapInput/SwapInput.d.ts +1 -1
  46. package/cjs/components/SwapInput/SwapInput.js +4 -4
  47. package/cjs/components/SwapInput/SwapInputAdornment.d.ts +1 -1
  48. package/cjs/components/SwapInput/SwapInputAdornment.js +4 -4
  49. package/cjs/components/SwapRouteCard/SwapRouteCard.js +5 -4
  50. package/cjs/components/SwapRouteCard/SwapRouteCard.style.js +3 -3
  51. package/cjs/components/TokenAvatar/TokenAvatar.style.js +0 -3
  52. package/cjs/components/TokenList/TokenList.js +14 -11
  53. package/cjs/components/TokenList/types.d.ts +1 -1
  54. package/cjs/config/theme.js +24 -23
  55. package/cjs/config/version.d.ts +1 -1
  56. package/cjs/config/version.js +1 -1
  57. package/cjs/hooks/index.d.ts +3 -0
  58. package/cjs/hooks/index.js +3 -0
  59. package/cjs/hooks/useChains.d.ts +1 -97
  60. package/cjs/hooks/useChains.js +8 -15
  61. package/cjs/hooks/useNavigateBack.d.ts +4 -0
  62. package/cjs/hooks/useNavigateBack.js +18 -0
  63. package/cjs/{components/Step/utils.d.ts → hooks/useProcessMessage.d.ts} +4 -0
  64. package/cjs/{components/Step/utils.js → hooks/useProcessMessage.js} +16 -10
  65. package/cjs/hooks/useRouteExecution.d.ts +1 -1
  66. package/cjs/hooks/useRouteExecution.js +20 -29
  67. package/cjs/hooks/useSwapRoutes.js +18 -7
  68. package/cjs/hooks/useWidgetEvents.d.ts +3 -0
  69. package/cjs/hooks/useWidgetEvents.js +13 -0
  70. package/cjs/i18n/en/translation.json +25 -15
  71. package/cjs/i18n/index.d.ts +20 -10
  72. package/cjs/index.d.ts +1 -0
  73. package/cjs/index.js +3 -1
  74. package/cjs/pages/ActiveSwapsPage/ActiveSwapsEmpty.d.ts +2 -0
  75. package/cjs/pages/ActiveSwapsPage/ActiveSwapsEmpty.js +18 -0
  76. package/cjs/pages/ActiveSwapsPage/ActiveSwapsPage.d.ts +2 -0
  77. package/cjs/pages/ActiveSwapsPage/ActiveSwapsPage.js +21 -0
  78. package/cjs/pages/ActiveSwapsPage/index.d.ts +1 -0
  79. package/cjs/pages/ActiveSwapsPage/index.js +17 -0
  80. package/cjs/pages/MainPage/MainPage.js +2 -2
  81. package/cjs/pages/MainPage/MainSwapButton.js +3 -1
  82. package/cjs/pages/MainPage/SwapRoutes.js +4 -1
  83. package/cjs/pages/SelectChainPage/SelectChainPage.d.ts +3 -0
  84. package/cjs/pages/SelectChainPage/SelectChainPage.js +33 -0
  85. package/cjs/pages/SelectChainPage/SelectChainPage.style.d.ts +21 -0
  86. package/cjs/pages/SelectChainPage/SelectChainPage.style.js +20 -0
  87. package/cjs/pages/SelectChainPage/index.d.ts +1 -0
  88. package/cjs/pages/SelectChainPage/index.js +17 -0
  89. package/cjs/pages/SelectTokenPage/SearchTokenInput.js +3 -3
  90. package/cjs/pages/SelectTokenPage/SelectTokenPage.d.ts +2 -4
  91. package/cjs/pages/SelectTokenPage/SelectTokenPage.js +4 -8
  92. package/cjs/pages/SelectWalletPage/SelectWalletPage.js +10 -10
  93. package/cjs/pages/SelectWalletPage/SelectWalletPage.style.d.ts +2 -27
  94. package/cjs/pages/SelectWalletPage/SelectWalletPage.style.js +4 -14
  95. package/cjs/pages/SettingsPage/AdvancedPreferences.js +2 -2
  96. package/cjs/pages/SettingsPage/ColorSchemeButtonGroup.js +2 -2
  97. package/cjs/pages/SettingsPage/ColorSchemeButtonGroup.style.d.ts +1 -1
  98. package/cjs/pages/SettingsPage/EnabledBridgesSelect.js +3 -6
  99. package/cjs/pages/SettingsPage/EnabledExchangesSelect.js +3 -5
  100. package/cjs/pages/SettingsPage/RoutePrioritySelect.js +5 -1
  101. package/cjs/pages/SettingsPage/SettingsPage.js +2 -1
  102. package/cjs/pages/SettingsPage/ShowDestinationWallet.d.ts +2 -0
  103. package/cjs/pages/SettingsPage/ShowDestinationWallet.js +22 -0
  104. package/cjs/pages/SwapDetailsPage/SwapDetailsPage.js +4 -3
  105. package/cjs/pages/SwapHistoryPage/SwapHistoryPage.js +2 -2
  106. package/cjs/pages/SwapPage/StatusBottomSheet.js +29 -41
  107. package/cjs/pages/SwapPage/SwapPage.js +7 -3
  108. package/cjs/pages/SwapRoutesPage/SwapRoutesPage.js +1 -1
  109. package/cjs/providers/SwapFormProvider/SwapFormProvider.d.ts +1 -0
  110. package/cjs/providers/SwapFormProvider/SwapFormProvider.js +43 -9
  111. package/cjs/providers/SwapFormProvider/types.d.ts +3 -1
  112. package/cjs/providers/SwapFormProvider/types.js +1 -0
  113. package/cjs/providers/WalletProvider/WalletProvider.js +10 -4
  114. package/cjs/providers/WalletProvider/types.d.ts +4 -2
  115. package/cjs/providers/WidgetProvider/WidgetProvider.js +3 -7
  116. package/cjs/providers/index.d.ts +4 -0
  117. package/cjs/providers/index.js +20 -0
  118. package/cjs/stores/chains/index.d.ts +4 -0
  119. package/cjs/stores/chains/index.js +20 -0
  120. package/cjs/stores/chains/types.d.ts +8 -0
  121. package/cjs/stores/chains/types.js +2 -0
  122. package/cjs/stores/chains/useChainOrder.d.ts +1 -0
  123. package/cjs/stores/chains/useChainOrder.js +12 -0
  124. package/cjs/stores/chains/useChainOrderStore.d.ts +19 -0
  125. package/cjs/stores/chains/useChainOrderStore.js +42 -0
  126. package/cjs/stores/chains/useInitializeChainOrder.d.ts +1 -0
  127. package/cjs/stores/chains/useInitializeChainOrder.js +12 -0
  128. package/cjs/stores/route/index.d.ts +2 -1
  129. package/cjs/stores/route/index.js +2 -1
  130. package/cjs/stores/route/useExecutingRoutesIds.d.ts +1 -0
  131. package/cjs/stores/route/useExecutingRoutesIds.js +20 -0
  132. package/cjs/stores/route/useRouteStore.js +5 -4
  133. package/cjs/stores/route/utils.d.ts +4 -0
  134. package/cjs/stores/route/utils.js +21 -0
  135. package/cjs/stores/settings/types.d.ts +2 -1
  136. package/cjs/stores/settings/useSettingsStore.d.ts +4 -2
  137. package/cjs/stores/settings/useSettingsStore.js +6 -2
  138. package/cjs/types/events.d.ts +5 -0
  139. package/cjs/types/events.js +9 -0
  140. package/cjs/types/index.d.ts +1 -0
  141. package/cjs/types/index.js +1 -0
  142. package/cjs/types/widget.d.ts +3 -1
  143. package/cjs/utils/format.js +7 -2
  144. package/cjs/utils/navigationRoutes.d.ts +5 -0
  145. package/cjs/utils/navigationRoutes.js +31 -4
  146. package/components/ActiveSwaps/ActiveSwapItem.d.ts +5 -0
  147. package/components/ActiveSwaps/ActiveSwapItem.js +41 -0
  148. package/components/ActiveSwaps/ActiveSwaps.d.ts +3 -0
  149. package/components/ActiveSwaps/ActiveSwaps.js +26 -0
  150. package/components/ActiveSwaps/ActiveSwaps.style.d.ts +78 -0
  151. package/components/ActiveSwaps/ActiveSwaps.style.js +37 -0
  152. package/components/ActiveSwaps/index.d.ts +2 -0
  153. package/components/ActiveSwaps/index.js +2 -0
  154. package/components/Card/Card.d.ts +7 -4
  155. package/components/Card/Card.js +39 -29
  156. package/{pages/SelectTokenPage → components/ChainSelect}/ChainSelect.d.ts +1 -1
  157. package/components/ChainSelect/ChainSelect.js +31 -0
  158. package/components/{SwapInProgress/SwapInProgress.style.d.ts → ChainSelect/ChainSelect.style.d.ts} +10 -19
  159. package/components/ChainSelect/ChainSelect.style.js +16 -0
  160. package/components/ChainSelect/index.d.ts +2 -0
  161. package/components/ChainSelect/index.js +2 -0
  162. package/components/ChainSelect/useChainSelect.d.ts +8 -0
  163. package/components/ChainSelect/useChainSelect.js +29 -0
  164. package/components/Header/Header.js +2 -10
  165. package/components/Header/NavigationHeader.js +11 -18
  166. package/components/Header/WalletHeader.js +1 -2
  167. package/components/PoweredBy/PoweredBy.style.d.ts +1 -1
  168. package/components/PoweredBy/PoweredBy.style.js +1 -0
  169. package/components/ReverseTokensButton/ReverseTokensButton.js +1 -1
  170. package/components/SelectTokenButton/SelectTokenButton.d.ts +1 -1
  171. package/components/SelectTokenButton/SelectTokenButton.js +1 -1
  172. package/components/SendToWallet/SendToWallet.d.ts +3 -0
  173. package/components/SendToWallet/SendToWallet.js +49 -0
  174. package/components/SendToWallet/SendToWallet.style.d.ts +19 -0
  175. package/components/SendToWallet/SendToWallet.style.js +12 -0
  176. package/components/SendToWallet/index.d.ts +1 -0
  177. package/components/SendToWallet/index.js +1 -0
  178. package/components/Step/CircularProgress.js +3 -3
  179. package/components/Step/CircularProgress.style.js +1 -1
  180. package/components/Step/StepProcess.js +2 -6
  181. package/components/Step/StepProcess.style.d.ts +1 -1
  182. package/components/Step/StepTimer.d.ts +1 -0
  183. package/components/Step/StepTimer.js +6 -6
  184. package/components/SwapButton/SwapButton.js +7 -11
  185. package/components/SwapButton/types.d.ts +2 -2
  186. package/components/SwapInput/FormPriceHelperText.d.ts +1 -1
  187. package/components/SwapInput/FormPriceHelperText.js +1 -1
  188. package/components/SwapInput/SwapInput.d.ts +1 -1
  189. package/components/SwapInput/SwapInput.js +1 -1
  190. package/components/SwapInput/SwapInputAdornment.d.ts +1 -1
  191. package/components/SwapInput/SwapInputAdornment.js +1 -1
  192. package/components/SwapRouteCard/SwapRouteCard.js +5 -4
  193. package/components/SwapRouteCard/SwapRouteCard.style.js +3 -3
  194. package/components/TokenAvatar/TokenAvatar.style.js +0 -3
  195. package/components/TokenList/TokenList.js +7 -4
  196. package/components/TokenList/types.d.ts +1 -1
  197. package/config/theme.js +24 -23
  198. package/config/version.d.ts +1 -1
  199. package/config/version.js +1 -1
  200. package/hooks/index.d.ts +3 -0
  201. package/hooks/index.js +3 -0
  202. package/hooks/useChains.d.ts +1 -97
  203. package/hooks/useChains.js +8 -15
  204. package/hooks/useNavigateBack.d.ts +4 -0
  205. package/hooks/useNavigateBack.js +14 -0
  206. package/{components/Step/utils.d.ts → hooks/useProcessMessage.d.ts} +4 -0
  207. package/{pages/SwapPage/utils.js → hooks/useProcessMessage.js} +15 -10
  208. package/hooks/useRouteExecution.d.ts +1 -1
  209. package/hooks/useRouteExecution.js +21 -30
  210. package/hooks/useSwapRoutes.js +18 -7
  211. package/hooks/useWidgetEvents.d.ts +3 -0
  212. package/hooks/useWidgetEvents.js +6 -0
  213. package/i18n/en/translation.json +25 -15
  214. package/i18n/index.d.ts +20 -10
  215. package/index.d.ts +1 -0
  216. package/index.js +1 -0
  217. package/package.json +17 -19
  218. package/pages/ActiveSwapsPage/ActiveSwapsEmpty.d.ts +2 -0
  219. package/pages/ActiveSwapsPage/ActiveSwapsEmpty.js +14 -0
  220. package/pages/ActiveSwapsPage/ActiveSwapsPage.d.ts +2 -0
  221. package/pages/ActiveSwapsPage/ActiveSwapsPage.js +17 -0
  222. package/pages/ActiveSwapsPage/index.d.ts +1 -0
  223. package/pages/ActiveSwapsPage/index.js +1 -0
  224. package/pages/MainPage/MainPage.js +2 -2
  225. package/pages/MainPage/MainSwapButton.js +3 -1
  226. package/pages/MainPage/SwapRoutes.js +4 -1
  227. package/pages/SelectChainPage/SelectChainPage.d.ts +3 -0
  228. package/pages/SelectChainPage/SelectChainPage.js +29 -0
  229. package/pages/SelectChainPage/SelectChainPage.style.d.ts +21 -0
  230. package/pages/SelectChainPage/SelectChainPage.style.js +17 -0
  231. package/pages/SelectChainPage/index.d.ts +1 -0
  232. package/pages/SelectChainPage/index.js +1 -0
  233. package/pages/SelectTokenPage/SearchTokenInput.js +1 -1
  234. package/pages/SelectTokenPage/SelectTokenPage.d.ts +2 -4
  235. package/pages/SelectTokenPage/SelectTokenPage.js +5 -9
  236. package/pages/SelectWalletPage/SelectWalletPage.js +10 -10
  237. package/pages/SelectWalletPage/SelectWalletPage.style.d.ts +2 -27
  238. package/pages/SelectWalletPage/SelectWalletPage.style.js +4 -14
  239. package/pages/SettingsPage/AdvancedPreferences.js +2 -2
  240. package/pages/SettingsPage/ColorSchemeButtonGroup.js +1 -1
  241. package/pages/SettingsPage/ColorSchemeButtonGroup.style.d.ts +1 -1
  242. package/pages/SettingsPage/EnabledBridgesSelect.js +4 -7
  243. package/pages/SettingsPage/EnabledExchangesSelect.js +4 -6
  244. package/pages/SettingsPage/RoutePrioritySelect.js +5 -1
  245. package/pages/SettingsPage/SettingsPage.js +2 -1
  246. package/pages/SettingsPage/ShowDestinationWallet.d.ts +2 -0
  247. package/pages/SettingsPage/ShowDestinationWallet.js +18 -0
  248. package/pages/SwapDetailsPage/SwapDetailsPage.js +5 -4
  249. package/pages/SwapHistoryPage/SwapHistoryPage.js +1 -1
  250. package/pages/SwapPage/StatusBottomSheet.js +30 -42
  251. package/pages/SwapPage/SwapPage.js +9 -5
  252. package/pages/SwapRoutesPage/SwapRoutesPage.js +1 -1
  253. package/providers/SwapFormProvider/SwapFormProvider.d.ts +1 -0
  254. package/providers/SwapFormProvider/SwapFormProvider.js +43 -9
  255. package/providers/SwapFormProvider/types.d.ts +3 -1
  256. package/providers/SwapFormProvider/types.js +1 -0
  257. package/providers/WalletProvider/WalletProvider.js +10 -4
  258. package/providers/WalletProvider/types.d.ts +4 -2
  259. package/providers/WidgetProvider/WidgetProvider.js +3 -7
  260. package/providers/index.d.ts +4 -0
  261. package/providers/index.js +4 -0
  262. package/stores/chains/index.d.ts +4 -0
  263. package/stores/chains/index.js +4 -0
  264. package/stores/chains/types.d.ts +8 -0
  265. package/stores/chains/types.js +1 -0
  266. package/stores/chains/useChainOrder.d.ts +1 -0
  267. package/stores/chains/useChainOrder.js +5 -0
  268. package/stores/chains/useChainOrderStore.d.ts +19 -0
  269. package/stores/chains/useChainOrderStore.js +36 -0
  270. package/stores/chains/useInitializeChainOrder.d.ts +1 -0
  271. package/stores/chains/useInitializeChainOrder.js +5 -0
  272. package/stores/route/index.d.ts +2 -1
  273. package/stores/route/index.js +2 -1
  274. package/stores/route/useExecutingRoutesIds.d.ts +1 -0
  275. package/stores/route/useExecutingRoutesIds.js +13 -0
  276. package/stores/route/useRouteStore.js +5 -4
  277. package/stores/route/utils.d.ts +4 -0
  278. package/stores/route/utils.js +15 -0
  279. package/stores/settings/types.d.ts +2 -1
  280. package/stores/settings/useSettingsStore.d.ts +4 -2
  281. package/stores/settings/useSettingsStore.js +6 -2
  282. package/tsconfig.cjs.tsbuildinfo +1 -1
  283. package/types/events.d.ts +5 -0
  284. package/types/events.js +6 -0
  285. package/types/index.d.ts +1 -0
  286. package/types/index.js +1 -0
  287. package/types/widget.d.ts +3 -1
  288. package/utils/format.js +7 -2
  289. package/utils/navigationRoutes.d.ts +5 -0
  290. package/utils/navigationRoutes.js +30 -3
  291. package/cjs/components/SwapButton/SwapButton.style.d.ts +0 -65
  292. package/cjs/components/SwapButton/SwapButton.style.js +0 -15
  293. package/cjs/components/SwapInProgress/SwapInProgress.js +0 -29
  294. package/cjs/components/SwapInProgress/SwapInProgress.style.js +0 -17
  295. package/cjs/components/SwapInProgress/index.d.ts +0 -1
  296. package/cjs/pages/SelectTokenPage/ChainSelect.js +0 -32
  297. package/cjs/pages/SwapPage/utils.d.ts +0 -6
  298. package/cjs/pages/SwapPage/utils.js +0 -93
  299. package/cjs/stores/route/useExecutingRoutes.d.ts +0 -2
  300. package/cjs/stores/route/useExecutingRoutes.js +0 -13
  301. package/components/Step/utils.js +0 -89
  302. package/components/SwapButton/SwapButton.style.d.ts +0 -65
  303. package/components/SwapButton/SwapButton.style.js +0 -12
  304. package/components/SwapInProgress/SwapInProgress.js +0 -25
  305. package/components/SwapInProgress/SwapInProgress.style.js +0 -14
  306. package/components/SwapInProgress/index.d.ts +0 -1
  307. package/components/SwapInProgress/index.js +0 -1
  308. package/pages/SelectTokenPage/ChainSelect.js +0 -28
  309. package/pages/SwapPage/utils.d.ts +0 -6
  310. package/stores/route/useExecutingRoutes.d.ts +0 -2
  311. package/stores/route/useExecutingRoutes.js +0 -6
@@ -1,101 +1,5 @@
1
1
  export declare const useChains: () => {
2
- error: unknown;
3
- isError: true;
4
- isLoading: false;
5
- isLoadingError: false;
6
- isRefetchError: true;
7
- isSuccess: false;
8
- status: "error";
9
- dataUpdatedAt: number;
10
- errorUpdatedAt: number;
11
- failureCount: number;
12
- errorUpdateCount: number;
13
- isFetched: boolean;
14
- isFetchedAfterMount: boolean;
15
- isFetching: boolean;
16
- isPaused: boolean;
17
- isPlaceholderData: boolean;
18
- isPreviousData: boolean;
19
- isRefetching: boolean;
20
- isStale: boolean;
21
- refetch: <TPageData>(options?: (import("@tanstack/react-query").RefetchOptions & import("@tanstack/react-query").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@lifi/types").EVMChain[], unknown>>;
22
- remove: () => void;
23
- fetchStatus: import("@tanstack/react-query").FetchStatus;
24
- chains: import("@lifi/types").EVMChain[] | undefined;
25
- getChainById: (chainId: number) => import("@lifi/types").EVMChain | undefined;
26
- } | {
27
- error: null;
28
- isError: false;
29
- isLoading: false;
30
- isLoadingError: false;
31
- isRefetchError: false;
32
- isSuccess: true;
33
- status: "success";
34
- dataUpdatedAt: number;
35
- errorUpdatedAt: number;
36
- failureCount: number;
37
- errorUpdateCount: number;
38
- isFetched: boolean;
39
- isFetchedAfterMount: boolean;
40
- isFetching: boolean;
41
- isPaused: boolean;
42
- isPlaceholderData: boolean;
43
- isPreviousData: boolean;
44
- isRefetching: boolean;
45
- isStale: boolean;
46
- refetch: <TPageData>(options?: (import("@tanstack/react-query").RefetchOptions & import("@tanstack/react-query").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@lifi/types").EVMChain[], unknown>>;
47
- remove: () => void;
48
- fetchStatus: import("@tanstack/react-query").FetchStatus;
49
- chains: import("@lifi/types").EVMChain[] | undefined;
50
- getChainById: (chainId: number) => import("@lifi/types").EVMChain | undefined;
51
- } | {
52
- error: unknown;
53
- isError: true;
54
- isLoading: false;
55
- isLoadingError: true;
56
- isRefetchError: false;
57
- isSuccess: false;
58
- status: "error";
59
- dataUpdatedAt: number;
60
- errorUpdatedAt: number;
61
- failureCount: number;
62
- errorUpdateCount: number;
63
- isFetched: boolean;
64
- isFetchedAfterMount: boolean;
65
- isFetching: boolean;
66
- isPaused: boolean;
67
- isPlaceholderData: boolean;
68
- isPreviousData: boolean;
69
- isRefetching: boolean;
70
- isStale: boolean;
71
- refetch: <TPageData>(options?: (import("@tanstack/react-query").RefetchOptions & import("@tanstack/react-query").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@lifi/types").EVMChain[], unknown>>;
72
- remove: () => void;
73
- fetchStatus: import("@tanstack/react-query").FetchStatus;
74
- chains: import("@lifi/types").EVMChain[] | undefined;
75
- getChainById: (chainId: number) => import("@lifi/types").EVMChain | undefined;
76
- } | {
77
- error: null;
78
- isError: false;
79
- isLoading: true;
80
- isLoadingError: false;
81
- isRefetchError: false;
82
- isSuccess: false;
83
- status: "loading";
84
- dataUpdatedAt: number;
85
- errorUpdatedAt: number;
86
- failureCount: number;
87
- errorUpdateCount: number;
88
- isFetched: boolean;
89
- isFetchedAfterMount: boolean;
90
- isFetching: boolean;
91
- isPaused: boolean;
92
- isPlaceholderData: boolean;
93
- isPreviousData: boolean;
94
- isRefetching: boolean;
95
- isStale: boolean;
96
- refetch: <TPageData>(options?: (import("@tanstack/react-query").RefetchOptions & import("@tanstack/react-query").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@lifi/types").EVMChain[], unknown>>;
97
- remove: () => void;
98
- fetchStatus: import("@tanstack/react-query").FetchStatus;
99
2
  chains: import("@lifi/types").EVMChain[] | undefined;
100
3
  getChainById: (chainId: number) => import("@lifi/types").EVMChain | undefined;
4
+ isLoading: boolean;
101
5
  };
@@ -7,27 +7,20 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- var __rest = (this && this.__rest) || function (s, e) {
11
- var t = {};
12
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
13
- t[p] = s[p];
14
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
15
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
16
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
17
- t[p[i]] = s[p[i]];
18
- }
19
- return t;
20
- };
21
10
  import { useQuery } from '@tanstack/react-query';
22
11
  import { useCallback } from 'react';
23
12
  import { LiFi } from '../config/lifi';
24
13
  import { useWidgetConfig } from '../providers/WidgetProvider';
14
+ import { useSetChainOrder } from '../stores/chains';
25
15
  export const useChains = () => {
26
16
  const { disabledChains } = useWidgetConfig();
27
- const _a = useQuery(['chains'], () => __awaiter(void 0, void 0, void 0, function* () {
17
+ const [, initializeChains] = useSetChainOrder();
18
+ const { data, isLoading } = useQuery(['chains'], () => __awaiter(void 0, void 0, void 0, function* () {
28
19
  const chains = yield LiFi.getChains();
29
- return chains.filter((chain) => !(disabledChains === null || disabledChains === void 0 ? void 0 : disabledChains.includes(chain.id)));
30
- })), { data } = _a, other = __rest(_a, ["data"]);
20
+ const filteredChains = chains.filter((chain) => !(disabledChains === null || disabledChains === void 0 ? void 0 : disabledChains.includes(chain.id)));
21
+ initializeChains(filteredChains.map((chain) => chain.id));
22
+ return filteredChains;
23
+ }));
31
24
  const getChainById = useCallback((chainId) => {
32
25
  const chain = data === null || data === void 0 ? void 0 : data.find((chain) => chain.id === chainId);
33
26
  // if (!chain) {
@@ -35,5 +28,5 @@ export const useChains = () => {
35
28
  // }
36
29
  return chain;
37
30
  }, [data]);
38
- return Object.assign({ chains: data, getChainById }, other);
31
+ return { chains: data, getChainById, isLoading };
39
32
  };
@@ -0,0 +1,4 @@
1
+ export declare const useNavigateBack: () => {
2
+ navigateBack: () => void;
3
+ navigate: import("react-router-dom").NavigateFunction;
4
+ };
@@ -0,0 +1,14 @@
1
+ import { useCallback } from 'react';
2
+ import { useNavigate } from 'react-router-dom';
3
+ export const useNavigateBack = () => {
4
+ const navigate = useNavigate();
5
+ const navigateBack = useCallback(() => {
6
+ if (window.history.state && window.history.state.idx > 0) {
7
+ navigate(-1);
8
+ }
9
+ else {
10
+ navigate(window.location.pathname.substring(0, window.location.pathname.lastIndexOf('/')) || '/', { replace: true });
11
+ }
12
+ }, [navigate]);
13
+ return { navigateBack, navigate };
14
+ };
@@ -1,5 +1,9 @@
1
1
  import type { EVMChain, Process, Step } from '@lifi/sdk';
2
2
  import type { TFunction } from 'react-i18next';
3
+ export declare const useProcessMessage: (step?: Step, process?: Process) => {
4
+ title?: string | undefined;
5
+ message?: string | undefined;
6
+ };
3
7
  export declare function getProcessMessage(t: TFunction<'translation', undefined>, getChainById: (chainId: number) => EVMChain | undefined, step: Step, process: Process): {
4
8
  title?: string;
5
9
  message?: string;
@@ -1,9 +1,14 @@
1
- import { LifiErrorCode, MetaMaskProviderErrorCode } from '@lifi/sdk';
2
- import { formatTokenAmount } from '../../utils';
3
- const formatProcessMessage = (initialMessage, args = {}) => {
4
- return Object.keys(args).reduce((message, key) => {
5
- return message.replace(`{${key}}`, args[key]);
6
- }, initialMessage);
1
+ import { LifiErrorCode } from '@lifi/sdk';
2
+ import { useTranslation } from 'react-i18next';
3
+ import { formatTokenAmount } from '../utils';
4
+ import { useChains } from './useChains';
5
+ export const useProcessMessage = (step, process) => {
6
+ const { t } = useTranslation();
7
+ const { getChainById } = useChains();
8
+ if (!step || !process) {
9
+ return {};
10
+ }
11
+ return getProcessMessage(t, getChainById, step, process);
7
12
  };
8
13
  const processMessages = {
9
14
  TOKEN_ALLOWANCE: {
@@ -12,7 +17,7 @@ const processMessages = {
12
17
  DONE: (t) => t(`swap.process.tokenAllowance.done`),
13
18
  },
14
19
  SWITCH_CHAIN: {
15
- PENDING: (t) => t(`swap.process.switchChain.pending`),
20
+ ACTION_REQUIRED: (t) => t(`swap.process.switchChain.actionRequired`),
16
21
  DONE: (t) => t(`swap.process.switchChain.done`),
17
22
  },
18
23
  SWAP: {
@@ -67,9 +72,9 @@ export function getProcessMessage(t, getChainById, step, process) {
67
72
  title = t(`swap.error.title.slippageTooLarge`);
68
73
  message = t(`swap.error.message.slippageTooLarge`);
69
74
  break;
70
- case MetaMaskProviderErrorCode.userRejectedRequest:
71
- title = t(`swap.error.title.userRejectedSignatureRequest`);
72
- message = t(`swap.error.message.signatureRequired`, {
75
+ case LifiErrorCode.TransactionRejected:
76
+ title = t(`swap.error.title.transactionRejected`);
77
+ message = t(`swap.error.message.transactionRejected`, {
73
78
  amount: formatTokenAmount(step.action.fromAmount, step.action.fromToken.decimals),
74
79
  tokenSymbol: step.action.fromToken.symbol,
75
80
  chainName: (_b = (_a = getChainById(step.action.fromChainId)) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : '',
@@ -1,5 +1,5 @@
1
1
  import type { Route } from '@lifi/sdk';
2
- export declare const useRouteExecution: (routeId: string) => {
2
+ export declare const useRouteExecution: (routeId: string, executeInBackground?: boolean) => {
3
3
  executeRoute: () => void;
4
4
  restartRoute: () => void;
5
5
  deleteRoute: () => void;
@@ -12,17 +12,26 @@ import { useCallback, useEffect, useRef } from 'react';
12
12
  import shallow from 'zustand/shallow';
13
13
  import { LiFi } from '../config/lifi';
14
14
  import { useWallet } from '../providers/WalletProvider';
15
- import { useRouteStore } from '../stores';
15
+ import { isRouteActive, isRouteCompleted, isRouteFailed, useRouteStore, } from '../stores';
16
+ import { WidgetEvent } from '../types/events';
16
17
  import { deepClone } from '../utils';
17
- export const useRouteExecution = (routeId) => {
18
+ import { useWidgetEvents } from './useWidgetEvents';
19
+ export const useRouteExecution = (routeId, executeInBackground) => {
18
20
  const { account, switchChain } = useWallet();
19
21
  const resumedAfterMount = useRef(false);
22
+ const emitter = useWidgetEvents();
20
23
  const routeExecution = useRouteStore((state) => state.routes[routeId]);
21
24
  const [updateRoute, restartRoute, deleteRoute] = useRouteStore((state) => [state.updateRoute, state.restartRoute, state.deleteRoute], shallow);
22
25
  const updateCallback = (updatedRoute) => {
23
26
  const clonedUpdatedRoute = deepClone(updatedRoute);
24
27
  console.log('Route updated.', clonedUpdatedRoute);
25
28
  updateRoute(clonedUpdatedRoute);
29
+ if (isRouteCompleted(clonedUpdatedRoute)) {
30
+ emitter.emit(WidgetEvent.SwapCompleted);
31
+ }
32
+ if (isRouteFailed(clonedUpdatedRoute)) {
33
+ emitter.emit(WidgetEvent.SwapFailed);
34
+ }
26
35
  };
27
36
  const switchChainHook = (requiredChainId) => __awaiter(void 0, void 0, void 0, function* () {
28
37
  if (!account.isActive || !account.signer) {
@@ -48,16 +57,12 @@ export const useRouteExecution = (routeId) => {
48
57
  updateCallback,
49
58
  switchChainHook,
50
59
  infiniteApproval: false,
60
+ executeInBackground,
51
61
  });
52
62
  }, {
53
63
  onMutate: () => {
54
64
  console.log('Execution started.', routeId);
55
- },
56
- onError: () => {
57
- console.warn('Execution failed.', routeId);
58
- },
59
- onSuccess: (route) => {
60
- console.log('Executed successfully.', routeId);
65
+ emitter.emit(WidgetEvent.SwapStarted);
61
66
  },
62
67
  });
63
68
  const resumeRouteMutation = useMutation((resumedRoute) => {
@@ -71,26 +76,21 @@ export const useRouteExecution = (routeId) => {
71
76
  updateCallback,
72
77
  switchChainHook,
73
78
  infiniteApproval: false,
79
+ executeInBackground,
74
80
  });
75
81
  }, {
76
82
  onMutate: () => {
77
83
  console.log('Resumed to execution.', routeId);
78
84
  },
79
- onError: () => {
80
- console.warn('Resumed execution failed.', routeId);
81
- },
82
- onSuccess: (route) => {
83
- console.log('Resumed execution successful.', route);
84
- },
85
85
  });
86
86
  const executeRoute = useCallback(() => {
87
87
  executeRouteMutation.mutateAsync(undefined, {
88
88
  onError: () => {
89
- console.warn('Real execution failed!', routeId);
89
+ console.warn('Execution failed!', routeId);
90
90
  // Notification.showNotification(NotificationType.SwapExecution_ERROR);
91
91
  },
92
92
  onSuccess: (route) => {
93
- console.log('Real execution successfully!', route);
93
+ console.log('Executed successfully!', route);
94
94
  // Notification.showNotification(NotificationType.TRANSACTION_SUCCESSFULL);
95
95
  },
96
96
  });
@@ -98,10 +98,10 @@ export const useRouteExecution = (routeId) => {
98
98
  const resumeRoute = useCallback((route) => {
99
99
  resumeRouteMutation.mutateAsync(route, {
100
100
  onError: () => {
101
- console.warn('Real resumed execution failed.', routeId);
101
+ console.warn('Resumed execution failed.', routeId);
102
102
  },
103
103
  onSuccess: (route) => {
104
- console.log('Real resumed execution successful.', route);
104
+ console.log('Resumed execution successful.', route);
105
105
  },
106
106
  });
107
107
  }, [resumeRouteMutation, routeId]);
@@ -117,7 +117,7 @@ export const useRouteExecution = (routeId) => {
117
117
  // Resume route execution after page reload
118
118
  useEffect(() => {
119
119
  // Check if route is eligible for automatic resuming
120
- if (isActiveRoute(routeExecution === null || routeExecution === void 0 ? void 0 : routeExecution.route) &&
120
+ if (isRouteActive(routeExecution === null || routeExecution === void 0 ? void 0 : routeExecution.route) &&
121
121
  account.isActive &&
122
122
  !resumedAfterMount.current) {
123
123
  resumedAfterMount.current = true;
@@ -129,10 +129,10 @@ export const useRouteExecution = (routeId) => {
129
129
  return () => {
130
130
  var _a;
131
131
  const route = (_a = useRouteStore.getState().routes[routeId]) === null || _a === void 0 ? void 0 : _a.route;
132
- if (!route || !isActiveRoute(route)) {
132
+ if (!route || !isRouteActive(route)) {
133
133
  return;
134
134
  }
135
- LiFi.moveExecutionToBackground(route);
135
+ LiFi.updateRouteExecution(route, { executeInBackground: true });
136
136
  console.log('Move route execution to background.', routeId);
137
137
  resumedAfterMount.current = false;
138
138
  };
@@ -145,12 +145,3 @@ export const useRouteExecution = (routeId) => {
145
145
  status: routeExecution === null || routeExecution === void 0 ? void 0 : routeExecution.status,
146
146
  };
147
147
  };
148
- const isActiveRoute = (route) => {
149
- if (!route) {
150
- return false;
151
- }
152
- const allDone = route.steps.every((step) => { var _a; return ((_a = step.execution) === null || _a === void 0 ? void 0 : _a.status) === 'DONE'; });
153
- const isFailed = route.steps.some((step) => { var _a; return ((_a = step.execution) === null || _a === void 0 ? void 0 : _a.status) === 'FAILED'; });
154
- const alreadyStarted = route.steps.some((step) => step.execution);
155
- return !allDone && !isFailed && alreadyStarted;
156
- };
@@ -7,6 +7,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
+ import { isAddress } from '@ethersproject/address';
10
11
  import { useQuery, useQueryClient } from '@tanstack/react-query';
11
12
  import Big from 'big.js';
12
13
  import { useWatch } from 'react-hook-form';
@@ -18,7 +19,7 @@ import { useSettings } from '../stores';
18
19
  const refetchTime = 60000;
19
20
  export const useSwapRoutes = () => {
20
21
  var _a;
21
- const { account } = useWallet();
22
+ const { account, provider } = useWallet();
22
23
  const queryClient = useQueryClient();
23
24
  const { slippage, enabledBridges, enabledExchanges, routePriority } = useSettings([
24
25
  'slippage',
@@ -26,12 +27,13 @@ export const useSwapRoutes = () => {
26
27
  'enabledBridges',
27
28
  'enabledExchanges',
28
29
  ]);
29
- const [fromChainId, fromTokenAddress, toChainId, toTokenAddress] = useWatch({
30
+ const [fromChainId, fromTokenAddress, toChainId, toTokenAddress, toAddress] = useWatch({
30
31
  name: [
31
32
  SwapFormKey.FromChain,
32
33
  SwapFormKey.FromToken,
33
34
  SwapFormKey.ToChain,
34
35
  SwapFormKey.ToToken,
36
+ SwapFormKey.ToAddress,
35
37
  ],
36
38
  });
37
39
  const [fromTokenAmount] = useDebouncedWatch([SwapFormKey.FromAmount], 250);
@@ -53,6 +55,7 @@ export const useSwapRoutes = () => {
53
55
  fromTokenAmount,
54
56
  toChainId,
55
57
  toTokenAddress,
58
+ toAddress,
56
59
  slippage,
57
60
  enabledBridges,
58
61
  enabledExchanges,
@@ -62,16 +65,24 @@ export const useSwapRoutes = () => {
62
65
  const refetchInterval = previousDataUpdatedAt
63
66
  ? Math.min(Math.abs(refetchTime - (Date.now() - previousDataUpdatedAt)), refetchTime)
64
67
  : refetchTime;
65
- const { data, isLoading, isFetching, isFetched, dataUpdatedAt, refetch } = useQuery(queryKey, ({ queryKey: [_, address, fromChainId, fromTokenAddress, fromTokenAmount, toChainId, toTokenAddress, slippage, enabledBridges, enabledExchanges, routePriority,], signal, }) => __awaiter(void 0, void 0, void 0, function* () {
66
- var _b;
68
+ const { data, isLoading, isFetching, isFetched, dataUpdatedAt, refetch } = useQuery(queryKey, ({ queryKey: [_, fromAddress, fromChainId, fromTokenAddress, fromTokenAmount, toChainId, toTokenAddress, toAddress, slippage, enabledBridges, enabledExchanges, routePriority,], signal, }) => __awaiter(void 0, void 0, void 0, function* () {
69
+ var _b, _c;
70
+ let toWalletAddress;
71
+ try {
72
+ toWalletAddress =
73
+ (_b = (yield (provider === null || provider === void 0 ? void 0 : provider.resolveName(toAddress)))) !== null && _b !== void 0 ? _b : (isAddress(toAddress) ? toAddress : fromAddress);
74
+ }
75
+ catch (_d) {
76
+ toWalletAddress = isAddress(toAddress) ? toAddress : fromAddress;
77
+ }
67
78
  return LiFi.getRoutes({
68
79
  fromChainId,
69
- fromAmount: Big(Number(fromTokenAmount) * Math.pow(10, ((_b = token === null || token === void 0 ? void 0 : token.decimals) !== null && _b !== void 0 ? _b : 0))).toString(),
80
+ fromAmount: Big(Number(fromTokenAmount) * Math.pow(10, ((_c = token === null || token === void 0 ? void 0 : token.decimals) !== null && _c !== void 0 ? _c : 0))).toString(),
70
81
  fromTokenAddress,
71
82
  toChainId,
72
83
  toTokenAddress,
73
- fromAddress: address,
74
- toAddress: address,
84
+ fromAddress,
85
+ toAddress: toWalletAddress,
75
86
  options: {
76
87
  slippage: slippage / 100,
77
88
  bridges: {
@@ -0,0 +1,3 @@
1
+ /// <reference types="node" />
2
+ import { EventEmitter } from 'events';
3
+ export declare const useWidgetEvents: () => EventEmitter;
@@ -0,0 +1,6 @@
1
+ import { EventEmitter } from 'events';
2
+ import create from 'zustand';
3
+ const emitterStore = create()(() => new EventEmitter());
4
+ export const useWidgetEvents = () => {
5
+ return emitterStore();
6
+ };
@@ -6,10 +6,12 @@
6
6
  "swap": "Swap",
7
7
  "from": "Swap from",
8
8
  "to": "Swap to",
9
+ "selectChain": "Select chain",
9
10
  "settings": "Settings",
10
11
  "routes": "You get",
11
12
  "swapHistory": "Swap history",
12
- "swapDetails": "Swap details"
13
+ "swapDetails": "Swap details",
14
+ "activeSwaps": "Active swaps"
13
15
  },
14
16
  "button": {
15
17
  "connectWallet": "Connect wallet",
@@ -31,6 +33,7 @@
31
33
  "delete": "Delete",
32
34
  "hide": "Hide",
33
35
  "max": "max",
36
+ "showAll": "Show all",
34
37
  "contactSupport": "Contact support",
35
38
  "lifiSwap": "LI.FI Swap"
36
39
  },
@@ -52,24 +55,25 @@
52
55
  "selectChainAndToken": "Select chain and token",
53
56
  "featuredTokens": "Featured tokens",
54
57
  "otherTokens": "Other tokens",
55
- "inProgress": "In progress",
58
+ "inProgress": "in progress",
56
59
  "couldntFindTokens": "We couldn't find tokens on this chain or you don't have any.",
57
60
  "stepSwap": "Swap",
58
61
  "stepBridge": "Bridge",
59
62
  "stepSwapAndBridge": "Swap and bridge",
60
63
  "estimatedTime": "~{{value}} min.",
61
- "networkIsBusy": "Network is busy...",
62
64
  "crossStepDetails": "Bridge from {{from}} to {{to}} via {{tool}}",
63
65
  "swapStepDetails": "Swap on {{chain}} via {{tool}}",
64
66
  "tokenOnChain": "{{tokenSymbol}} on {{chainName}}",
65
67
  "tokenOnChainAmount": "{{amount}} {{tokenSymbol}} on {{chainName}}",
66
- "routeId": "Route ID",
68
+ "supportId": "Support ID",
69
+ "sendToWallet": "Send to a different wallet",
70
+ "walletAddressOrEns": "Wallet address or ENS name",
67
71
  "tags": {
68
- "recommended": "Recommended",
69
- "fastest": "Fast",
70
- "cheapest": "Cheap",
71
- "safest": "Safe",
72
- "general": "General"
72
+ "RECOMMENDED": "RECOMMENDED",
73
+ "FASTEST": "FAST",
74
+ "CHEAPEST": "CHEAP",
75
+ "SAFEST": "SAFE",
76
+ "ALTERNATIVE": "ALTERNATIVE"
73
77
  },
74
78
  "success": {
75
79
  "title": {
@@ -82,11 +86,13 @@
82
86
  "info": {
83
87
  "title": {
84
88
  "routeNotFound": "No routes available",
85
- "emptySwapHistory": "No recent swaps"
89
+ "emptySwapHistory": "No recent swaps",
90
+ "emptyActiveSwaps": "No active swaps"
86
91
  },
87
92
  "message": {
88
93
  "routeNotFound": "Try another token combination.",
89
- "emptySwapHistory": "Swap history is only stored locally and will be deleted if you clear your browser data."
94
+ "emptySwapHistory": "Swap history is only stored locally and will be deleted if you clear your browser data.",
95
+ "emptyActiveSwaps": "Swaps in progress will appear here. Once completed, find them in swap history."
90
96
  }
91
97
  },
92
98
  "warning": {
@@ -103,16 +109,19 @@
103
109
  },
104
110
  "error": {
105
111
  "title": {
112
+ "failed": "Swap failed.",
106
113
  "chainSwitch": "Chain switch required.",
107
114
  "transactionFailed": "Transaction has failed.",
108
115
  "transactionUnderpriced": "Transaction is underpriced.",
109
116
  "transactionUnprepared": "Unable to prepare transaction.",
117
+ "transactionRejected": "Signature required.",
110
118
  "unknown": "Something went wrong.",
111
- "userRejectedSignatureRequest": "Signature required.",
112
- "slippageTooLarge": "Slippage too large."
119
+ "slippageTooLarge": "Slippage too large.",
120
+ "walletAddressInvalid": "Wallet address is invalid.",
121
+ "walletEnsAddressInvalid": "Wallet address is invalid or network doesn't support ENS."
113
122
  },
114
123
  "message": {
115
- "signatureRequired": "Your signature is required to complete the transaction. {{amount}} {{tokenSymbol}} on {{chainName}} remain in your wallet.",
124
+ "transactionRejected": "Your signature is required to complete the transaction. {{amount}} {{tokenSymbol}} on {{chainName}} remain in your wallet.",
116
125
  "transactionFailed": "Please check the block explorer for more information.",
117
126
  "transactionNotSent": "Transaction was not sent, your funds are still in your wallet ({{amount}} {{tokenSymbol}} on {{chainName}}).",
118
127
  "slippageTooLarge": "The slippage is larger than the defined threshold. Please request a new route to get a fresh quote."
@@ -125,7 +134,7 @@
125
134
  "done": "Token allowance approved."
126
135
  },
127
136
  "switchChain": {
128
- "pending": "Chain switch required.",
137
+ "actionRequired": "Chain switch required.",
129
138
  "done": "Chain switched successfully."
130
139
  },
131
140
  "swap": {
@@ -156,6 +165,7 @@
156
165
  "fast": "Fast"
157
166
  },
158
167
  "advancedPreferences": "Advanced preferences",
168
+ "showDestinationWallet": "Show destination wallet",
159
169
  "enabledBridges": "Enabled bridges",
160
170
  "selectEnabledBridges": "Select enabled bridges",
161
171
  "enabledExchanges": "Enabled exchanges",
package/i18n/index.d.ts CHANGED
@@ -9,10 +9,12 @@ export declare const resources: {
9
9
  swap: string;
10
10
  from: string;
11
11
  to: string;
12
+ selectChain: string;
12
13
  settings: string;
13
14
  routes: string;
14
15
  swapHistory: string;
15
16
  swapDetails: string;
17
+ activeSwaps: string;
16
18
  };
17
19
  button: {
18
20
  connectWallet: string;
@@ -34,6 +36,7 @@ export declare const resources: {
34
36
  delete: string;
35
37
  hide: string;
36
38
  max: string;
39
+ showAll: string;
37
40
  contactSupport: string;
38
41
  lifiSwap: string;
39
42
  };
@@ -61,18 +64,19 @@ export declare const resources: {
61
64
  stepBridge: string;
62
65
  stepSwapAndBridge: string;
63
66
  estimatedTime: string;
64
- networkIsBusy: string;
65
67
  crossStepDetails: string;
66
68
  swapStepDetails: string;
67
69
  tokenOnChain: string;
68
70
  tokenOnChainAmount: string;
69
- routeId: string;
71
+ supportId: string;
72
+ sendToWallet: string;
73
+ walletAddressOrEns: string;
70
74
  tags: {
71
- recommended: string;
72
- fastest: string;
73
- cheapest: string;
74
- safest: string;
75
- general: string;
75
+ RECOMMENDED: string;
76
+ FASTEST: string;
77
+ CHEAPEST: string;
78
+ SAFEST: string;
79
+ ALTERNATIVE: string;
76
80
  };
77
81
  success: {
78
82
  title: {
@@ -86,10 +90,12 @@ export declare const resources: {
86
90
  title: {
87
91
  routeNotFound: string;
88
92
  emptySwapHistory: string;
93
+ emptyActiveSwaps: string;
89
94
  };
90
95
  message: {
91
96
  routeNotFound: string;
92
97
  emptySwapHistory: string;
98
+ emptyActiveSwaps: string;
93
99
  };
94
100
  };
95
101
  warning: {
@@ -106,16 +112,19 @@ export declare const resources: {
106
112
  };
107
113
  error: {
108
114
  title: {
115
+ failed: string;
109
116
  chainSwitch: string;
110
117
  transactionFailed: string;
111
118
  transactionUnderpriced: string;
112
119
  transactionUnprepared: string;
120
+ transactionRejected: string;
113
121
  unknown: string;
114
- userRejectedSignatureRequest: string;
115
122
  slippageTooLarge: string;
123
+ walletAddressInvalid: string;
124
+ walletEnsAddressInvalid: string;
116
125
  };
117
126
  message: {
118
- signatureRequired: string;
127
+ transactionRejected: string;
119
128
  transactionFailed: string;
120
129
  transactionNotSent: string;
121
130
  slippageTooLarge: string;
@@ -128,7 +137,7 @@ export declare const resources: {
128
137
  done: string;
129
138
  };
130
139
  switchChain: {
131
- pending: string;
140
+ actionRequired: string;
132
141
  done: string;
133
142
  };
134
143
  swap: {
@@ -159,6 +168,7 @@ export declare const resources: {
159
168
  fast: string;
160
169
  };
161
170
  advancedPreferences: string;
171
+ showDestinationWallet: string;
162
172
  enabledBridges: string;
163
173
  selectEnabledBridges: string;
164
174
  enabledExchanges: string;