@lifi/widget 1.32.7 → 2.0.0-alpha.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 (309) hide show
  1. package/App.js +3 -3
  2. package/AppDrawer.js +4 -3
  3. package/AppDrawer.style.d.ts +5 -5
  4. package/cjs/App.js +3 -3
  5. package/cjs/AppDrawer.js +4 -3
  6. package/cjs/AppDrawer.style.d.ts +5 -5
  7. package/cjs/components/ActiveSwaps/ActiveSwaps.style.d.ts +3 -3
  8. package/cjs/components/Card/CardIconButton.d.ts +29 -0
  9. package/cjs/components/Card/CardIconButton.js +17 -0
  10. package/cjs/components/Card/CardLabel.d.ts +26 -0
  11. package/cjs/components/Card/CardLabel.js +45 -0
  12. package/cjs/components/Card/CardTitle.d.ts +2 -2
  13. package/cjs/components/Card/index.d.ts +2 -0
  14. package/cjs/components/Card/index.js +2 -0
  15. package/cjs/components/GasMessage/FundsSufficiencyMessage.d.ts +1 -0
  16. package/cjs/components/GasMessage/FundsSufficiencyMessage.js +16 -0
  17. package/cjs/components/{GasSufficiencyMessage/GasSufficiencyMessage.d.ts → GasMessage/GasMessage.d.ts} +4 -2
  18. package/cjs/components/GasMessage/GasMessage.js +19 -0
  19. package/cjs/components/GasMessage/GasMessage.style.d.ts +34 -0
  20. package/cjs/components/GasMessage/GasMessage.style.js +48 -0
  21. package/cjs/components/GasMessage/GasRefuelMessage.d.ts +3 -0
  22. package/cjs/components/GasMessage/GasRefuelMessage.js +26 -0
  23. package/cjs/components/GasMessage/GasSufficiencyMessage.d.ts +7 -0
  24. package/cjs/components/GasMessage/GasSufficiencyMessage.js +21 -0
  25. package/cjs/components/GasMessage/index.d.ts +2 -0
  26. package/cjs/components/GasMessage/index.js +18 -0
  27. package/cjs/components/Header/Header.style.d.ts +5 -5
  28. package/cjs/components/Header/NavigationHeader.js +4 -4
  29. package/cjs/components/Header/WalletHeader.js +5 -5
  30. package/cjs/components/Insurance/Insurance.d.ts +3 -0
  31. package/cjs/components/Insurance/Insurance.js +11 -0
  32. package/cjs/components/Insurance/InsuranceCard.d.ts +3 -0
  33. package/cjs/components/Insurance/InsuranceCard.js +20 -0
  34. package/cjs/components/Insurance/InsuranceCollapsed.d.ts +3 -0
  35. package/cjs/components/Insurance/InsuranceCollapsed.js +32 -0
  36. package/cjs/components/Insurance/index.d.ts +1 -0
  37. package/cjs/components/{GasSufficiencyMessage → Insurance}/index.js +1 -1
  38. package/cjs/components/Insurance/types.d.ts +14 -0
  39. package/cjs/components/Insurance/types.js +2 -0
  40. package/cjs/components/NFT/NFT.style.d.ts +1 -1
  41. package/cjs/components/PoweredBy/PoweredBy.style.d.ts +1 -1
  42. package/cjs/components/ReverseTokensButton/ReverseTokensButton.style.d.ts +2 -2
  43. package/cjs/components/SendToWallet/SendToWallet.js +31 -25
  44. package/cjs/components/SendToWallet/SendToWallet.style.d.ts +2 -2
  45. package/cjs/components/SendToWallet/SendToWalletButton.js +3 -3
  46. package/cjs/components/SmallAvatar.d.ts +2 -2
  47. package/cjs/components/Step/CircularProgress.style.d.ts +1 -1
  48. package/cjs/components/Step/DestinationWalletAddress.js +2 -2
  49. package/cjs/components/Step/GasStepProcess.js +2 -2
  50. package/cjs/components/Step/Step.js +7 -5
  51. package/cjs/components/Step/StepList.d.ts +1 -1
  52. package/cjs/components/Step/StepProcess.style.d.ts +3 -3
  53. package/cjs/components/StepActions/StepActions.d.ts +5 -0
  54. package/cjs/components/StepActions/StepActions.js +55 -17
  55. package/cjs/components/StepActions/StepActions.style.d.ts +1 -1
  56. package/cjs/components/SwapButton/SwapButton.js +2 -2
  57. package/cjs/components/SwapButton/types.d.ts +1 -2
  58. package/cjs/components/SwapInput/SwapInput.style.d.ts +2 -2
  59. package/cjs/components/SwapInput/SwapInputAdornment.style.d.ts +3 -3
  60. package/cjs/components/SwapInput/SwapInputEndAdornment.js +18 -1
  61. package/cjs/components/SwapRouteCard/SwapRouteCard.d.ts +1 -2
  62. package/cjs/components/SwapRouteCard/SwapRouteCard.js +10 -26
  63. package/cjs/components/SwapRouteCard/SwapRouteCard.style.d.ts +4 -36
  64. package/cjs/components/SwapRouteCard/SwapRouteCard.style.js +7 -38
  65. package/cjs/components/SwapRouteCard/SwapRouteCardEssentials.d.ts +3 -0
  66. package/cjs/components/SwapRouteCard/SwapRouteCardEssentials.js +27 -0
  67. package/cjs/components/SwapRouteCard/SwapRouteCardSkeleton.js +5 -5
  68. package/cjs/components/SwapRouteCard/types.d.ts +2 -2
  69. package/cjs/components/SwapRouteCard/utils.d.ts +5 -0
  70. package/cjs/components/SwapRouteCard/utils.js +32 -2
  71. package/cjs/components/SwapRoutes/SwapRoutes.js +3 -12
  72. package/cjs/components/SwapRoutes/SwapRoutesExpanded.js +3 -5
  73. package/cjs/components/SwapRoutes/{SwapRoutes.style.d.ts → SwapRoutesExpanded.style.d.ts} +0 -9
  74. package/cjs/components/SwapRoutes/{SwapRoutes.style.js → SwapRoutesExpanded.style.js} +1 -12
  75. package/cjs/components/Switch.js +4 -4
  76. package/cjs/components/TextFitter/TextFitter.js +9 -3
  77. package/cjs/components/Token/Token.style.d.ts +2 -2
  78. package/cjs/config/theme.js +1 -1
  79. package/cjs/config/version.d.ts +1 -1
  80. package/cjs/config/version.js +1 -1
  81. package/cjs/hooks/index.d.ts +4 -0
  82. package/cjs/hooks/index.js +4 -0
  83. package/cjs/hooks/useChains.js +2 -2
  84. package/cjs/hooks/useFeaturedTokens.d.ts +1 -1
  85. package/cjs/hooks/useFeaturedTokens.js +2 -2
  86. package/cjs/hooks/useFundsSufficiency.d.ts +5 -0
  87. package/cjs/hooks/useFundsSufficiency.js +73 -0
  88. package/cjs/hooks/useGasRecommendation.d.ts +2 -0
  89. package/cjs/hooks/useGasRecommendation.js +23 -0
  90. package/cjs/hooks/useGasRefuel.d.ts +7 -0
  91. package/cjs/hooks/useGasRefuel.js +61 -0
  92. package/cjs/hooks/useGasSufficiency.d.ts +2 -3
  93. package/cjs/hooks/useGasSufficiency.js +6 -37
  94. package/cjs/hooks/useGetTokenBalancesWithRetry.d.ts +3 -0
  95. package/cjs/hooks/useGetTokenBalancesWithRetry.js +33 -0
  96. package/cjs/hooks/useSwapRoutes.d.ts +7 -2
  97. package/cjs/hooks/useSwapRoutes.js +31 -11
  98. package/cjs/hooks/useTokenAddressBalance.js +4 -2
  99. package/cjs/hooks/useTokenBalance.js +4 -22
  100. package/cjs/hooks/useTokenBalances.d.ts +1 -1
  101. package/cjs/hooks/useTokenSearch.js +2 -2
  102. package/cjs/hooks/useTokens.js +2 -3
  103. package/cjs/i18n/en.json +14 -7
  104. package/cjs/i18n/it.json +6 -2
  105. package/cjs/i18n/pt.json +234 -0
  106. package/cjs/i18n/uk.json +5 -1
  107. package/cjs/icons/InsuraceLogo.d.ts +2 -0
  108. package/cjs/icons/InsuraceLogo.js +11 -0
  109. package/cjs/icons/index.d.ts +1 -0
  110. package/cjs/icons/index.js +1 -0
  111. package/cjs/index.d.ts +0 -6
  112. package/cjs/index.js +1 -6
  113. package/cjs/pages/MainPage/MainGasMessage.d.ts +3 -0
  114. package/cjs/pages/MainPage/MainGasMessage.js +12 -0
  115. package/cjs/pages/MainPage/MainPage.js +3 -2
  116. package/cjs/pages/MainPage/MainSwapButton.js +1 -1
  117. package/cjs/pages/SettingsPage/ColorSchemeButtonGroup.js +2 -2
  118. package/cjs/pages/SettingsPage/ColorSchemeButtonGroup.style.d.ts +2 -2
  119. package/cjs/pages/SettingsPage/ResetSettingsButton.js +3 -1
  120. package/cjs/pages/SettingsPage/RoutePrioritySelect.js +1 -1
  121. package/cjs/pages/SwapDetailsPage/SwapDetailsPage.js +4 -3
  122. package/cjs/pages/SwapPage/ExchangeRateBottomSheet.d.ts +1 -2
  123. package/cjs/pages/SwapPage/ExchangeRateBottomSheet.js +1 -14
  124. package/cjs/pages/SwapPage/StartSwapButton.d.ts +3 -2
  125. package/cjs/pages/SwapPage/StartSwapButton.js +14 -4
  126. package/cjs/pages/SwapPage/SwapPage.js +18 -7
  127. package/cjs/pages/SwapPage/types.d.ts +9 -0
  128. package/cjs/pages/SwapPage/types.js +2 -0
  129. package/cjs/pages/SwapRoutesPage/SwapRoutesPage.js +1 -1
  130. package/cjs/providers/SDKProvider/SDKProvider.d.ts +2 -2
  131. package/cjs/providers/SDKProvider/SDKProvider.js +2 -1
  132. package/cjs/providers/SwapFormProvider/FormUpdater.js +2 -3
  133. package/cjs/providers/WidgetProvider/WidgetProvider.js +17 -4
  134. package/cjs/providers/WidgetProvider/utils.d.ts +1 -1
  135. package/cjs/providers/WidgetProvider/utils.js +2 -4
  136. package/cjs/stores/StoreProvider.js +1 -1
  137. package/cjs/stores/routes/createRouteExecutionStore.js +3 -2
  138. package/cjs/stores/routes/index.d.ts +0 -1
  139. package/cjs/stores/routes/index.js +0 -1
  140. package/cjs/stores/routes/types.d.ts +1 -5
  141. package/cjs/stores/routes/useSetExecutableRoute.d.ts +1 -1
  142. package/cjs/stores/settings/types.d.ts +3 -2
  143. package/cjs/stores/settings/useSettingsStore.js +3 -1
  144. package/cjs/types/widget.d.ts +5 -10
  145. package/cjs/utils/format.js +4 -1
  146. package/components/ActiveSwaps/ActiveSwaps.style.d.ts +3 -3
  147. package/components/Card/CardIconButton.d.ts +29 -0
  148. package/components/Card/CardIconButton.js +14 -0
  149. package/components/Card/CardLabel.d.ts +26 -0
  150. package/components/Card/CardLabel.js +42 -0
  151. package/components/Card/CardTitle.d.ts +2 -2
  152. package/components/Card/index.d.ts +2 -0
  153. package/components/Card/index.js +2 -0
  154. package/components/GasMessage/FundsSufficiencyMessage.d.ts +1 -0
  155. package/components/GasMessage/FundsSufficiencyMessage.js +12 -0
  156. package/components/{GasSufficiencyMessage/GasSufficiencyMessage.d.ts → GasMessage/GasMessage.d.ts} +4 -2
  157. package/components/GasMessage/GasMessage.js +15 -0
  158. package/components/GasMessage/GasMessage.style.d.ts +34 -0
  159. package/components/GasMessage/GasMessage.style.js +45 -0
  160. package/components/GasMessage/GasRefuelMessage.d.ts +3 -0
  161. package/components/GasMessage/GasRefuelMessage.js +22 -0
  162. package/components/GasMessage/GasSufficiencyMessage.d.ts +7 -0
  163. package/components/GasMessage/GasSufficiencyMessage.js +17 -0
  164. package/components/GasMessage/index.d.ts +2 -0
  165. package/components/GasMessage/index.js +2 -0
  166. package/components/Header/Header.style.d.ts +5 -5
  167. package/components/Header/NavigationHeader.js +4 -4
  168. package/components/Header/WalletHeader.js +6 -6
  169. package/components/Insurance/Insurance.d.ts +3 -0
  170. package/components/Insurance/Insurance.js +7 -0
  171. package/components/Insurance/InsuranceCard.d.ts +3 -0
  172. package/components/Insurance/InsuranceCard.js +16 -0
  173. package/components/Insurance/InsuranceCollapsed.d.ts +3 -0
  174. package/components/Insurance/InsuranceCollapsed.js +28 -0
  175. package/components/Insurance/index.d.ts +1 -0
  176. package/components/Insurance/index.js +1 -0
  177. package/components/Insurance/types.d.ts +14 -0
  178. package/components/Insurance/types.js +1 -0
  179. package/components/NFT/NFT.style.d.ts +1 -1
  180. package/components/PoweredBy/PoweredBy.style.d.ts +1 -1
  181. package/components/ReverseTokensButton/ReverseTokensButton.style.d.ts +2 -2
  182. package/components/SendToWallet/SendToWallet.js +34 -28
  183. package/components/SendToWallet/SendToWallet.style.d.ts +2 -2
  184. package/components/SendToWallet/SendToWalletButton.js +4 -4
  185. package/components/SmallAvatar.d.ts +2 -2
  186. package/components/Step/CircularProgress.style.d.ts +1 -1
  187. package/components/Step/DestinationWalletAddress.js +2 -2
  188. package/components/Step/GasStepProcess.js +2 -2
  189. package/components/Step/Step.js +7 -5
  190. package/components/Step/StepList.d.ts +1 -1
  191. package/components/Step/StepProcess.style.d.ts +3 -3
  192. package/components/StepActions/StepActions.d.ts +5 -0
  193. package/components/StepActions/StepActions.js +52 -16
  194. package/components/StepActions/StepActions.style.d.ts +1 -1
  195. package/components/SwapButton/SwapButton.js +2 -2
  196. package/components/SwapButton/types.d.ts +1 -2
  197. package/components/SwapInput/SwapInput.style.d.ts +2 -2
  198. package/components/SwapInput/SwapInputAdornment.style.d.ts +3 -3
  199. package/components/SwapInput/SwapInputEndAdornment.js +19 -2
  200. package/components/SwapRouteCard/SwapRouteCard.d.ts +1 -2
  201. package/components/SwapRouteCard/SwapRouteCard.js +11 -26
  202. package/components/SwapRouteCard/SwapRouteCard.style.d.ts +4 -36
  203. package/components/SwapRouteCard/SwapRouteCard.style.js +7 -38
  204. package/components/SwapRouteCard/SwapRouteCardEssentials.d.ts +3 -0
  205. package/components/SwapRouteCard/SwapRouteCardEssentials.js +23 -0
  206. package/components/SwapRouteCard/SwapRouteCardSkeleton.js +5 -5
  207. package/components/SwapRouteCard/types.d.ts +2 -2
  208. package/components/SwapRouteCard/utils.d.ts +5 -0
  209. package/components/SwapRouteCard/utils.js +30 -1
  210. package/components/SwapRoutes/SwapRoutes.js +5 -14
  211. package/components/SwapRoutes/SwapRoutesExpanded.js +2 -4
  212. package/components/SwapRoutes/{SwapRoutes.style.d.ts → SwapRoutesExpanded.style.d.ts} +0 -9
  213. package/components/SwapRoutes/{SwapRoutes.style.js → SwapRoutesExpanded.style.js} +1 -12
  214. package/components/Switch.js +5 -5
  215. package/components/TextFitter/TextFitter.js +9 -3
  216. package/components/Token/Token.style.d.ts +2 -2
  217. package/config/theme.js +1 -1
  218. package/config/version.d.ts +1 -1
  219. package/config/version.js +1 -1
  220. package/hooks/index.d.ts +4 -0
  221. package/hooks/index.js +4 -0
  222. package/hooks/useChains.js +2 -2
  223. package/hooks/useFeaturedTokens.d.ts +1 -1
  224. package/hooks/useFeaturedTokens.js +2 -2
  225. package/hooks/useFundsSufficiency.d.ts +5 -0
  226. package/hooks/useFundsSufficiency.js +69 -0
  227. package/hooks/useGasRecommendation.d.ts +2 -0
  228. package/hooks/useGasRecommendation.js +19 -0
  229. package/hooks/useGasRefuel.d.ts +7 -0
  230. package/hooks/useGasRefuel.js +57 -0
  231. package/hooks/useGasSufficiency.d.ts +2 -3
  232. package/hooks/useGasSufficiency.js +7 -38
  233. package/hooks/useGetTokenBalancesWithRetry.d.ts +3 -0
  234. package/hooks/useGetTokenBalancesWithRetry.js +29 -0
  235. package/hooks/useSwapRoutes.d.ts +7 -2
  236. package/hooks/useSwapRoutes.js +32 -12
  237. package/hooks/useTokenAddressBalance.js +4 -2
  238. package/hooks/useTokenBalance.js +5 -23
  239. package/hooks/useTokenBalances.d.ts +1 -1
  240. package/hooks/useTokenSearch.js +2 -2
  241. package/hooks/useTokens.js +2 -3
  242. package/i18n/en.json +14 -7
  243. package/i18n/it.json +6 -2
  244. package/i18n/pt.json +234 -0
  245. package/i18n/uk.json +5 -1
  246. package/icons/InsuraceLogo.d.ts +2 -0
  247. package/icons/InsuraceLogo.js +7 -0
  248. package/icons/index.d.ts +1 -0
  249. package/icons/index.js +1 -0
  250. package/index.d.ts +0 -6
  251. package/index.js +0 -5
  252. package/package.json +12 -11
  253. package/pages/ActiveSwapsPage/ActiveSwapsPage.js +2 -2
  254. package/pages/MainPage/MainGasMessage.d.ts +3 -0
  255. package/pages/MainPage/MainGasMessage.js +8 -0
  256. package/pages/MainPage/MainPage.js +3 -2
  257. package/pages/MainPage/MainSwapButton.js +1 -1
  258. package/pages/SettingsPage/ColorSchemeButtonGroup.js +2 -2
  259. package/pages/SettingsPage/ColorSchemeButtonGroup.style.d.ts +2 -2
  260. package/pages/SettingsPage/ResetSettingsButton.js +3 -1
  261. package/pages/SettingsPage/RoutePrioritySelect.js +1 -1
  262. package/pages/SwapDetailsPage/SwapDetailsPage.js +5 -4
  263. package/pages/SwapHistoryPage/SwapHistoryPage.js +2 -2
  264. package/pages/SwapPage/ExchangeRateBottomSheet.d.ts +1 -2
  265. package/pages/SwapPage/ExchangeRateBottomSheet.js +0 -12
  266. package/pages/SwapPage/StartSwapButton.d.ts +3 -2
  267. package/pages/SwapPage/StartSwapButton.js +13 -4
  268. package/pages/SwapPage/SwapPage.js +21 -10
  269. package/pages/SwapPage/types.d.ts +9 -0
  270. package/pages/SwapPage/types.js +1 -0
  271. package/pages/SwapRoutesPage/SwapRoutesPage.js +1 -1
  272. package/providers/SDKProvider/SDKProvider.d.ts +2 -2
  273. package/providers/SDKProvider/SDKProvider.js +3 -2
  274. package/providers/SwapFormProvider/FormUpdater.js +2 -3
  275. package/providers/WidgetProvider/WidgetProvider.js +17 -4
  276. package/providers/WidgetProvider/utils.d.ts +1 -1
  277. package/providers/WidgetProvider/utils.js +2 -4
  278. package/stores/StoreProvider.js +2 -2
  279. package/stores/routes/createRouteExecutionStore.js +3 -2
  280. package/stores/routes/index.d.ts +0 -1
  281. package/stores/routes/index.js +0 -1
  282. package/stores/routes/types.d.ts +1 -5
  283. package/stores/routes/useSetExecutableRoute.d.ts +1 -1
  284. package/stores/settings/types.d.ts +3 -2
  285. package/stores/settings/useSettingsStore.js +3 -1
  286. package/tsconfig.cjs.tsbuildinfo +1 -1
  287. package/types/widget.d.ts +5 -10
  288. package/utils/format.js +4 -1
  289. package/cjs/components/GasSufficiencyMessage/GasSufficiencyMessage.js +0 -31
  290. package/cjs/components/GasSufficiencyMessage/GasSufficiencyMessage.style.d.ts +0 -9
  291. package/cjs/components/GasSufficiencyMessage/GasSufficiencyMessage.style.js +0 -14
  292. package/cjs/components/GasSufficiencyMessage/index.d.ts +0 -1
  293. package/cjs/components/SwapRoutes/useSetRecommendedRoute.d.ts +0 -2
  294. package/cjs/components/SwapRoutes/useSetRecommendedRoute.js +0 -13
  295. package/cjs/config/env.d.ts +0 -3
  296. package/cjs/config/env.js +0 -6
  297. package/cjs/stores/routes/useRecommendedRouteStore.d.ts +0 -10
  298. package/cjs/stores/routes/useRecommendedRouteStore.js +0 -39
  299. package/components/GasSufficiencyMessage/GasSufficiencyMessage.js +0 -27
  300. package/components/GasSufficiencyMessage/GasSufficiencyMessage.style.d.ts +0 -9
  301. package/components/GasSufficiencyMessage/GasSufficiencyMessage.style.js +0 -11
  302. package/components/GasSufficiencyMessage/index.d.ts +0 -1
  303. package/components/GasSufficiencyMessage/index.js +0 -1
  304. package/components/SwapRoutes/useSetRecommendedRoute.d.ts +0 -2
  305. package/components/SwapRoutes/useSetRecommendedRoute.js +0 -9
  306. package/config/env.d.ts +0 -3
  307. package/config/env.js +0 -3
  308. package/stores/routes/useRecommendedRouteStore.d.ts +0 -10
  309. package/stores/routes/useRecommendedRouteStore.js +0 -32
@@ -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
  },
@@ -0,0 +1,234 @@
1
+ {
2
+ "button": {
3
+ "auto": "Automático",
4
+ "cancel": "Cancelar",
5
+ "connectWallet": "Conectar carteira",
6
+ "contactSupport": "Falar com o suporte",
7
+ "continue": "Continuar",
8
+ "copyAddress": "Copiar endereço",
9
+ "dark": "Escuro",
10
+ "delete": "Apagar",
11
+ "disconnect": "Desconectar",
12
+ "done": "Concluído",
13
+ "getGas": "Obter gás",
14
+ "hide": "Ocultar",
15
+ "lifiSwap": "Conversão LI.FI",
16
+ "light": "Claro",
17
+ "max": "máximo",
18
+ "ok": "Tudo certo",
19
+ "okay": "Ok",
20
+ "removeSwap": "Remover conversão",
21
+ "reset": "Redefinir",
22
+ "resetSettings": "Redefinir as configurações",
23
+ "restartSwap": "Reiniciar a conversão",
24
+ "reviewGasSwap": "Rever o gás de conversão",
25
+ "reviewSwap": "Rever conversão",
26
+ "seeDetails": "Ver detalhes",
27
+ "showAll": "Mostrar tudo",
28
+ "startGasSwap": "Iniciar conversão de gás",
29
+ "startSwap": "Iniciar conversão",
30
+ "swap": "Conversão",
31
+ "tryAgain": "Tente novamente",
32
+ "viewOnExplorer": "Ver no explorador"
33
+ },
34
+ "format": {
35
+ "currency": "{{value, currency(currency: USD)}}",
36
+ "number": "{{value, number(maximumFractionDigits: 9)}}"
37
+ },
38
+ "header": {
39
+ "activeSwaps": "Conversões ativas",
40
+ "checkout": "Finalizar",
41
+ "from": "Converter a partir de",
42
+ "gas": "Gás",
43
+ "gasSwap": "Conversão de gás",
44
+ "routes": "Você recebe",
45
+ "selectChain": "Selecionar uma rede",
46
+ "selectWallet": "Selecionar sua carteira",
47
+ "settings": "Configurações",
48
+ "swap": "Conversão",
49
+ "swapDetails": "Detalhes da conversão",
50
+ "swapHistory": "Histórico de conversões",
51
+ "to": "Converter para",
52
+ "walletConnected": "Carteira conectada"
53
+ },
54
+ "language": {
55
+ "name": "Português",
56
+ "title": "Idioma"
57
+ },
58
+ "settings": {
59
+ "enabledBridges": "Pontes habilitadas",
60
+ "enabledExchanges": "Corretoras habilitadas",
61
+ "gasPrice": {
62
+ "fast": "Rápido",
63
+ "normal": "Normal",
64
+ "slow": "Lento",
65
+ "title": "Preço do gás"
66
+ },
67
+ "routePriority": "Prioridade de rota / caminho",
68
+ "showDestinationWallet": "Mostrar carteira de destino",
69
+ "slippage": "Derrapagem"
70
+ },
71
+ "swap": {
72
+ "crossStepDetails": "Ponte de {{from}} para {{to}} via {{tool}}",
73
+ "currentAmount": "Quantidade atual",
74
+ "error": {
75
+ "message": {
76
+ "slippageThreshold": "A derrapagem é maior do que o limite definido. Solicite uma nova rota para obter uma nova cotação.",
77
+ "transactionFailed": "Por favor, verifique o explorador de blocos para mais informações.",
78
+ "transactionNotSent": "A transação não foi enviada. {{amount, number(maximumFractionDigits: 9)}} {{tokenSymbol}} na {{chainName}} permanece na sua carteira.",
79
+ "transactionRejected": "Sua assinatura é necessária para completar a transação. {{amount, number(maximumFractionDigits: 9)}} {{tokenSymbol}} em {{chainName}} permanece na sua carteira.",
80
+ "unknown": "Por favor, tente novamente ou fale com o suporte."
81
+ },
82
+ "title": {
83
+ "balanceIsTooLow": "O saldo é muito baixo",
84
+ "chainSwitch": "Necessário mudança de rede",
85
+ "failed": "Conversão falhou",
86
+ "gasLimitIsTooLow": "O limite de gás é muito baixo",
87
+ "slippageNotMet": "Condições de tolerância a discrepâncias não foram atendidas",
88
+ "transactionCanceled": "Transação cancelada",
89
+ "transactionFailed": "Transação falhou",
90
+ "transactionRejected": "Necessário assinatura",
91
+ "transactionUnderpriced": "Transação está abaixo do valor",
92
+ "transactionUnprepared": "Não foi possível preparar a transação",
93
+ "unknown": "Algo deu errado",
94
+ "walletAddressInvalid": "Endereço da carteira é inválido.",
95
+ "walletAddressRequired": "Endereço da carteira é necessário.",
96
+ "walletEnsAddressInvalid": "O endereço da carteira é inválido ou a rede não suporta ENS."
97
+ }
98
+ },
99
+ "estimatedTime": "{{value}}minutos",
100
+ "featuredTokens": "Tokens em destaque",
101
+ "from": "De",
102
+ "fromAmount": "Você paga",
103
+ "gasCost": "Custo do gás",
104
+ "gasFeeEstimated": "Taxa de gás estimada",
105
+ "gasFeePaid": "taxa de gás paga",
106
+ "inProgress": "em andamento",
107
+ "info": {
108
+ "message": {
109
+ "autoRefuel": "Você está com pouco gás na rede {{chainName}}. Ao continuar, você obterá gás suficiente para completar a conversão.",
110
+ "emptyActiveSwaps": "Conversões em andamento aparecerão aqui. Uma vez concluídas, encontre-as no histórico de conversão.",
111
+ "emptySwapHistory": "Histórico de conversão é armazenado apenas localmente e será excluído se você limpar os dados do seu navegador.",
112
+ "emptyTokenList": "Não conseguimos encontrar tokens na rede {{chainName}} ou você não possui nenhum. Por favor, tente procurar novamente ou escolha outra rede.",
113
+ "routeNotFound": "Tente outra combinação de tokens."
114
+ },
115
+ "title": {
116
+ "autoRefuel": "Obter gás",
117
+ "emptyActiveSwaps": "Não há conversões ativas",
118
+ "emptySwapHistory": "Não há conversões recentes",
119
+ "routeNotFound": "Nenhuma rota disponível"
120
+ }
121
+ },
122
+ "nftStepDetails": "Comprar NFT via {{tool}}",
123
+ "onChain": "em {{nome da rede}}",
124
+ "otherTokens": "Outros tokens",
125
+ "ownedBy": "Possuído por",
126
+ "payWith": "Pagar com",
127
+ "process": {
128
+ "crossChain": {
129
+ "actionRequired": "Por favor, assine a transação",
130
+ "done": "Transação da ponte confirmada",
131
+ "pending": "Aguardando a transação da ponte",
132
+ "started": "Preparando a transação da ponte"
133
+ },
134
+ "receivingChain": {
135
+ "done": "Ponte concluída",
136
+ "partial": "Ponte parcialmente concluída",
137
+ "pending": "Aguardando a rede de destino",
138
+ "refunded": "Transação de ponte reembolsada"
139
+ },
140
+ "swap": {
141
+ "actionRequired": "Por favor, assine a transação",
142
+ "done": "Conversão concluída",
143
+ "pending": "Aguardando a transação de conversão",
144
+ "started": "Preparando a transação de conversão"
145
+ },
146
+ "switchChain": {
147
+ "actionRequired": "Necessário mudança de rede",
148
+ "done": "Rede alterada com sucesso"
149
+ },
150
+ "tokenAllowance": {
151
+ "done": "Permissão de token aprovada",
152
+ "pending": "Aguardando a permissão do token",
153
+ "started": "Configurando a permissão do token"
154
+ }
155
+ },
156
+ "quotedAmount": "Valor da cotação",
157
+ "rateChange": "Alterar taxa",
158
+ "receiving": "Recebendo",
159
+ "refuelStepDetails": "Obter gás via {{tool}}",
160
+ "routes": "Você recebe",
161
+ "selectChain": "Rede",
162
+ "selectChainAndToken": "Selecione a rede e o token",
163
+ "selectToken": "Token",
164
+ "sendToAddress": "Enviar para",
165
+ "sendToWallet": "Enviar para uma carteira diferente",
166
+ "sentToAddress": "Enviar para",
167
+ "stepBridge": "Ponte",
168
+ "stepDetails": "{{tool}} via LI.FI",
169
+ "stepSwap": "Conversão",
170
+ "stepSwapAndBridge": "Converter e enviar pela ponte",
171
+ "success": {
172
+ "message": {
173
+ "swapPartiallySuccessful": "Tentamos completar a conversão, mas a {{tool}} ficou sem liquidez para o token {{tokenSymbol}}.",
174
+ "swapSuccessful": "Agora há {{amount, number(maximumFractionDigits: 9)}} {{tokenSymbol}} na carteira {{walletAddress}} na rede {{chainName}}."
175
+ },
176
+ "title": {
177
+ "gasSwapSuccessful": "Conversão de gás bem sucedida",
178
+ "refundIssued": "Reembolso emitido",
179
+ "swapPartiallySuccessful": "Conversão parcialmente bem sucedida",
180
+ "swapSuccessful": "Conversão bem sucedida"
181
+ }
182
+ },
183
+ "supportId": "ID de suporte",
184
+ "swapStepDetails": "Converter na {{chain}} via {{tool}}",
185
+ "swapping": "Convertendo",
186
+ "tags": {
187
+ "ALTERNATIVE": "ALTERNATIVA",
188
+ "CHEAPEST": "MAIS BARATO",
189
+ "FASTEST": "MAIS RÁPIDO",
190
+ "RECOMMENDED": "RECOMENDADO",
191
+ "SAFEST": "MAIS SEGURO"
192
+ },
193
+ "to": "Para",
194
+ "tokenOnChain": "{{tokenSymbol}} na {{chainName}}",
195
+ "tokenOnChainAmount": "{{amount, number(maximumFractionDigits: 9)}} {{tokenSymbol}} na {{chainName}}",
196
+ "tokenSearch": "Pesquisar seu token",
197
+ "valueLoss": "Perda de Valor",
198
+ "walletAddressOrEns": "Endereço da carteira ou nome ENS",
199
+ "warning": {
200
+ "message": {
201
+ "deleteActiveSwaps": "As conversões ativas são armazenadas apenas localmente e não podem ser recuperadas se forem excluídas.",
202
+ "deleteSwapHistory": "O histórico de conversões é armazenado apenas localmente e não pode ser recuperado caso seja excluído.",
203
+ "highValueLoss": "A quantidade de tokens a serem recebidos é significativamente menor do que os tokens convertidos e os custos da transação.",
204
+ "insufficientFunds": "Você não possui fundos suficientes para completar a conversão.",
205
+ "insufficientGas": "Você não tem gás suficiente para completar a conversão. É necessário adicionar pelo menos:",
206
+ "rateChanged": "A taxa de câmbio mudou. Ao continuar a conversão, você aceitará a nova taxa.",
207
+ "resetSettings": "Isto redefinirá sua prioridade de rota, tolerância a derrapagem, preço de gás, pontes e trocas ativadas."
208
+ },
209
+ "title": {
210
+ "deleteActiveSwaps": "Excluir todas as conversões ativas?",
211
+ "deleteSwap": "Excluir esta conversão?",
212
+ "deleteSwapHistory": "Excluir o histórico de conversão?",
213
+ "highValueLoss": "Alta perda de valor",
214
+ "insufficientGas": "Gás insuficiente",
215
+ "rateChanged": "Taxa alterada",
216
+ "resetSettings": "Redefinir as configurações?"
217
+ }
218
+ }
219
+ },
220
+ "tooltip": {
221
+ "estimatedNetworkFee": "Taxa de rede estimada.",
222
+ "estimatedTime": "Tempo de execução da conversão estimado em minutos.",
223
+ "notFound": {
224
+ "text": "Não conseguimos encontrar esta página.",
225
+ "title": "404"
226
+ },
227
+ "numberOfSteps": "Um número de passos para a conversão. Cada etapa pode conter 1-2 transações que requerem uma assinatura.",
228
+ "progressToNextUpdate": "Os dados exibidos serão atualizados automaticamente após {{value}} segundos. Clique aqui para atualizar manualmente.",
229
+ "settingsModified": "Configurações (modificado)"
230
+ },
231
+ "wallet": {
232
+ "extensionNotFound": "Por favor, certifique-se de que apenas a extensão do navegador da {{name}} está ativa antes de escolher esta carteira."
233
+ }
234
+ }
package/cjs/i18n/uk.json CHANGED
@@ -106,12 +106,14 @@
106
106
  "inProgress": "в процесі",
107
107
  "info": {
108
108
  "message": {
109
+ "autoRefuel": "У вас замало {{chainName}} газу. Продовжуючи, ви отримаєте достатньо газу, щоб завершити обмін.",
109
110
  "emptyActiveSwaps": "Тут відображатимуться незавершені свопи. Після завершення ви можете знайти їх в історії свопів.",
110
111
  "emptySwapHistory": "Історія свопів зберігається лише локально та буде видалена, якщо ви очистите дані браузера.",
111
112
  "emptyTokenList": "Нам не вдалося знайти токени на {{chainName}}, або у вас їх немає. Будь ласка, повторіть пошук або виберіть інший чейн.",
112
113
  "routeNotFound": "Спробуйте іншу комбінацію токенів."
113
114
  },
114
115
  "title": {
116
+ "autoRefuel": "Отримати газ",
115
117
  "emptyActiveSwaps": "Немає активних свопів",
116
118
  "emptySwapHistory": "Немає останніх свопів",
117
119
  "routeNotFound": "Немає доступних маршрутів"
@@ -154,6 +156,7 @@
154
156
  "quotedAmount": "Запропонована сума",
155
157
  "rateChange": "Зміна курсу",
156
158
  "receiving": "Отримання",
159
+ "refuelStepDetails": "Отримати газ через {{tool}}",
157
160
  "routes": "Ви отримуєте",
158
161
  "selectChain": "Чейн",
159
162
  "selectChainAndToken": "Виберіть чейн і токен",
@@ -162,6 +165,7 @@
162
165
  "sendToWallet": "Надіслати на інший гаманець",
163
166
  "sentToAddress": "Відправлено на {{address}}",
164
167
  "stepBridge": "Брідж",
168
+ "stepDetails": "{{tool}} через LI.FI",
165
169
  "stepSwap": "Своп",
166
170
  "stepSwapAndBridge": "Своп та брідж",
167
171
  "success": {
@@ -198,7 +202,7 @@
198
202
  "deleteSwapHistory": "Історія свопів зберігається лише локально й не може бути відновлена, якщо ви їх видалите.",
199
203
  "highValueLoss": "Вартість отриманих токенів значно нижча, ніж обмінені токени та вартість транзакції.",
200
204
  "insufficientFunds": "У вас недостатньо коштів для здійснення свопу.",
201
- "insufficientGas": "Потрібно додати хоча б:",
205
+ "insufficientGas": "Для завершення свопа у вас недостатньо газу. Вам необхідно додати хоча б:",
202
206
  "rateChanged": "Курс обміну змінився. Продовжуючи своп, ви приймете новий курс.",
203
207
  "resetSettings": "Це скине пріоритет вашого маршруту, прослизання, ціну газу, увімкнені мости та обмінники."
204
208
  },
@@ -0,0 +1,2 @@
1
+ import type { SVGProps } from 'react';
2
+ export declare const InsuraceLogo: (props: SVGProps<SVGSVGElement>) => JSX.Element;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InsuraceLogo = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const material_1 = require("@mui/material");
6
+ const InsuraceLogo = (props) => {
7
+ const theme = (0, material_1.useTheme)();
8
+ const insurColor = theme.palette.mode === 'light' ? '#1C4332' : theme.palette.common.white;
9
+ return ((0, jsx_runtime_1.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "58", height: "20", fill: "none", ...props, children: [(0, jsx_runtime_1.jsx)("path", { fill: insurColor, fillRule: "evenodd", d: "M42.887 3.894a2.104 2.104 0 0 0-1.304.405 1.259 1.259 0 0 0-.544 1.046c0 .683.509 1.15 1.527 1.401.483.12.817.236 1 .345.184.11.276.234.276.373a.36.36 0 0 1-.227.331 1.25 1.25 0 0 1-.568.115c-.66 0-1.292-.25-1.896-.753V8.23c.473.418 1.082.637 1.826.656h.055c.46.01.912-.12 1.297-.37a1.19 1.19 0 0 0 .558-1.053c0-.734-.51-1.229-1.527-1.485a.532.532 0 0 1-.084-.02l-.097-.022a5.483 5.483 0 0 1-.826-.258c-.18-.079-.269-.192-.269-.341a.38.38 0 0 1 .23-.341c.178-.09.374-.133.572-.126.303.006.602.061.886.164a4 4 0 0 1 .906.443V4.41a3.55 3.55 0 0 0-1.791-.516Zm-11.621.056h1.052v4.88h-1.052V3.95Zm5.014 0 1.638 3.876V3.95h1.025v4.88h-1.625l-1.687-4.002V8.83h-1.025V3.95h1.674Zm10.56.007h1.053v2.9c-.007.28.102.55.3.746a.972.972 0 0 0 .711.3.982.982 0 0 0 .715-.3c.2-.196.31-.466.303-.746v-2.9h1.046v2.9c.013.543-.2 1.067-.59 1.447a2.158 2.158 0 0 1-2.941.007 1.934 1.934 0 0 1-.596-1.454v-2.9Zm9.283 1.653a.714.714 0 0 1-.718.71h-1.179V4.891h1.178a.7.7 0 0 1 .51.206.68.68 0 0 1 .209.505v.008ZM53.18 3.95v4.88h1.045V7.226h.823l.969 1.604h1.185l-1.046-1.736c.29-.114.538-.316.708-.578.176-.26.27-.565.268-.879a1.617 1.617 0 0 0-.505-1.185 1.673 1.673 0 0 0-1.224-.502h-2.223Z", clipRule: "evenodd" }), (0, jsx_runtime_1.jsx)("path", { fill: "#28DA98", fillRule: "evenodd", d: "M32.366 13.05a1.27 1.27 0 0 0 .37.914c.238.252.57.391.917.383a1.317 1.317 0 0 0 1.296-1.296 1.267 1.267 0 0 0-.383-.913 1.233 1.233 0 0 0-.913-.393 1.216 1.216 0 0 0-.918.388c-.24.245-.373.575-.37.918Zm-.53-1.78a2.274 2.274 0 0 1 1.69-.721c.49-.01.966.166 1.332.493v-.411h1.324v4.838h-1.324v-.401c-.37.318-.845.488-1.333.475a2.252 2.252 0 0 1-1.684-.74 2.45 2.45 0 0 1-.708-1.752 2.471 2.471 0 0 1 .704-1.78v-.001Zm7.093 0c.461-.47 1.095-.73 1.753-.721.5-.006.99.148 1.397.438.408.284.72.685.895 1.15l-1.205.347a1.274 1.274 0 0 0-.434-.543 1.095 1.095 0 0 0-.652-.206 1.174 1.174 0 0 0-.895.393 1.31 1.31 0 0 0-.365.922c-.005.342.127.672.365.918.228.252.554.393.895.388.235.004.466-.068.657-.206a1.3 1.3 0 0 0 .429-.534l1.205.347c-.176.46-.486.858-.89 1.141a2.36 2.36 0 0 1-1.401.439 2.388 2.388 0 0 1-1.767-.736 2.501 2.501 0 0 1 .014-3.537Zm9.495 1.269h-2.346a1.16 1.16 0 0 1 .425-.585c.217-.16.482-.244.753-.237a1.195 1.195 0 0 1 1.168.822Zm.411-1.424a2.477 2.477 0 0 0-3.323.155 2.501 2.501 0 0 0-.013 3.537c.46.48 1.1.747 1.766.735a2.89 2.89 0 0 0 1.351-.342 2.08 2.08 0 0 0 .94-.908l-1.15-.33c-.313.28-.722.428-1.141.412a1.327 1.327 0 0 1-.758-.215 1.043 1.043 0 0 1-.429-.616h3.633c.037-.156.056-.315.055-.475a2.338 2.338 0 0 0-.064-.53 2.467 2.467 0 0 0-.867-1.423Z", clipRule: "evenodd" }), (0, jsx_runtime_1.jsx)("path", { fill: "#28DA98", d: "M16.951 10a2.139 2.139 0 0 0-2.139-2.139l1.908-1.907c0 1.18.958 2.139 2.139 2.139L16.95 10ZM12.905 5.954a2.139 2.139 0 0 0-2.14-2.139l1.908-1.907c0 1.18.958 2.138 2.139 2.138l-1.907 1.908Z" }), (0, jsx_runtime_1.jsx)("path", { fill: insurColor, d: "M16.951 18.093a2.139 2.139 0 0 0-2.138-2.14l1.907-1.907c0 1.181.958 2.139 2.139 2.139l-1.908 1.908ZM12.905 14.046a2.139 2.139 0 0 0-2.14-2.138L12.674 10c0 1.181.958 2.139 2.139 2.139l-1.907 1.907ZM16.938 2.147c.008-.078.013-.158.013-.24l-.014.24Z" }), (0, jsx_runtime_1.jsx)("path", { fill: "#28DA98", d: "M20.207 8.651a1.907 1.907 0 0 0-2.698 0 1.901 1.901 0 0 0-.558 1.35c-.001 1.181-.958 2.138-2.14 2.138h.001c-.488 0-.976.186-1.349.559a1.9 1.9 0 0 0-.558 1.35c-.001 1.18-.957 2.135-2.136 2.137h-.004a2.139 2.139 0 0 1-2.138-2.138c0-.489-.186-.977-.559-1.35a1.901 1.901 0 0 0-1.349-.558 2.139 2.139 0 0 1-2.138-2.137v-.004c0-1.18.957-2.136 2.137-2.137.488 0 .977-.185 1.35-.558.373-.373.559-.861.559-1.35 0-1.18.958-2.138 2.139-2.138a1.907 1.907 0 1 0-1.907-1.907A2.139 2.139 0 0 1 6.72 4.046c-.488 0-.977.186-1.35.56-.372.372-.558.86-.558 1.348a2.139 2.139 0 0 1-2.138 2.139 1.907 1.907 0 1 0 .001 3.815 2.139 2.139 0 0 1 2.137 2.136c0 .489.185.978.559 1.351a1.9 1.9 0 0 0 1.354.559 2.139 2.139 0 0 1 2.133 2.139 1.908 1.908 0 0 0 3.815 0c0-1.182.958-2.14 2.139-2.14.488 0 .976-.185 1.349-.558.374-.374.56-.864.558-1.354a2.139 2.139 0 0 1 2.137-2.133 1.908 1.908 0 0 0 1.35-3.256Z" }), (0, jsx_runtime_1.jsx)("path", { fill: insurColor, d: "M28.3 8.651a1.901 1.901 0 0 0-1.348-.558 2.139 2.139 0 0 1-2.139-2.139 1.9 1.9 0 0 0-.559-1.349 1.901 1.901 0 0 0-1.349-.559 2.139 2.139 0 0 1-2.138-2.135 1.907 1.907 0 1 0-3.815-.003c0 .082-.005.164-.014.244v-.005a2.13 2.13 0 0 1-.999 1.579l-.002.001a2.112 2.112 0 0 1-.16.09l-.012.006a2.11 2.11 0 0 1-.163.072l-.018.008c-.055.02-.11.04-.167.056l-.02.006c-.057.016-.115.03-.174.042l-.02.003c-.06.011-.12.02-.182.026l-.013.001c-.064.006-.129.01-.194.01-.06 0-.118.002-.176.008h-.007a1.909 1.909 0 0 0-.526.128l-.01.003a1.92 1.92 0 0 0-.166.077l-.003.002c-.046.024-.09.051-.135.08l-.027.016c-.045.029-.087.061-.13.095-.008.006-.017.011-.025.018a1.912 1.912 0 0 0-.39.43l-.046.08c-.016.027-.034.054-.05.083-.011.023-.02.047-.032.07-.015.033-.032.066-.046.1-.01.025-.018.053-.028.08-.01.03-.023.062-.033.094-.01.036-.018.073-.027.11-.005.023-.012.046-.016.068a1.9 1.9 0 0 0-.02.137l-.007.045a1.935 1.935 0 0 0-.007.154l-.001.029a2.139 2.139 0 0 1-2.138 2.139A1.907 1.907 0 1 0 12.675 10c0-1.18.956-2.138 2.136-2.139.243 0 .485-.045.713-.137l.006-.002c.052-.02.102-.045.152-.07l.018-.009c.045-.023.089-.05.132-.078l.03-.018c.042-.027.083-.058.123-.09l.032-.023a1.953 1.953 0 0 0 .276-.277c.01-.01.017-.023.026-.034.03-.04.06-.08.088-.12l.017-.03c.028-.044.055-.088.079-.133l.009-.02c.025-.049.049-.1.07-.15l.003-.01c.09-.227.136-.468.136-.71l.013-.236a2.139 2.139 0 0 1 4.264.237c0 .49.186.978.559 1.352.373.373.862.559 1.35.558a2.139 2.139 0 0 1-.001 4.278c-.488 0-.977.186-1.35.559-.372.373-.558.862-.558 1.35a2.139 2.139 0 0 1-2.136 2.137 1.908 1.908 0 0 0-1.352 3.256 1.908 1.908 0 0 0 3.257-1.349c0-1.18.958-2.138 2.139-2.138.488 0 .976-.186 1.349-.559.372-.372.558-.86.558-1.35 0-1.18.957-2.136 2.137-2.137a1.907 1.907 0 0 0 1.35-3.256Z" })] }));
10
+ };
11
+ exports.InsuraceLogo = InsuraceLogo;
@@ -1,3 +1,4 @@
1
+ export * from './InsuraceLogo';
1
2
  export * from './LiFiFullLogo';
2
3
  export * from './LiFiLogo';
3
4
  export * from './LiFiToolLogo';
@@ -14,6 +14,7 @@ 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("./InsuraceLogo"), exports);
17
18
  __exportStar(require("./LiFiFullLogo"), exports);
18
19
  __exportStar(require("./LiFiLogo"), exports);
19
20
  __exportStar(require("./LiFiToolLogo"), exports);