@lifi/widget 1.32.8 → 2.0.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (343) hide show
  1. package/App.js +3 -3
  2. package/AppDrawer.js +4 -3
  3. package/AppDrawer.style.d.ts +5 -5
  4. package/AppProvider.js +4 -3
  5. package/cjs/App.js +3 -3
  6. package/cjs/AppDrawer.js +4 -3
  7. package/cjs/AppDrawer.style.d.ts +5 -5
  8. package/cjs/AppProvider.js +2 -1
  9. package/cjs/components/ActiveSwaps/ActiveSwaps.style.d.ts +5 -5
  10. package/cjs/components/Card/CardIconButton.d.ts +29 -0
  11. package/cjs/components/Card/CardIconButton.js +17 -0
  12. package/cjs/components/Card/CardLabel.d.ts +26 -0
  13. package/cjs/components/Card/CardLabel.js +45 -0
  14. package/cjs/components/Card/CardTitle.d.ts +2 -2
  15. package/cjs/components/Card/index.d.ts +2 -0
  16. package/cjs/components/Card/index.js +2 -0
  17. package/cjs/components/GasMessage/FundsSufficiencyMessage.d.ts +1 -0
  18. package/cjs/components/GasMessage/FundsSufficiencyMessage.js +16 -0
  19. package/cjs/components/{GasSufficiencyMessage/GasSufficiencyMessage.d.ts → GasMessage/GasMessage.d.ts} +4 -2
  20. package/cjs/components/GasMessage/GasMessage.js +19 -0
  21. package/cjs/components/GasMessage/GasMessage.style.d.ts +34 -0
  22. package/cjs/components/GasMessage/GasMessage.style.js +48 -0
  23. package/cjs/components/GasMessage/GasRefuelMessage.d.ts +3 -0
  24. package/cjs/components/GasMessage/GasRefuelMessage.js +26 -0
  25. package/cjs/components/GasMessage/GasSufficiencyMessage.d.ts +7 -0
  26. package/cjs/components/GasMessage/GasSufficiencyMessage.js +21 -0
  27. package/cjs/components/GasMessage/index.d.ts +2 -0
  28. package/cjs/components/GasMessage/index.js +18 -0
  29. package/cjs/components/Header/Header.style.d.ts +6 -6
  30. package/cjs/components/Header/NavigationHeader.js +4 -4
  31. package/cjs/components/Header/WalletHeader.js +5 -5
  32. package/cjs/components/Insurance/Insurance.d.ts +3 -0
  33. package/cjs/components/Insurance/Insurance.js +11 -0
  34. package/cjs/components/Insurance/InsuranceCard.d.ts +3 -0
  35. package/cjs/components/Insurance/InsuranceCard.js +20 -0
  36. package/cjs/components/Insurance/InsuranceCollapsed.d.ts +3 -0
  37. package/cjs/components/Insurance/InsuranceCollapsed.js +32 -0
  38. package/cjs/components/Insurance/index.d.ts +1 -0
  39. package/cjs/components/{GasSufficiencyMessage → Insurance}/index.js +1 -1
  40. package/cjs/components/Insurance/types.d.ts +14 -0
  41. package/cjs/components/Insurance/types.js +2 -0
  42. package/cjs/components/ListItemButton.d.ts +1 -1
  43. package/cjs/components/NFT/NFT.style.d.ts +1 -1
  44. package/cjs/components/PoweredBy/PoweredBy.style.d.ts +3 -12
  45. package/cjs/components/ReverseTokensButton/ReverseTokensButton.style.d.ts +2 -2
  46. package/cjs/components/SendToWallet/SendToWallet.js +31 -25
  47. package/cjs/components/SendToWallet/SendToWallet.style.d.ts +2 -2
  48. package/cjs/components/SendToWallet/SendToWalletButton.js +3 -3
  49. package/cjs/components/SmallAvatar.d.ts +2 -2
  50. package/cjs/components/Step/CircularProgress.style.d.ts +1 -1
  51. package/cjs/components/Step/DestinationWalletAddress.d.ts +2 -2
  52. package/cjs/components/Step/DestinationWalletAddress.js +4 -8
  53. package/cjs/components/Step/GasStepProcess.d.ts +2 -2
  54. package/cjs/components/Step/GasStepProcess.js +3 -3
  55. package/cjs/components/Step/Step.d.ts +2 -2
  56. package/cjs/components/Step/Step.js +6 -8
  57. package/cjs/components/Step/StepList.d.ts +1 -1
  58. package/cjs/components/Step/StepProcess.d.ts +2 -2
  59. package/cjs/components/Step/StepProcess.js +1 -5
  60. package/cjs/components/Step/StepProcess.style.d.ts +3 -39
  61. package/cjs/components/Step/StepTimer.d.ts +2 -2
  62. package/cjs/components/Step/StepTimer.js +1 -1
  63. package/cjs/components/StepActions/StepActions.d.ts +6 -1
  64. package/cjs/components/StepActions/StepActions.js +54 -17
  65. package/cjs/components/StepActions/StepActions.style.d.ts +1 -1
  66. package/cjs/components/StepActions/types.d.ts +2 -2
  67. package/cjs/components/SwapButton/SwapButton.js +2 -2
  68. package/cjs/components/SwapButton/types.d.ts +1 -2
  69. package/cjs/components/SwapInput/SwapInput.style.d.ts +2 -2
  70. package/cjs/components/SwapInput/SwapInputAdornment.style.d.ts +3 -3
  71. package/cjs/components/SwapInput/SwapInputEndAdornment.js +18 -1
  72. package/cjs/components/SwapRouteCard/SwapRouteCard.d.ts +1 -2
  73. package/cjs/components/SwapRouteCard/SwapRouteCard.js +10 -26
  74. package/cjs/components/SwapRouteCard/SwapRouteCard.style.d.ts +4 -36
  75. package/cjs/components/SwapRouteCard/SwapRouteCard.style.js +7 -38
  76. package/cjs/components/SwapRouteCard/SwapRouteCardEssentials.d.ts +3 -0
  77. package/cjs/components/SwapRouteCard/SwapRouteCardEssentials.js +27 -0
  78. package/cjs/components/SwapRouteCard/SwapRouteCardSkeleton.js +5 -5
  79. package/cjs/components/SwapRouteCard/types.d.ts +2 -2
  80. package/cjs/components/SwapRouteCard/utils.d.ts +5 -0
  81. package/cjs/components/SwapRouteCard/utils.js +32 -2
  82. package/cjs/components/SwapRoutes/SwapRoutes.js +3 -12
  83. package/cjs/components/SwapRoutes/SwapRoutesExpanded.js +4 -11
  84. package/cjs/components/SwapRoutes/{SwapRoutes.style.d.ts → SwapRoutesExpanded.style.d.ts} +0 -9
  85. package/cjs/components/SwapRoutes/{SwapRoutes.style.js → SwapRoutesExpanded.style.js} +1 -12
  86. package/cjs/components/Switch.js +4 -4
  87. package/cjs/components/Token/Token.d.ts +2 -2
  88. package/cjs/components/Token/Token.style.d.ts +2 -2
  89. package/cjs/components/TokenList/TokenList.style.d.ts +2 -2
  90. package/cjs/config/theme.js +1 -1
  91. package/cjs/config/version.d.ts +1 -1
  92. package/cjs/config/version.js +1 -1
  93. package/cjs/hooks/index.d.ts +4 -0
  94. package/cjs/hooks/index.js +4 -0
  95. package/cjs/hooks/useChains.js +2 -2
  96. package/cjs/hooks/useFeaturedTokens.d.ts +1 -1
  97. package/cjs/hooks/useFeaturedTokens.js +2 -2
  98. package/cjs/hooks/useFundsSufficiency.d.ts +5 -0
  99. package/cjs/hooks/useFundsSufficiency.js +73 -0
  100. package/cjs/hooks/useGasRecommendation.d.ts +2 -0
  101. package/cjs/hooks/useGasRecommendation.js +23 -0
  102. package/cjs/hooks/useGasRefuel.d.ts +7 -0
  103. package/cjs/hooks/useGasRefuel.js +61 -0
  104. package/cjs/hooks/useGasSufficiency.d.ts +2 -3
  105. package/cjs/hooks/useGasSufficiency.js +6 -37
  106. package/cjs/hooks/useGetTokenBalancesWithRetry.d.ts +3 -0
  107. package/cjs/hooks/useGetTokenBalancesWithRetry.js +33 -0
  108. package/cjs/hooks/useProcessMessage.d.ts +3 -3
  109. package/cjs/hooks/useSwapRoutes.d.ts +7 -2
  110. package/cjs/hooks/useSwapRoutes.js +31 -11
  111. package/cjs/hooks/useTokenAddressBalance.js +4 -2
  112. package/cjs/hooks/useTokenBalance.js +4 -22
  113. package/cjs/hooks/useTokenBalances.d.ts +1 -1
  114. package/cjs/hooks/useTokenSearch.js +2 -2
  115. package/cjs/hooks/useTokens.js +2 -3
  116. package/cjs/i18n/en.json +14 -7
  117. package/cjs/i18n/it.json +6 -2
  118. package/cjs/i18n/pt.json +234 -0
  119. package/cjs/i18n/uk.json +5 -1
  120. package/cjs/icons/InsuraceLogo.d.ts +2 -0
  121. package/cjs/icons/InsuraceLogo.js +11 -0
  122. package/cjs/icons/index.d.ts +1 -0
  123. package/cjs/icons/index.js +1 -0
  124. package/cjs/index.d.ts +0 -6
  125. package/cjs/index.js +1 -6
  126. package/cjs/pages/MainPage/MainGasMessage.d.ts +3 -0
  127. package/cjs/pages/MainPage/MainGasMessage.js +12 -0
  128. package/cjs/pages/MainPage/MainPage.js +3 -2
  129. package/cjs/pages/MainPage/MainSwapButton.js +1 -1
  130. package/cjs/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.style.d.ts +1 -1
  131. package/cjs/pages/SettingsPage/ColorSchemeButtonGroup.js +2 -2
  132. package/cjs/pages/SettingsPage/ColorSchemeButtonGroup.style.d.ts +2 -2
  133. package/cjs/pages/SettingsPage/EnabledToolsButton.style.d.ts +1 -1
  134. package/cjs/pages/SettingsPage/RoutePrioritySelect.js +1 -1
  135. package/cjs/pages/SwapDetailsPage/SwapDetailsPage.js +4 -3
  136. package/cjs/pages/SwapPage/ExchangeRateBottomSheet.d.ts +1 -2
  137. package/cjs/pages/SwapPage/ExchangeRateBottomSheet.js +1 -14
  138. package/cjs/pages/SwapPage/StartSwapButton.d.ts +3 -2
  139. package/cjs/pages/SwapPage/StartSwapButton.js +14 -4
  140. package/cjs/pages/SwapPage/SwapPage.js +18 -7
  141. package/cjs/pages/SwapPage/types.d.ts +9 -0
  142. package/cjs/pages/SwapPage/types.js +2 -0
  143. package/cjs/pages/SwapRoutesPage/SwapRoutesPage.js +1 -1
  144. package/cjs/pages/SwapRoutesPage/SwapRoutesPage.style.d.ts +2 -1
  145. package/cjs/providers/SDKProvider/SDKProvider.d.ts +2 -2
  146. package/cjs/providers/SDKProvider/SDKProvider.js +2 -1
  147. package/cjs/providers/SwapFormProvider/FormUpdater.js +2 -3
  148. package/cjs/providers/SwapFormProvider/SwapFormProvider.js +2 -3
  149. package/cjs/providers/SwapFormProvider/index.d.ts +1 -0
  150. package/cjs/providers/SwapFormProvider/index.js +1 -0
  151. package/cjs/providers/WidgetProvider/WidgetProvider.js +17 -4
  152. package/cjs/providers/WidgetProvider/utils.d.ts +1 -1
  153. package/cjs/providers/WidgetProvider/utils.js +2 -4
  154. package/cjs/stores/StoreProvider.js +1 -1
  155. package/cjs/stores/routes/createRouteExecutionStore.js +3 -2
  156. package/cjs/stores/routes/index.d.ts +0 -1
  157. package/cjs/stores/routes/index.js +0 -1
  158. package/cjs/stores/routes/types.d.ts +1 -5
  159. package/cjs/stores/routes/useSetExecutableRoute.d.ts +1 -1
  160. package/cjs/stores/settings/types.d.ts +1 -0
  161. package/cjs/stores/settings/useSettingsStore.js +1 -0
  162. package/cjs/types/widget.d.ts +5 -10
  163. package/cjs/utils/format.js +4 -1
  164. package/components/ActiveSwaps/ActiveSwaps.style.d.ts +5 -5
  165. package/components/Card/CardIconButton.d.ts +29 -0
  166. package/components/Card/CardIconButton.js +14 -0
  167. package/components/Card/CardLabel.d.ts +26 -0
  168. package/components/Card/CardLabel.js +42 -0
  169. package/components/Card/CardTitle.d.ts +2 -2
  170. package/components/Card/index.d.ts +2 -0
  171. package/components/Card/index.js +2 -0
  172. package/components/GasMessage/FundsSufficiencyMessage.d.ts +1 -0
  173. package/components/GasMessage/FundsSufficiencyMessage.js +12 -0
  174. package/components/{GasSufficiencyMessage/GasSufficiencyMessage.d.ts → GasMessage/GasMessage.d.ts} +4 -2
  175. package/components/GasMessage/GasMessage.js +15 -0
  176. package/components/GasMessage/GasMessage.style.d.ts +34 -0
  177. package/components/GasMessage/GasMessage.style.js +45 -0
  178. package/components/GasMessage/GasRefuelMessage.d.ts +3 -0
  179. package/components/GasMessage/GasRefuelMessage.js +22 -0
  180. package/components/GasMessage/GasSufficiencyMessage.d.ts +7 -0
  181. package/components/GasMessage/GasSufficiencyMessage.js +17 -0
  182. package/components/GasMessage/index.d.ts +2 -0
  183. package/components/GasMessage/index.js +2 -0
  184. package/components/Header/Header.style.d.ts +6 -6
  185. package/components/Header/NavigationHeader.js +4 -4
  186. package/components/Header/WalletHeader.js +6 -6
  187. package/components/Insurance/Insurance.d.ts +3 -0
  188. package/components/Insurance/Insurance.js +7 -0
  189. package/components/Insurance/InsuranceCard.d.ts +3 -0
  190. package/components/Insurance/InsuranceCard.js +16 -0
  191. package/components/Insurance/InsuranceCollapsed.d.ts +3 -0
  192. package/components/Insurance/InsuranceCollapsed.js +28 -0
  193. package/components/Insurance/index.d.ts +1 -0
  194. package/components/Insurance/index.js +1 -0
  195. package/components/Insurance/types.d.ts +14 -0
  196. package/components/Insurance/types.js +1 -0
  197. package/components/ListItemButton.d.ts +1 -1
  198. package/components/NFT/NFT.style.d.ts +1 -1
  199. package/components/PoweredBy/PoweredBy.style.d.ts +3 -12
  200. package/components/ReverseTokensButton/ReverseTokensButton.style.d.ts +2 -2
  201. package/components/SendToWallet/SendToWallet.js +34 -28
  202. package/components/SendToWallet/SendToWallet.style.d.ts +2 -2
  203. package/components/SendToWallet/SendToWalletButton.js +4 -4
  204. package/components/SmallAvatar.d.ts +2 -2
  205. package/components/Step/CircularProgress.style.d.ts +1 -1
  206. package/components/Step/DestinationWalletAddress.d.ts +2 -2
  207. package/components/Step/DestinationWalletAddress.js +4 -8
  208. package/components/Step/GasStepProcess.d.ts +2 -2
  209. package/components/Step/GasStepProcess.js +3 -3
  210. package/components/Step/Step.d.ts +2 -2
  211. package/components/Step/Step.js +6 -8
  212. package/components/Step/StepList.d.ts +1 -1
  213. package/components/Step/StepProcess.d.ts +2 -2
  214. package/components/Step/StepProcess.js +1 -5
  215. package/components/Step/StepProcess.style.d.ts +3 -39
  216. package/components/Step/StepTimer.d.ts +2 -2
  217. package/components/Step/StepTimer.js +1 -1
  218. package/components/StepActions/StepActions.d.ts +6 -1
  219. package/components/StepActions/StepActions.js +51 -16
  220. package/components/StepActions/StepActions.style.d.ts +1 -1
  221. package/components/StepActions/types.d.ts +2 -2
  222. package/components/SwapButton/SwapButton.js +2 -2
  223. package/components/SwapButton/types.d.ts +1 -2
  224. package/components/SwapInput/SwapInput.style.d.ts +2 -2
  225. package/components/SwapInput/SwapInputAdornment.style.d.ts +3 -3
  226. package/components/SwapInput/SwapInputEndAdornment.js +19 -2
  227. package/components/SwapRouteCard/SwapRouteCard.d.ts +1 -2
  228. package/components/SwapRouteCard/SwapRouteCard.js +11 -26
  229. package/components/SwapRouteCard/SwapRouteCard.style.d.ts +4 -36
  230. package/components/SwapRouteCard/SwapRouteCard.style.js +7 -38
  231. package/components/SwapRouteCard/SwapRouteCardEssentials.d.ts +3 -0
  232. package/components/SwapRouteCard/SwapRouteCardEssentials.js +23 -0
  233. package/components/SwapRouteCard/SwapRouteCardSkeleton.js +5 -5
  234. package/components/SwapRouteCard/types.d.ts +2 -2
  235. package/components/SwapRouteCard/utils.d.ts +5 -0
  236. package/components/SwapRouteCard/utils.js +30 -1
  237. package/components/SwapRoutes/SwapRoutes.js +5 -14
  238. package/components/SwapRoutes/SwapRoutesExpanded.js +4 -11
  239. package/components/SwapRoutes/{SwapRoutes.style.d.ts → SwapRoutesExpanded.style.d.ts} +0 -9
  240. package/components/SwapRoutes/{SwapRoutes.style.js → SwapRoutesExpanded.style.js} +1 -12
  241. package/components/Switch.js +5 -5
  242. package/components/Token/Token.d.ts +2 -2
  243. package/components/Token/Token.style.d.ts +2 -2
  244. package/components/TokenList/TokenList.style.d.ts +2 -2
  245. package/config/theme.js +1 -1
  246. package/config/version.d.ts +1 -1
  247. package/config/version.js +1 -1
  248. package/hooks/index.d.ts +4 -0
  249. package/hooks/index.js +4 -0
  250. package/hooks/useChains.js +2 -2
  251. package/hooks/useFeaturedTokens.d.ts +1 -1
  252. package/hooks/useFeaturedTokens.js +2 -2
  253. package/hooks/useFundsSufficiency.d.ts +5 -0
  254. package/hooks/useFundsSufficiency.js +69 -0
  255. package/hooks/useGasRecommendation.d.ts +2 -0
  256. package/hooks/useGasRecommendation.js +19 -0
  257. package/hooks/useGasRefuel.d.ts +7 -0
  258. package/hooks/useGasRefuel.js +57 -0
  259. package/hooks/useGasSufficiency.d.ts +2 -3
  260. package/hooks/useGasSufficiency.js +7 -38
  261. package/hooks/useGetTokenBalancesWithRetry.d.ts +3 -0
  262. package/hooks/useGetTokenBalancesWithRetry.js +29 -0
  263. package/hooks/useProcessMessage.d.ts +3 -3
  264. package/hooks/useSwapRoutes.d.ts +7 -2
  265. package/hooks/useSwapRoutes.js +32 -12
  266. package/hooks/useTokenAddressBalance.js +4 -2
  267. package/hooks/useTokenBalance.js +5 -23
  268. package/hooks/useTokenBalances.d.ts +1 -1
  269. package/hooks/useTokenSearch.js +2 -2
  270. package/hooks/useTokens.js +2 -3
  271. package/i18n/en.json +14 -7
  272. package/i18n/it.json +6 -2
  273. package/i18n/pt.json +234 -0
  274. package/i18n/uk.json +5 -1
  275. package/icons/InsuraceLogo.d.ts +2 -0
  276. package/icons/InsuraceLogo.js +7 -0
  277. package/icons/index.d.ts +1 -0
  278. package/icons/index.js +1 -0
  279. package/index.d.ts +0 -6
  280. package/index.js +0 -5
  281. package/package.json +12 -12
  282. package/pages/ActiveSwapsPage/ActiveSwapsPage.js +2 -2
  283. package/pages/MainPage/MainGasMessage.d.ts +3 -0
  284. package/pages/MainPage/MainGasMessage.js +8 -0
  285. package/pages/MainPage/MainPage.js +3 -2
  286. package/pages/MainPage/MainSwapButton.js +1 -1
  287. package/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.style.d.ts +1 -1
  288. package/pages/SettingsPage/ColorSchemeButtonGroup.js +2 -2
  289. package/pages/SettingsPage/ColorSchemeButtonGroup.style.d.ts +2 -2
  290. package/pages/SettingsPage/EnabledToolsButton.style.d.ts +1 -1
  291. package/pages/SettingsPage/RoutePrioritySelect.js +1 -1
  292. package/pages/SwapDetailsPage/SwapDetailsPage.js +5 -4
  293. package/pages/SwapHistoryPage/SwapHistoryPage.js +2 -2
  294. package/pages/SwapPage/ExchangeRateBottomSheet.d.ts +1 -2
  295. package/pages/SwapPage/ExchangeRateBottomSheet.js +0 -12
  296. package/pages/SwapPage/StartSwapButton.d.ts +3 -2
  297. package/pages/SwapPage/StartSwapButton.js +13 -4
  298. package/pages/SwapPage/SwapPage.js +21 -10
  299. package/pages/SwapPage/types.d.ts +9 -0
  300. package/pages/SwapPage/types.js +1 -0
  301. package/pages/SwapRoutesPage/SwapRoutesPage.js +1 -1
  302. package/pages/SwapRoutesPage/SwapRoutesPage.style.d.ts +2 -1
  303. package/providers/SDKProvider/SDKProvider.d.ts +2 -2
  304. package/providers/SDKProvider/SDKProvider.js +3 -2
  305. package/providers/SwapFormProvider/FormUpdater.js +2 -3
  306. package/providers/SwapFormProvider/SwapFormProvider.js +2 -3
  307. package/providers/SwapFormProvider/index.d.ts +1 -0
  308. package/providers/SwapFormProvider/index.js +1 -0
  309. package/providers/WidgetProvider/WidgetProvider.js +17 -4
  310. package/providers/WidgetProvider/utils.d.ts +1 -1
  311. package/providers/WidgetProvider/utils.js +2 -4
  312. package/stores/StoreProvider.js +2 -2
  313. package/stores/routes/createRouteExecutionStore.js +3 -2
  314. package/stores/routes/index.d.ts +0 -1
  315. package/stores/routes/index.js +0 -1
  316. package/stores/routes/types.d.ts +1 -5
  317. package/stores/routes/useSetExecutableRoute.d.ts +1 -1
  318. package/stores/settings/types.d.ts +1 -0
  319. package/stores/settings/useSettingsStore.js +1 -0
  320. package/tsconfig.cjs.tsbuildinfo +1 -1
  321. package/types/widget.d.ts +5 -10
  322. package/utils/format.js +4 -1
  323. package/cjs/components/GasSufficiencyMessage/GasSufficiencyMessage.js +0 -31
  324. package/cjs/components/GasSufficiencyMessage/GasSufficiencyMessage.style.d.ts +0 -9
  325. package/cjs/components/GasSufficiencyMessage/GasSufficiencyMessage.style.js +0 -14
  326. package/cjs/components/GasSufficiencyMessage/index.d.ts +0 -1
  327. package/cjs/components/SwapRoutes/useSetRecommendedRoute.d.ts +0 -2
  328. package/cjs/components/SwapRoutes/useSetRecommendedRoute.js +0 -13
  329. package/cjs/config/env.d.ts +0 -3
  330. package/cjs/config/env.js +0 -6
  331. package/cjs/stores/routes/useRecommendedRouteStore.d.ts +0 -10
  332. package/cjs/stores/routes/useRecommendedRouteStore.js +0 -39
  333. package/components/GasSufficiencyMessage/GasSufficiencyMessage.js +0 -27
  334. package/components/GasSufficiencyMessage/GasSufficiencyMessage.style.d.ts +0 -9
  335. package/components/GasSufficiencyMessage/GasSufficiencyMessage.style.js +0 -11
  336. package/components/GasSufficiencyMessage/index.d.ts +0 -1
  337. package/components/GasSufficiencyMessage/index.js +0 -1
  338. package/components/SwapRoutes/useSetRecommendedRoute.d.ts +0 -2
  339. package/components/SwapRoutes/useSetRecommendedRoute.js +0 -9
  340. package/config/env.d.ts +0 -3
  341. package/config/env.js +0 -3
  342. package/stores/routes/useRecommendedRouteStore.d.ts +0 -10
  343. package/stores/routes/useRecommendedRouteStore.js +0 -32
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useGasRefuel = void 0;
4
+ const big_js_1 = require("big.js");
5
+ const react_1 = require("react");
6
+ const react_hook_form_1 = require("react-hook-form");
7
+ const _1 = require(".");
8
+ const providers_1 = require("../providers");
9
+ const useGasRecommendation_1 = require("./useGasRecommendation");
10
+ const useTokenBalance_1 = require("./useTokenBalance");
11
+ const useGasRefuel = () => {
12
+ const { getChainById } = (0, _1.useChains)();
13
+ const [fromChainId, fromTokenAddress, toChainId, toTokenAddress, toAddress] = (0, react_hook_form_1.useWatch)({
14
+ name: [
15
+ providers_1.SwapFormKey.FromChain,
16
+ providers_1.SwapFormKey.FromToken,
17
+ providers_1.SwapFormKey.ToChain,
18
+ providers_1.SwapFormKey.ToToken,
19
+ providers_1.SwapFormKey.ToAddress,
20
+ ],
21
+ });
22
+ const toChain = getChainById(toChainId);
23
+ const { token: nativeToken } = (0, useTokenBalance_1.useTokenBalance)(toChainId && toChain?.nativeToken, toAddress);
24
+ const { data: gasRecommendation, isLoading } = (0, useGasRecommendation_1.useGasRecommendation)(toChainId, fromChainId, fromTokenAddress);
25
+ const enabled = (0, react_1.useMemo)(() => {
26
+ if (
27
+ // We don't allow same chain refuel.
28
+ // If a user runs out of gas, he can't send a source chain transaction.
29
+ fromChainId === toChainId ||
30
+ // We don't want to apply auto refuel when swapping to native tokens
31
+ toChain?.nativeToken.address === toTokenAddress ||
32
+ !gasRecommendation?.available ||
33
+ !gasRecommendation.recommended ||
34
+ !nativeToken) {
35
+ return false;
36
+ }
37
+ const tokenBalance = (0, big_js_1.default)(nativeToken.amount ?? 0);
38
+ // check if the user balance < 50% of the recommended amount
39
+ const recommendedAmount = (0, big_js_1.default)(gasRecommendation.recommended.amount)
40
+ .div(10 ** gasRecommendation.recommended.token.decimals)
41
+ .div(2);
42
+ const insufficientGas = tokenBalance.lt(recommendedAmount);
43
+ return insufficientGas;
44
+ }, [
45
+ fromChainId,
46
+ gasRecommendation?.available,
47
+ gasRecommendation?.recommended,
48
+ nativeToken,
49
+ toChain?.nativeToken.address,
50
+ toChainId,
51
+ toTokenAddress,
52
+ ]);
53
+ return {
54
+ enabled: enabled,
55
+ availble: gasRecommendation?.available,
56
+ isLoading: isLoading,
57
+ chain: toChain,
58
+ gasRecommendation,
59
+ };
60
+ };
61
+ exports.useGasRefuel = useGasRefuel;
@@ -9,7 +9,6 @@ export interface GasSufficiency {
9
9
  chain?: EVMChain;
10
10
  }
11
11
  export declare const useGasSufficiency: (route?: Route) => {
12
- insufficientGas: GasSufficiency[] | null | undefined;
13
- insufficientFunds: boolean | null | undefined;
14
- isLoading: boolean;
12
+ insufficientGas: GasSufficiency[] | undefined;
13
+ isInitialLoading: boolean;
15
14
  };
@@ -5,16 +5,14 @@ const react_query_1 = require("@tanstack/react-query");
5
5
  const big_js_1 = require("big.js");
6
6
  const _1 = require(".");
7
7
  const providers_1 = require("../providers");
8
- const stores_1 = require("../stores");
9
- const useTokenBalance_1 = require("./useTokenBalance");
10
8
  const refetchInterval = 30000;
11
9
  const useGasSufficiency = (route) => {
12
- const { account } = (0, providers_1.useWallet)();
10
+ const { account, provider } = (0, providers_1.useWallet)();
13
11
  const { getChainById } = (0, _1.useChains)();
14
- const { token: fromToken, getTokenBalancesWithRetry } = (0, useTokenBalance_1.useTokenBalance)(route?.fromToken);
15
- const { data: insufficientGas, isInitialLoading: insufficientGasLoading } = (0, react_query_1.useQuery)(['gas-sufficiency-check', account.address, route?.id], async () => {
12
+ const getTokenBalancesWithRetry = (0, _1.useGetTokenBalancesWithRetry)(provider);
13
+ const { data: insufficientGas, isInitialLoading } = (0, react_query_1.useQuery)(['gas-sufficiency-check', account.address, route?.id], async () => {
16
14
  if (!account.address || !route) {
17
- return null;
15
+ return;
18
16
  }
19
17
  const gasCosts = route.steps
20
18
  .filter((step) => !step.execution || step.execution.status !== 'DONE')
@@ -42,7 +40,7 @@ const useGasSufficiency = (route) => {
42
40
  }
43
41
  const tokenBalances = await getTokenBalancesWithRetry(account.address, Object.values(gasCosts).map((item) => item.token));
44
42
  if (!tokenBalances?.length) {
45
- return null;
43
+ return;
46
44
  }
47
45
  [route.fromChainId, route.toChainId].forEach((chainId) => {
48
46
  if (gasCosts[chainId]) {
@@ -71,38 +69,9 @@ const useGasSufficiency = (route) => {
71
69
  staleTime: refetchInterval,
72
70
  cacheTime: refetchInterval,
73
71
  });
74
- const { data: insufficientFunds, isInitialLoading: insufficientFundsLoading, } = (0, react_query_1.useQuery)(['funds-sufficiency-check', account.address, route?.id], async () => {
75
- if (!account.address || !fromToken || !route || (0, stores_1.isRouteDone)(route)) {
76
- return null;
77
- }
78
- let currentTokenBalance = (0, big_js_1.default)(fromToken?.amount ?? 0);
79
- const currentAction = route.steps.filter((step) => !step.execution || step.execution.status !== 'DONE')[0]?.action;
80
- if (fromToken.chainId === currentAction.fromToken.chainId &&
81
- fromToken.address === currentAction.fromToken.address &&
82
- currentTokenBalance.gt(0)) {
83
- const insufficientFunds = (0, big_js_1.default)(route.fromAmount)
84
- .div(10 ** route.fromToken.decimals)
85
- .gt(currentTokenBalance);
86
- return insufficientFunds;
87
- }
88
- const tokenBalances = await getTokenBalancesWithRetry(account.address, [
89
- currentAction.fromToken,
90
- ]);
91
- currentTokenBalance = (0, big_js_1.default)(tokenBalances?.[0]?.amount ?? 0);
92
- const insufficientFunds = (0, big_js_1.default)(currentAction.fromAmount)
93
- .div(10 ** currentAction.fromToken.decimals)
94
- .gt(currentTokenBalance);
95
- return insufficientFunds;
96
- }, {
97
- enabled: Boolean(account.address && route && fromToken),
98
- refetchInterval,
99
- staleTime: refetchInterval,
100
- cacheTime: refetchInterval,
101
- });
102
72
  return {
103
73
  insufficientGas,
104
- insufficientFunds,
105
- isLoading: insufficientGasLoading || insufficientFundsLoading,
74
+ isInitialLoading,
106
75
  };
107
76
  };
108
77
  exports.useGasSufficiency = useGasSufficiency;
@@ -0,0 +1,3 @@
1
+ import type { Provider } from '@ethersproject/providers';
2
+ import type { Token, TokenAmount } from '@lifi/sdk';
3
+ export declare const useGetTokenBalancesWithRetry: (provider?: Provider) => (accountAddress: string, tokens: Token[], depth?: number) => Promise<TokenAmount[] | undefined>;
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useGetTokenBalancesWithRetry = void 0;
4
+ const address_1 = require("@ethersproject/address");
5
+ const react_1 = require("react");
6
+ const providers_1 = require("../providers");
7
+ const useGetTokenBalancesWithRetry = (provider) => {
8
+ const lifi = (0, providers_1.useLiFi)();
9
+ const getTokenBalancesWithRetry = (0, react_1.useCallback)(async (accountAddress, tokens, depth = 0) => {
10
+ try {
11
+ const walletAddress = (0, address_1.isAddress)(accountAddress)
12
+ ? accountAddress
13
+ : await provider?.resolveName(accountAddress);
14
+ const tokenBalances = await lifi.getTokenBalances(walletAddress, tokens);
15
+ if (!tokenBalances.every((token) => token.blockNumber)) {
16
+ if (depth > 10) {
17
+ console.warn('Token balance backoff depth exceeded.');
18
+ return undefined;
19
+ }
20
+ await new Promise((resolve) => {
21
+ setTimeout(resolve, 1.5 ** depth * 100);
22
+ });
23
+ return getTokenBalancesWithRetry(accountAddress, tokens, depth + 1);
24
+ }
25
+ return tokenBalances;
26
+ }
27
+ catch (error) {
28
+ //
29
+ }
30
+ }, [lifi, provider]);
31
+ return getTokenBalancesWithRetry;
32
+ };
33
+ exports.useGetTokenBalancesWithRetry = useGetTokenBalancesWithRetry;
@@ -1,10 +1,10 @@
1
- import type { EVMChain, Process, Step } from '@lifi/sdk';
1
+ import type { EVMChain, LifiStep, Process } from '@lifi/sdk';
2
2
  import type { TFunction } from 'i18next';
3
- export declare const useProcessMessage: (step?: Step, process?: Process) => {
3
+ export declare const useProcessMessage: (step?: LifiStep, process?: Process) => {
4
4
  title?: string | undefined;
5
5
  message?: string | undefined;
6
6
  };
7
- export declare function getProcessMessage(t: TFunction, getChainById: (chainId: number) => EVMChain | undefined, step: Step, process: Process): {
7
+ export declare function getProcessMessage(t: TFunction, getChainById: (chainId: number) => EVMChain | undefined, step: LifiStep, process: Process): {
8
8
  title?: string;
9
9
  message?: string;
10
10
  };
@@ -1,10 +1,15 @@
1
1
  import type { Route, RoutesResponse } from '@lifi/sdk';
2
- export declare const useSwapRoutes: () => {
2
+ interface SwapRoutesProps {
3
+ onSettled?: (data?: RoutesResponse) => void;
4
+ insurableRoute?: Route;
5
+ }
6
+ export declare const useSwapRoutes: ({ onSettled, insurableRoute, }?: SwapRoutesProps) => {
3
7
  routes: Route[] | undefined;
4
8
  isLoading: boolean;
5
9
  isFetching: boolean;
6
10
  isFetched: boolean;
7
11
  dataUpdatedAt: number;
8
12
  refetchTime: number;
9
- refetch: <TPageData>(options?: (import("@tanstack/react-query").RefetchOptions & import("@tanstack/react-query").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("@tanstack/react-query").QueryObserverResult<RoutesResponse, any>>;
13
+ refetch: <TPageData>(options?: (import("@tanstack/react-query").RefetchOptions & import("@tanstack/react-query").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("@tanstack/react-query").QueryObserverResult<RoutesResponse, unknown>>;
10
14
  };
15
+ export {};
@@ -11,14 +11,15 @@ const _1 = require(".");
11
11
  const providers_1 = require("../providers");
12
12
  const stores_1 = require("../stores");
13
13
  const refetchTime = 60000;
14
- const useSwapRoutes = () => {
14
+ const useSwapRoutes = ({ onSettled, insurableRoute, } = {}) => {
15
15
  const lifi = (0, providers_1.useLiFi)();
16
- const { variant, sdkConfig } = (0, providers_1.useWidgetConfig)();
16
+ const { variant, sdkConfig, insurance } = (0, providers_1.useWidgetConfig)();
17
17
  const { account, provider } = (0, providers_1.useWallet)();
18
18
  const queryClient = (0, react_query_1.useQueryClient)();
19
- const { slippage, enabledBridges, enabledExchanges, routePriority } = (0, stores_1.useSettings)([
19
+ const { slippage, enabledBridges, enabledAutoRefuel, enabledExchanges, routePriority, } = (0, stores_1.useSettings)([
20
20
  'slippage',
21
21
  'routePriority',
22
+ 'enabledAutoRefuel',
22
23
  'enabledBridges',
23
24
  'enabledExchanges',
24
25
  ]);
@@ -38,6 +39,7 @@ const useSwapRoutes = () => {
38
39
  });
39
40
  const { token: fromToken } = (0, _1.useToken)(fromChainId, fromTokenAddress);
40
41
  const { token: toToken } = (0, _1.useToken)(toChainId, toTokenAddress);
42
+ const { enabled: enabledRefuel, gasRecommendation } = (0, _1.useGasRefuel)();
41
43
  const hasAmount = (!isNaN(fromTokenAmount) && Number(fromTokenAmount) > 0) ||
42
44
  (!isNaN(toTokenAmount) && Number(toTokenAmount) > 0);
43
45
  const contractCallQuoteEnabled = variant === 'nft'
@@ -69,12 +71,12 @@ const useSwapRoutes = () => {
69
71
  routePriority,
70
72
  variant,
71
73
  sdkConfig?.defaultRouteOptions?.allowSwitchChain,
74
+ enabledRefuel && enabledAutoRefuel,
75
+ gasRecommendation?.fromAmount,
76
+ insurance,
77
+ insurableRoute?.id,
72
78
  ];
73
- const previousDataUpdatedAt = queryClient.getQueryState(queryKey)?.dataUpdatedAt;
74
- const refetchInterval = previousDataUpdatedAt
75
- ? Math.min(Math.abs(refetchTime - (Date.now() - previousDataUpdatedAt)), refetchTime)
76
- : refetchTime;
77
- const { data, isLoading, isFetching, isFetched, dataUpdatedAt, refetch } = (0, react_query_1.useQuery)(queryKey, async ({ queryKey: [_, fromAddress, fromChainId, fromTokenAddress, fromTokenAmount, toAddress, toChainId, toTokenAddress, toTokenAmount, toContractAddress, toContractCallData, toContractGasLimit, slippage, enabledBridges, enabledExchanges, routePriority, variant, allowSwitchChain,], signal, }) => {
79
+ const { data, isLoading, isFetching, isFetched, dataUpdatedAt, refetch } = (0, react_query_1.useQuery)(queryKey, async ({ queryKey: [_, fromAddress, fromChainId, fromTokenAddress, fromTokenAmount, toAddress, toChainId, toTokenAddress, toTokenAmount, toContractAddress, toContractCallData, toContractGasLimit, slippage, enabledBridges, enabledExchanges, routePriority, variant, allowSwitchChain, enabledRefuel, gasRecommendationFromAmount, insurance, insurableRouteId,], signal, }) => {
78
80
  let toWalletAddress;
79
81
  try {
80
82
  toWalletAddress =
@@ -120,9 +122,20 @@ const useSwapRoutes = () => {
120
122
  toAddress: toAddress,
121
123
  gasCostUSD: contractCallQuote.estimate.gasCosts?.[0].amountUSD,
122
124
  steps: [contractCallQuote],
125
+ insurance: { state: 'NOT_INSURABLE', feeAmountUsd: '0' },
123
126
  };
124
127
  return { routes: [route] };
125
128
  }
129
+ const allowedBridges = insurableRoute
130
+ ? insurableRoute.steps.flatMap((step) => step.includedSteps
131
+ .filter((includedStep) => includedStep.type === 'cross')
132
+ .map((includedStep) => includedStep.toolDetails.key))
133
+ : enabledBridges;
134
+ const allowedExchanges = insurableRoute
135
+ ? insurableRoute.steps.flatMap((step) => step.includedSteps
136
+ .filter((includedStep) => includedStep.type === 'swap')
137
+ .map((includedStep) => includedStep.toolDetails.key))
138
+ : enabledExchanges;
126
139
  return lifi.getRoutes({
127
140
  fromChainId,
128
141
  fromAmount,
@@ -131,23 +144,29 @@ const useSwapRoutes = () => {
131
144
  toTokenAddress,
132
145
  fromAddress,
133
146
  toAddress: toWalletAddress,
147
+ fromAmountForGas: enabledRefuel && gasRecommendationFromAmount
148
+ ? gasRecommendationFromAmount
149
+ : undefined,
134
150
  options: {
135
151
  slippage: formattedSlippage,
136
152
  bridges: {
137
- allow: enabledBridges,
153
+ allow: allowedBridges,
138
154
  },
139
155
  exchanges: {
140
- allow: enabledExchanges,
156
+ allow: allowedExchanges,
141
157
  },
142
158
  order: routePriority,
143
159
  allowSwitchChain: variant === 'refuel' ? false : allowSwitchChain,
160
+ insurance: insurance ? Boolean(insurableRoute) : undefined,
144
161
  },
145
162
  }, { signal });
146
163
  }, {
147
164
  enabled: isEnabled,
148
- refetchInterval,
149
165
  staleTime: refetchTime,
150
166
  cacheTime: refetchTime,
167
+ refetchInterval(data, query) {
168
+ return Math.min(Math.abs(refetchTime - (Date.now() - query.state.dataUpdatedAt)), refetchTime);
169
+ },
151
170
  retry(failureCount, error) {
152
171
  if (error?.code === sdk_1.LifiErrorCode.NotFound) {
153
172
  return false;
@@ -173,6 +192,7 @@ const useSwapRoutes = () => {
173
192
  });
174
193
  }
175
194
  },
195
+ onSettled,
176
196
  });
177
197
  return {
178
198
  routes: data?.routes,
@@ -6,8 +6,10 @@ const useTokenBalances_1 = require("./useTokenBalances");
6
6
  const useTokenAddressBalance = (chainId, tokenAddress) => {
7
7
  const { tokens, tokensWithBalance, isBalanceLoading, refetch } = (0, useTokenBalances_1.useTokenBalances)(chainId);
8
8
  const token = (0, react_1.useMemo)(() => {
9
- const token = (tokensWithBalance ?? tokens)?.find((token) => token.address === tokenAddress && token.chainId === chainId);
10
- return token;
9
+ if (tokenAddress && chainId) {
10
+ const token = (tokensWithBalance ?? tokens)?.find((token) => token.address === tokenAddress && token.chainId === chainId);
11
+ return token;
12
+ }
11
13
  }, [chainId, tokenAddress, tokens, tokensWithBalance]);
12
14
  return {
13
15
  token,
@@ -5,31 +5,13 @@ const react_query_1 = require("@tanstack/react-query");
5
5
  const react_1 = require("react");
6
6
  const providers_1 = require("../providers");
7
7
  const utils_1 = require("../utils");
8
+ const useGetTokenBalancesWithRetry_1 = require("./useGetTokenBalancesWithRetry");
8
9
  const defaultRefetchInterval = 30000;
9
10
  const useTokenBalance = (token, accountAddress) => {
10
- const lifi = (0, providers_1.useLiFi)();
11
- const { account } = (0, providers_1.useWallet)();
11
+ const { account, provider } = (0, providers_1.useWallet)();
12
12
  const queryClient = (0, react_query_1.useQueryClient)();
13
- const walletAddress = accountAddress ?? account.address;
14
- const getTokenBalancesWithRetry = (0, react_1.useCallback)(async (accountAddress, tokens, depth = 0) => {
15
- try {
16
- const tokenBalances = await lifi.getTokenBalances(accountAddress, tokens);
17
- if (!tokenBalances.every((token) => token.blockNumber)) {
18
- if (depth > 10) {
19
- console.warn('Token balance backoff depth exceeded.');
20
- return undefined;
21
- }
22
- await new Promise((resolve) => {
23
- setTimeout(resolve, 1.5 ** depth * 100);
24
- });
25
- return getTokenBalancesWithRetry(accountAddress, tokens, depth + 1);
26
- }
27
- return tokenBalances;
28
- }
29
- catch (error) {
30
- //
31
- }
32
- }, [lifi]);
13
+ const walletAddress = accountAddress || account.address;
14
+ const getTokenBalancesWithRetry = (0, useGetTokenBalancesWithRetry_1.useGetTokenBalancesWithRetry)(provider);
33
15
  const tokenBalanceQueryKey = (0, react_1.useMemo)(() => ['token-balance', walletAddress, token?.chainId, token?.address], [token?.address, token?.chainId, walletAddress]);
34
16
  const { data, isLoading, refetch } = (0, react_query_1.useQuery)(tokenBalanceQueryKey, async ({ queryKey: [, accountAddress] }) => {
35
17
  const cachedToken = queryClient
@@ -2,7 +2,7 @@ import type { Token } from '../types';
2
2
  export declare const useTokenBalances: (selectedChainId?: number) => {
3
3
  tokens: Token[];
4
4
  tokensWithBalance: Token[] | undefined;
5
- featuredTokens: import("@lifi/types").Token[];
5
+ featuredTokens: import("@lifi/types").Token[] | undefined;
6
6
  isLoading: boolean;
7
7
  isBalanceLoading: boolean;
8
8
  refetch: <TPageData>(options?: (import("@tanstack/react-query").RefetchOptions & import("@tanstack/react-query").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("@tanstack/react-query").QueryObserverResult<Token[], unknown>>;
@@ -13,9 +13,9 @@ const useTokenSearch = (chainId, tokenQuery, enabled) => {
13
13
  if (token) {
14
14
  queryClient.setQueriesData(['tokens'], (data) => {
15
15
  if (data &&
16
- !data.tokens[chainId].some((t) => t.address === token.address)) {
16
+ !data.tokens[chainId]?.some((t) => t.address === token.address)) {
17
17
  const clonedData = { ...data };
18
- clonedData.tokens[chainId].push(token);
18
+ clonedData.tokens[chainId]?.push(token);
19
19
  return clonedData;
20
20
  }
21
21
  });
@@ -11,14 +11,14 @@ const useTokens = (selectedChainId) => {
11
11
  const { data, isLoading, dataUpdatedAt } = (0, react_query_1.useQuery)(['tokens'], () => lifi.getTokens());
12
12
  const { getChainById, isLoading: isSupportedChainsLoading } = (0, useChains_1.useChains)();
13
13
  const featuredTokens = (0, useFeaturedTokens_1.useFeaturedTokens)(selectedChainId);
14
- const { tokens: configTokens, chains: configChains, disabledChains, } = (0, providers_1.useWidgetConfig)();
14
+ const { tokens: configTokens, chains: configChains } = (0, providers_1.useWidgetConfig)();
15
15
  const tokens = (0, react_1.useMemo)(() => {
16
16
  if (isSupportedChainsLoading) {
17
17
  return [];
18
18
  }
19
19
  const chainAllowed = selectedChainId &&
20
20
  getChainById(selectedChainId) &&
21
- (0, providers_1.isItemAllowed)(selectedChainId, configChains, disabledChains);
21
+ (0, providers_1.isItemAllowed)(selectedChainId, configChains);
22
22
  if (!chainAllowed) {
23
23
  return [];
24
24
  }
@@ -47,7 +47,6 @@ const useTokens = (selectedChainId) => {
47
47
  selectedChainId,
48
48
  getChainById,
49
49
  configChains,
50
- disabledChains,
51
50
  configTokens?.allow,
52
51
  configTokens?.deny,
53
52
  featuredTokens,
package/cjs/i18n/en.json CHANGED
@@ -106,12 +106,14 @@
106
106
  "inProgress": "in progress",
107
107
  "info": {
108
108
  "message": {
109
+ "autoRefuel": "You're low on {{chainName}} gas. By continuing, you'll get enough gas to complete the swap.",
109
110
  "emptyActiveSwaps": "Swaps in progress will appear here. Once completed, find them in swap history.",
110
111
  "emptySwapHistory": "Swap history is only stored locally and will be deleted if you clear your browser data.",
111
112
  "emptyTokenList": "We couldn't find tokens on {{chainName}} chain or you don't have any. Please try search again or choose another chain.",
112
113
  "routeNotFound": "Try another token combination."
113
114
  },
114
115
  "title": {
116
+ "autoRefuel": "Get gas",
115
117
  "emptyActiveSwaps": "No active swaps",
116
118
  "emptySwapHistory": "No recent swaps",
117
119
  "routeNotFound": "No routes available"
@@ -154,6 +156,7 @@
154
156
  "quotedAmount": "Quoted amount",
155
157
  "rateChange": "Rate change",
156
158
  "receiving": "Receiving",
159
+ "refuelStepDetails": "Get gas via {{tool}}",
157
160
  "routes": "You get",
158
161
  "selectChain": "Chain",
159
162
  "selectChainAndToken": "Select chain and token",
@@ -162,6 +165,7 @@
162
165
  "sendToWallet": "Send to a different wallet",
163
166
  "sentToAddress": "Sent to {{address}}",
164
167
  "stepBridge": "Bridge",
168
+ "stepDetails": "{{tool}} via LI.FI",
165
169
  "stepSwap": "Swap",
166
170
  "stepSwapAndBridge": "Swap and bridge",
167
171
  "success": {
@@ -180,11 +184,13 @@
180
184
  "swapStepDetails": "Swap on {{chain}} via {{tool}}",
181
185
  "swapping": "Swapping",
182
186
  "tags": {
183
- "ALTERNATIVE": "ALTERNATIVE",
184
- "CHEAPEST": "CHEAP",
185
- "FASTEST": "FAST",
186
- "RECOMMENDED": "RECOMMENDED",
187
- "SAFEST": "SAFE"
187
+ "cheapest": "Cheap",
188
+ "fastest": "Fast",
189
+ "insurable": "Insurable",
190
+ "insurance": "Insurance",
191
+ "insured": "Insured",
192
+ "recommended": "Recommended",
193
+ "safest": "Safe"
188
194
  },
189
195
  "to": "To",
190
196
  "tokenOnChain": "{{tokenSymbol}} on {{chainName}}",
@@ -197,8 +203,8 @@
197
203
  "deleteActiveSwaps": "Active swaps are only stored locally and can't be recovered if you delete them.",
198
204
  "deleteSwapHistory": "Swap history is only stored locally and can't be recovered if you delete it.",
199
205
  "highValueLoss": "The value of the received tokens is significantly lower than the swapped tokens and transaction cost.",
200
- "insufficientFunds": "You don't have enough funds to execute the swap.",
201
- "insufficientGas": "You need to add at least:",
206
+ "insufficientFunds": "You don't have enough funds to complete the swap.",
207
+ "insufficientGas": "You don't have enough gas to complete the swap. You need to add at least:",
202
208
  "rateChanged": "The exchange rate has changed. By continuing the swap, you'll accept the new rate.",
203
209
  "resetSettings": "This will reset your route priority, slippage, gas price, enabled bridges and exchanges."
204
210
  },
@@ -214,6 +220,7 @@
214
220
  }
215
221
  },
216
222
  "tooltip": {
223
+ "additionalProviderFee": "Additional bridges, DEXs, and service fees.",
217
224
  "estimatedNetworkFee": "Estimated network fee.",
218
225
  "estimatedTime": "Estimated swap execution time in minutes.",
219
226
  "notFound": {
package/cjs/i18n/it.json CHANGED
@@ -106,12 +106,14 @@
106
106
  "inProgress": "in corso",
107
107
  "info": {
108
108
  "message": {
109
+ "autoRefuel": "Livello basso di gas su {{chainName}}. Continuando avrai abbastanza gas per completare lo scambio.",
109
110
  "emptyActiveSwaps": "Gli scambi in corso verranno visualizzati qui. Una volta completati, saranno presenti nella cronologia di scambi.",
110
111
  "emptySwapHistory": "La cronologia di scambi viene memorizzata solo localmente e verrà cancellata se si cancellano i dati del browser.",
111
112
  "emptyTokenList": "Non siamo riusciti a trovare token sulla chain {{chainName}} o non ne hai. Riprova o scegli un'altra chain.",
112
113
  "routeNotFound": "Prova un'altra combinazione di token."
113
114
  },
114
115
  "title": {
116
+ "autoRefuel": "Ottieni gas",
115
117
  "emptyActiveSwaps": "Nessuno scambio attivo",
116
118
  "emptySwapHistory": "Nessuno scambio recente",
117
119
  "routeNotFound": "Nessuna rotta disponibile"
@@ -154,6 +156,7 @@
154
156
  "quotedAmount": "Totale quotato",
155
157
  "rateChange": "Tasso di scambio",
156
158
  "receiving": "In ricezione",
159
+ "refuelStepDetails": "Ottieni gas tramite {{tool}}",
157
160
  "routes": "Ottieni",
158
161
  "selectChain": "Chain",
159
162
  "selectChainAndToken": "Selezionare la chain ed il token",
@@ -162,6 +165,7 @@
162
165
  "sendToWallet": "Invia ad un altro portafoglio",
163
166
  "sentToAddress": "Inviati a {{address}}",
164
167
  "stepBridge": "Bridge",
168
+ "stepDetails": "{{tool}} tramite LI.FI",
165
169
  "stepSwap": "Scambio",
166
170
  "stepSwapAndBridge": "Scambia e bridge",
167
171
  "success": {
@@ -197,8 +201,8 @@
197
201
  "deleteActiveSwaps": "Gli scambi attivi vengono memorizzati solo localmente e non possono essere recuperati se vengono cancellati.",
198
202
  "deleteSwapHistory": "La cronologia degli scambi viene memorizzata solo localmente e, se cancellata, non può essere recuperata.",
199
203
  "highValueLoss": "Il valore dei token ricevuti è significativamente inferiore ai token scambiati più il costo della transazione.",
200
- "insufficientFunds": "Non hai abbastanza fondi per eseguire lo scambio.",
201
- "insufficientGas": "È necessario aggiungere almeno:",
204
+ "insufficientFunds": "Non hai abbastanza fondi per completare lo scambio.",
205
+ "insufficientGas": "Non hai abbastanza gas per completare lo scambio. Devi aggiungere almeno:",
202
206
  "rateChanged": "Il tasso di scambio è cambiato. Se procedi, confermi di accettare il nuovo tasso.",
203
207
  "resetSettings": "Questo porterà al ripristino della priorità di route, slittamento di prezzo, prezzo del gas, bridge abilitati ed exchanges."
204
208
  },