@lifi/widget 1.32.8 → 2.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/App.js +3 -3
- package/AppDrawer.js +4 -3
- package/AppDrawer.style.d.ts +5 -5
- package/AppProvider.js +4 -3
- package/cjs/App.js +3 -3
- package/cjs/AppDrawer.js +4 -3
- package/cjs/AppDrawer.style.d.ts +5 -5
- package/cjs/AppProvider.js +2 -1
- package/cjs/components/ActiveSwaps/ActiveSwaps.style.d.ts +5 -5
- package/cjs/components/Card/CardIconButton.d.ts +29 -0
- package/cjs/components/Card/CardIconButton.js +17 -0
- package/cjs/components/Card/CardLabel.d.ts +26 -0
- package/cjs/components/Card/CardLabel.js +45 -0
- package/cjs/components/Card/CardTitle.d.ts +2 -2
- package/cjs/components/Card/index.d.ts +2 -0
- package/cjs/components/Card/index.js +2 -0
- package/cjs/components/GasMessage/FundsSufficiencyMessage.d.ts +1 -0
- package/cjs/components/GasMessage/FundsSufficiencyMessage.js +16 -0
- package/cjs/components/{GasSufficiencyMessage/GasSufficiencyMessage.d.ts → GasMessage/GasMessage.d.ts} +4 -2
- package/cjs/components/GasMessage/GasMessage.js +19 -0
- package/cjs/components/GasMessage/GasMessage.style.d.ts +34 -0
- package/cjs/components/GasMessage/GasMessage.style.js +48 -0
- package/cjs/components/GasMessage/GasRefuelMessage.d.ts +3 -0
- package/cjs/components/GasMessage/GasRefuelMessage.js +26 -0
- package/cjs/components/GasMessage/GasSufficiencyMessage.d.ts +7 -0
- package/cjs/components/GasMessage/GasSufficiencyMessage.js +21 -0
- package/cjs/components/GasMessage/index.d.ts +2 -0
- package/cjs/components/GasMessage/index.js +18 -0
- package/cjs/components/Header/Header.style.d.ts +6 -6
- package/cjs/components/Header/NavigationHeader.js +4 -4
- package/cjs/components/Header/WalletHeader.js +5 -5
- package/cjs/components/Insurance/Insurance.d.ts +3 -0
- package/cjs/components/Insurance/Insurance.js +11 -0
- package/cjs/components/Insurance/InsuranceCard.d.ts +3 -0
- package/cjs/components/Insurance/InsuranceCard.js +20 -0
- package/cjs/components/Insurance/InsuranceCollapsed.d.ts +3 -0
- package/cjs/components/Insurance/InsuranceCollapsed.js +32 -0
- package/cjs/components/Insurance/index.d.ts +1 -0
- package/cjs/components/{GasSufficiencyMessage → Insurance}/index.js +1 -1
- package/cjs/components/Insurance/types.d.ts +14 -0
- package/cjs/components/Insurance/types.js +2 -0
- package/cjs/components/ListItemButton.d.ts +1 -1
- package/cjs/components/NFT/NFT.style.d.ts +1 -1
- package/cjs/components/PoweredBy/PoweredBy.style.d.ts +3 -12
- package/cjs/components/ReverseTokensButton/ReverseTokensButton.style.d.ts +2 -2
- package/cjs/components/SendToWallet/SendToWallet.js +31 -25
- package/cjs/components/SendToWallet/SendToWallet.style.d.ts +2 -2
- package/cjs/components/SendToWallet/SendToWalletButton.js +3 -3
- package/cjs/components/SmallAvatar.d.ts +2 -2
- package/cjs/components/Step/CircularProgress.style.d.ts +1 -1
- package/cjs/components/Step/DestinationWalletAddress.d.ts +2 -2
- package/cjs/components/Step/DestinationWalletAddress.js +4 -8
- package/cjs/components/Step/GasStepProcess.d.ts +2 -2
- package/cjs/components/Step/GasStepProcess.js +3 -3
- package/cjs/components/Step/Step.d.ts +2 -2
- package/cjs/components/Step/Step.js +6 -8
- package/cjs/components/Step/StepList.d.ts +1 -1
- package/cjs/components/Step/StepProcess.d.ts +2 -2
- package/cjs/components/Step/StepProcess.js +1 -5
- package/cjs/components/Step/StepProcess.style.d.ts +3 -39
- package/cjs/components/Step/StepTimer.d.ts +2 -2
- package/cjs/components/Step/StepTimer.js +1 -1
- package/cjs/components/StepActions/StepActions.d.ts +6 -1
- package/cjs/components/StepActions/StepActions.js +54 -17
- package/cjs/components/StepActions/StepActions.style.d.ts +1 -1
- package/cjs/components/StepActions/types.d.ts +2 -2
- package/cjs/components/SwapButton/SwapButton.js +2 -2
- package/cjs/components/SwapButton/types.d.ts +1 -2
- package/cjs/components/SwapInput/SwapInput.style.d.ts +2 -2
- package/cjs/components/SwapInput/SwapInputAdornment.style.d.ts +3 -3
- package/cjs/components/SwapInput/SwapInputEndAdornment.js +18 -1
- package/cjs/components/SwapRouteCard/SwapRouteCard.d.ts +1 -2
- package/cjs/components/SwapRouteCard/SwapRouteCard.js +10 -26
- package/cjs/components/SwapRouteCard/SwapRouteCard.style.d.ts +4 -36
- package/cjs/components/SwapRouteCard/SwapRouteCard.style.js +7 -38
- package/cjs/components/SwapRouteCard/SwapRouteCardEssentials.d.ts +3 -0
- package/cjs/components/SwapRouteCard/SwapRouteCardEssentials.js +27 -0
- package/cjs/components/SwapRouteCard/SwapRouteCardSkeleton.js +5 -5
- package/cjs/components/SwapRouteCard/types.d.ts +2 -2
- package/cjs/components/SwapRouteCard/utils.d.ts +5 -0
- package/cjs/components/SwapRouteCard/utils.js +32 -2
- package/cjs/components/SwapRoutes/SwapRoutes.js +3 -12
- package/cjs/components/SwapRoutes/SwapRoutesExpanded.js +4 -11
- package/cjs/components/SwapRoutes/{SwapRoutes.style.d.ts → SwapRoutesExpanded.style.d.ts} +0 -9
- package/cjs/components/SwapRoutes/{SwapRoutes.style.js → SwapRoutesExpanded.style.js} +1 -12
- package/cjs/components/Switch.js +4 -4
- package/cjs/components/Token/Token.d.ts +2 -2
- package/cjs/components/Token/Token.style.d.ts +2 -2
- package/cjs/components/TokenList/TokenList.style.d.ts +2 -2
- package/cjs/config/theme.js +1 -1
- package/cjs/config/version.d.ts +1 -1
- package/cjs/config/version.js +1 -1
- package/cjs/hooks/index.d.ts +4 -0
- package/cjs/hooks/index.js +4 -0
- package/cjs/hooks/useChains.js +2 -2
- package/cjs/hooks/useFeaturedTokens.d.ts +1 -1
- package/cjs/hooks/useFeaturedTokens.js +2 -2
- package/cjs/hooks/useFundsSufficiency.d.ts +5 -0
- package/cjs/hooks/useFundsSufficiency.js +73 -0
- package/cjs/hooks/useGasRecommendation.d.ts +2 -0
- package/cjs/hooks/useGasRecommendation.js +23 -0
- package/cjs/hooks/useGasRefuel.d.ts +7 -0
- package/cjs/hooks/useGasRefuel.js +61 -0
- package/cjs/hooks/useGasSufficiency.d.ts +2 -3
- package/cjs/hooks/useGasSufficiency.js +6 -37
- package/cjs/hooks/useGetTokenBalancesWithRetry.d.ts +3 -0
- package/cjs/hooks/useGetTokenBalancesWithRetry.js +33 -0
- package/cjs/hooks/useProcessMessage.d.ts +3 -3
- package/cjs/hooks/useSwapRoutes.d.ts +7 -2
- package/cjs/hooks/useSwapRoutes.js +31 -11
- package/cjs/hooks/useTokenAddressBalance.js +4 -2
- package/cjs/hooks/useTokenBalance.js +4 -22
- package/cjs/hooks/useTokenBalances.d.ts +1 -1
- package/cjs/hooks/useTokenSearch.js +2 -2
- package/cjs/hooks/useTokens.js +2 -3
- package/cjs/i18n/en.json +14 -7
- package/cjs/i18n/it.json +6 -2
- package/cjs/i18n/pt.json +234 -0
- package/cjs/i18n/uk.json +5 -1
- package/cjs/icons/InsuraceLogo.d.ts +2 -0
- package/cjs/icons/InsuraceLogo.js +11 -0
- package/cjs/icons/index.d.ts +1 -0
- package/cjs/icons/index.js +1 -0
- package/cjs/index.d.ts +0 -6
- package/cjs/index.js +1 -6
- package/cjs/pages/MainPage/MainGasMessage.d.ts +3 -0
- package/cjs/pages/MainPage/MainGasMessage.js +12 -0
- package/cjs/pages/MainPage/MainPage.js +3 -2
- package/cjs/pages/MainPage/MainSwapButton.js +1 -1
- package/cjs/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.style.d.ts +1 -1
- package/cjs/pages/SettingsPage/ColorSchemeButtonGroup.js +2 -2
- package/cjs/pages/SettingsPage/ColorSchemeButtonGroup.style.d.ts +2 -2
- package/cjs/pages/SettingsPage/EnabledToolsButton.style.d.ts +1 -1
- package/cjs/pages/SettingsPage/RoutePrioritySelect.js +1 -1
- package/cjs/pages/SwapDetailsPage/SwapDetailsPage.js +4 -3
- package/cjs/pages/SwapPage/ExchangeRateBottomSheet.d.ts +1 -2
- package/cjs/pages/SwapPage/ExchangeRateBottomSheet.js +1 -14
- package/cjs/pages/SwapPage/StartSwapButton.d.ts +3 -2
- package/cjs/pages/SwapPage/StartSwapButton.js +14 -4
- package/cjs/pages/SwapPage/SwapPage.js +18 -7
- package/cjs/pages/SwapPage/types.d.ts +9 -0
- package/cjs/pages/SwapPage/types.js +2 -0
- package/cjs/pages/SwapRoutesPage/SwapRoutesPage.js +1 -1
- package/cjs/pages/SwapRoutesPage/SwapRoutesPage.style.d.ts +2 -1
- package/cjs/providers/SDKProvider/SDKProvider.d.ts +2 -2
- package/cjs/providers/SDKProvider/SDKProvider.js +2 -1
- package/cjs/providers/SwapFormProvider/FormUpdater.js +2 -3
- package/cjs/providers/SwapFormProvider/SwapFormProvider.js +2 -3
- package/cjs/providers/SwapFormProvider/index.d.ts +1 -0
- package/cjs/providers/SwapFormProvider/index.js +1 -0
- package/cjs/providers/WidgetProvider/WidgetProvider.js +17 -4
- package/cjs/providers/WidgetProvider/utils.d.ts +1 -1
- package/cjs/providers/WidgetProvider/utils.js +2 -4
- package/cjs/stores/StoreProvider.js +1 -1
- package/cjs/stores/routes/createRouteExecutionStore.js +3 -2
- package/cjs/stores/routes/index.d.ts +0 -1
- package/cjs/stores/routes/index.js +0 -1
- package/cjs/stores/routes/types.d.ts +1 -5
- package/cjs/stores/routes/useSetExecutableRoute.d.ts +1 -1
- package/cjs/stores/settings/types.d.ts +1 -0
- package/cjs/stores/settings/useSettingsStore.js +1 -0
- package/cjs/types/widget.d.ts +5 -10
- package/cjs/utils/format.js +4 -1
- package/components/ActiveSwaps/ActiveSwaps.style.d.ts +5 -5
- package/components/Card/CardIconButton.d.ts +29 -0
- package/components/Card/CardIconButton.js +14 -0
- package/components/Card/CardLabel.d.ts +26 -0
- package/components/Card/CardLabel.js +42 -0
- package/components/Card/CardTitle.d.ts +2 -2
- package/components/Card/index.d.ts +2 -0
- package/components/Card/index.js +2 -0
- package/components/GasMessage/FundsSufficiencyMessage.d.ts +1 -0
- package/components/GasMessage/FundsSufficiencyMessage.js +12 -0
- package/components/{GasSufficiencyMessage/GasSufficiencyMessage.d.ts → GasMessage/GasMessage.d.ts} +4 -2
- package/components/GasMessage/GasMessage.js +15 -0
- package/components/GasMessage/GasMessage.style.d.ts +34 -0
- package/components/GasMessage/GasMessage.style.js +45 -0
- package/components/GasMessage/GasRefuelMessage.d.ts +3 -0
- package/components/GasMessage/GasRefuelMessage.js +22 -0
- package/components/GasMessage/GasSufficiencyMessage.d.ts +7 -0
- package/components/GasMessage/GasSufficiencyMessage.js +17 -0
- package/components/GasMessage/index.d.ts +2 -0
- package/components/GasMessage/index.js +2 -0
- package/components/Header/Header.style.d.ts +6 -6
- package/components/Header/NavigationHeader.js +4 -4
- package/components/Header/WalletHeader.js +6 -6
- package/components/Insurance/Insurance.d.ts +3 -0
- package/components/Insurance/Insurance.js +7 -0
- package/components/Insurance/InsuranceCard.d.ts +3 -0
- package/components/Insurance/InsuranceCard.js +16 -0
- package/components/Insurance/InsuranceCollapsed.d.ts +3 -0
- package/components/Insurance/InsuranceCollapsed.js +28 -0
- package/components/Insurance/index.d.ts +1 -0
- package/components/Insurance/index.js +1 -0
- package/components/Insurance/types.d.ts +14 -0
- package/components/Insurance/types.js +1 -0
- package/components/ListItemButton.d.ts +1 -1
- package/components/NFT/NFT.style.d.ts +1 -1
- package/components/PoweredBy/PoweredBy.style.d.ts +3 -12
- package/components/ReverseTokensButton/ReverseTokensButton.style.d.ts +2 -2
- package/components/SendToWallet/SendToWallet.js +34 -28
- package/components/SendToWallet/SendToWallet.style.d.ts +2 -2
- package/components/SendToWallet/SendToWalletButton.js +4 -4
- package/components/SmallAvatar.d.ts +2 -2
- package/components/Step/CircularProgress.style.d.ts +1 -1
- package/components/Step/DestinationWalletAddress.d.ts +2 -2
- package/components/Step/DestinationWalletAddress.js +4 -8
- package/components/Step/GasStepProcess.d.ts +2 -2
- package/components/Step/GasStepProcess.js +3 -3
- package/components/Step/Step.d.ts +2 -2
- package/components/Step/Step.js +6 -8
- package/components/Step/StepList.d.ts +1 -1
- package/components/Step/StepProcess.d.ts +2 -2
- package/components/Step/StepProcess.js +1 -5
- package/components/Step/StepProcess.style.d.ts +3 -39
- package/components/Step/StepTimer.d.ts +2 -2
- package/components/Step/StepTimer.js +1 -1
- package/components/StepActions/StepActions.d.ts +6 -1
- package/components/StepActions/StepActions.js +51 -16
- package/components/StepActions/StepActions.style.d.ts +1 -1
- package/components/StepActions/types.d.ts +2 -2
- package/components/SwapButton/SwapButton.js +2 -2
- package/components/SwapButton/types.d.ts +1 -2
- package/components/SwapInput/SwapInput.style.d.ts +2 -2
- package/components/SwapInput/SwapInputAdornment.style.d.ts +3 -3
- package/components/SwapInput/SwapInputEndAdornment.js +19 -2
- package/components/SwapRouteCard/SwapRouteCard.d.ts +1 -2
- package/components/SwapRouteCard/SwapRouteCard.js +11 -26
- package/components/SwapRouteCard/SwapRouteCard.style.d.ts +4 -36
- package/components/SwapRouteCard/SwapRouteCard.style.js +7 -38
- package/components/SwapRouteCard/SwapRouteCardEssentials.d.ts +3 -0
- package/components/SwapRouteCard/SwapRouteCardEssentials.js +23 -0
- package/components/SwapRouteCard/SwapRouteCardSkeleton.js +5 -5
- package/components/SwapRouteCard/types.d.ts +2 -2
- package/components/SwapRouteCard/utils.d.ts +5 -0
- package/components/SwapRouteCard/utils.js +30 -1
- package/components/SwapRoutes/SwapRoutes.js +5 -14
- package/components/SwapRoutes/SwapRoutesExpanded.js +4 -11
- package/components/SwapRoutes/{SwapRoutes.style.d.ts → SwapRoutesExpanded.style.d.ts} +0 -9
- package/components/SwapRoutes/{SwapRoutes.style.js → SwapRoutesExpanded.style.js} +1 -12
- package/components/Switch.js +5 -5
- package/components/Token/Token.d.ts +2 -2
- package/components/Token/Token.style.d.ts +2 -2
- package/components/TokenList/TokenList.style.d.ts +2 -2
- package/config/theme.js +1 -1
- package/config/version.d.ts +1 -1
- package/config/version.js +1 -1
- package/hooks/index.d.ts +4 -0
- package/hooks/index.js +4 -0
- package/hooks/useChains.js +2 -2
- package/hooks/useFeaturedTokens.d.ts +1 -1
- package/hooks/useFeaturedTokens.js +2 -2
- package/hooks/useFundsSufficiency.d.ts +5 -0
- package/hooks/useFundsSufficiency.js +69 -0
- package/hooks/useGasRecommendation.d.ts +2 -0
- package/hooks/useGasRecommendation.js +19 -0
- package/hooks/useGasRefuel.d.ts +7 -0
- package/hooks/useGasRefuel.js +57 -0
- package/hooks/useGasSufficiency.d.ts +2 -3
- package/hooks/useGasSufficiency.js +7 -38
- package/hooks/useGetTokenBalancesWithRetry.d.ts +3 -0
- package/hooks/useGetTokenBalancesWithRetry.js +29 -0
- package/hooks/useProcessMessage.d.ts +3 -3
- package/hooks/useSwapRoutes.d.ts +7 -2
- package/hooks/useSwapRoutes.js +32 -12
- package/hooks/useTokenAddressBalance.js +4 -2
- package/hooks/useTokenBalance.js +5 -23
- package/hooks/useTokenBalances.d.ts +1 -1
- package/hooks/useTokenSearch.js +2 -2
- package/hooks/useTokens.js +2 -3
- package/i18n/en.json +14 -7
- package/i18n/it.json +6 -2
- package/i18n/pt.json +234 -0
- package/i18n/uk.json +5 -1
- package/icons/InsuraceLogo.d.ts +2 -0
- package/icons/InsuraceLogo.js +7 -0
- package/icons/index.d.ts +1 -0
- package/icons/index.js +1 -0
- package/index.d.ts +0 -6
- package/index.js +0 -5
- package/package.json +12 -12
- package/pages/ActiveSwapsPage/ActiveSwapsPage.js +2 -2
- package/pages/MainPage/MainGasMessage.d.ts +3 -0
- package/pages/MainPage/MainGasMessage.js +8 -0
- package/pages/MainPage/MainPage.js +3 -2
- package/pages/MainPage/MainSwapButton.js +1 -1
- package/pages/SelectEnabledToolsPage/SelectEnabledToolsPage.style.d.ts +1 -1
- package/pages/SettingsPage/ColorSchemeButtonGroup.js +2 -2
- package/pages/SettingsPage/ColorSchemeButtonGroup.style.d.ts +2 -2
- package/pages/SettingsPage/EnabledToolsButton.style.d.ts +1 -1
- package/pages/SettingsPage/RoutePrioritySelect.js +1 -1
- package/pages/SwapDetailsPage/SwapDetailsPage.js +5 -4
- package/pages/SwapHistoryPage/SwapHistoryPage.js +2 -2
- package/pages/SwapPage/ExchangeRateBottomSheet.d.ts +1 -2
- package/pages/SwapPage/ExchangeRateBottomSheet.js +0 -12
- package/pages/SwapPage/StartSwapButton.d.ts +3 -2
- package/pages/SwapPage/StartSwapButton.js +13 -4
- package/pages/SwapPage/SwapPage.js +21 -10
- package/pages/SwapPage/types.d.ts +9 -0
- package/pages/SwapPage/types.js +1 -0
- package/pages/SwapRoutesPage/SwapRoutesPage.js +1 -1
- package/pages/SwapRoutesPage/SwapRoutesPage.style.d.ts +2 -1
- package/providers/SDKProvider/SDKProvider.d.ts +2 -2
- package/providers/SDKProvider/SDKProvider.js +3 -2
- package/providers/SwapFormProvider/FormUpdater.js +2 -3
- package/providers/SwapFormProvider/SwapFormProvider.js +2 -3
- package/providers/SwapFormProvider/index.d.ts +1 -0
- package/providers/SwapFormProvider/index.js +1 -0
- package/providers/WidgetProvider/WidgetProvider.js +17 -4
- package/providers/WidgetProvider/utils.d.ts +1 -1
- package/providers/WidgetProvider/utils.js +2 -4
- package/stores/StoreProvider.js +2 -2
- package/stores/routes/createRouteExecutionStore.js +3 -2
- package/stores/routes/index.d.ts +0 -1
- package/stores/routes/index.js +0 -1
- package/stores/routes/types.d.ts +1 -5
- package/stores/routes/useSetExecutableRoute.d.ts +1 -1
- package/stores/settings/types.d.ts +1 -0
- package/stores/settings/useSettingsStore.js +1 -0
- package/tsconfig.cjs.tsbuildinfo +1 -1
- package/types/widget.d.ts +5 -10
- package/utils/format.js +4 -1
- package/cjs/components/GasSufficiencyMessage/GasSufficiencyMessage.js +0 -31
- package/cjs/components/GasSufficiencyMessage/GasSufficiencyMessage.style.d.ts +0 -9
- package/cjs/components/GasSufficiencyMessage/GasSufficiencyMessage.style.js +0 -14
- package/cjs/components/GasSufficiencyMessage/index.d.ts +0 -1
- package/cjs/components/SwapRoutes/useSetRecommendedRoute.d.ts +0 -2
- package/cjs/components/SwapRoutes/useSetRecommendedRoute.js +0 -13
- package/cjs/config/env.d.ts +0 -3
- package/cjs/config/env.js +0 -6
- package/cjs/stores/routes/useRecommendedRouteStore.d.ts +0 -10
- package/cjs/stores/routes/useRecommendedRouteStore.js +0 -39
- package/components/GasSufficiencyMessage/GasSufficiencyMessage.js +0 -27
- package/components/GasSufficiencyMessage/GasSufficiencyMessage.style.d.ts +0 -9
- package/components/GasSufficiencyMessage/GasSufficiencyMessage.style.js +0 -11
- package/components/GasSufficiencyMessage/index.d.ts +0 -1
- package/components/GasSufficiencyMessage/index.js +0 -1
- package/components/SwapRoutes/useSetRecommendedRoute.d.ts +0 -2
- package/components/SwapRoutes/useSetRecommendedRoute.js +0 -9
- package/config/env.d.ts +0 -3
- package/config/env.js +0 -3
- package/stores/routes/useRecommendedRouteStore.d.ts +0 -10
- package/stores/routes/useRecommendedRouteStore.js +0 -32
package/cjs/i18n/pt.json
ADDED
|
@@ -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,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;
|
package/cjs/icons/index.d.ts
CHANGED
package/cjs/icons/index.js
CHANGED
|
@@ -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);
|
package/cjs/index.d.ts
CHANGED
|
@@ -7,9 +7,3 @@ export { useWidgetEvents, widgetEvents } from './hooks';
|
|
|
7
7
|
export { useWallet } from './providers/WalletProvider';
|
|
8
8
|
export * from './types';
|
|
9
9
|
export declare const LiFiWidget: import("react").FC<import("./types").WidgetProps>;
|
|
10
|
-
/**
|
|
11
|
-
* @deprecated Use configuration { variant: 'drawer' } instead
|
|
12
|
-
*/
|
|
13
|
-
export declare const LiFiWidgetDrawer: import("react").ForwardRefExoticComponent<import("./types").WidgetDrawerProps & import("./types").WidgetConfig & {
|
|
14
|
-
config?: import("./types").WidgetConfig | undefined;
|
|
15
|
-
} & import("react").RefAttributes<import("./AppDrawer").WidgetDrawer>>;
|
package/cjs/index.js
CHANGED
|
@@ -14,9 +14,8 @@ 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
|
-
exports.
|
|
17
|
+
exports.LiFiWidget = exports.useWallet = exports.widgetEvents = exports.useWidgetEvents = void 0;
|
|
18
18
|
const App_1 = require("./App");
|
|
19
|
-
const AppDrawer_1 = require("./AppDrawer");
|
|
20
19
|
// TODO: remove or make optional
|
|
21
20
|
require("./fonts/inter.css");
|
|
22
21
|
__exportStar(require("./components/NFT"), exports);
|
|
@@ -31,7 +30,3 @@ __exportStar(require("./types"), exports);
|
|
|
31
30
|
// componentName.replace('Mui', 'LiFi'),
|
|
32
31
|
// );
|
|
33
32
|
exports.LiFiWidget = App_1.App;
|
|
34
|
-
/**
|
|
35
|
-
* @deprecated Use configuration { variant: 'drawer' } instead
|
|
36
|
-
*/
|
|
37
|
-
exports.LiFiWidgetDrawer = AppDrawer_1.AppDrawer;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MainGasMessage = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const GasMessage_1 = require("../../components/GasMessage");
|
|
6
|
+
const hooks_1 = require("../../hooks");
|
|
7
|
+
const MainGasMessage = (props) => {
|
|
8
|
+
const { routes } = (0, hooks_1.useSwapRoutes)();
|
|
9
|
+
const currentRoute = routes?.[0];
|
|
10
|
+
return (0, jsx_runtime_1.jsx)(GasMessage_1.GasMessage, { route: currentRoute, ...props });
|
|
11
|
+
};
|
|
12
|
+
exports.MainGasMessage = MainGasMessage;
|
|
@@ -5,19 +5,20 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const material_1 = require("@mui/material");
|
|
6
6
|
const ActiveSwaps_1 = require("../../components/ActiveSwaps");
|
|
7
7
|
const ContractComponent_1 = require("../../components/ContractComponent");
|
|
8
|
-
const
|
|
8
|
+
const GasMessage_1 = require("../../components/GasMessage");
|
|
9
9
|
const SelectChainAndToken_1 = require("../../components/SelectChainAndToken");
|
|
10
10
|
const SendToWallet_1 = require("../../components/SendToWallet");
|
|
11
11
|
const SwapInput_1 = require("../../components/SwapInput");
|
|
12
12
|
const SwapRoutes_1 = require("../../components/SwapRoutes");
|
|
13
13
|
const hooks_1 = require("../../hooks");
|
|
14
14
|
const providers_1 = require("../../providers");
|
|
15
|
+
const MainGasMessage_1 = require("./MainGasMessage");
|
|
15
16
|
const MainPage_style_1 = require("./MainPage.style");
|
|
16
17
|
const MainSwapButton_1 = require("./MainSwapButton");
|
|
17
18
|
const MainPage = () => {
|
|
18
19
|
const expandable = (0, hooks_1.useExpandableVariant)();
|
|
19
20
|
const { variant } = (0, providers_1.useWidgetConfig)();
|
|
20
21
|
const nft = variant === 'nft';
|
|
21
|
-
return ((0, jsx_runtime_1.jsxs)(MainPage_style_1.FormContainer, { disableGutters: true, children: [(0, jsx_runtime_1.jsx)(ActiveSwaps_1.ActiveSwaps, { mx: 3, mt: 1, mb:
|
|
22
|
+
return ((0, jsx_runtime_1.jsxs)(MainPage_style_1.FormContainer, { disableGutters: true, children: [(0, jsx_runtime_1.jsx)(ActiveSwaps_1.ActiveSwaps, { mx: 3, mt: 1, mb: 1 }), nft ? (0, jsx_runtime_1.jsx)(ContractComponent_1.ContractComponent, { mx: 3, mt: 1, mb: 1 }) : null, (0, jsx_runtime_1.jsx)(SelectChainAndToken_1.SelectChainAndToken, { mt: 1, mx: 3, mb: 2 }), !nft ? (0, jsx_runtime_1.jsx)(SwapInput_1.SwapInput, { formType: "from", mx: 3, mb: 2 }) : null, !expandable ? (0, jsx_runtime_1.jsx)(SwapRoutes_1.SwapRoutes, { mx: 3, mb: 2 }) : null, (0, jsx_runtime_1.jsx)(SendToWallet_1.SendToWallet, { mx: 3, mb: 2 }), (0, jsx_runtime_1.jsx)(GasMessage_1.GasRefuelMessage, { mx: 3, mb: 2 }), (0, jsx_runtime_1.jsx)(MainGasMessage_1.MainGasMessage, { mx: 3, mb: 2 }), (0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", mx: 3, mb: 1, children: [(0, jsx_runtime_1.jsx)(MainSwapButton_1.MainSwapButton, {}), (0, jsx_runtime_1.jsx)(SendToWallet_1.SendToWalletButton, {})] })] }));
|
|
22
23
|
};
|
|
23
24
|
exports.MainPage = MainPage;
|
|
@@ -22,6 +22,6 @@ const MainSwapButton = () => {
|
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
|
-
return ((0, jsx_runtime_1.jsx)(SwapButton_1.SwapButton, { onClick: handleClick,
|
|
25
|
+
return ((0, jsx_runtime_1.jsx)(SwapButton_1.SwapButton, { onClick: handleClick, hasRoute: Boolean(currentRoute), disabled: currentRoute && (isLoading || isFetching || isValidating || !isValid) }));
|
|
26
26
|
};
|
|
27
27
|
exports.MainSwapButton = MainSwapButton;
|
|
@@ -17,4 +17,4 @@ export declare const ListItemButton: import("@emotion/styled").StyledComponent<i
|
|
|
17
17
|
touchRippleRef?: import("react").Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions> | undefined;
|
|
18
18
|
}, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
19
19
|
ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
|
|
20
|
-
}, "className" | "style" | "classes" | "tabIndex" | "children" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "TouchRippleProps" | "touchRippleRef" | "alignItems" | "
|
|
20
|
+
}, "className" | "style" | "classes" | "autoFocus" | "tabIndex" | "children" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "TouchRippleProps" | "touchRippleRef" | "alignItems" | "dense" | "divider" | "selected" | "disableGutters"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
|
|
@@ -13,9 +13,9 @@ const types_1 = require("../../types");
|
|
|
13
13
|
const ColorSchemeButtonGroup_style_1 = require("./ColorSchemeButtonGroup.style");
|
|
14
14
|
const ColorSchemeButtonGroup = () => {
|
|
15
15
|
const { t } = (0, react_i18next_1.useTranslation)();
|
|
16
|
-
const {
|
|
16
|
+
const { hiddenUI } = (0, providers_1.useWidgetConfig)();
|
|
17
17
|
const [appearance, setAppearance] = (0, stores_1.useAppearance)();
|
|
18
|
-
if (
|
|
18
|
+
if (hiddenUI?.includes(types_1.HiddenUI.Appearance)) {
|
|
19
19
|
return null;
|
|
20
20
|
}
|
|
21
21
|
return ((0, jsx_runtime_1.jsx)(material_1.Box, { pb: 2, children: (0, jsx_runtime_1.jsxs)(material_1.ToggleButtonGroup, { color: "primary", value: appearance, onChange: (_, value) => {
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
export declare const ToggleButton: import("@emotion/styled").StyledComponent<{
|
|
3
3
|
children?: import("react").ReactNode;
|
|
4
4
|
classes?: Partial<import("@mui/material").ToggleButtonClasses> | undefined;
|
|
5
|
-
color?: "success" | "warning" | "error" | "primary" | "secondary" | "info" | "standard" | undefined;
|
|
5
|
+
color?: import("@mui/types").OverridableStringUnion<"success" | "warning" | "error" | "primary" | "secondary" | "info" | "standard", import("@mui/material").ToggleButtonPropsColorOverrides> | undefined;
|
|
6
6
|
disabled?: boolean | undefined;
|
|
7
7
|
disableFocusRipple?: boolean | undefined;
|
|
8
8
|
fullWidth?: boolean | undefined;
|
|
9
9
|
onChange?: ((event: import("react").MouseEvent<HTMLElement, MouseEvent>, value: any) => void) | undefined;
|
|
10
10
|
onClick?: ((event: import("react").MouseEvent<HTMLElement, MouseEvent>, value: any) => void) | undefined;
|
|
11
11
|
selected?: boolean | undefined;
|
|
12
|
-
size?: "small" | "medium" | "large" | undefined;
|
|
12
|
+
size?: import("@mui/types").OverridableStringUnion<"small" | "medium" | "large", import("@mui/material").ToggleButtonPropsSizeOverrides> | undefined;
|
|
13
13
|
sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
|
|
14
14
|
value: {};
|
|
15
15
|
} & Omit<{
|
|
@@ -17,5 +17,5 @@ export declare const ListItemButton: import("@emotion/styled").StyledComponent<i
|
|
|
17
17
|
touchRippleRef?: import("react").Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions> | undefined;
|
|
18
18
|
}, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
19
19
|
ref?: import("react").RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
|
|
20
|
-
}, "className" | "style" | "classes" | "tabIndex" | "children" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "TouchRippleProps" | "touchRippleRef" | "alignItems" | "
|
|
20
|
+
}, "className" | "style" | "classes" | "autoFocus" | "tabIndex" | "children" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "TouchRippleProps" | "touchRippleRef" | "alignItems" | "dense" | "divider" | "selected" | "disableGutters"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
21
21
|
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>, {}, {}>;
|
|
@@ -15,7 +15,7 @@ const RoutePrioritySelect = () => {
|
|
|
15
15
|
const { routePriority } = (0, stores_1.useSettings)(['routePriority']);
|
|
16
16
|
const value = routePriority ?? '';
|
|
17
17
|
return ((0, jsx_runtime_1.jsxs)(Card_1.Card, { children: [(0, jsx_runtime_1.jsx)(Card_1.CardTitle, { children: t(`settings.routePriority`) }), (0, jsx_runtime_1.jsx)(material_1.FormControl, { fullWidth: true, children: (0, jsx_runtime_1.jsx)(Select_1.Select, { MenuProps: { elevation: 2 }, value: value, onChange: (event) => setValue('routePriority', event.target.value), IconComponent: KeyboardArrowDown_1.default, dense: true, children: sdk_1.Orders.map((order) => {
|
|
18
|
-
const tag = t(`swap.tags.${order.
|
|
18
|
+
const tag = t(`swap.tags.${order.toLowerCase()}`);
|
|
19
19
|
const tagName = `${tag[0]}${tag.slice(1).toLowerCase()}`;
|
|
20
20
|
return ((0, jsx_runtime_1.jsx)(material_1.MenuItem, { value: order, children: tagName }, order));
|
|
21
21
|
}) }) })] }));
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SwapDetailsPage = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const
|
|
5
|
+
const ContentCopyRounded_1 = require("@mui/icons-material/ContentCopyRounded");
|
|
6
6
|
const DeleteOutline_1 = require("@mui/icons-material/DeleteOutline");
|
|
7
7
|
const material_1 = require("@mui/material");
|
|
8
8
|
const react_1 = require("react");
|
|
@@ -12,6 +12,7 @@ const shallow_1 = require("zustand/shallow");
|
|
|
12
12
|
const Card_1 = require("../../components/Card");
|
|
13
13
|
const Dialog_1 = require("../../components/Dialog");
|
|
14
14
|
const Header_1 = require("../../components/Header");
|
|
15
|
+
const Insurance_1 = require("../../components/Insurance");
|
|
15
16
|
const Step_1 = require("../../components/Step");
|
|
16
17
|
const hooks_1 = require("../../hooks");
|
|
17
18
|
const stores_1 = require("../../stores");
|
|
@@ -50,9 +51,9 @@ const SwapDetailsPage = () => {
|
|
|
50
51
|
justifyContent: 'space-between',
|
|
51
52
|
}, pb: 1, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { fontSize: 12, children: new Intl.DateTimeFormat(i18n.language, { dateStyle: 'long' }).format(startedAt) }), (0, jsx_runtime_1.jsx)(material_1.Typography, { fontSize: 12, children: new Intl.DateTimeFormat(i18n.language, {
|
|
52
53
|
timeStyle: 'short',
|
|
53
|
-
}).format(startedAt) })] }), (0, Step_1.getStepList)(routeExecution?.route), (0, jsx_runtime_1.jsxs)(Card_1.Card, { mt: 2, children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
54
|
+
}).format(startedAt) })] }), (0, Step_1.getStepList)(routeExecution?.route), routeExecution?.route?.insurance?.state === 'INSURED' ? ((0, jsx_runtime_1.jsx)(Insurance_1.Insurance, { mt: 2, status: routeExecution.status, feeAmountUsd: routeExecution.route.insurance.feeAmountUsd, insurableRouteId: routeExecution.route.id })) : null, (0, jsx_runtime_1.jsxs)(Card_1.Card, { mt: 2, children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
54
55
|
display: 'flex',
|
|
55
56
|
flex: 1,
|
|
56
|
-
}, children: [(0, jsx_runtime_1.jsx)(Card_1.CardTitle, { flex: 1, children: t('swap.supportId') }), (0, jsx_runtime_1.jsx)(material_1.Box, { mr: 1, mt: 1, children: (0, jsx_runtime_1.jsx)(material_1.IconButton, { size: "medium", onClick: copySupportId, children: (0, jsx_runtime_1.jsx)(
|
|
57
|
+
}, children: [(0, jsx_runtime_1.jsx)(Card_1.CardTitle, { flex: 1, children: t('swap.supportId') }), (0, jsx_runtime_1.jsx)(material_1.Box, { mr: 1, mt: 1, children: (0, jsx_runtime_1.jsx)(material_1.IconButton, { size: "medium", onClick: copySupportId, children: (0, jsx_runtime_1.jsx)(ContentCopyRounded_1.default, { fontSize: "small" }) }) })] }), (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", pt: 1, pb: 2, px: 2, sx: { wordBreak: 'break-all' }, children: supportId })] }), (0, jsx_runtime_1.jsx)(material_1.Box, { mt: 2, children: (0, jsx_runtime_1.jsx)(material_1.Button, { href: "https://discord.com/channels/849912621360218112/863689862514343946", target: "_blank", rel: "nofollow noreferrer", fullWidth: true, children: t('button.contactSupport') }) }), (0, jsx_runtime_1.jsxs)(Dialog_1.Dialog, { open: open, onClose: toggleDialog, children: [(0, jsx_runtime_1.jsx)(material_1.DialogTitle, { children: t('swap.warning.title.deleteSwap') }), (0, jsx_runtime_1.jsx)(material_1.DialogContent, { children: (0, jsx_runtime_1.jsx)(material_1.DialogContentText, { children: t('swap.warning.message.deleteSwapHistory') }) }), (0, jsx_runtime_1.jsxs)(material_1.DialogActions, { children: [(0, jsx_runtime_1.jsx)(material_1.Button, { onClick: toggleDialog, children: t('button.cancel') }), (0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", onClick: handleDeleteRoute, autoFocus: true, children: t('button.delete') })] })] })] }));
|
|
57
58
|
};
|
|
58
59
|
exports.SwapDetailsPage = SwapDetailsPage;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { ExchangeRateUpdateParams
|
|
2
|
+
import type { ExchangeRateUpdateParams } from '@lifi/sdk';
|
|
3
3
|
export interface ExchangeRateBottomSheetBase {
|
|
4
4
|
isOpen(): void;
|
|
5
5
|
open(resolver: (value: boolean) => void, data: ExchangeRateUpdateParams): void;
|
|
@@ -11,5 +11,4 @@ interface ExchangeRateBottomSheetProps {
|
|
|
11
11
|
onCancel?(): void;
|
|
12
12
|
}
|
|
13
13
|
export declare const ExchangeRateBottomSheet: import("react").ForwardRefExoticComponent<ExchangeRateBottomSheetProps & import("react").RefAttributes<ExchangeRateBottomSheetBase>>;
|
|
14
|
-
export declare const getTokenValueLossThreshold: (route?: Route) => boolean;
|
|
15
14
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.ExchangeRateBottomSheet = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const WarningRounded_1 = require("@mui/icons-material/WarningRounded");
|
|
6
6
|
const material_1 = require("@mui/material");
|
|
@@ -58,16 +58,3 @@ const ExchangeRateBottomSheetContent = ({ data, onCancel, onContinue }) => {
|
|
|
58
58
|
.round(2, big_js_1.default.roundUp)
|
|
59
59
|
.toString(), "%"] })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", mt: 3, children: [(0, jsx_runtime_1.jsx)(material_1.Button, { variant: "text", onClick: onCancel, fullWidth: true, children: t('button.cancel') }), (0, jsx_runtime_1.jsx)(material_1.Box, { display: "flex", p: 1 }), (0, jsx_runtime_1.jsx)(material_1.Button, { variant: "contained", onClick: onContinue, fullWidth: true, children: t('button.continue') })] })] }));
|
|
60
60
|
};
|
|
61
|
-
const getTokenValueLossThreshold = (route) => {
|
|
62
|
-
if (!route) {
|
|
63
|
-
return false;
|
|
64
|
-
}
|
|
65
|
-
const fromAmountUSD = (0, big_js_1.default)(route?.fromAmountUSD || 0);
|
|
66
|
-
const toAmountUSD = (0, big_js_1.default)(route?.toAmountUSD || 0);
|
|
67
|
-
const gasCostUSD = (0, big_js_1.default)(route?.gasCostUSD || 0);
|
|
68
|
-
if (fromAmountUSD.eq(0) && toAmountUSD.eq(0)) {
|
|
69
|
-
return false;
|
|
70
|
-
}
|
|
71
|
-
return toAmountUSD.div(fromAmountUSD.plus(gasCostUSD)).lt(0.9);
|
|
72
|
-
};
|
|
73
|
-
exports.getTokenValueLossThreshold = getTokenValueLossThreshold;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type {
|
|
3
|
-
export declare const StartSwapButton: React.FC<
|
|
2
|
+
import type { StartSwapButtonProps } from './types';
|
|
3
|
+
export declare const StartSwapButton: React.FC<StartSwapButtonProps>;
|
|
4
|
+
export declare const StartIdleSwapButton: React.FC<StartSwapButtonProps>;
|
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.StartSwapButton = void 0;
|
|
3
|
+
exports.StartIdleSwapButton = exports.StartSwapButton = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const SwapButton_1 = require("../../components/SwapButton");
|
|
6
6
|
const hooks_1 = require("../../hooks");
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
const stores_1 = require("../../stores");
|
|
8
|
+
const StartSwapButton = ({ onClick, route, text, loading, }) => {
|
|
9
|
+
const { insufficientGas, isInitialLoading: isGasSufficiencyLoading } = (0, hooks_1.useGasSufficiency)(route);
|
|
10
|
+
const { insufficientFunds, isInitialLoading: isFundsSufficiencyLoading } = (0, hooks_1.useFundsSufficiency)(route);
|
|
11
|
+
return ((0, jsx_runtime_1.jsx)(SwapButton_1.SwapButton, { onClick: onClick, text: text, hasRoute: Boolean(route), disabled: insufficientFunds || !!insufficientGas?.length, loading: isFundsSufficiencyLoading || isGasSufficiencyLoading || loading }));
|
|
10
12
|
};
|
|
11
13
|
exports.StartSwapButton = StartSwapButton;
|
|
14
|
+
const StartIdleSwapButton = ({ onClick, route, text, loading, disabled, insurableRouteId, }) => {
|
|
15
|
+
const routeExecution = (0, stores_1.useRouteExecutionStore)((state) => state.routes[insurableRouteId]);
|
|
16
|
+
const { isFetching } = (0, hooks_1.useSwapRoutes)({
|
|
17
|
+
insurableRoute: routeExecution?.route,
|
|
18
|
+
});
|
|
19
|
+
return ((0, jsx_runtime_1.jsx)(exports.StartSwapButton, { onClick: onClick, text: text, route: route, disabled: disabled, loading: loading || isFetching, insurableRouteId: insurableRouteId }));
|
|
20
|
+
};
|
|
21
|
+
exports.StartIdleSwapButton = StartIdleSwapButton;
|