@lifi/widget 2.9.3 → 3.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 (600) hide show
  1. package/AppProvider.js +2 -2
  2. package/AppRoutes.js +75 -67
  3. package/cjs/AppProvider.js +1 -1
  4. package/cjs/AppRoutes.js +74 -66
  5. package/cjs/components/ActiveTransactions/ActiveTransactionItem.js +1 -5
  6. package/cjs/components/ActiveTransactions/ActiveTransactions.js +2 -2
  7. package/cjs/components/AmountInput/AmountInputEndAdornment.js +9 -10
  8. package/cjs/components/AmountInput/FormPriceHelperText.js +1 -1
  9. package/cjs/components/BaseTransactionButton/BaseTransactionButton.js +5 -4
  10. package/cjs/components/Card/CardLabel.d.ts +1 -1
  11. package/cjs/components/ChainSelect/ChainSelect.js +8 -5
  12. package/cjs/components/ChainSelect/useChainSelect.js +21 -2
  13. package/cjs/components/GasMessage/GasMessage.style.js +3 -6
  14. package/cjs/components/GasMessage/GasSufficiencyMessage.js +2 -1
  15. package/cjs/components/Header/Header.style.d.ts +8 -0
  16. package/cjs/components/Header/Header.style.js +16 -1
  17. package/cjs/components/Header/NavigationHeader.d.ts +1 -0
  18. package/cjs/components/Header/NavigationHeader.js +15 -8
  19. package/cjs/components/Header/NavigationTabs.js +2 -2
  20. package/cjs/components/Header/SettingsButton.d.ts +1 -0
  21. package/cjs/components/Header/SettingsButton.js +25 -0
  22. package/cjs/components/Header/SettingsButton.style.d.ts +11 -0
  23. package/cjs/components/Header/SettingsButton.style.js +43 -0
  24. package/cjs/components/Header/WalletHeader.js +11 -24
  25. package/cjs/components/Header/WalletMenu.d.ts +3 -1
  26. package/cjs/components/Header/WalletMenu.js +58 -24
  27. package/cjs/components/Header/WalletMenu.style.d.ts +1 -0
  28. package/cjs/components/Header/WalletMenu.style.js +27 -0
  29. package/cjs/components/Insurance/InsuranceCollapsed.js +1 -1
  30. package/cjs/components/NFT/NFT.js +3 -1
  31. package/cjs/components/NFT/types.d.ts +1 -1
  32. package/cjs/components/PoweredBy/PoweredBy.js +2 -1
  33. package/cjs/components/RouteCard/RouteCard.js +3 -3
  34. package/cjs/components/RouteCard/RouteCardEssentials.js +2 -1
  35. package/cjs/components/RouteCard/utils.d.ts +2 -3
  36. package/cjs/components/RouteCard/utils.js +4 -9
  37. package/cjs/components/SendToWallet/SendToWallet.js +24 -21
  38. package/cjs/components/SendToWallet/SendToWalletButton.js +3 -2
  39. package/{pages/SelectEnabledToolsPage/SelectEnabledToolsPage.style.d.ts → cjs/components/SettingsListItemButton.d.ts} +1 -1
  40. package/cjs/components/SettingsListItemButton.js +8 -0
  41. package/cjs/components/Step/DestinationWalletAddress.d.ts +2 -2
  42. package/cjs/components/Step/GasStepProcess.d.ts +2 -2
  43. package/cjs/components/Step/Step.d.ts +2 -2
  44. package/cjs/components/Step/Step.js +1 -1
  45. package/cjs/components/Step/StepList.d.ts +2 -2
  46. package/cjs/components/Step/StepList.js +4 -4
  47. package/cjs/components/Step/StepProcess.d.ts +2 -2
  48. package/cjs/components/Step/StepTimer.d.ts +2 -2
  49. package/cjs/components/StepActions/StepActions.d.ts +3 -3
  50. package/cjs/components/StepActions/StepActions.js +11 -14
  51. package/cjs/components/StepActions/types.d.ts +2 -2
  52. package/cjs/components/{Header/NavigationTabs.style.d.ts → Tabs/Tabs.style.d.ts} +2 -2
  53. package/cjs/components/{Header/NavigationTabs.style.js → Tabs/Tabs.style.js} +9 -31
  54. package/cjs/components/Tabs/index.d.ts +1 -0
  55. package/cjs/{providers/SDKProvider → components/Tabs}/index.js +1 -1
  56. package/cjs/components/Token/Token.d.ts +3 -3
  57. package/cjs/components/Token/Token.js +5 -5
  58. package/cjs/components/TokenList/TokenList.js +2 -2
  59. package/cjs/components/TokenList/TokenListItem.js +9 -5
  60. package/cjs/components/TokenList/TokenNotFound.js +1 -1
  61. package/cjs/components/TokenList/VirtualizedTokenList.js +2 -1
  62. package/cjs/config/queryClient.js +0 -4
  63. package/cjs/config/version.d.ts +1 -1
  64. package/cjs/config/version.js +1 -1
  65. package/cjs/hooks/index.d.ts +7 -1
  66. package/cjs/hooks/index.js +7 -1
  67. package/cjs/hooks/useAccount.d.ts +31 -0
  68. package/cjs/hooks/useAccount.js +53 -0
  69. package/cjs/hooks/useAvailableChains.d.ts +6 -0
  70. package/cjs/hooks/useAvailableChains.js +36 -0
  71. package/cjs/hooks/useChain.js +3 -6
  72. package/cjs/hooks/useChains.d.ts +1 -1
  73. package/cjs/hooks/useChains.js +7 -38
  74. package/cjs/hooks/useFromTokenSufficiency.d.ts +3 -3
  75. package/cjs/hooks/useFromTokenSufficiency.js +39 -41
  76. package/cjs/hooks/useGasRecommendation.d.ts +2 -2
  77. package/cjs/hooks/useGasRecommendation.js +23 -18
  78. package/cjs/hooks/useGasRefuel.js +18 -11
  79. package/cjs/hooks/useGasSufficiency.d.ts +6 -7
  80. package/cjs/hooks/useGasSufficiency.js +68 -71
  81. package/cjs/hooks/useLanguages.d.ts +6 -0
  82. package/cjs/hooks/useLanguages.js +28 -0
  83. package/cjs/hooks/useProcessMessage.d.ts +3 -3
  84. package/cjs/hooks/useProcessMessage.js +32 -28
  85. package/cjs/hooks/useRequiredToAddress.d.ts +1 -0
  86. package/cjs/hooks/useRequiredToAddress.js +19 -0
  87. package/cjs/hooks/useRouteExecution.d.ts +2 -2
  88. package/cjs/hooks/useRouteExecution.js +44 -58
  89. package/cjs/hooks/useRoutes.d.ts +1 -1
  90. package/cjs/hooks/useRoutes.js +128 -113
  91. package/cjs/hooks/useSettingMonitor.d.ts +11 -0
  92. package/cjs/hooks/useSettingMonitor.js +57 -0
  93. package/cjs/hooks/useTokenAddressBalance.d.ts +1 -1
  94. package/cjs/hooks/useTokenBalance.d.ts +5 -3
  95. package/cjs/hooks/useTokenBalance.js +77 -47
  96. package/cjs/hooks/useTokenBalances.d.ts +3 -3
  97. package/cjs/hooks/useTokenBalances.js +34 -24
  98. package/cjs/hooks/useTokenSearch.js +18 -17
  99. package/cjs/hooks/useTokens.d.ts +2 -1
  100. package/cjs/hooks/useTokens.js +18 -15
  101. package/cjs/hooks/useTools.d.ts +1 -1
  102. package/cjs/hooks/useTools.js +12 -11
  103. package/cjs/hooks/useTransactionDetails.d.ts +4 -0
  104. package/cjs/hooks/useTransactionDetails.js +56 -0
  105. package/cjs/hooks/useTransactionHistory.d.ts +5 -0
  106. package/cjs/hooks/useTransactionHistory.js +39 -0
  107. package/cjs/i18n/en.json +18 -9
  108. package/cjs/i18n/fr.json +7 -4
  109. package/cjs/i18n/pt.json +7 -4
  110. package/cjs/i18n/tr.json +7 -4
  111. package/cjs/i18n/uk.json +7 -4
  112. package/cjs/i18n/zh.json +7 -4
  113. package/cjs/icons/index.d.ts +1 -3
  114. package/cjs/icons/index.js +1 -3
  115. package/cjs/icons/lifi.d.ts +1 -0
  116. package/cjs/icons/lifi.js +4 -0
  117. package/cjs/index.d.ts +2 -3
  118. package/cjs/index.js +4 -4
  119. package/cjs/pages/ActiveTransactionsPage/ActiveTransactionsPage.js +2 -2
  120. package/cjs/pages/LanguagesPage/LanguagesPage.d.ts +2 -0
  121. package/cjs/pages/LanguagesPage/LanguagesPage.js +22 -0
  122. package/cjs/pages/LanguagesPage/index.d.ts +1 -0
  123. package/cjs/pages/LanguagesPage/index.js +17 -0
  124. package/cjs/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.js +15 -5
  125. package/cjs/pages/SelectWalletPage/EVMListItemButton.d.ts +8 -0
  126. package/cjs/pages/SelectWalletPage/EVMListItemButton.js +40 -0
  127. package/cjs/pages/SelectWalletPage/SVMListItemButton.d.ts +6 -0
  128. package/cjs/pages/SelectWalletPage/SVMListItemButton.js +34 -0
  129. package/cjs/pages/SelectWalletPage/SelectWalletPage.js +31 -32
  130. package/cjs/pages/SelectWalletPage/utils.d.ts +3 -0
  131. package/cjs/pages/SelectWalletPage/utils.js +21 -0
  132. package/{pages/SettingsPage/EnabledToolsButton.d.ts → cjs/pages/SettingsPage/BridgeAndExchangeSettings.d.ts} +1 -1
  133. package/cjs/pages/SettingsPage/BridgeAndExchangeSettings.js +36 -0
  134. package/cjs/pages/SettingsPage/GasPriceSettings.d.ts +2 -0
  135. package/cjs/pages/SettingsPage/GasPriceSettings.js +21 -0
  136. package/cjs/pages/SettingsPage/LanguageSetting.d.ts +2 -0
  137. package/cjs/pages/SettingsPage/LanguageSetting.js +26 -0
  138. package/cjs/pages/SettingsPage/ResetSettingsButton.js +3 -30
  139. package/cjs/pages/SettingsPage/RoutePrioritySettings.d.ts +2 -0
  140. package/cjs/pages/SettingsPage/RoutePrioritySettings.js +25 -0
  141. package/cjs/pages/SettingsPage/SendToWalletOptionSetting.d.ts +1 -0
  142. package/cjs/pages/SettingsPage/{ShowDestinationWallet.js → SendToWalletOptionSetting.js} +6 -9
  143. package/cjs/pages/SettingsPage/SettingsCard/BadgedValue.d.ts +8 -0
  144. package/cjs/pages/SettingsPage/SettingsCard/BadgedValue.js +7 -0
  145. package/cjs/pages/SettingsPage/SettingsCard/SettingCard.d.ts +2 -0
  146. package/cjs/pages/SettingsPage/SettingsCard/SettingCard.js +11 -0
  147. package/cjs/pages/SettingsPage/SettingsCard/SettingCard.style.d.ts +19 -0
  148. package/cjs/pages/SettingsPage/SettingsCard/SettingCard.style.js +53 -0
  149. package/cjs/pages/SettingsPage/SettingsCard/SettingCardButton.d.ts +7 -0
  150. package/cjs/pages/SettingsPage/SettingsCard/SettingCardButton.js +8 -0
  151. package/cjs/pages/SettingsPage/SettingsCard/SettingCardExpandable.d.ts +7 -0
  152. package/cjs/pages/SettingsPage/SettingsCard/SettingCardExpandable.js +16 -0
  153. package/cjs/pages/SettingsPage/SettingsCard/SettingsAccordian.d.ts +6 -0
  154. package/cjs/pages/SettingsPage/SettingsCard/SettingsAccordian.js +36 -0
  155. package/cjs/pages/SettingsPage/SettingsCard/index.d.ts +6 -0
  156. package/cjs/pages/SettingsPage/SettingsCard/index.js +22 -0
  157. package/cjs/pages/SettingsPage/SettingsCard/types.d.ts +5 -0
  158. package/cjs/pages/SettingsPage/SettingsPage.js +9 -8
  159. package/cjs/pages/SettingsPage/SlippageSettings/SlippageSettings.d.ts +2 -0
  160. package/cjs/pages/SettingsPage/SlippageSettings/SlippageSettings.js +51 -0
  161. package/cjs/pages/SettingsPage/SlippageSettings/SlippageSettings.style.d.ts +16 -0
  162. package/cjs/pages/SettingsPage/SlippageSettings/SlippageSettings.style.js +74 -0
  163. package/cjs/pages/SettingsPage/SlippageSettings/index.d.ts +1 -0
  164. package/cjs/pages/SettingsPage/SlippageSettings/index.js +17 -0
  165. package/cjs/pages/SettingsPage/ThemeSettings.d.ts +2 -0
  166. package/cjs/pages/SettingsPage/ThemeSettings.js +39 -0
  167. package/cjs/pages/TransactionDetailsPage/ContactSupportButton.js +2 -2
  168. package/cjs/pages/TransactionDetailsPage/TransactionDetailsPage.js +33 -28
  169. package/cjs/pages/TransactionDetailsPage/TransactionDetailsSkeleton.d.ts +1 -0
  170. package/cjs/pages/TransactionDetailsPage/TransactionDetailsSkeleton.js +31 -0
  171. package/cjs/pages/TransactionHistoryPage/TransactionHistoryItem.d.ts +4 -2
  172. package/cjs/pages/TransactionHistoryPage/TransactionHistoryItem.js +34 -7
  173. package/cjs/pages/TransactionHistoryPage/TransactionHistoryPage.js +21 -22
  174. package/cjs/pages/TransactionHistoryPage/TransactionHistorySkeleton.d.ts +1 -0
  175. package/cjs/pages/TransactionHistoryPage/TransactionHistorySkeleton.js +26 -0
  176. package/cjs/pages/TransactionHistoryPage/constants.d.ts +1 -0
  177. package/cjs/pages/TransactionHistoryPage/constants.js +4 -0
  178. package/cjs/pages/TransactionPage/ExchangeRateBottomSheet.js +11 -10
  179. package/cjs/pages/TransactionPage/StartTransactionButton.js +2 -2
  180. package/cjs/pages/TransactionPage/StatusBottomSheet.js +12 -8
  181. package/cjs/pages/TransactionPage/TransactionPage.js +1 -1
  182. package/cjs/providers/FormProvider/FormUpdater.js +4 -4
  183. package/cjs/providers/I18nProvider/I18nProvider.js +3 -7
  184. package/cjs/providers/I18nProvider/types.d.ts +4 -3
  185. package/cjs/providers/WalletProvider/EVMProvider.d.ts +3 -0
  186. package/cjs/providers/WalletProvider/EVMProvider.js +79 -0
  187. package/cjs/providers/WalletProvider/SDKProviders.d.ts +1 -0
  188. package/cjs/providers/WalletProvider/SDKProviders.js +31 -0
  189. package/cjs/providers/WalletProvider/SolanaProvider.d.ts +3 -0
  190. package/cjs/providers/WalletProvider/SolanaProvider.js +35 -0
  191. package/cjs/providers/WalletProvider/WalletProvider.d.ts +1 -15
  192. package/cjs/providers/WalletProvider/WalletProvider.js +5 -183
  193. package/cjs/providers/WalletProvider/index.d.ts +1 -1
  194. package/cjs/providers/WalletProvider/index.js +1 -1
  195. package/cjs/providers/WalletProvider/utils.d.ts +3 -0
  196. package/cjs/providers/WalletProvider/utils.js +25 -0
  197. package/cjs/providers/WidgetProvider/WidgetProvider.js +51 -35
  198. package/cjs/providers/index.d.ts +0 -1
  199. package/cjs/providers/index.js +0 -1
  200. package/cjs/stores/chains/ChainOrderStore.js +24 -0
  201. package/cjs/stores/header/useHeaderStore.d.ts +1 -1
  202. package/cjs/stores/header/useHeaderStore.js +2 -2
  203. package/cjs/stores/routes/createRouteExecutionStore.js +6 -60
  204. package/cjs/stores/routes/index.d.ts +0 -1
  205. package/cjs/stores/routes/index.js +0 -1
  206. package/cjs/stores/routes/types.d.ts +2 -2
  207. package/cjs/stores/routes/utils.d.ts +8 -8
  208. package/cjs/stores/routes/utils.js +7 -5
  209. package/cjs/stores/settings/useSettingsStore.js +2 -4
  210. package/cjs/stores/settings/useSplitSubvariantStore.d.ts +1 -1
  211. package/cjs/stores/settings/useSplitSubvariantStore.js +2 -2
  212. package/cjs/types/events.d.ts +6 -5
  213. package/cjs/types/events.js +1 -1
  214. package/cjs/types/widget.d.ts +7 -14
  215. package/cjs/utils/colors.d.ts +3 -0
  216. package/cjs/utils/colors.js +13 -1
  217. package/cjs/utils/converters.d.ts +3 -0
  218. package/cjs/utils/converters.js +172 -0
  219. package/cjs/utils/format.d.ts +1 -1
  220. package/cjs/utils/format.js +5 -12
  221. package/cjs/utils/index.d.ts +1 -0
  222. package/cjs/utils/index.js +1 -0
  223. package/cjs/utils/navigationRoutes.d.ts +1 -0
  224. package/cjs/utils/navigationRoutes.js +3 -1
  225. package/cjs/utils/svm.d.ts +1 -0
  226. package/cjs/utils/svm.js +14 -0
  227. package/components/ActiveTransactions/ActiveTransactionItem.js +1 -5
  228. package/components/ActiveTransactions/ActiveTransactions.js +2 -2
  229. package/components/AmountInput/AmountInputEndAdornment.js +10 -11
  230. package/components/AmountInput/FormPriceHelperText.js +1 -1
  231. package/components/BaseTransactionButton/BaseTransactionButton.js +6 -5
  232. package/components/Card/CardLabel.d.ts +1 -1
  233. package/components/ChainSelect/ChainSelect.js +8 -5
  234. package/components/ChainSelect/useChainSelect.js +22 -3
  235. package/components/GasMessage/GasMessage.style.js +3 -6
  236. package/components/GasMessage/GasSufficiencyMessage.js +2 -1
  237. package/components/Header/Header.style.d.ts +8 -0
  238. package/components/Header/Header.style.js +16 -1
  239. package/components/Header/NavigationHeader.d.ts +1 -0
  240. package/components/Header/NavigationHeader.js +16 -10
  241. package/components/Header/NavigationTabs.js +3 -3
  242. package/components/Header/SettingsButton.d.ts +1 -0
  243. package/components/Header/SettingsButton.js +21 -0
  244. package/components/Header/SettingsButton.style.d.ts +11 -0
  245. package/components/Header/SettingsButton.style.js +40 -0
  246. package/components/Header/WalletHeader.js +15 -28
  247. package/components/Header/WalletMenu.d.ts +3 -1
  248. package/components/Header/WalletMenu.js +58 -25
  249. package/components/Header/WalletMenu.style.d.ts +1 -0
  250. package/components/Header/WalletMenu.style.js +24 -0
  251. package/components/Insurance/InsuranceCollapsed.js +1 -1
  252. package/components/NFT/NFT.js +3 -1
  253. package/components/NFT/types.d.ts +1 -1
  254. package/components/PoweredBy/PoweredBy.js +2 -1
  255. package/components/RouteCard/RouteCard.js +3 -3
  256. package/components/RouteCard/RouteCardEssentials.js +2 -1
  257. package/components/RouteCard/utils.d.ts +2 -3
  258. package/components/RouteCard/utils.js +4 -9
  259. package/components/SendToWallet/SendToWallet.js +26 -23
  260. package/components/SendToWallet/SendToWalletButton.js +5 -4
  261. package/{cjs/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.style.d.ts → components/SettingsListItemButton.d.ts} +1 -1
  262. package/components/SettingsListItemButton.js +5 -0
  263. package/components/Step/DestinationWalletAddress.d.ts +2 -2
  264. package/components/Step/GasStepProcess.d.ts +2 -2
  265. package/components/Step/Step.d.ts +2 -2
  266. package/components/Step/Step.js +2 -2
  267. package/components/Step/StepList.d.ts +2 -2
  268. package/components/Step/StepList.js +4 -4
  269. package/components/Step/StepProcess.d.ts +2 -2
  270. package/components/Step/StepTimer.d.ts +2 -2
  271. package/components/StepActions/StepActions.d.ts +3 -3
  272. package/components/StepActions/StepActions.js +12 -15
  273. package/components/StepActions/types.d.ts +2 -2
  274. package/components/{Header/NavigationTabs.style.d.ts → Tabs/Tabs.style.d.ts} +2 -2
  275. package/components/Tabs/Tabs.style.js +36 -0
  276. package/components/Tabs/index.d.ts +1 -0
  277. package/components/Tabs/index.js +1 -0
  278. package/components/Token/Token.d.ts +3 -3
  279. package/components/Token/Token.js +5 -5
  280. package/components/TokenList/TokenList.js +4 -4
  281. package/components/TokenList/TokenListItem.js +9 -6
  282. package/components/TokenList/TokenNotFound.js +2 -2
  283. package/components/TokenList/VirtualizedTokenList.js +2 -1
  284. package/config/queryClient.js +0 -4
  285. package/config/version.d.ts +1 -1
  286. package/config/version.js +1 -1
  287. package/hooks/index.d.ts +7 -1
  288. package/hooks/index.js +7 -1
  289. package/hooks/useAccount.d.ts +31 -0
  290. package/hooks/useAccount.js +48 -0
  291. package/hooks/useAvailableChains.d.ts +6 -0
  292. package/hooks/useAvailableChains.js +32 -0
  293. package/hooks/useChain.js +3 -6
  294. package/hooks/useChains.d.ts +1 -1
  295. package/hooks/useChains.js +9 -40
  296. package/hooks/useFromTokenSufficiency.d.ts +3 -3
  297. package/hooks/useFromTokenSufficiency.js +41 -43
  298. package/hooks/useGasRecommendation.d.ts +2 -2
  299. package/hooks/useGasRecommendation.js +23 -18
  300. package/hooks/useGasRefuel.js +19 -12
  301. package/hooks/useGasSufficiency.d.ts +6 -7
  302. package/hooks/useGasSufficiency.js +69 -72
  303. package/hooks/useLanguages.d.ts +6 -0
  304. package/hooks/useLanguages.js +24 -0
  305. package/hooks/useProcessMessage.d.ts +3 -3
  306. package/hooks/useProcessMessage.js +33 -29
  307. package/hooks/useRequiredToAddress.d.ts +1 -0
  308. package/hooks/useRequiredToAddress.js +15 -0
  309. package/hooks/useRouteExecution.d.ts +2 -2
  310. package/hooks/useRouteExecution.js +44 -58
  311. package/hooks/useRoutes.d.ts +1 -1
  312. package/hooks/useRoutes.js +131 -116
  313. package/hooks/useSettingMonitor.d.ts +11 -0
  314. package/hooks/useSettingMonitor.js +53 -0
  315. package/hooks/useTokenAddressBalance.d.ts +1 -1
  316. package/hooks/useTokenBalance.d.ts +5 -3
  317. package/hooks/useTokenBalance.js +74 -45
  318. package/hooks/useTokenBalances.d.ts +3 -3
  319. package/hooks/useTokenBalances.js +34 -24
  320. package/hooks/useTokenSearch.js +18 -17
  321. package/hooks/useTokens.d.ts +2 -1
  322. package/hooks/useTokens.js +19 -16
  323. package/hooks/useTools.d.ts +1 -1
  324. package/hooks/useTools.js +13 -12
  325. package/hooks/useTransactionDetails.d.ts +4 -0
  326. package/hooks/useTransactionDetails.js +52 -0
  327. package/hooks/useTransactionHistory.d.ts +5 -0
  328. package/hooks/useTransactionHistory.js +35 -0
  329. package/i18n/en.json +18 -9
  330. package/i18n/fr.json +7 -4
  331. package/i18n/pt.json +7 -4
  332. package/i18n/tr.json +7 -4
  333. package/i18n/uk.json +7 -4
  334. package/i18n/zh.json +7 -4
  335. package/icons/index.d.ts +1 -3
  336. package/icons/index.js +1 -3
  337. package/icons/lifi.d.ts +1 -0
  338. package/icons/lifi.js +1 -0
  339. package/index.d.ts +2 -3
  340. package/index.js +2 -4
  341. package/package.json +19 -19
  342. package/pages/ActiveTransactionsPage/ActiveTransactionsPage.js +2 -2
  343. package/pages/LanguagesPage/LanguagesPage.d.ts +2 -0
  344. package/pages/LanguagesPage/LanguagesPage.js +18 -0
  345. package/pages/LanguagesPage/index.d.ts +1 -0
  346. package/pages/LanguagesPage/index.js +1 -0
  347. package/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.js +16 -6
  348. package/pages/SelectWalletPage/EVMListItemButton.d.ts +8 -0
  349. package/pages/SelectWalletPage/EVMListItemButton.js +36 -0
  350. package/pages/SelectWalletPage/SVMListItemButton.d.ts +6 -0
  351. package/pages/SelectWalletPage/SVMListItemButton.js +30 -0
  352. package/pages/SelectWalletPage/SelectWalletPage.js +34 -35
  353. package/pages/SelectWalletPage/utils.d.ts +3 -0
  354. package/pages/SelectWalletPage/utils.js +17 -0
  355. package/{cjs/pages/SettingsPage/EnabledToolsButton.d.ts → pages/SettingsPage/BridgeAndExchangeSettings.d.ts} +1 -1
  356. package/pages/SettingsPage/BridgeAndExchangeSettings.js +32 -0
  357. package/pages/SettingsPage/GasPriceSettings.d.ts +2 -0
  358. package/pages/SettingsPage/GasPriceSettings.js +17 -0
  359. package/pages/SettingsPage/LanguageSetting.d.ts +2 -0
  360. package/pages/SettingsPage/LanguageSetting.js +22 -0
  361. package/pages/SettingsPage/ResetSettingsButton.js +4 -31
  362. package/pages/SettingsPage/RoutePrioritySettings.d.ts +2 -0
  363. package/pages/SettingsPage/RoutePrioritySettings.js +21 -0
  364. package/pages/SettingsPage/SendToWalletOptionSetting.d.ts +1 -0
  365. package/pages/SettingsPage/{ShowDestinationWallet.js → SendToWalletOptionSetting.js} +4 -7
  366. package/pages/SettingsPage/SettingsCard/BadgedValue.d.ts +8 -0
  367. package/pages/SettingsPage/SettingsCard/BadgedValue.js +3 -0
  368. package/pages/SettingsPage/SettingsCard/SettingCard.d.ts +2 -0
  369. package/pages/SettingsPage/SettingsCard/SettingCard.js +7 -0
  370. package/pages/SettingsPage/SettingsCard/SettingCard.style.d.ts +19 -0
  371. package/pages/SettingsPage/SettingsCard/SettingCard.style.js +50 -0
  372. package/pages/SettingsPage/SettingsCard/SettingCardButton.d.ts +7 -0
  373. package/pages/SettingsPage/SettingsCard/SettingCardButton.js +4 -0
  374. package/pages/SettingsPage/SettingsCard/SettingCardExpandable.d.ts +7 -0
  375. package/pages/SettingsPage/SettingsCard/SettingCardExpandable.js +12 -0
  376. package/pages/SettingsPage/SettingsCard/SettingsAccordian.d.ts +6 -0
  377. package/pages/SettingsPage/SettingsCard/SettingsAccordian.js +31 -0
  378. package/pages/SettingsPage/SettingsCard/index.d.ts +6 -0
  379. package/pages/SettingsPage/SettingsCard/index.js +6 -0
  380. package/pages/SettingsPage/SettingsCard/types.d.ts +5 -0
  381. package/pages/SettingsPage/SettingsPage.js +10 -9
  382. package/pages/SettingsPage/SlippageSettings/SlippageSettings.d.ts +2 -0
  383. package/pages/SettingsPage/SlippageSettings/SlippageSettings.js +47 -0
  384. package/pages/SettingsPage/SlippageSettings/SlippageSettings.style.d.ts +16 -0
  385. package/pages/SettingsPage/SlippageSettings/SlippageSettings.style.js +71 -0
  386. package/pages/SettingsPage/SlippageSettings/index.d.ts +1 -0
  387. package/pages/SettingsPage/SlippageSettings/index.js +1 -0
  388. package/pages/SettingsPage/ThemeSettings.d.ts +2 -0
  389. package/pages/SettingsPage/ThemeSettings.js +35 -0
  390. package/pages/TransactionDetailsPage/ContactSupportButton.js +2 -2
  391. package/pages/TransactionDetailsPage/TransactionDetailsPage.js +38 -33
  392. package/pages/TransactionDetailsPage/TransactionDetailsSkeleton.d.ts +1 -0
  393. package/pages/TransactionDetailsPage/TransactionDetailsSkeleton.js +27 -0
  394. package/pages/TransactionHistoryPage/TransactionHistoryItem.d.ts +4 -2
  395. package/pages/TransactionHistoryPage/TransactionHistoryItem.js +34 -7
  396. package/pages/TransactionHistoryPage/TransactionHistoryPage.js +24 -25
  397. package/pages/TransactionHistoryPage/TransactionHistorySkeleton.d.ts +1 -0
  398. package/pages/TransactionHistoryPage/TransactionHistorySkeleton.js +22 -0
  399. package/pages/TransactionHistoryPage/constants.d.ts +1 -0
  400. package/pages/TransactionHistoryPage/constants.js +1 -0
  401. package/pages/TransactionPage/ExchangeRateBottomSheet.js +11 -10
  402. package/pages/TransactionPage/StartTransactionButton.js +2 -2
  403. package/pages/TransactionPage/StatusBottomSheet.js +14 -10
  404. package/pages/TransactionPage/TransactionPage.js +1 -1
  405. package/providers/FormProvider/FormUpdater.js +4 -4
  406. package/providers/I18nProvider/I18nProvider.js +4 -8
  407. package/providers/I18nProvider/types.d.ts +4 -3
  408. package/providers/WalletProvider/EVMProvider.d.ts +3 -0
  409. package/providers/WalletProvider/EVMProvider.js +74 -0
  410. package/providers/WalletProvider/SDKProviders.d.ts +1 -0
  411. package/providers/WalletProvider/SDKProviders.js +27 -0
  412. package/providers/WalletProvider/SolanaProvider.d.ts +3 -0
  413. package/providers/WalletProvider/SolanaProvider.js +30 -0
  414. package/providers/WalletProvider/WalletProvider.d.ts +1 -15
  415. package/providers/WalletProvider/WalletProvider.js +5 -181
  416. package/providers/WalletProvider/index.d.ts +1 -1
  417. package/providers/WalletProvider/index.js +1 -1
  418. package/providers/WalletProvider/utils.d.ts +3 -0
  419. package/providers/WalletProvider/utils.js +21 -0
  420. package/providers/WidgetProvider/WidgetProvider.js +52 -36
  421. package/providers/index.d.ts +0 -1
  422. package/providers/index.js +0 -1
  423. package/stores/chains/ChainOrderStore.js +25 -1
  424. package/stores/header/useHeaderStore.d.ts +1 -1
  425. package/stores/header/useHeaderStore.js +2 -2
  426. package/stores/routes/createRouteExecutionStore.js +6 -60
  427. package/stores/routes/index.d.ts +0 -1
  428. package/stores/routes/index.js +0 -1
  429. package/stores/routes/types.d.ts +2 -2
  430. package/stores/routes/utils.d.ts +8 -8
  431. package/stores/routes/utils.js +5 -3
  432. package/stores/settings/useSettingsStore.js +2 -4
  433. package/stores/settings/useSplitSubvariantStore.d.ts +1 -1
  434. package/stores/settings/useSplitSubvariantStore.js +2 -2
  435. package/tsconfig.cjs.tsbuildinfo +1 -1
  436. package/types/events.d.ts +6 -5
  437. package/types/events.js +1 -1
  438. package/types/widget.d.ts +7 -14
  439. package/utils/colors.d.ts +3 -0
  440. package/utils/colors.js +10 -1
  441. package/utils/converters.d.ts +3 -0
  442. package/utils/converters.js +168 -0
  443. package/utils/format.d.ts +1 -1
  444. package/utils/format.js +5 -12
  445. package/utils/index.d.ts +1 -0
  446. package/utils/index.js +1 -0
  447. package/utils/navigationRoutes.d.ts +1 -0
  448. package/utils/navigationRoutes.js +3 -1
  449. package/utils/svm.d.ts +1 -0
  450. package/utils/svm.js +10 -0
  451. package/cjs/components/LiFiLogo.d.ts +0 -5
  452. package/cjs/components/LiFiLogo.js +0 -10
  453. package/cjs/fonts/Inter-Black.woff +0 -0
  454. package/cjs/fonts/Inter-Black.woff2 +0 -0
  455. package/cjs/fonts/Inter-BlackItalic.woff +0 -0
  456. package/cjs/fonts/Inter-BlackItalic.woff2 +0 -0
  457. package/cjs/fonts/Inter-Bold.woff +0 -0
  458. package/cjs/fonts/Inter-Bold.woff2 +0 -0
  459. package/cjs/fonts/Inter-BoldItalic.woff +0 -0
  460. package/cjs/fonts/Inter-BoldItalic.woff2 +0 -0
  461. package/cjs/fonts/Inter-ExtraBold.woff +0 -0
  462. package/cjs/fonts/Inter-ExtraBold.woff2 +0 -0
  463. package/cjs/fonts/Inter-ExtraBoldItalic.woff +0 -0
  464. package/cjs/fonts/Inter-ExtraBoldItalic.woff2 +0 -0
  465. package/cjs/fonts/Inter-ExtraLight.woff +0 -0
  466. package/cjs/fonts/Inter-ExtraLight.woff2 +0 -0
  467. package/cjs/fonts/Inter-ExtraLightItalic.woff +0 -0
  468. package/cjs/fonts/Inter-ExtraLightItalic.woff2 +0 -0
  469. package/cjs/fonts/Inter-Italic.woff +0 -0
  470. package/cjs/fonts/Inter-Italic.woff2 +0 -0
  471. package/cjs/fonts/Inter-Light.woff +0 -0
  472. package/cjs/fonts/Inter-Light.woff2 +0 -0
  473. package/cjs/fonts/Inter-LightItalic.woff +0 -0
  474. package/cjs/fonts/Inter-LightItalic.woff2 +0 -0
  475. package/cjs/fonts/Inter-Medium.woff +0 -0
  476. package/cjs/fonts/Inter-Medium.woff2 +0 -0
  477. package/cjs/fonts/Inter-MediumItalic.woff +0 -0
  478. package/cjs/fonts/Inter-MediumItalic.woff2 +0 -0
  479. package/cjs/fonts/Inter-Regular.woff +0 -0
  480. package/cjs/fonts/Inter-Regular.woff2 +0 -0
  481. package/cjs/fonts/Inter-SemiBold.woff +0 -0
  482. package/cjs/fonts/Inter-SemiBold.woff2 +0 -0
  483. package/cjs/fonts/Inter-SemiBoldItalic.woff +0 -0
  484. package/cjs/fonts/Inter-SemiBoldItalic.woff2 +0 -0
  485. package/cjs/fonts/Inter-Thin.woff +0 -0
  486. package/cjs/fonts/Inter-Thin.woff2 +0 -0
  487. package/cjs/fonts/Inter-ThinItalic.woff +0 -0
  488. package/cjs/fonts/Inter-ThinItalic.woff2 +0 -0
  489. package/cjs/fonts/Inter-italic.var.woff2 +0 -0
  490. package/cjs/fonts/Inter-roman.var.woff2 +0 -0
  491. package/cjs/fonts/Inter.var.woff2 +0 -0
  492. package/cjs/fonts/inter.css +0 -217
  493. package/cjs/hooks/useGetTokenBalancesWithRetry.d.ts +0 -3
  494. package/cjs/hooks/useGetTokenBalancesWithRetry.js +0 -33
  495. package/cjs/icons/LiFiFullLogo.d.ts +0 -2
  496. package/cjs/icons/LiFiFullLogo.js +0 -6
  497. package/cjs/icons/LiFiLogo.d.ts +0 -2
  498. package/cjs/icons/LiFiLogo.js +0 -6
  499. package/cjs/icons/LiFiToolLogo.d.ts +0 -2
  500. package/cjs/icons/LiFiToolLogo.js +0 -6
  501. package/cjs/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.style.js +0 -8
  502. package/cjs/pages/SettingsPage/ColorSchemeButtonGroup.d.ts +0 -2
  503. package/cjs/pages/SettingsPage/ColorSchemeButtonGroup.js +0 -27
  504. package/cjs/pages/SettingsPage/ColorSchemeButtonGroup.style.d.ts +0 -4
  505. package/cjs/pages/SettingsPage/ColorSchemeButtonGroup.style.js +0 -19
  506. package/cjs/pages/SettingsPage/EnabledToolsButton.js +0 -25
  507. package/cjs/pages/SettingsPage/EnabledToolsButton.style.d.ts +0 -5
  508. package/cjs/pages/SettingsPage/EnabledToolsButton.style.js +0 -17
  509. package/cjs/pages/SettingsPage/GasPriceSelect.d.ts +0 -1
  510. package/cjs/pages/SettingsPage/GasPriceSelect.js +0 -17
  511. package/cjs/pages/SettingsPage/LanguageSelect.d.ts +0 -2
  512. package/cjs/pages/SettingsPage/LanguageSelect.js +0 -37
  513. package/cjs/pages/SettingsPage/RoutePrioritySelect.d.ts +0 -2
  514. package/cjs/pages/SettingsPage/RoutePrioritySelect.js +0 -23
  515. package/cjs/pages/SettingsPage/ShowDestinationWallet.d.ts +0 -1
  516. package/cjs/pages/SettingsPage/SlippageInput.d.ts +0 -1
  517. package/cjs/pages/SettingsPage/SlippageInput.js +0 -30
  518. package/cjs/providers/SDKProvider/SDKProvider.d.ts +0 -4
  519. package/cjs/providers/SDKProvider/SDKProvider.js +0 -41
  520. package/cjs/providers/SDKProvider/index.d.ts +0 -1
  521. package/cjs/providers/WalletProvider/types.d.ts +0 -17
  522. package/cjs/stores/routes/useTransactionHistory.d.ts +0 -2
  523. package/cjs/stores/routes/useTransactionHistory.js +0 -15
  524. package/components/Header/NavigationTabs.style.js +0 -58
  525. package/components/LiFiLogo.d.ts +0 -5
  526. package/components/LiFiLogo.js +0 -6
  527. package/fonts/Inter-Black.woff +0 -0
  528. package/fonts/Inter-Black.woff2 +0 -0
  529. package/fonts/Inter-BlackItalic.woff +0 -0
  530. package/fonts/Inter-BlackItalic.woff2 +0 -0
  531. package/fonts/Inter-Bold.woff +0 -0
  532. package/fonts/Inter-Bold.woff2 +0 -0
  533. package/fonts/Inter-BoldItalic.woff +0 -0
  534. package/fonts/Inter-BoldItalic.woff2 +0 -0
  535. package/fonts/Inter-ExtraBold.woff +0 -0
  536. package/fonts/Inter-ExtraBold.woff2 +0 -0
  537. package/fonts/Inter-ExtraBoldItalic.woff +0 -0
  538. package/fonts/Inter-ExtraBoldItalic.woff2 +0 -0
  539. package/fonts/Inter-ExtraLight.woff +0 -0
  540. package/fonts/Inter-ExtraLight.woff2 +0 -0
  541. package/fonts/Inter-ExtraLightItalic.woff +0 -0
  542. package/fonts/Inter-ExtraLightItalic.woff2 +0 -0
  543. package/fonts/Inter-Italic.woff +0 -0
  544. package/fonts/Inter-Italic.woff2 +0 -0
  545. package/fonts/Inter-Light.woff +0 -0
  546. package/fonts/Inter-Light.woff2 +0 -0
  547. package/fonts/Inter-LightItalic.woff +0 -0
  548. package/fonts/Inter-LightItalic.woff2 +0 -0
  549. package/fonts/Inter-Medium.woff +0 -0
  550. package/fonts/Inter-Medium.woff2 +0 -0
  551. package/fonts/Inter-MediumItalic.woff +0 -0
  552. package/fonts/Inter-MediumItalic.woff2 +0 -0
  553. package/fonts/Inter-Regular.woff +0 -0
  554. package/fonts/Inter-Regular.woff2 +0 -0
  555. package/fonts/Inter-SemiBold.woff +0 -0
  556. package/fonts/Inter-SemiBold.woff2 +0 -0
  557. package/fonts/Inter-SemiBoldItalic.woff +0 -0
  558. package/fonts/Inter-SemiBoldItalic.woff2 +0 -0
  559. package/fonts/Inter-Thin.woff +0 -0
  560. package/fonts/Inter-Thin.woff2 +0 -0
  561. package/fonts/Inter-ThinItalic.woff +0 -0
  562. package/fonts/Inter-ThinItalic.woff2 +0 -0
  563. package/fonts/Inter-italic.var.woff2 +0 -0
  564. package/fonts/Inter-roman.var.woff2 +0 -0
  565. package/fonts/Inter.var.woff2 +0 -0
  566. package/fonts/inter.css +0 -217
  567. package/hooks/useGetTokenBalancesWithRetry.d.ts +0 -3
  568. package/hooks/useGetTokenBalancesWithRetry.js +0 -29
  569. package/icons/LiFiFullLogo.d.ts +0 -2
  570. package/icons/LiFiFullLogo.js +0 -2
  571. package/icons/LiFiLogo.d.ts +0 -2
  572. package/icons/LiFiLogo.js +0 -2
  573. package/icons/LiFiToolLogo.d.ts +0 -2
  574. package/icons/LiFiToolLogo.js +0 -2
  575. package/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.style.js +0 -5
  576. package/pages/SettingsPage/ColorSchemeButtonGroup.d.ts +0 -2
  577. package/pages/SettingsPage/ColorSchemeButtonGroup.js +0 -23
  578. package/pages/SettingsPage/ColorSchemeButtonGroup.style.d.ts +0 -4
  579. package/pages/SettingsPage/ColorSchemeButtonGroup.style.js +0 -16
  580. package/pages/SettingsPage/EnabledToolsButton.js +0 -21
  581. package/pages/SettingsPage/EnabledToolsButton.style.d.ts +0 -5
  582. package/pages/SettingsPage/EnabledToolsButton.style.js +0 -14
  583. package/pages/SettingsPage/GasPriceSelect.d.ts +0 -1
  584. package/pages/SettingsPage/GasPriceSelect.js +0 -13
  585. package/pages/SettingsPage/LanguageSelect.d.ts +0 -2
  586. package/pages/SettingsPage/LanguageSelect.js +0 -33
  587. package/pages/SettingsPage/RoutePrioritySelect.d.ts +0 -2
  588. package/pages/SettingsPage/RoutePrioritySelect.js +0 -19
  589. package/pages/SettingsPage/ShowDestinationWallet.d.ts +0 -1
  590. package/pages/SettingsPage/SlippageInput.d.ts +0 -1
  591. package/pages/SettingsPage/SlippageInput.js +0 -26
  592. package/providers/SDKProvider/SDKProvider.d.ts +0 -4
  593. package/providers/SDKProvider/SDKProvider.js +0 -36
  594. package/providers/SDKProvider/index.d.ts +0 -1
  595. package/providers/SDKProvider/index.js +0 -1
  596. package/providers/WalletProvider/types.d.ts +0 -17
  597. package/stores/routes/useTransactionHistory.d.ts +0 -2
  598. package/stores/routes/useTransactionHistory.js +0 -11
  599. /package/cjs/{providers/WalletProvider → pages/SettingsPage/SettingsCard}/types.js +0 -0
  600. /package/{providers/WalletProvider → pages/SettingsPage/SettingsCard}/types.js +0 -0
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useTransactionHistory = void 0;
4
- const shallow_1 = require("zustand/shallow");
5
- const utils_1 = require("../../utils");
6
- const RouteExecutionStore_1 = require("./RouteExecutionStore");
7
- const types_1 = require("./types");
8
- const useTransactionHistory = (address) => {
9
- return (0, RouteExecutionStore_1.useRouteExecutionStore)((state) => Object.values(state.routes)
10
- .filter((item) => item?.route.fromAddress === address &&
11
- (0, utils_1.hasEnumFlag)(item.status, types_1.RouteExecutionStatus.Done))
12
- .sort((a, b) => (b?.route.steps[0].execution?.process[0].startedAt ?? 0) -
13
- (a?.route.steps[0].execution?.process[0].startedAt ?? 0)), shallow_1.shallow);
14
- };
15
- exports.useTransactionHistory = useTransactionHistory;
@@ -1,58 +0,0 @@
1
- import { Tab, Tabs, tabClasses, tabsClasses } from '@mui/material';
2
- import { alpha, styled } from '@mui/material/styles';
3
- export const NavbarTabs = styled(Tabs)(({ theme }) => ({
4
- backgroundColor: theme.palette.mode === 'dark'
5
- ? theme.palette.background.paper
6
- : alpha(theme.palette.common.black, 0.04),
7
- borderRadius: Math.max(theme.shape.borderRadius, theme.shape.borderRadiusSecondary),
8
- padding: theme.spacing(0.5),
9
- flex: 1,
10
- display: 'flex',
11
- alignItems: 'center',
12
- height: 56,
13
- [`.${tabsClasses.flexContainer}`]: {
14
- alignItems: 'center',
15
- },
16
- [`.${tabsClasses.scroller}`]: {
17
- overflow: 'initial !important',
18
- },
19
- [`.${tabsClasses.indicator}`]: {
20
- position: 'absolute',
21
- top: '50%',
22
- transform: 'translateY(-50%)',
23
- height: 48,
24
- backgroundColor: theme.palette.mode === 'dark'
25
- ? theme.palette.background.default
26
- : theme.palette.common.white,
27
- borderRadius: theme.shape.borderRadiusSecondary,
28
- boxShadow: `0px 2px 4px ${alpha(theme.palette.common.black, 0.04)}`,
29
- },
30
- }));
31
- export const NavbarTab = styled(Tab, {
32
- shouldForwardProp: (prop) => prop !== 'isDarkMode',
33
- })(({ theme }) => ({
34
- zIndex: 1,
35
- display: 'flex',
36
- flex: 1,
37
- justifyContent: 'center',
38
- alignItems: 'center',
39
- flexDirection: 'row',
40
- textTransform: 'none',
41
- height: 48,
42
- minHeight: 48,
43
- fontSize: '1rem',
44
- fontWeight: 700,
45
- color: theme.palette.mode === 'dark'
46
- ? theme.palette.common.white
47
- : theme.palette.common.black,
48
- textDecoration: 'none',
49
- [`&.${tabClasses.selected}`]: {
50
- color: theme.palette.mode === 'dark'
51
- ? theme.palette.common.white
52
- : theme.palette.common.black,
53
- backgroundColor: 'transparent',
54
- },
55
- [`.${tabClasses.iconWrapper}`]: {
56
- margin: theme.spacing(0, 1, 0, 0),
57
- },
58
- }));
@@ -1,5 +0,0 @@
1
- import type { CSSProperties } from 'react';
2
- export declare const LiFiLogo: React.FC<{
3
- variant?: 'icon' | 'full';
4
- style?: CSSProperties;
5
- }>;
@@ -1,6 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { LiFiFullLogo, LiFiLogo as LiFiIconLogo } from '../icons';
3
- export const LiFiLogo = ({ variant = 'icon', style }) => {
4
- const Component = variant === 'icon' ? LiFiIconLogo : LiFiFullLogo;
5
- return _jsx(Component, { style: style, fill: "currentColor", color: "currentColor" });
6
- };
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/fonts/inter.css DELETED
@@ -1,217 +0,0 @@
1
- @font-face {
2
- font-family: 'Inter';
3
- font-style: normal;
4
- font-weight: 100;
5
- font-display: swap;
6
- src:
7
- url('Inter-Thin.woff2?v=3.19') format('woff2'),
8
- url('Inter-Thin.woff?v=3.19') format('woff');
9
- }
10
- @font-face {
11
- font-family: 'Inter';
12
- font-style: italic;
13
- font-weight: 100;
14
- font-display: swap;
15
- src:
16
- url('Inter-ThinItalic.woff2?v=3.19') format('woff2'),
17
- url('Inter-ThinItalic.woff?v=3.19') format('woff');
18
- }
19
-
20
- @font-face {
21
- font-family: 'Inter';
22
- font-style: normal;
23
- font-weight: 200;
24
- font-display: swap;
25
- src:
26
- url('Inter-ExtraLight.woff2?v=3.19') format('woff2'),
27
- url('Inter-ExtraLight.woff?v=3.19') format('woff');
28
- }
29
- @font-face {
30
- font-family: 'Inter';
31
- font-style: italic;
32
- font-weight: 200;
33
- font-display: swap;
34
- src:
35
- url('Inter-ExtraLightItalic.woff2?v=3.19') format('woff2'),
36
- url('Inter-ExtraLightItalic.woff?v=3.19') format('woff');
37
- }
38
-
39
- @font-face {
40
- font-family: 'Inter';
41
- font-style: normal;
42
- font-weight: 300;
43
- font-display: swap;
44
- src:
45
- url('Inter-Light.woff2?v=3.19') format('woff2'),
46
- url('Inter-Light.woff?v=3.19') format('woff');
47
- }
48
- @font-face {
49
- font-family: 'Inter';
50
- font-style: italic;
51
- font-weight: 300;
52
- font-display: swap;
53
- src:
54
- url('Inter-LightItalic.woff2?v=3.19') format('woff2'),
55
- url('Inter-LightItalic.woff?v=3.19') format('woff');
56
- }
57
-
58
- @font-face {
59
- font-family: 'Inter';
60
- font-style: normal;
61
- font-weight: 400;
62
- font-display: swap;
63
- src:
64
- url('Inter-Regular.woff2?v=3.19') format('woff2'),
65
- url('Inter-Regular.woff?v=3.19') format('woff');
66
- }
67
- @font-face {
68
- font-family: 'Inter';
69
- font-style: italic;
70
- font-weight: 400;
71
- font-display: swap;
72
- src:
73
- url('Inter-Italic.woff2?v=3.19') format('woff2'),
74
- url('Inter-Italic.woff?v=3.19') format('woff');
75
- }
76
-
77
- @font-face {
78
- font-family: 'Inter';
79
- font-style: normal;
80
- font-weight: 500;
81
- font-display: swap;
82
- src:
83
- url('Inter-Medium.woff2?v=3.19') format('woff2'),
84
- url('Inter-Medium.woff?v=3.19') format('woff');
85
- }
86
- @font-face {
87
- font-family: 'Inter';
88
- font-style: italic;
89
- font-weight: 500;
90
- font-display: swap;
91
- src:
92
- url('Inter-MediumItalic.woff2?v=3.19') format('woff2'),
93
- url('Inter-MediumItalic.woff?v=3.19') format('woff');
94
- }
95
-
96
- @font-face {
97
- font-family: 'Inter';
98
- font-style: normal;
99
- font-weight: 600;
100
- font-display: swap;
101
- src:
102
- url('Inter-SemiBold.woff2?v=3.19') format('woff2'),
103
- url('Inter-SemiBold.woff?v=3.19') format('woff');
104
- }
105
- @font-face {
106
- font-family: 'Inter';
107
- font-style: italic;
108
- font-weight: 600;
109
- font-display: swap;
110
- src:
111
- url('Inter-SemiBoldItalic.woff2?v=3.19') format('woff2'),
112
- url('Inter-SemiBoldItalic.woff?v=3.19') format('woff');
113
- }
114
-
115
- @font-face {
116
- font-family: 'Inter';
117
- font-style: normal;
118
- font-weight: 700;
119
- font-display: swap;
120
- src:
121
- url('Inter-Bold.woff2?v=3.19') format('woff2'),
122
- url('Inter-Bold.woff?v=3.19') format('woff');
123
- }
124
- @font-face {
125
- font-family: 'Inter';
126
- font-style: italic;
127
- font-weight: 700;
128
- font-display: swap;
129
- src:
130
- url('Inter-BoldItalic.woff2?v=3.19') format('woff2'),
131
- url('Inter-BoldItalic.woff?v=3.19') format('woff');
132
- }
133
-
134
- @font-face {
135
- font-family: 'Inter';
136
- font-style: normal;
137
- font-weight: 800;
138
- font-display: swap;
139
- src:
140
- url('Inter-ExtraBold.woff2?v=3.19') format('woff2'),
141
- url('Inter-ExtraBold.woff?v=3.19') format('woff');
142
- }
143
- @font-face {
144
- font-family: 'Inter';
145
- font-style: italic;
146
- font-weight: 800;
147
- font-display: swap;
148
- src:
149
- url('Inter-ExtraBoldItalic.woff2?v=3.19') format('woff2'),
150
- url('Inter-ExtraBoldItalic.woff?v=3.19') format('woff');
151
- }
152
-
153
- @font-face {
154
- font-family: 'Inter';
155
- font-style: normal;
156
- font-weight: 900;
157
- font-display: swap;
158
- src:
159
- url('Inter-Black.woff2?v=3.19') format('woff2'),
160
- url('Inter-Black.woff?v=3.19') format('woff');
161
- }
162
- @font-face {
163
- font-family: 'Inter';
164
- font-style: italic;
165
- font-weight: 900;
166
- font-display: swap;
167
- src:
168
- url('Inter-BlackItalic.woff2?v=3.19') format('woff2'),
169
- url('Inter-BlackItalic.woff?v=3.19') format('woff');
170
- }
171
-
172
- /* -------------------------------------------------------
173
- Variable font.
174
- Usage:
175
-
176
- html { font-family: 'Inter', sans-serif; }
177
- @supports (font-variation-settings: normal) {
178
- html { font-family: 'Inter var', sans-serif; }
179
- }
180
- */
181
- @font-face {
182
- font-family: 'Inter var';
183
- font-weight: 100 900;
184
- font-display: swap;
185
- font-style: normal;
186
- font-named-instance: 'Regular';
187
- src: url('Inter-roman.var.woff2?v=3.19') format('woff2');
188
- }
189
- @font-face {
190
- font-family: 'Inter var';
191
- font-weight: 100 900;
192
- font-display: swap;
193
- font-style: italic;
194
- font-named-instance: 'Italic';
195
- src: url('Inter-italic.var.woff2?v=3.19') format('woff2');
196
- }
197
-
198
- /* --------------------------------------------------------------------------
199
- [EXPERIMENTAL] Multi-axis, single variable font.
200
-
201
- Slant axis is not yet widely supported (as of February 2019) and thus this
202
- multi-axis single variable font is opt-in rather than the default.
203
-
204
- When using this, you will probably need to set font-variation-settings
205
- explicitly, e.g.
206
-
207
- * { font-variation-settings: "slnt" 0deg }
208
- .italic { font-variation-settings: "slnt" 10deg }
209
-
210
- */
211
- @font-face {
212
- font-family: 'Inter var experimental';
213
- font-weight: 100 900;
214
- font-display: swap;
215
- font-style: oblique 0deg 10deg;
216
- src: url('Inter.var.woff2?v=3.19') format('woff2');
217
- }
@@ -1,3 +0,0 @@
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>;
@@ -1,29 +0,0 @@
1
- import { isAddress } from '@ethersproject/address';
2
- import { useCallback } from 'react';
3
- import { useLiFi } from '../providers';
4
- export const useGetTokenBalancesWithRetry = (provider) => {
5
- const lifi = useLiFi();
6
- const getTokenBalancesWithRetry = useCallback(async (accountAddress, tokens, depth = 0) => {
7
- try {
8
- const walletAddress = isAddress(accountAddress)
9
- ? accountAddress
10
- : await provider?.resolveName(accountAddress);
11
- const tokenBalances = await lifi.getTokenBalances(walletAddress, tokens);
12
- if (!tokenBalances.every((token) => token.blockNumber)) {
13
- if (depth > 10) {
14
- console.warn('Token balance backoff depth exceeded.');
15
- return undefined;
16
- }
17
- await new Promise((resolve) => {
18
- setTimeout(resolve, 1.5 ** depth * 100);
19
- });
20
- return getTokenBalancesWithRetry(accountAddress, tokens, depth + 1);
21
- }
22
- return tokenBalances;
23
- }
24
- catch (error) {
25
- //
26
- }
27
- }, [lifi, provider]);
28
- return getTokenBalancesWithRetry;
29
- };
@@ -1,2 +0,0 @@
1
- import type { SVGProps } from 'react';
2
- export declare const LiFiFullLogo: (props: SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- export const LiFiFullLogo = (props) => (_jsxs("svg", { width: "84", height: "32", viewBox: "0 0 84 32", fill: "inherit", xmlns: "http://www.w3.org/2000/svg", ...props, children: [_jsx("path", { d: "M50.6689 20.5714H42.6849V8H39V24H50.6689V20.5714Z" }), _jsx("path", { d: "M53.0717 24H56.7566V8H53.0717V24Z" }), _jsx("path", { d: "M59.5088 24H63.0117V20.48H59.5088V24Z" }), _jsx("path", { d: "M69.4396 17.76H77.1506V14.6057H69.4396V11.2457H77.8103V8H65.7547V24H69.4396V17.76Z" }), _jsx("path", { d: "M80.3151 24H84V8H80.3151V24Z" }), _jsx("path", { d: "M14.6163 21.6947L5.1336 23.89C4.78772 23.9766 4.52832 24.3232 4.52832 24.6698V31.1978C4.52832 31.7467 4.96066 32.0933 5.50829 31.9777L18.7379 28.9159C19.2856 28.8004 19.5162 28.2805 19.2856 27.7894L16.8933 22.8501C16.5186 22.0702 16.8933 21.2614 17.7291 21.0881L26.376 19.0084C26.9813 18.864 27.5001 18.2285 27.5001 17.593V11.5561C27.5001 11.0073 27.0677 10.6318 26.5201 10.7762L14.0398 13.7514C13.2616 13.9247 12.9157 14.6757 13.2616 15.3978L15.4521 19.9327C15.8268 20.7126 15.4521 21.4925 14.6163 21.6947Z" }), _jsx("path", { d: "M8.36225 5.3748L10.841 10.4585C11.1581 11.1229 10.841 11.8161 10.1204 11.9606L5.53762 13.0293C4.96116 13.1737 4.5 13.7514 4.5 14.3291V19.7884C4.5 20.7127 5.24939 21.2904 6.1429 21.0882L10.4087 20.1061C10.9851 19.9906 11.4463 19.384 11.4463 18.8063L11.4751 13.2026C11.4751 12.4227 12.1092 11.6428 12.8586 11.4695L26.8376 8.11886C27.1835 8.03221 27.4429 7.68559 27.4429 7.33897V0.810981C27.4429 0.262168 27.0106 -0.113336 26.4629 0.0310883L8.90988 4.24829C8.36225 4.36383 8.13167 4.88375 8.36225 5.3748Z" })] }));
@@ -1,2 +0,0 @@
1
- import type { SVGProps } from 'react';
2
- export declare const LiFiLogo: (props: SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
package/icons/LiFiLogo.js DELETED
@@ -1,2 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- export const LiFiLogo = (props) => (_jsxs("svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "inherit", xmlns: "http://www.w3.org/2000/svg", ...props, children: [_jsx("path", { d: "M14.6163 21.6947L5.1336 23.89C4.78772 23.9766 4.52832 24.3232 4.52832 24.6698V31.1978C4.52832 31.7467 4.96066 32.0933 5.50829 31.9777L18.7379 28.9159C19.2856 28.8004 19.5162 28.2805 19.2856 27.7894L16.8933 22.8501C16.5186 22.0702 16.8933 21.2614 17.7291 21.0881L26.376 19.0084C26.9813 18.864 27.5001 18.2285 27.5001 17.593V11.5561C27.5001 11.0073 27.0677 10.6318 26.5201 10.7762L14.0398 13.7514C13.2616 13.9247 12.9157 14.6757 13.2616 15.3978L15.4521 19.9327C15.8268 20.7126 15.4521 21.4925 14.6163 21.6947Z" }), _jsx("path", { d: "M8.36225 5.3748L10.841 10.4585C11.1581 11.1229 10.841 11.8161 10.1204 11.9606L5.53762 13.0293C4.96116 13.1737 4.5 13.7514 4.5 14.3291V19.7884C4.5 20.7127 5.24939 21.2904 6.1429 21.0882L10.4087 20.1061C10.9851 19.9906 11.4463 19.384 11.4463 18.8063L11.4751 13.2026C11.4751 12.4227 12.1092 11.6428 12.8586 11.4695L26.8376 8.11886C27.1835 8.03221 27.4429 7.68559 27.4429 7.33897V0.810981C27.4429 0.262168 27.0106 -0.113336 26.4629 0.0310883L8.90988 4.24829C8.36225 4.36383 8.13167 4.88375 8.36225 5.3748Z" })] }));
@@ -1,2 +0,0 @@
1
- import type { SVGProps } from 'react';
2
- export declare const LiFiToolLogo: (props: SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- export const LiFiToolLogo = (props) => (_jsxs("svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: [_jsx("circle", { cx: "16", cy: "16", r: "16", fill: "#F5B5FF" }), _jsx("path", { d: "M15.5031 19.2031L10.1691 20.4379C9.97453 20.4867 9.82861 20.6816 9.82861 20.8766V24.5486C9.82861 24.8573 10.0718 25.0523 10.3798 24.9873L17.8215 23.265C18.1296 23.2 18.2593 22.9076 18.1296 22.6314L16.7839 19.853C16.5731 19.4143 16.7839 18.9594 17.2541 18.8619L22.1179 17.692C22.4584 17.6108 22.7502 17.2534 22.7502 16.8959V13.5001C22.7502 13.1914 22.507 12.9802 22.199 13.0614L15.1788 14.735C14.7411 14.8324 14.5465 15.2549 14.7411 15.6611L15.9733 18.212C16.184 18.6507 15.9733 19.0893 15.5031 19.2031Z", fill: "black" }), _jsx("path", { d: "M11.985 10.0233L13.3793 12.8829C13.5577 13.2566 13.3793 13.6466 12.974 13.7278L10.3962 14.329C10.0719 14.4102 9.8125 14.7352 9.8125 15.0601V18.1309C9.8125 18.6509 10.234 18.9758 10.7366 18.8621L13.1361 18.3097C13.4604 18.2447 13.7198 17.9035 13.7198 17.5785L13.736 14.4265C13.736 13.9878 14.0927 13.5491 14.5142 13.4516L22.3774 11.5669C22.572 11.5181 22.7179 11.3231 22.7179 11.1282V7.45618C22.7179 7.14747 22.4747 6.93625 22.1666 7.01749L12.2931 9.38966C11.985 9.45465 11.8553 9.74711 11.985 10.0233Z", fill: "black" })] }));
@@ -1,5 +0,0 @@
1
- import { styled } from '@mui/material/styles';
2
- import { ListItemButton as ListItemButtonBase } from '../../components/ListItemButton';
3
- export const ListItemButton = styled(ListItemButtonBase)(({ theme }) => ({
4
- paddingRight: theme.spacing(1),
5
- }));
@@ -1,2 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const ColorSchemeButtonGroup: React.FC;
@@ -1,23 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import Brightness4Icon from '@mui/icons-material/Brightness4';
3
- import DarkModeIcon from '@mui/icons-material/DarkMode';
4
- import LightModeIcon from '@mui/icons-material/LightMode';
5
- import { Box, ToggleButtonGroup } from '@mui/material';
6
- import { useTranslation } from 'react-i18next';
7
- import { useWidgetConfig } from '../../providers';
8
- import { useAppearance } from '../../stores';
9
- import { HiddenUI } from '../../types';
10
- import { ToggleButton } from './ColorSchemeButtonGroup.style';
11
- export const ColorSchemeButtonGroup = () => {
12
- const { t } = useTranslation();
13
- const { hiddenUI } = useWidgetConfig();
14
- const [appearance, setAppearance] = useAppearance();
15
- if (hiddenUI?.includes(HiddenUI.Appearance)) {
16
- return null;
17
- }
18
- return (_jsx(Box, { pb: 2, children: _jsxs(ToggleButtonGroup, { color: "primary", value: appearance, onChange: (_, value) => {
19
- if (value) {
20
- setAppearance(value);
21
- }
22
- }, exclusive: true, fullWidth: true, children: [_jsxs(ToggleButton, { value: "light", children: [_jsx(LightModeIcon, { sx: { marginRight: 1 } }), t('button.light')] }), _jsxs(ToggleButton, { value: "dark", children: [_jsx(DarkModeIcon, { sx: { marginRight: 1 } }), t('button.dark')] }), _jsxs(ToggleButton, { value: "auto", children: [_jsx(Brightness4Icon, { sx: { marginRight: 1 } }), t('button.auto')] })] }) }));
23
- };
@@ -1,4 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const ToggleButton: import("@emotion/styled").StyledComponent<import("@mui/material").ToggleButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
3
- ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
4
- }, "className" | "style" | "classes" | "action" | "centerRipple" | "children" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "tabIndex" | "TouchRippleProps" | "touchRippleRef" | "color" | "onChange" | "onClick" | "disableFocusRipple" | "fullWidth" | "size" | "value" | "selected"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
@@ -1,16 +0,0 @@
1
- import { ToggleButton as MuiToggleButton } from '@mui/material';
2
- import { styled } from '@mui/material/styles';
3
- import { toggleButtonClasses } from '@mui/material/ToggleButton';
4
- export const ToggleButton = styled(MuiToggleButton)(({ theme }) => ({
5
- textTransform: 'none',
6
- borderRadius: theme.shape.borderRadius,
7
- borderColor: theme.palette.mode === 'light'
8
- ? theme.palette.grey[300]
9
- : theme.palette.grey[800],
10
- [`&.${toggleButtonClasses.selected}`]: {
11
- color: theme.palette.mode === 'light'
12
- ? theme.palette.primary.main
13
- : theme.palette.primary.light,
14
- borderColor: 'currentColor !important',
15
- },
16
- }));
@@ -1,21 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import ChevronRightIcon from '@mui/icons-material/ChevronRight';
3
- import { Box } from '@mui/material';
4
- import { useTranslation } from 'react-i18next';
5
- import { useNavigate } from 'react-router-dom';
6
- import { shallow } from 'zustand/shallow';
7
- import { useSettingsStore } from '../../stores';
8
- import { navigationRoutes } from '../../utils';
9
- import { ListItemButton, ListItemText } from './EnabledToolsButton.style';
10
- export const EnabledToolsButton = ({ type }) => {
11
- const { t } = useTranslation();
12
- const navigate = useNavigate();
13
- const [enabledTools, tools] = useSettingsStore((state) => {
14
- const enabledTools = Object.values(state[`_enabled${type}`] ?? {});
15
- return [enabledTools.filter(Boolean).length, enabledTools.length];
16
- }, shallow);
17
- const handleClick = () => {
18
- navigate(navigationRoutes[type.toLowerCase()]);
19
- };
20
- return (_jsxs(ListItemButton, { onClick: handleClick, children: [_jsx(ListItemText, { primary: t(`settings.enabled${type}`) }), _jsxs(Box, { display: "flex", alignItems: "center", children: [_jsx(ListItemText, { primary: `${enabledTools}/${tools}` }), _jsx(ChevronRightIcon, {})] })] }));
21
- };
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const ListItemButton: import("@emotion/styled").StyledComponent<import("@mui/material").ListItemButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
3
- ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
4
- }, "className" | "style" | "classes" | "action" | "centerRipple" | "children" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "tabIndex" | "TouchRippleProps" | "touchRippleRef" | "autoFocus" | "alignItems" | "divider" | "dense" | "selected" | "disableGutters"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
5
- export declare const ListItemText: import("@emotion/styled").StyledComponent<import("@mui/material").ListItemTextProps<import("react").ElementType<any>, import("react").ElementType<any>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
@@ -1,14 +0,0 @@
1
- import { ListItemText as MuiListItemText } from '@mui/material';
2
- import { listItemTextClasses } from '@mui/material/ListItemText';
3
- import { styled } from '@mui/material/styles';
4
- import { ListItemButton as ListItemButtonBase } from '../../components/ListItemButton';
5
- export const ListItemButton = styled(ListItemButtonBase)(({ theme }) => ({
6
- height: 48,
7
- paddingRight: theme.spacing(0.5),
8
- }));
9
- export const ListItemText = styled(MuiListItemText)({
10
- [`.${listItemTextClasses.primary}`]: {
11
- fontWeight: 400,
12
- fontSize: '1rem',
13
- },
14
- });
@@ -1 +0,0 @@
1
- export declare const GasPriceSelect: () => import("react/jsx-runtime").JSX.Element;
@@ -1,13 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown';
3
- import { FormControl, MenuItem } from '@mui/material';
4
- import { useTranslation } from 'react-i18next';
5
- import { Card, CardTitle } from '../../components/Card';
6
- import { Select } from '../../components/Select';
7
- import { useSettings, useSettingsStore } from '../../stores';
8
- export const GasPriceSelect = () => {
9
- const { t } = useTranslation();
10
- const setValue = useSettingsStore((state) => state.setValue);
11
- const { gasPrice } = useSettings(['gasPrice']);
12
- return (_jsxs(Card, { flex: 1, children: [_jsx(CardTitle, { children: t(`settings.gasPrice.title`) }), _jsx(FormControl, { fullWidth: true, children: _jsxs(Select, { MenuProps: { elevation: 2 }, value: gasPrice, onChange: (event) => setValue('gasPrice', event.target.value), IconComponent: KeyboardArrowDownIcon, dense: true, children: [_jsx(MenuItem, { value: "slow", children: t(`settings.gasPrice.slow`) }), _jsx(MenuItem, { value: "normal", children: t(`settings.gasPrice.normal`) }), _jsx(MenuItem, { value: "fast", children: t(`settings.gasPrice.fast`) })] }) })] }));
13
- };
@@ -1,2 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const LanguageSelect: React.FC;
@@ -1,33 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown';
3
- import { FormControl, MenuItem } from '@mui/material';
4
- import { useTranslation } from 'react-i18next';
5
- import { Card, CardTitle } from '../../components/Card';
6
- import { Select } from '../../components/Select';
7
- import { useWidgetConfig } from '../../providers';
8
- import { useSettings, useSettingsStore } from '../../stores';
9
- import { HiddenUI } from '../../types';
10
- export const LanguageSelect = () => {
11
- const { t, i18n } = useTranslation();
12
- const { languages, hiddenUI } = useWidgetConfig();
13
- const setValue = useSettingsStore((state) => state.setValue);
14
- const { language } = useSettings(['language']);
15
- if (hiddenUI?.includes(HiddenUI.Language)) {
16
- return null;
17
- }
18
- const handleChangeLanguage = (event) => {
19
- const language = event.target.value;
20
- setValue('language', language);
21
- i18n.changeLanguage(language);
22
- };
23
- const filteredLanguages = Object.keys(i18n.store.data).sort();
24
- if (filteredLanguages.length <= 1) {
25
- return null;
26
- }
27
- const value = filteredLanguages.includes(language || i18n.resolvedLanguage || '')
28
- ? language || i18n.resolvedLanguage
29
- : languages?.default || languages?.allow?.[0];
30
- return (_jsxs(Card, { mb: 2, children: [_jsx(CardTitle, { children: t(`language.title`) }), _jsx(FormControl, { fullWidth: true, children: _jsx(Select, { MenuProps: { elevation: 2 }, value: value, onChange: handleChangeLanguage, IconComponent: KeyboardArrowDownIcon, dense: true, children: filteredLanguages.map((lng) => {
31
- return (_jsx(MenuItem, { value: lng, children: t('language.name', { lng }) }, lng));
32
- }) }) })] }));
33
- };