@lifi/widget 2.0.0-beta.3 → 2.0.0-beta.4
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/cjs/components/ChainSelect/ChainSelect.d.ts +0 -1
- package/cjs/components/ChainSelect/ChainSelect.style.js +1 -1
- package/cjs/components/GasMessage/FundsSufficiencyMessage.d.ts +0 -1
- package/cjs/components/Header/NavigationHeader.js +18 -5
- package/cjs/components/Insurance/InsuranceCard.js +10 -5
- package/cjs/components/Insurance/InsuranceCollapsed.js +1 -1
- package/cjs/components/Insurance/types.d.ts +1 -2
- package/cjs/components/NFT/NFT.js +2 -2
- package/cjs/components/NFT/types.d.ts +1 -1
- package/cjs/components/PoweredBy/PoweredBy.js +2 -3
- package/cjs/components/SelectTokenButton/SelectTokenButton.js +1 -1
- package/cjs/components/Step/CircularProgress.d.ts +0 -1
- package/cjs/components/Step/Step.js +14 -4
- package/cjs/components/Step/StepList.d.ts +0 -1
- package/cjs/components/StepActions/StepActions.js +2 -19
- package/cjs/components/SwapButton/SwapButton.js +16 -4
- package/cjs/components/SwapInput/SwapInputEndAdornment.d.ts +0 -1
- package/cjs/components/SwapRouteCard/SwapRouteCard.js +6 -3
- package/cjs/components/SwapRouteCard/SwapRouteCardEssentials.js +1 -1
- package/cjs/components/SwapRouteCard/SwapRouteCardSkeleton.js +1 -1
- package/cjs/components/SwapRoutes/SwapRoutes.js +1 -1
- package/cjs/components/SwapRoutes/SwapRoutesExpanded.d.ts +0 -1
- package/cjs/components/SwapRoutes/SwapRoutesExpanded.js +2 -2
- package/cjs/components/Token/Token.js +1 -1
- package/cjs/components/TokenAvatar/TokenAvatar.d.ts +4 -4
- package/cjs/components/TokenList/TokenList.js +4 -2
- package/cjs/components/TokenList/types.d.ts +2 -3
- package/cjs/config/theme.js +14 -1
- package/cjs/config/version.d.ts +1 -1
- package/cjs/config/version.js +1 -1
- package/cjs/hooks/useFeaturedTokens.d.ts +1 -1
- package/cjs/hooks/useProcessMessage.d.ts +2 -1
- package/cjs/hooks/useProcessMessage.js +23 -9
- package/cjs/hooks/useSwapRoutes.js +24 -11
- package/cjs/hooks/useToken.d.ts +1 -1
- package/cjs/hooks/useTokenAddressBalance.d.ts +2 -2
- package/cjs/hooks/useTokenBalances.d.ts +5 -5
- package/cjs/hooks/useTokenBalances.js +3 -14
- package/cjs/hooks/useTokenSearch.d.ts +2 -2
- package/cjs/hooks/useTokens.d.ts +2 -2
- package/cjs/i18n/bn.json +8 -0
- package/cjs/i18n/en.json +16 -2
- package/cjs/i18n/fr.json +8 -0
- package/cjs/i18n/id.json +22 -7
- package/cjs/i18n/ko.json +22 -7
- package/cjs/i18n/pt.json +8 -0
- package/cjs/i18n/th.json +21 -6
- package/cjs/i18n/uk.json +20 -12
- package/cjs/i18n/zh.json +8 -0
- package/cjs/pages/ActiveSwapsPage/ActiveSwapsPage.d.ts +0 -1
- package/cjs/pages/SelectTokenPage/SearchTokenInput.d.ts +0 -1
- package/cjs/pages/SelectWalletPage/SelectWalletPage.d.ts +0 -1
- package/cjs/pages/SettingsPage/GasPriceSelect.d.ts +0 -1
- package/cjs/pages/SettingsPage/SettingsPage.d.ts +0 -1
- package/cjs/pages/SettingsPage/ShowDestinationWallet.d.ts +0 -1
- package/cjs/pages/SettingsPage/SlippageInput.d.ts +0 -1
- package/cjs/pages/SwapDetailsPage/SwapDetailsPage.js +4 -1
- package/cjs/pages/SwapPage/ExchangeRateBottomSheet.js +1 -1
- package/cjs/pages/SwapPage/StatusBottomSheet.js +9 -3
- package/cjs/pages/SwapPage/StatusBottomSheet.style.d.ts +1 -1
- package/cjs/pages/SwapPage/StatusBottomSheet.style.js +2 -2
- package/cjs/pages/SwapPage/SwapPage.js +12 -6
- package/cjs/pages/SwapPage/TokenValueBottomSheet.js +1 -1
- package/cjs/providers/WalletProvider/types.d.ts +2 -2
- package/cjs/types/token.d.ts +2 -2
- package/cjs/types/widget.d.ts +7 -6
- package/cjs/types/widget.js +1 -0
- package/components/ChainSelect/ChainSelect.d.ts +0 -1
- package/components/ChainSelect/ChainSelect.style.js +1 -1
- package/components/GasMessage/FundsSufficiencyMessage.d.ts +0 -1
- package/components/Header/NavigationHeader.js +18 -5
- package/components/Insurance/InsuranceCard.js +10 -5
- package/components/Insurance/InsuranceCollapsed.js +1 -1
- package/components/Insurance/types.d.ts +1 -2
- package/components/NFT/NFT.js +2 -2
- package/components/NFT/types.d.ts +1 -1
- package/components/PoweredBy/PoweredBy.js +2 -3
- package/components/SelectTokenButton/SelectTokenButton.js +1 -1
- package/components/Step/CircularProgress.d.ts +0 -1
- package/components/Step/Step.js +14 -4
- package/components/Step/StepList.d.ts +0 -1
- package/components/StepActions/StepActions.js +2 -19
- package/components/SwapButton/SwapButton.js +16 -4
- package/components/SwapInput/SwapInputEndAdornment.d.ts +0 -1
- package/components/SwapRouteCard/SwapRouteCard.js +7 -4
- package/components/SwapRouteCard/SwapRouteCardEssentials.js +1 -1
- package/components/SwapRouteCard/SwapRouteCardSkeleton.js +1 -1
- package/components/SwapRoutes/SwapRoutes.js +1 -1
- package/components/SwapRoutes/SwapRoutesExpanded.d.ts +0 -1
- package/components/SwapRoutes/SwapRoutesExpanded.js +2 -2
- package/components/Token/Token.js +1 -1
- package/components/TokenAvatar/TokenAvatar.d.ts +4 -4
- package/components/TokenList/TokenList.js +4 -2
- package/components/TokenList/types.d.ts +2 -3
- package/config/theme.js +14 -1
- package/config/version.d.ts +1 -1
- package/config/version.js +1 -1
- package/hooks/useFeaturedTokens.d.ts +1 -1
- package/hooks/useProcessMessage.d.ts +2 -1
- package/hooks/useProcessMessage.js +23 -9
- package/hooks/useSwapRoutes.js +24 -11
- package/hooks/useToken.d.ts +1 -1
- package/hooks/useTokenAddressBalance.d.ts +2 -2
- package/hooks/useTokenBalances.d.ts +5 -5
- package/hooks/useTokenBalances.js +3 -14
- package/hooks/useTokenSearch.d.ts +2 -2
- package/hooks/useTokens.d.ts +2 -2
- package/i18n/bn.json +8 -0
- package/i18n/en.json +16 -2
- package/i18n/fr.json +8 -0
- package/i18n/id.json +22 -7
- package/i18n/ko.json +22 -7
- package/i18n/pt.json +8 -0
- package/i18n/th.json +21 -6
- package/i18n/uk.json +20 -12
- package/i18n/zh.json +8 -0
- package/package.json +7 -7
- package/pages/ActiveSwapsPage/ActiveSwapsPage.d.ts +0 -1
- package/pages/SelectTokenPage/SearchTokenInput.d.ts +0 -1
- package/pages/SelectWalletPage/SelectWalletPage.d.ts +0 -1
- package/pages/SettingsPage/GasPriceSelect.d.ts +0 -1
- package/pages/SettingsPage/SettingsPage.d.ts +0 -1
- package/pages/SettingsPage/ShowDestinationWallet.d.ts +0 -1
- package/pages/SettingsPage/SlippageInput.d.ts +0 -1
- package/pages/SwapDetailsPage/SwapDetailsPage.js +4 -1
- package/pages/SwapPage/ExchangeRateBottomSheet.js +2 -2
- package/pages/SwapPage/StatusBottomSheet.js +11 -5
- package/pages/SwapPage/StatusBottomSheet.style.d.ts +1 -1
- package/pages/SwapPage/StatusBottomSheet.style.js +1 -1
- package/pages/SwapPage/SwapPage.js +12 -6
- package/pages/SwapPage/TokenValueBottomSheet.js +2 -2
- package/providers/WalletProvider/types.d.ts +2 -2
- package/tsconfig.cjs.tsbuildinfo +1 -1
- package/types/token.d.ts +2 -2
- package/types/widget.d.ts +7 -6
- package/types/widget.js +1 -0
|
@@ -3,20 +3,23 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getProcessMessage = exports.useProcessMessage = void 0;
|
|
4
4
|
const sdk_1 = require("@lifi/sdk");
|
|
5
5
|
const react_i18next_1 = require("react-i18next");
|
|
6
|
+
const providers_1 = require("../providers");
|
|
6
7
|
const utils_1 = require("../utils");
|
|
7
8
|
const useChains_1 = require("./useChains");
|
|
8
9
|
const useProcessMessage = (step, process) => {
|
|
10
|
+
const { variant } = (0, providers_1.useWidgetConfig)();
|
|
9
11
|
const { t } = (0, react_i18next_1.useTranslation)();
|
|
10
12
|
const { getChainById } = (0, useChains_1.useChains)();
|
|
11
13
|
if (!step || !process) {
|
|
12
14
|
return {};
|
|
13
15
|
}
|
|
14
|
-
return getProcessMessage(t, getChainById, step, process);
|
|
16
|
+
return getProcessMessage(t, getChainById, step, process, variant);
|
|
15
17
|
};
|
|
16
18
|
exports.useProcessMessage = useProcessMessage;
|
|
17
19
|
const processStatusMessages = {
|
|
18
20
|
TOKEN_ALLOWANCE: {
|
|
19
21
|
STARTED: (t) => t(`swap.process.tokenAllowance.started`),
|
|
22
|
+
ACTION_REQUIRED: (t) => t(`swap.process.tokenAllowance.pending`),
|
|
20
23
|
PENDING: (t) => t(`swap.process.tokenAllowance.pending`),
|
|
21
24
|
DONE: (t) => t(`swap.process.tokenAllowance.done`),
|
|
22
25
|
},
|
|
@@ -28,7 +31,9 @@ const processStatusMessages = {
|
|
|
28
31
|
STARTED: (t) => t(`swap.process.swap.started`),
|
|
29
32
|
ACTION_REQUIRED: (t) => t(`swap.process.swap.actionRequired`),
|
|
30
33
|
PENDING: (t) => t(`swap.process.swap.pending`),
|
|
31
|
-
DONE: (t) =>
|
|
34
|
+
DONE: (t, variant) => variant === 'nft'
|
|
35
|
+
? t(`swap.process.nft.done`)
|
|
36
|
+
: t(`swap.process.swap.done`),
|
|
32
37
|
},
|
|
33
38
|
CROSS_CHAIN: {
|
|
34
39
|
STARTED: (t) => t(`swap.process.crossChain.started`),
|
|
@@ -38,7 +43,9 @@ const processStatusMessages = {
|
|
|
38
43
|
},
|
|
39
44
|
RECEIVING_CHAIN: {
|
|
40
45
|
PENDING: (t) => t(`swap.process.receivingChain.pending`),
|
|
41
|
-
DONE: (t) =>
|
|
46
|
+
DONE: (t, variant) => variant === 'nft'
|
|
47
|
+
? t(`swap.process.nft.done`)
|
|
48
|
+
: t(`swap.process.receivingChain.done`),
|
|
42
49
|
},
|
|
43
50
|
TRANSACTION: {},
|
|
44
51
|
};
|
|
@@ -68,7 +75,7 @@ const processSubstatusMessages = {
|
|
|
68
75
|
INVALID: {},
|
|
69
76
|
NOT_FOUND: {},
|
|
70
77
|
};
|
|
71
|
-
function getProcessMessage(t, getChainById, step, process) {
|
|
78
|
+
function getProcessMessage(t, getChainById, step, process, variant) {
|
|
72
79
|
if (process.error && process.status === 'FAILED') {
|
|
73
80
|
const getTransactionNotSentMessage = () => t(`swap.error.message.transactionNotSent`, {
|
|
74
81
|
amount: (0, utils_1.formatTokenAmount)(step.action.fromAmount, step.action.fromToken.decimals),
|
|
@@ -78,6 +85,12 @@ function getProcessMessage(t, getChainById, step, process) {
|
|
|
78
85
|
let title = '';
|
|
79
86
|
let message = '';
|
|
80
87
|
switch (process.error.code) {
|
|
88
|
+
case sdk_1.LifiErrorCode.AllowanceRequired:
|
|
89
|
+
title = t(`swap.error.title.allowanceRequired`);
|
|
90
|
+
message = t(`swap.error.message.allowanceRequired`, {
|
|
91
|
+
tokenSymbol: step.action.fromToken.symbol,
|
|
92
|
+
});
|
|
93
|
+
break;
|
|
81
94
|
case sdk_1.LifiErrorCode.BalanceError:
|
|
82
95
|
title = t(`swap.error.title.balanceIsTooLow`);
|
|
83
96
|
message = getTransactionNotSentMessage();
|
|
@@ -90,6 +103,10 @@ function getProcessMessage(t, getChainById, step, process) {
|
|
|
90
103
|
title = t(`swap.error.title.gasLimitIsTooLow`);
|
|
91
104
|
message = getTransactionNotSentMessage();
|
|
92
105
|
break;
|
|
106
|
+
case sdk_1.LifiErrorCode.SlippageError:
|
|
107
|
+
title = t(`swap.error.title.slippageNotMet`);
|
|
108
|
+
message = t(`swap.error.message.slippageThreshold`);
|
|
109
|
+
break;
|
|
93
110
|
case sdk_1.LifiErrorCode.TransactionFailed:
|
|
94
111
|
title = t(`swap.error.title.transactionFailed`);
|
|
95
112
|
message = t(`swap.error.message.transactionFailed`);
|
|
@@ -106,10 +123,6 @@ function getProcessMessage(t, getChainById, step, process) {
|
|
|
106
123
|
title = t(`swap.error.title.transactionCanceled`);
|
|
107
124
|
message = getTransactionNotSentMessage();
|
|
108
125
|
break;
|
|
109
|
-
case sdk_1.LifiErrorCode.SlippageError:
|
|
110
|
-
title = t(`swap.error.title.slippageNotMet`);
|
|
111
|
-
message = t(`swap.error.message.slippageThreshold`);
|
|
112
|
-
break;
|
|
113
126
|
case sdk_1.LifiErrorCode.TransactionRejected:
|
|
114
127
|
title = t(`swap.error.title.transactionRejected`);
|
|
115
128
|
message = t(`swap.error.message.transactionRejected`, {
|
|
@@ -131,7 +144,8 @@ function getProcessMessage(t, getChainById, step, process) {
|
|
|
131
144
|
}
|
|
132
145
|
return { title, message };
|
|
133
146
|
}
|
|
134
|
-
const title = processSubstatusMessages[process.status]?.[process.substatus]?.(t) ??
|
|
147
|
+
const title = processSubstatusMessages[process.status]?.[process.substatus]?.(t) ??
|
|
148
|
+
processStatusMessages[process.type]?.[process.status]?.(t, variant);
|
|
135
149
|
return { title };
|
|
136
150
|
}
|
|
137
151
|
exports.getProcessMessage = getProcessMessage;
|
|
@@ -13,7 +13,7 @@ const stores_1 = require("../stores");
|
|
|
13
13
|
const refetchTime = 60000;
|
|
14
14
|
const useSwapRoutes = ({ onSettled, insurableRoute, } = {}) => {
|
|
15
15
|
const lifi = (0, providers_1.useLiFi)();
|
|
16
|
-
const { variant, sdkConfig, insurance } = (0, providers_1.useWidgetConfig)();
|
|
16
|
+
const { variant, sdkConfig, insurance, contractTool } = (0, providers_1.useWidgetConfig)();
|
|
17
17
|
const { account, provider } = (0, providers_1.useWallet)();
|
|
18
18
|
const queryClient = (0, react_query_1.useQueryClient)();
|
|
19
19
|
const { slippage, enabledBridges, enabledAutoRefuel, enabledExchanges, routePriority, } = (0, stores_1.useSettings)([
|
|
@@ -90,6 +90,16 @@ const useSwapRoutes = ({ onSettled, insurableRoute, } = {}) => {
|
|
|
90
90
|
.mul(10 ** (fromToken?.decimals ?? 0))
|
|
91
91
|
.toFixed(0);
|
|
92
92
|
const formattedSlippage = parseFloat(slippage) / 100;
|
|
93
|
+
const allowedBridges = insurableRoute
|
|
94
|
+
? insurableRoute.steps.flatMap((step) => step.includedSteps
|
|
95
|
+
.filter((includedStep) => includedStep.type === 'cross')
|
|
96
|
+
.map((includedStep) => includedStep.toolDetails.key))
|
|
97
|
+
: enabledBridges;
|
|
98
|
+
const allowedExchanges = insurableRoute
|
|
99
|
+
? insurableRoute.steps.flatMap((step) => step.includedSteps
|
|
100
|
+
.filter((includedStep) => includedStep.type === 'swap')
|
|
101
|
+
.map((includedStep) => includedStep.toolDetails.key))
|
|
102
|
+
: enabledExchanges;
|
|
93
103
|
if (variant === 'nft') {
|
|
94
104
|
const contractCallQuote = await lifi.getContractCallQuote({
|
|
95
105
|
fromAddress,
|
|
@@ -101,12 +111,25 @@ const useSwapRoutes = ({ onSettled, insurableRoute, } = {}) => {
|
|
|
101
111
|
toContractAddress,
|
|
102
112
|
toContractCallData,
|
|
103
113
|
toContractGasLimit,
|
|
114
|
+
allowBridges: allowedBridges,
|
|
104
115
|
// toFallbackAddress: toAddress,
|
|
105
116
|
slippage: formattedSlippage,
|
|
106
117
|
}, { signal });
|
|
107
118
|
contractCallQuote.estimate.toAmount = toTokenAmount;
|
|
108
119
|
contractCallQuote.estimate.toAmountMin = toTokenAmount;
|
|
109
120
|
contractCallQuote.action.toToken = toToken;
|
|
121
|
+
const customStep = variant === 'nft'
|
|
122
|
+
? contractCallQuote.includedSteps?.find((step) => step.type === 'custom')
|
|
123
|
+
: undefined;
|
|
124
|
+
if (customStep && contractTool) {
|
|
125
|
+
const toolDetails = {
|
|
126
|
+
key: contractTool.name,
|
|
127
|
+
name: contractTool.name,
|
|
128
|
+
logoURI: contractTool.logoURI,
|
|
129
|
+
};
|
|
130
|
+
customStep.toolDetails = toolDetails;
|
|
131
|
+
contractCallQuote.toolDetails = toolDetails;
|
|
132
|
+
}
|
|
110
133
|
const route = {
|
|
111
134
|
id: (0, uuid_1.v4)(),
|
|
112
135
|
fromChainId: contractCallQuote.action.fromChainId,
|
|
@@ -126,16 +149,6 @@ const useSwapRoutes = ({ onSettled, insurableRoute, } = {}) => {
|
|
|
126
149
|
};
|
|
127
150
|
return { routes: [route] };
|
|
128
151
|
}
|
|
129
|
-
const allowedBridges = insurableRoute
|
|
130
|
-
? insurableRoute.steps.flatMap((step) => step.includedSteps
|
|
131
|
-
.filter((includedStep) => includedStep.type === 'cross')
|
|
132
|
-
.map((includedStep) => includedStep.toolDetails.key))
|
|
133
|
-
: enabledBridges;
|
|
134
|
-
const allowedExchanges = insurableRoute
|
|
135
|
-
? insurableRoute.steps.flatMap((step) => step.includedSteps
|
|
136
|
-
.filter((includedStep) => includedStep.type === 'swap')
|
|
137
|
-
.map((includedStep) => includedStep.toolDetails.key))
|
|
138
|
-
: enabledExchanges;
|
|
139
152
|
return lifi.getRoutes({
|
|
140
153
|
fromChainId,
|
|
141
154
|
fromAmount,
|
package/cjs/hooks/useToken.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const useTokenAddressBalance: (chainId?: number, tokenAddress?: string) => {
|
|
2
|
-
token: import("..").
|
|
2
|
+
token: import("..").TokenAmount | undefined;
|
|
3
3
|
isLoading: boolean;
|
|
4
|
-
refetch: <TPageData>(options?: (import("@tanstack/query-core").RefetchOptions & import("@tanstack/query-core").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("@tanstack/query-core").QueryObserverResult<import("..").
|
|
4
|
+
refetch: <TPageData>(options?: (import("@tanstack/query-core").RefetchOptions & import("@tanstack/query-core").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("@tanstack/query-core").QueryObserverResult<import("..").TokenAmount[], unknown>>;
|
|
5
5
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { TokenAmount } from '../types';
|
|
2
2
|
export declare const useTokenBalances: (selectedChainId?: number) => {
|
|
3
|
-
tokens:
|
|
4
|
-
tokensWithBalance:
|
|
5
|
-
featuredTokens: import("@lifi/types").
|
|
3
|
+
tokens: TokenAmount[];
|
|
4
|
+
tokensWithBalance: TokenAmount[] | undefined;
|
|
5
|
+
featuredTokens: import("@lifi/types").StaticToken[] | undefined;
|
|
6
6
|
isLoading: boolean;
|
|
7
7
|
isBalanceLoading: boolean;
|
|
8
|
-
refetch: <TPageData>(options?: (import("@tanstack/react-query").RefetchOptions & import("@tanstack/react-query").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("@tanstack/react-query").QueryObserverResult<
|
|
8
|
+
refetch: <TPageData>(options?: (import("@tanstack/react-query").RefetchOptions & import("@tanstack/react-query").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("@tanstack/react-query").QueryObserverResult<TokenAmount[], unknown>>;
|
|
9
9
|
};
|
|
@@ -2,32 +2,21 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useTokenBalances = void 0;
|
|
4
4
|
const react_query_1 = require("@tanstack/react-query");
|
|
5
|
-
const react_1 = require("react");
|
|
6
5
|
const providers_1 = require("../providers");
|
|
7
6
|
const utils_1 = require("../utils");
|
|
8
7
|
const useFeaturedTokens_1 = require("./useFeaturedTokens");
|
|
9
8
|
const useTokens_1 = require("./useTokens");
|
|
10
|
-
const defaultRefetchInterval =
|
|
11
|
-
const minRefetchInterval = 1000;
|
|
9
|
+
const defaultRefetchInterval = 32000;
|
|
12
10
|
const useTokenBalances = (selectedChainId) => {
|
|
13
11
|
const lifi = (0, providers_1.useLiFi)();
|
|
14
12
|
const { account } = (0, providers_1.useWallet)();
|
|
15
13
|
const featuredTokens = (0, useFeaturedTokens_1.useFeaturedTokens)(selectedChainId);
|
|
16
14
|
const { tokens, isLoading } = (0, useTokens_1.useTokens)(selectedChainId);
|
|
17
|
-
const [refetchInterval, setRefetchInterval] = (0, react_1.useState)(defaultRefetchInterval);
|
|
18
15
|
const isBalanceLoadingEnabled = Boolean(account.address) &&
|
|
19
16
|
Boolean(tokens?.length) &&
|
|
20
17
|
Boolean(selectedChainId);
|
|
21
18
|
const { data: tokensWithBalance, isLoading: isBalanceLoading, refetch, } = (0, react_query_1.useQuery)(['token-balances', account.address, selectedChainId, tokens?.length], async ({ queryKey: [, accountAddress] }) => {
|
|
22
19
|
const tokenBalances = await lifi.getTokenBalances(accountAddress, tokens);
|
|
23
|
-
if (!tokenBalances?.length) {
|
|
24
|
-
// Sometimes RPCs (e.g. Arbitrum) don't return balances on first call
|
|
25
|
-
// TODO: fix and remove backplane
|
|
26
|
-
setRefetchInterval((interval) => interval === defaultRefetchInterval
|
|
27
|
-
? minRefetchInterval
|
|
28
|
-
: interval * 2);
|
|
29
|
-
throw Error('Could not get tokens balance.');
|
|
30
|
-
}
|
|
31
20
|
const featuredTokenAddresses = new Set(featuredTokens?.map((token) => token.address));
|
|
32
21
|
const sortFn = (a, b) => parseFloat(b.amount ?? '0') * parseFloat(b.priceUSD ?? '0') -
|
|
33
22
|
parseFloat(a.amount ?? '0') * parseFloat(a.priceUSD ?? '0');
|
|
@@ -49,8 +38,8 @@ const useTokenBalances = (selectedChainId) => {
|
|
|
49
38
|
return result;
|
|
50
39
|
}, {
|
|
51
40
|
enabled: isBalanceLoadingEnabled,
|
|
52
|
-
refetchInterval,
|
|
53
|
-
staleTime:
|
|
41
|
+
refetchInterval: defaultRefetchInterval,
|
|
42
|
+
staleTime: defaultRefetchInterval,
|
|
54
43
|
});
|
|
55
44
|
return {
|
|
56
45
|
tokens,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { TokenAmount } from '../types';
|
|
2
2
|
export declare const useTokenSearch: (chainId?: number, tokenQuery?: string, enabled?: boolean) => {
|
|
3
|
-
token:
|
|
3
|
+
token: TokenAmount | undefined;
|
|
4
4
|
isLoading: boolean;
|
|
5
5
|
};
|
package/cjs/hooks/useTokens.d.ts
CHANGED
package/cjs/i18n/bn.json
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"done": "সম্পন্ন হয়েছে",
|
|
13
13
|
"getGas": "গ্যাস পান",
|
|
14
14
|
"hide": "গোপন করুন",
|
|
15
|
+
"learnMore": "আরও জানুন",
|
|
15
16
|
"lifiSwap": "লি.ফাই সোওয়াপ",
|
|
16
17
|
"light": "লাইট",
|
|
17
18
|
"max": "সর্বোচ্চ",
|
|
@@ -29,6 +30,7 @@
|
|
|
29
30
|
"startSwap": "সোওয়াপ শুরু করুন",
|
|
30
31
|
"swap": "সোওয়াপ",
|
|
31
32
|
"tryAgain": "আবার চেষ্টা করুন",
|
|
33
|
+
"viewCoverage": "কভারেজ দেখুন",
|
|
32
34
|
"viewOnExplorer": "এক্সপ্লোরারে দেখুন"
|
|
33
35
|
},
|
|
34
36
|
"format": {
|
|
@@ -104,6 +106,12 @@
|
|
|
104
106
|
"gasFeeEstimated": "আনুমানিক গ্যাস ফি",
|
|
105
107
|
"gasFeePaid": "গ্যাস ফি প্রদান করা হয়",
|
|
106
108
|
"inProgress": "প্রক্রিয়াধীন",
|
|
109
|
+
"insurance": {
|
|
110
|
+
"bridgeExploits": "ব্রিজের ত্রুটি, হ্যাক বা শোষণ",
|
|
111
|
+
"insure": "ট্রানজিটে টোকেনের ১০০% বীমা করুন।",
|
|
112
|
+
"insured": "আপনি ট্রানজিটের ১০০% টোকেন বীমা করেছেন:",
|
|
113
|
+
"slippageError": "প্রাপ্ত টোকেনগুলির জন্য স্লিপেজে ত্রুটি।"
|
|
114
|
+
},
|
|
107
115
|
"info": {
|
|
108
116
|
"message": {
|
|
109
117
|
"autoRefuel": "আপনার {{chainName}} গ্যাস কম। চালিয়ে যাওয়ার মাধ্যমে, আপনি সোওয়াপ সম্পূর্ণ করার জন্য পর্যাপ্ত গ্যাস পাবেন।",
|
package/cjs/i18n/en.json
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"button": {
|
|
3
3
|
"auto": "Auto",
|
|
4
|
+
"buy": "Buy",
|
|
5
|
+
"buyNow": "Buy now",
|
|
4
6
|
"cancel": "Cancel",
|
|
5
7
|
"connectWallet": "Connect wallet",
|
|
6
8
|
"contactSupport": "Contact support",
|
|
@@ -23,6 +25,7 @@
|
|
|
23
25
|
"resetSettings": "Reset settings",
|
|
24
26
|
"restartSwap": "Restart swap",
|
|
25
27
|
"reviewGasSwap": "Review gas swap",
|
|
28
|
+
"reviewPurchase": "Review purchase",
|
|
26
29
|
"reviewSwap": "Review swap",
|
|
27
30
|
"seeDetails": "See details",
|
|
28
31
|
"showAll": "Show all",
|
|
@@ -39,10 +42,14 @@
|
|
|
39
42
|
},
|
|
40
43
|
"header": {
|
|
41
44
|
"activeSwaps": "Active swaps",
|
|
45
|
+
"bridge": "Bridge",
|
|
42
46
|
"checkout": "Checkout",
|
|
43
47
|
"from": "Swap from",
|
|
44
48
|
"gas": "Gas",
|
|
45
49
|
"gasSwap": "Gas swap",
|
|
50
|
+
"payWith": "Pay with",
|
|
51
|
+
"purchase": "Purchase",
|
|
52
|
+
"purchaseDetails": "Purchase details",
|
|
46
53
|
"routes": "You get",
|
|
47
54
|
"selectChain": "Select chain",
|
|
48
55
|
"selectWallet": "Select your wallet",
|
|
@@ -75,6 +82,7 @@
|
|
|
75
82
|
"currentAmount": "Current amount",
|
|
76
83
|
"error": {
|
|
77
84
|
"message": {
|
|
85
|
+
"allowanceRequired": "Transfer amount for {{tokenSymbol}} exceeds your current allowance. Please increase your allowance and try again.",
|
|
78
86
|
"slippageThreshold": "The slippage is larger than the defined threshold. Please request a new route to get a fresh quote.",
|
|
79
87
|
"transactionFailed": "Please check the block explorer for more information.",
|
|
80
88
|
"transactionNotSent": "Transaction was not sent. {{amount, number(maximumFractionDigits: 9)}} {{tokenSymbol}} on {{chainName}} remain in your wallet.",
|
|
@@ -82,6 +90,7 @@
|
|
|
82
90
|
"unknown": "Please try again or contact support."
|
|
83
91
|
},
|
|
84
92
|
"title": {
|
|
93
|
+
"allowanceRequired": "Insufficient allowance",
|
|
85
94
|
"balanceIsTooLow": "The balance is too low",
|
|
86
95
|
"chainSwitch": "Chain switch required",
|
|
87
96
|
"failed": "Swap failed",
|
|
@@ -131,7 +140,6 @@
|
|
|
131
140
|
"onChain": "on {{chainName}}",
|
|
132
141
|
"otherTokens": "Other tokens",
|
|
133
142
|
"ownedBy": "Owned by",
|
|
134
|
-
"payWith": "Pay with",
|
|
135
143
|
"process": {
|
|
136
144
|
"crossChain": {
|
|
137
145
|
"actionRequired": "Please sign the transaction",
|
|
@@ -139,6 +147,9 @@
|
|
|
139
147
|
"pending": "Waiting for bridge transaction",
|
|
140
148
|
"started": "Preparing bridge transaction"
|
|
141
149
|
},
|
|
150
|
+
"nft": {
|
|
151
|
+
"done": "NFT purchased"
|
|
152
|
+
},
|
|
142
153
|
"receivingChain": {
|
|
143
154
|
"done": "Bridge completed",
|
|
144
155
|
"partial": "Bridge partially completed",
|
|
@@ -165,7 +176,6 @@
|
|
|
165
176
|
"rateChange": "Rate change",
|
|
166
177
|
"receiving": "Receiving",
|
|
167
178
|
"refuelStepDetails": "Get gas via {{tool}}",
|
|
168
|
-
"routes": "You get",
|
|
169
179
|
"selectChain": "Chain",
|
|
170
180
|
"selectChainAndToken": "Select chain and token",
|
|
171
181
|
"selectToken": "Token",
|
|
@@ -173,16 +183,20 @@
|
|
|
173
183
|
"sendToWallet": "Send to a different wallet",
|
|
174
184
|
"sentToAddress": "Sent to {{address}}",
|
|
175
185
|
"stepBridge": "Bridge",
|
|
186
|
+
"stepBridgeAndBuy": "Bridge and buy",
|
|
176
187
|
"stepDetails": "{{tool}} via LI.FI",
|
|
177
188
|
"stepSwap": "Swap",
|
|
178
189
|
"stepSwapAndBridge": "Swap and bridge",
|
|
190
|
+
"stepSwapAndBuy": "Swap and buy",
|
|
179
191
|
"success": {
|
|
180
192
|
"message": {
|
|
181
193
|
"swapPartiallySuccessful": "We've tried to complete the swap, but {{tool}} ran out of liquidity for {{tokenSymbol}} token.",
|
|
194
|
+
"purchaseSuccessful": "You now own {{assetName}} in {{walletAddress}} wallet on {{chainName}} chain.",
|
|
182
195
|
"swapSuccessful": "There are now {{amount, number(maximumFractionDigits: 9)}} {{tokenSymbol}} in {{walletAddress}} wallet on {{chainName}} chain."
|
|
183
196
|
},
|
|
184
197
|
"title": {
|
|
185
198
|
"gasSwapSuccessful": "Gas swap successful",
|
|
199
|
+
"purchaseSuccessful": "Purchase successful",
|
|
186
200
|
"refundIssued": "Refund issued",
|
|
187
201
|
"swapPartiallySuccessful": "Swap partially successful",
|
|
188
202
|
"swapSuccessful": "Swap successful"
|
package/cjs/i18n/fr.json
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"done": "Terminé",
|
|
13
13
|
"getGas": "Obtenir du gaz",
|
|
14
14
|
"hide": "Cacher",
|
|
15
|
+
"learnMore": "Plus d'info",
|
|
15
16
|
"lifiSwap": "LI.FI Swap",
|
|
16
17
|
"light": "Clair",
|
|
17
18
|
"max": "max",
|
|
@@ -29,6 +30,7 @@
|
|
|
29
30
|
"startSwap": "Commencer l'échange",
|
|
30
31
|
"swap": "Échanger",
|
|
31
32
|
"tryAgain": "Réessayer",
|
|
33
|
+
"viewCoverage": "Voir la couverture",
|
|
32
34
|
"viewOnExplorer": "Voir sur l'explorateur"
|
|
33
35
|
},
|
|
34
36
|
"format": {
|
|
@@ -104,6 +106,12 @@
|
|
|
104
106
|
"gasFeeEstimated": "frais de gaz estimés",
|
|
105
107
|
"gasFeePaid": "frais de gaz payés",
|
|
106
108
|
"inProgress": "en cours",
|
|
109
|
+
"insurance": {
|
|
110
|
+
"bridgeExploits": "Des dysfonctionnements de pont, des hacks ou des exploits",
|
|
111
|
+
"insure": "Assurer 100% des jetons en cours de transit.",
|
|
112
|
+
"insured": "Vous avez assuré 100 % des jetons en cours de transit:",
|
|
113
|
+
"slippageError": "Erreur dans le slippage pour les jetons reçus"
|
|
114
|
+
},
|
|
107
115
|
"info": {
|
|
108
116
|
"message": {
|
|
109
117
|
"autoRefuel": "Vous avez peu de gaz sur {{chainName}}. En continuant, vous aurez assez de gaz pour compléter l'échange.",
|
package/cjs/i18n/id.json
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"done": "Selesai",
|
|
13
13
|
"getGas": "Dapatkan gas",
|
|
14
14
|
"hide": "Sembunyikan",
|
|
15
|
+
"learnMore": "Pelajari lebih lanjut",
|
|
15
16
|
"lifiSwap": "LI.FI Swap",
|
|
16
17
|
"light": "Terang",
|
|
17
18
|
"max": "maks",
|
|
@@ -29,6 +30,7 @@
|
|
|
29
30
|
"startSwap": "Mulai swap",
|
|
30
31
|
"swap": "Swap",
|
|
31
32
|
"tryAgain": "Coba lagi",
|
|
33
|
+
"viewCoverage": "Melihat cakupan",
|
|
32
34
|
"viewOnExplorer": "Lihat di explorer"
|
|
33
35
|
},
|
|
34
36
|
"format": {
|
|
@@ -104,14 +106,22 @@
|
|
|
104
106
|
"gasFeeEstimated": "perkiraan biaya gas",
|
|
105
107
|
"gasFeePaid": "biaya gas yang dibayar",
|
|
106
108
|
"inProgress": "dalam proses",
|
|
109
|
+
"insurance": {
|
|
110
|
+
"bridgeExploits": "Malfungsi jembatan, peretasan, atau eksploitasi",
|
|
111
|
+
"insure": "Asuransikan 100% token dalam perjalanan.",
|
|
112
|
+
"insured": "Anda telah mengasuransikan 100% token dalam perjalanan:",
|
|
113
|
+
"slippageError": "Kesalahan dalam slippage untuk token yang diterima"
|
|
114
|
+
},
|
|
107
115
|
"info": {
|
|
108
116
|
"message": {
|
|
117
|
+
"autoRefuel": "Gas anda hampir habis {{chainName}}. Dengan melanjutkan, anda akan mendapatkan cukup gas untuk menyelesaikan penukaran.",
|
|
109
118
|
"emptyActiveSwaps": "Swap yang sedang berlangsung akan muncul di sini. Setelah selesai, temukan di riwayat swap.",
|
|
110
119
|
"emptySwapHistory": "Riwayat swap hanya disimpan secara lokal dan akan dihapus jika Anda menghapus data browser.",
|
|
111
120
|
"emptyTokenList": "Kami tidak dapat menemukan token di rantai {{chainName}} atau Anda tidak memilikinya. Coba cari lagi atau pilih jaringan lain.",
|
|
112
121
|
"routeNotFound": "Coba kombinasi token lain."
|
|
113
122
|
},
|
|
114
123
|
"title": {
|
|
124
|
+
"autoRefuel": "Dapatkan gas",
|
|
115
125
|
"emptyActiveSwaps": "Tidak ada swap yang aktif",
|
|
116
126
|
"emptySwapHistory": "Tidak ada swap terbaru",
|
|
117
127
|
"routeNotFound": "Rute tidak tersedia"
|
|
@@ -154,6 +164,7 @@
|
|
|
154
164
|
"quotedAmount": "Jumlah yang dikutip",
|
|
155
165
|
"rateChange": "Perubahan rate",
|
|
156
166
|
"receiving": "Menerima",
|
|
167
|
+
"refuelStepDetails": "Dapatkan gas melalui {{tool}}",
|
|
157
168
|
"routes": "Anda mendapatkan",
|
|
158
169
|
"selectChain": "Jaringan",
|
|
159
170
|
"selectChainAndToken": "Pilih jaringan dan token",
|
|
@@ -162,6 +173,7 @@
|
|
|
162
173
|
"sendToWallet": "Kirim ke dompet berbeda",
|
|
163
174
|
"sentToAddress": "Dikirim ke {{address}}",
|
|
164
175
|
"stepBridge": "Bridge",
|
|
176
|
+
"stepDetails": "{{tool}} melalui LI.FI",
|
|
165
177
|
"stepSwap": "Swap",
|
|
166
178
|
"stepSwapAndBridge": "Swap dan bridge",
|
|
167
179
|
"success": {
|
|
@@ -180,11 +192,13 @@
|
|
|
180
192
|
"swapStepDetails": "Swap di {{chain}} melalui {{tool}}",
|
|
181
193
|
"swapping": "Bertukar",
|
|
182
194
|
"tags": {
|
|
183
|
-
"
|
|
184
|
-
"
|
|
185
|
-
"
|
|
186
|
-
"
|
|
187
|
-
"
|
|
195
|
+
"cheapest": "Murah",
|
|
196
|
+
"fastest": "Cepat",
|
|
197
|
+
"insurable": "Dapat diasuransikan",
|
|
198
|
+
"insurance": "Asuransi",
|
|
199
|
+
"insured": "Diasuransikan",
|
|
200
|
+
"recommended": "Direkomendasikan",
|
|
201
|
+
"safest": "Aman"
|
|
188
202
|
},
|
|
189
203
|
"to": "Kepada",
|
|
190
204
|
"tokenOnChain": "{{tokenSymbol}} di {{chainName}}",
|
|
@@ -197,8 +211,8 @@
|
|
|
197
211
|
"deleteActiveSwaps": "Swap aktif hanya disimpan secara lokal dan tidak dapat dipulihkan jika Anda menghapusnya.",
|
|
198
212
|
"deleteSwapHistory": "Riwayat swap hanya disimpan secara lokal dan tidak dapat dipulihkan jika Anda menghapusnya.",
|
|
199
213
|
"highValueLoss": "Nilai token yang diterima jauh lebih rendah daripada token yang ditukar dan biaya transaksi.",
|
|
200
|
-
"insufficientFunds": "Anda tidak memiliki cukup dana untuk
|
|
201
|
-
"insufficientGas": "Anda perlu menambahkan setidaknya:",
|
|
214
|
+
"insufficientFunds": "Anda tidak memiliki cukup dana untuk menyelesaikan penukaran.",
|
|
215
|
+
"insufficientGas": "Anda tidak memiliki cukup gas untuk menyelesaikan penukaran. Anda perlu menambahkan setidaknya:",
|
|
202
216
|
"rateChanged": "Nilai tukar telah berubah. Dengan melanjutkan penukaran, Anda akan menerima tarif baru.",
|
|
203
217
|
"resetSettings": "Ini akan mengatur ulang prioritas rute Anda, slippage, harga gas, jembatan yang diaktifkan, dan pertukaran."
|
|
204
218
|
},
|
|
@@ -214,6 +228,7 @@
|
|
|
214
228
|
}
|
|
215
229
|
},
|
|
216
230
|
"tooltip": {
|
|
231
|
+
"additionalProviderFee": "Jembatan tambahan, DEX, dan biaya layanan.",
|
|
217
232
|
"estimatedNetworkFee": "Perkiraan biaya jaringan.",
|
|
218
233
|
"estimatedTime": "Perkiraan waktu eksekusi swap dalam hitungan menit.",
|
|
219
234
|
"notFound": {
|
package/cjs/i18n/ko.json
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"done": "완료",
|
|
13
13
|
"getGas": "가스 받기",
|
|
14
14
|
"hide": "숨기기",
|
|
15
|
+
"learnMore": "자세히 알아보기",
|
|
15
16
|
"lifiSwap": "Li.Fi 스왑",
|
|
16
17
|
"light": "밝게",
|
|
17
18
|
"max": "최대",
|
|
@@ -29,6 +30,7 @@
|
|
|
29
30
|
"startSwap": "스왑 시작",
|
|
30
31
|
"swap": "스왑",
|
|
31
32
|
"tryAgain": "다시 시도",
|
|
33
|
+
"viewCoverage": "보장 범위",
|
|
32
34
|
"viewOnExplorer": "탐색기에서 보기"
|
|
33
35
|
},
|
|
34
36
|
"format": {
|
|
@@ -104,14 +106,22 @@
|
|
|
104
106
|
"gasFeeEstimated": "예상 가스비",
|
|
105
107
|
"gasFeePaid": "가스비 지불됨",
|
|
106
108
|
"inProgress": "진행 중",
|
|
109
|
+
"insurance": {
|
|
110
|
+
"bridgeExploits": "브릿지 오류, 해킹, 취약점 공격",
|
|
111
|
+
"insure": "토큰 전액에 대하여 보험 적용",
|
|
112
|
+
"insured": "토큰 전액에 대하여 보험을 적용하였습니다.",
|
|
113
|
+
"slippageError": "받을 토큰의 슬리피지 오류가 발생했습니다."
|
|
114
|
+
},
|
|
107
115
|
"info": {
|
|
108
116
|
"message": {
|
|
117
|
+
"autoRefuel": "현재 {{chainName}} 가스가 부족합니다. 이 기능을 통하여 스왑을 완료할 가스를 보충할 수 있습니다.",
|
|
109
118
|
"emptyActiveSwaps": "진행 중인 스왑이 여기에 나타납니다. 완료 후에는 스왑 기록을 참조하십시오",
|
|
110
119
|
"emptySwapHistory": "스왑 기록은 로컬에만 저장되며 브라우저 데이터를 지우면 삭제됩니다.",
|
|
111
120
|
"emptyTokenList": "{{chainName}} 체인에서 토큰을 찾을 수 없거나 보유 중인 토큰이 아닙니다. 다시 검색하거나 다른 체인을 선택하십시오.",
|
|
112
121
|
"routeNotFound": "다른 토큰 조합으로 시도하십시오."
|
|
113
122
|
},
|
|
114
123
|
"title": {
|
|
124
|
+
"autoRefuel": "가스 받기",
|
|
115
125
|
"emptyActiveSwaps": "활성화된 스왑 없음",
|
|
116
126
|
"emptySwapHistory": "최근 스왑 없음",
|
|
117
127
|
"routeNotFound": "가능한 경로가 없음"
|
|
@@ -154,6 +164,7 @@
|
|
|
154
164
|
"quotedAmount": "견적",
|
|
155
165
|
"rateChange": "비율 변경",
|
|
156
166
|
"receiving": "받는 중",
|
|
167
|
+
"refuelStepDetails": "{{tool}} 를 통해 가스 얻기",
|
|
157
168
|
"routes": "받는 수량",
|
|
158
169
|
"selectChain": "체인",
|
|
159
170
|
"selectChainAndToken": "체인과 토큰 선택",
|
|
@@ -162,6 +173,7 @@
|
|
|
162
173
|
"sendToWallet": "다른 지갑으로 전송",
|
|
163
174
|
"sentToAddress": "{{address}}로 전송",
|
|
164
175
|
"stepBridge": "브릿지",
|
|
176
|
+
"stepDetails": "LI.FI 를 통한 {{tool}}",
|
|
165
177
|
"stepSwap": "스왑",
|
|
166
178
|
"stepSwapAndBridge": "스왑 그리고 브릿지",
|
|
167
179
|
"success": {
|
|
@@ -180,11 +192,13 @@
|
|
|
180
192
|
"swapStepDetails": "{{tool}}로 {{chain}}에서 스왑",
|
|
181
193
|
"swapping": "스왑 중",
|
|
182
194
|
"tags": {
|
|
183
|
-
"
|
|
184
|
-
"
|
|
185
|
-
"
|
|
186
|
-
"
|
|
187
|
-
"
|
|
195
|
+
"cheapest": "저렴한",
|
|
196
|
+
"fastest": "빠르게",
|
|
197
|
+
"insurable": "보험 적용 가능한",
|
|
198
|
+
"insurance": "보험",
|
|
199
|
+
"insured": "보험 적용됨",
|
|
200
|
+
"recommended": "추천",
|
|
201
|
+
"safest": "안전한"
|
|
188
202
|
},
|
|
189
203
|
"to": "도착",
|
|
190
204
|
"tokenOnChain": "{{chainName}}의 {{tokenSymbol}}",
|
|
@@ -197,8 +211,8 @@
|
|
|
197
211
|
"deleteActiveSwaps": "활성화된 스왑은 로컬에만 저장되며 삭제시 복구할 수 없습니다.",
|
|
198
212
|
"deleteSwapHistory": "스왑 기록은 로컬에만 저장되며 삭제시 복구할 수 없습니다.",
|
|
199
213
|
"highValueLoss": "받은 토큰의 가치가 스왑된 토큰 및 트랜잭션 비용보다 상당히 낮습니다.",
|
|
200
|
-
"insufficientFunds": "스왑을
|
|
201
|
-
"insufficientGas": "최소
|
|
214
|
+
"insufficientFunds": "스왑을 진행할 자금이 부족합니다.",
|
|
215
|
+
"insufficientGas": "스왑을 진행할 가스가 부족합니다. 최소 다음과 같은 가스가 필요합니다:",
|
|
202
216
|
"rateChanged": "거래 비율이 변경되었습니다. 스왑을 계속하면 새로운 비율이 적용됩니다.",
|
|
203
217
|
"resetSettings": "우선 경로, 슬리피지, 가스 비용, 활성화된 브릿지 및 거래소가 재설정됩니다."
|
|
204
218
|
},
|
|
@@ -214,6 +228,7 @@
|
|
|
214
228
|
}
|
|
215
229
|
},
|
|
216
230
|
"tooltip": {
|
|
231
|
+
"additionalProviderFee": "추가적인 브릿지, 덱스, 그리고 서비스 수수료",
|
|
217
232
|
"estimatedNetworkFee": "예상 네트워크 수수료",
|
|
218
233
|
"estimatedTime": "예상 스왑 시간(분)",
|
|
219
234
|
"notFound": {
|
package/cjs/i18n/pt.json
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"done": "Concluído",
|
|
13
13
|
"getGas": "Obter gás",
|
|
14
14
|
"hide": "Ocultar",
|
|
15
|
+
"learnMore": "Saiba mais",
|
|
15
16
|
"lifiSwap": "Conversão LI.FI",
|
|
16
17
|
"light": "Claro",
|
|
17
18
|
"max": "máximo",
|
|
@@ -29,6 +30,7 @@
|
|
|
29
30
|
"startSwap": "Iniciar conversão",
|
|
30
31
|
"swap": "Conversão",
|
|
31
32
|
"tryAgain": "Tente novamente",
|
|
33
|
+
"viewCoverage": "Ver cobertura",
|
|
32
34
|
"viewOnExplorer": "Ver no explorador"
|
|
33
35
|
},
|
|
34
36
|
"format": {
|
|
@@ -104,6 +106,12 @@
|
|
|
104
106
|
"gasFeeEstimated": "Taxa de gás estimada",
|
|
105
107
|
"gasFeePaid": "taxa de gás paga",
|
|
106
108
|
"inProgress": "em andamento",
|
|
109
|
+
"insurance": {
|
|
110
|
+
"bridgeExploits": "Mau funcionamento da ponte, hacks ou exploits",
|
|
111
|
+
"insure": "Garantir 100% dos tokens em trânsito.",
|
|
112
|
+
"insured": "Você segurou 100% dos tokens em trânsito:",
|
|
113
|
+
"slippageError": "Erro na discrepância para tokens recebidos"
|
|
114
|
+
},
|
|
107
115
|
"info": {
|
|
108
116
|
"message": {
|
|
109
117
|
"autoRefuel": "Você está com pouco gás na rede {{chainName}}. Ao continuar, você obterá gás suficiente para completar a conversão.",
|