@rash2x/bridge-widget 0.6.27 → 0.6.29
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/dist/evaa-bridge.cjs +1 -1
- package/dist/evaa-bridge.mjs +1 -1
- package/dist/{index-CfCG3YId.js → index-BqFCsB_A.js} +112 -29
- package/dist/index-BqFCsB_A.js.map +1 -0
- package/dist/{index-CqrB7Lf4.cjs → index-BsYvWq1w.cjs} +2 -2
- package/dist/{index-CqrB7Lf4.cjs.map → index-BsYvWq1w.cjs.map} +1 -1
- package/dist/{index-BFKnX_pU.cjs → index-BtLimmVe.cjs} +112 -29
- package/dist/index-BtLimmVe.cjs.map +1 -0
- package/dist/{index-CK37sr6H.js → index-ieIpvYrV.js} +2 -2
- package/dist/{index-CK37sr6H.js.map → index-ieIpvYrV.js.map} +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/dist/index-BFKnX_pU.cjs.map +0 -1
- package/dist/index-CfCG3YId.js.map +0 -1
package/dist/evaa-bridge.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const index = require("./index-
|
|
3
|
+
const index = require("./index-BtLimmVe.cjs");
|
|
4
4
|
exports.DEFAULT_SLIPPAGE_BPS = index.DEFAULT_SLIPPAGE_BPS;
|
|
5
5
|
exports.EvaaBridge = index.EvaaBridge;
|
|
6
6
|
exports.RoutePriority = index.RoutePriority;
|
package/dist/evaa-bridge.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { U, d, f, e, H, B, F, X, N, z, $, G, A, D, Z, w, s, v, r, p, q, L, a2, a9, a4, a6, x, I, y, a5, J, a3, a7, a8, Y, W, P, _, a1, aa, Q, S, a0, K, V, t, o, i, u, l, m, j, n, h, k } from "./index-
|
|
1
|
+
import { U, d, f, e, H, B, F, X, N, z, $, G, A, D, Z, w, s, v, r, p, q, L, a2, a9, a4, a6, x, I, y, a5, J, a3, a7, a8, Y, W, P, _, a1, aa, Q, S, a0, K, V, t, o, i, u, l, m, j, n, h, k } from "./index-BqFCsB_A.js";
|
|
2
2
|
export {
|
|
3
3
|
U as DEFAULT_SLIPPAGE_BPS,
|
|
4
4
|
d as EvaaBridge,
|
|
@@ -33,7 +33,7 @@ import { CardHeader, CardTitle, CardAction, Card, CardContent, CardFooter } from
|
|
|
33
33
|
const common$1 = { "connecting": "Connecting…", "initializing": "Initializing...", "loading": "Loading...", "paste": "paste", "close": "Close", "zeroPlaceholder": "0", "nativeToken": "Native Token" };
|
|
34
34
|
const wallets$1 = { "addTonWallet": "Add TON wallet", "addEvmWallet": "Add EVM wallet", "connectTonWallet": "Connect TON wallet", "connectEvmWallet": "Connect EVM wallet", "initializingMetamask": "Initializing MetaMask SDK...", "initializingTronlink": "Initializing TronLink...", "failedToConnectTon": "Failed to connect to TON wallet", "failedToDisconnect": "Failed to disconnect", "metamaskConnectionError": "MetaMask connection error", "failedToConnectMetamask": "Failed to connect to MetaMask", "failedToDisconnectMetamask": "Failed to disconnect from MetaMask", "selectWallet": "Select Wallet", "tonWallets": "TON", "evmWallets": "EVM", "tronWallets": "TRON", "tonconnect": "TonConnect", "metaMask": "WalletConnect", "walletConnect": "WalletConnect", "tronLink": "TronLink", "addTronWallet": "Add Tron wallet", "comingSoon": "Coming Soon", "connected": "CONNECTED", "connectedStatus": "Connected", "disconnect": "Disconnect", "chooseWallet": "Connect wallet", "oneWalletPerEnv": "You can only connect one wallet per environment.", "connect": "Connect", "connectTronWallet": "Connect Tron wallet", "connectWallet": "Connect wallet" };
|
|
35
35
|
const bridge$1 = { "max": "Max", "sourceNetwork": "Source network", "destinationNetwork": "Destination network", "selectToken": "Select token", "selectNetwork": "Select network", "selectSourceNetwork": "Select source network", "selectDestinationNetwork": "Select destination network", "searchToken": "Search token", "myTokens": "My tokens", "allTokens": "All tokens", "search": "Search", "select": "Select", "willChangeSourceChain": "Will change source network", "willChangeSourceNetworkAndToken": "Will change source token", "noBalancesFound": "No balances found.", "noResults": "No results", "tokenNotFound": "We couldn't find a token with that name or symbol. Please try again.", "chainNotFound": "We couldn't find a chain with that name. Please try again.", "sendToAnotherAddress": "Send to another address", "youWillReceive": "You will receive", "anotherAddressPlaceholder": "Address", "addressDoesntMatch": "Address doesn't match the {{network}} network", "checkBeforeTransfer": "Check correctness before transfer" };
|
|
36
|
-
const transaction$1 = { "enterAmount": "Enter amount", "transfer": "Transfer", "getQuote": "Get quote", "failed": "Transaction Failed", "confirm": "Confirm transaction", "signTransaction": "Sign in transaction in wallet", "quoting": "Quoting...", "inProgress": "
|
|
36
|
+
const transaction$1 = { "enterAmount": "Enter amount", "transfer": "Transfer", "getQuote": "Get quote", "failed": "Transaction Failed", "confirm": "Confirm transaction", "signTransaction": "Sign in transaction in wallet", "quoting": "Quoting...", "inProgress": "Transaction in progress...", "checkingBalance": "Checking balance...", "insufficientBalance": "Insufficient balance", "amountTooSmall": "Min {{min}}", "amountTooLarge": "Max {{max}}", "success": "Success", "successTitle": "Success", "done": "Done", "hashCopied": "Hash copied to clipboard", "bridged": "Bridged", "transferTitle": "Transfer", "hash": "Hash", "finalFee": "Final Fee", "route": "Route", "estTime": "Est. Time", "slippage": "Slippage", "minimumReceived": "Minimum received", "totalFee": "Total Fee", "noRouteFound": "No route found", "notEnoughGas": "Not enough gas", "pasteAddressToTransfer": "Paste address to transfer", "noRouteFoundForSettings": "No route found for current settings.", "tryAdjustSettings": "Try disabling Gas on Destination, or adjust amount/networks.", "quoteError": "Quote error", "steps": { "sent": "Sent", "processing": "Processing", "processingNote": "Up to 2 minutes", "completed": "Completed" } };
|
|
37
37
|
const telegram$1 = { "openWebVersion": "Open EVAA Web to Bridge", "restrictionMessage": "You can bridge between the chosen networks on EVAA web version" };
|
|
38
38
|
const app$1 = { "stargateWidgetName": "Stargate Bridge Widget", "liveWidget": "Live Widget", "getStarted": "Get Started" };
|
|
39
39
|
const settings$1 = { "title": "Settings", "gasOnDestination": "Gas on destination", "gasOnDestinationDescription": "The default amount allows you to perform a couple of transactions (e.g. Approve and Swap).", "slippageTolerance": "Slippage tolerance", "slippageToleranceDescription": "Your transaction will revert if the amount you're receiving is outside of this tolerance", "routePriority": "Route Priority", "routePriorityDescription": "Choose how your transfer is routed. Recommended picks the best overall path for cost. Fastest prioritizes speed above all else.", "highSlippageWarning": "High slippage warning", "gasPresets": { "auto": "Auto", "none": "None", "medium": "Medium", "max": "Max" }, "routePresets": { "fastest": "Fastest", "cheapest": "Cheapest", "recommended": "Recommended" } };
|
|
@@ -51,7 +51,7 @@ const en$3 = {
|
|
|
51
51
|
const common = { "connecting": "Подключение…", "initializing": "Инициализация...", "loading": "Загрузка...", "paste": "вставить", "close": "Закрыть", "zeroPlaceholder": "0", "nativeToken": "Нативный токен" };
|
|
52
52
|
const wallets = { "addTonWallet": "Добавить TON кошелёк", "addEvmWallet": "Добавить EVM кошелёк", "connectTonWallet": "Подключить TON кошелёк", "connectEvmWallet": "Подключить EVM кошелёк", "initializingMetamask": "Инициализация MetaMask SDK...", "initializingTronlink": "Инициализация TronLink...", "failedToConnectTon": "Не удалось подключиться к TON кошельку", "failedToDisconnect": "Не удалось отключиться", "metamaskConnectionError": "Ошибка подключения MetaMask", "failedToConnectMetamask": "Не удалось подключиться к MetaMask", "failedToDisconnectMetamask": "Не удалось отключиться от MetaMask", "selectWallet": "Выберите кошелёк", "tonWallets": "TON", "evmWallets": "EVM", "tronWallets": "TRON", "tonconnect": "TonConnect", "metaMask": "WalletConnect", "walletConnect": "WalletConnect", "tronLink": "TronLink", "addTronWallet": "Добавить Tron кошелёк", "comingSoon": "Скоро", "connected": "ПОДКЛЮЧЕНО", "connectedStatus": "Подключён", "disconnect": "Отключить", "chooseWallet": "Подключите кошелек", "oneWalletPerEnv": "Можно подключить только один кошелёк на окружение.", "connect": "Подключить", "connectTronWallet": "Подключить Tron кошелёк", "connectWallet": "Подключить кошелёк" };
|
|
53
53
|
const bridge = { "max": "Макс", "sourceNetwork": "Исходная сеть", "destinationNetwork": "Целевая сеть", "selectToken": "Выбрать токен", "selectNetwork": "Выбрать сеть", "selectSourceNetwork": "Выбрать исходную сеть", "selectDestinationNetwork": "Выбрать целевую сеть", "searchToken": "Поиск токена", "myTokens": "Мои токены", "allTokens": "Все токены", "search": "Поиск", "select": "Выбрать", "willChangeSourceChain": "Сменит исходную сеть", "willChangeSourceNetworkAndToken": "Сменит исходный токен", "noBalancesFound": "Балансы не найдены.", "noResults": "Нет результатов", "tokenNotFound": "Мы не смогли найти токен с таким названием или символом. Пожалуйста, попробуйте снова.", "chainNotFound": "Мы не смогли найти сеть с таким названием. Пожалуйста, попробуйте снова.", "sendToAnotherAddress": "Отправить на другой адрес", "youWillReceive": "Вы получите", "anotherAddressPlaceholder": "Адрес", "addressDoesntMatch": "Адрес не соответствует сети {{network}}", "checkBeforeTransfer": "Проверьте корректность перед переводом" };
|
|
54
|
-
const transaction = { "enterAmount": "Введите сумму", "transfer": "Перевести", "getQuote": "Получить котировку", "quoting": "Расчет котировки...", "failed": "Ошибка транзакции", "confirm": "Подтвердите транзакцию", "signTransaction": "Подпишите транзакцию в кошельке", "inProgress": "
|
|
54
|
+
const transaction = { "enterAmount": "Введите сумму", "transfer": "Перевести", "getQuote": "Получить котировку", "quoting": "Расчет котировки...", "failed": "Ошибка транзакции", "confirm": "Подтвердите транзакцию", "signTransaction": "Подпишите транзакцию в кошельке", "inProgress": "Транзакция выполняется...", "checkingBalance": "Проверка баланса...", "insufficientBalance": "Недостаточно средств", "amountTooSmall": "Минимум {{min}}", "amountTooLarge": "Максимум {{max}}", "success": "Успех", "successTitle": "Успех", "done": "Готово", "hashCopied": "Хэш скопирован в буфер обмена", "bridged": "Переведено", "transferTitle": "Перевод", "hash": "Хэш", "finalFee": "Итоговая комиссия", "route": "Маршрут", "estTime": "Время", "slippage": "Проскальзывание", "minimumReceived": "Минимум к получению", "totalFee": "Общая комиссия", "noRouteFound": "Маршрут не найден", "notEnoughGas": "Недостаточно газа", "pasteAddressToTransfer": "Укажите адрес получателя", "noRouteFoundForSettings": "Маршрут не найден для текущих настроек.", "tryAdjustSettings": "Попробуйте отключить Gas on Destination или измените сумму/сети.", "quoteError": "Ошибка котировки", "steps": { "sent": "Отправлено", "processing": "Обработка", "processingNote": "До 2 минут", "completed": "Завершено" } };
|
|
55
55
|
const telegram = { "openWebVersion": "Открыть EVAA веб для трансфера", "restrictionMessage": "Трансфер между выбранными сетями доступен только в веб-версии EVAA" };
|
|
56
56
|
const app = { "stargateWidgetName": "Виджет Stargate Bridge", "liveWidget": "Живой виджет", "getStarted": "Начало работы" };
|
|
57
57
|
const settings = { "title": "Настройки", "gasOnDestination": "Газ на назначении", "gasOnDestinationDescription": "Значение по умолчанию позволяет выполнить пару транзакций (например, Approve и Swap).", "slippageTolerance": "Толерантность к проскальзыванию", "slippageToleranceDescription": "Ваша транзакция будет отклонена, если получаемая сумма выйдет за пределы этой допустимой погрешности.", "routePriority": "Приоритет маршрута", "routePriorityDescription": "Выберите, как будет выполняться ваш трансфер. Recommended — выбирает оптимальный маршрут с учётом общей стоимости. Fastest — отдаёт приоритет максимальной скорости.", "highSlippageWarning": "Высокое проскальзывание", "gasPresets": { "auto": "Авто", "none": "Нет", "medium": "Средний", "max": "Макс" }, "routePresets": { "fastest": "Быстрейший", "cheapest": "Дешевейший", "recommended": "Рекомендуемый" } };
|
|
@@ -1302,6 +1302,19 @@ function getRouteDisplayName(route) {
|
|
|
1302
1302
|
if (routeLower.includes("v2")) return "Stargate V2";
|
|
1303
1303
|
return route.split(/[/\-_]/).map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join(" ");
|
|
1304
1304
|
}
|
|
1305
|
+
const toSharedDecimals = (amount, fromDecimals, toDecimals) => {
|
|
1306
|
+
const value = BigInt(amount);
|
|
1307
|
+
const diff = BigInt(toDecimals) - BigInt(fromDecimals);
|
|
1308
|
+
if (diff === 0n) return value.toString();
|
|
1309
|
+
if (diff > 0n) return (value * 10n ** diff).toString();
|
|
1310
|
+
const divisor = 10n ** -diff;
|
|
1311
|
+
if (value % divisor !== 0n) {
|
|
1312
|
+
throw new Error(
|
|
1313
|
+
`Cannot convert amount ${amount} from ${fromDecimals} to ${toDecimals} decimals. Got dust: ${value % divisor}`
|
|
1314
|
+
);
|
|
1315
|
+
}
|
|
1316
|
+
return (value / divisor).toString();
|
|
1317
|
+
};
|
|
1305
1318
|
function useBridgeQuote() {
|
|
1306
1319
|
const { assetMatrix, selectedAssetSymbol } = useTokensStore();
|
|
1307
1320
|
const { fromChain, toChain, chains } = useChainsStore();
|
|
@@ -1380,14 +1393,19 @@ function useBridgeQuote() {
|
|
|
1380
1393
|
const dstAddrApi = addrForApi(toChain.chainKey, dstAddress);
|
|
1381
1394
|
const dstNativeAmount = getDstNativeAmount(toChain.chainKey);
|
|
1382
1395
|
const slippageDecimal = getSlippageDecimal();
|
|
1383
|
-
const
|
|
1396
|
+
const dstAmountLD = toSharedDecimals(
|
|
1397
|
+
srcAmountLD,
|
|
1398
|
+
srcTokenOnFrom.decimals,
|
|
1399
|
+
dstTokenOnTo.decimals
|
|
1400
|
+
);
|
|
1401
|
+
const dstAmountMinLD = (BigInt(dstAmountLD) * BigInt(9500) / BigInt(1e4)).toString();
|
|
1384
1402
|
const quoteRoute = await getQuotesByPriority({
|
|
1385
1403
|
srcChainKey: fromChain.chainKey,
|
|
1386
1404
|
dstChainKey: toChain.chainKey,
|
|
1387
1405
|
srcToken: srcTokenOnFrom.address,
|
|
1388
1406
|
dstToken: dstTokenOnTo.address,
|
|
1389
1407
|
srcAmountLD,
|
|
1390
|
-
dstAmountMinLD
|
|
1408
|
+
dstAmountMinLD,
|
|
1391
1409
|
srcAddress: srcAddrApi,
|
|
1392
1410
|
dstAddress: dstAddrApi,
|
|
1393
1411
|
dstNativeAmount,
|
|
@@ -2890,7 +2908,6 @@ const SwapSection = ({
|
|
|
2890
2908
|
return formatUsd(amt * priceUsd);
|
|
2891
2909
|
}, [amount, priceUsd]);
|
|
2892
2910
|
const isUsdLoading = Boolean(amount && parseFloat(amount) > 0 && !priceUsd);
|
|
2893
|
-
const isInsufficientBalance = !!(amount && balance.balance && parseFloat(amount) > balance.balance);
|
|
2894
2911
|
const onChangeChain = useCallback(
|
|
2895
2912
|
(c2) => {
|
|
2896
2913
|
onSelect?.(c2);
|
|
@@ -2903,6 +2920,9 @@ const SwapSection = ({
|
|
|
2903
2920
|
onAmountChange(balance.balance.toString());
|
|
2904
2921
|
}
|
|
2905
2922
|
}, [balance.balance, onAmountChange]);
|
|
2923
|
+
const isInsufficientBalance = useMemo(() => {
|
|
2924
|
+
return !!(isSource && amount && balance.balance && parseFloat(amount) > balance.balance);
|
|
2925
|
+
}, [amount, balance.balance, isSource]);
|
|
2906
2926
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2907
2927
|
/* @__PURE__ */ jsxs(
|
|
2908
2928
|
"div",
|
|
@@ -2959,7 +2979,7 @@ const SwapSection = ({
|
|
|
2959
2979
|
addressType: isSource ? "src" : "dst"
|
|
2960
2980
|
}
|
|
2961
2981
|
),
|
|
2962
|
-
|
|
2982
|
+
isInsufficientBalance ? /* @__PURE__ */ jsx("span", { className: "leading-5 text-sm font-medium text-destructive", children: t2("transaction.insufficientBalance") }) : isUsdLoading ? /* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-12 rounded-md" }) : /* @__PURE__ */ jsx("span", { className: "leading-5 text-sm font-medium text-muted-foreground", children: computedFiat })
|
|
2963
2983
|
] })
|
|
2964
2984
|
]
|
|
2965
2985
|
}
|
|
@@ -3015,13 +3035,7 @@ const AnotherAddress = () => {
|
|
|
3015
3035
|
if (customDstAddress !== trimmed) {
|
|
3016
3036
|
setCustomDstAddress(trimmed);
|
|
3017
3037
|
}
|
|
3018
|
-
}, [
|
|
3019
|
-
isEnabled2,
|
|
3020
|
-
trimmed,
|
|
3021
|
-
isValid,
|
|
3022
|
-
setCustomDstAddress,
|
|
3023
|
-
customDstAddress
|
|
3024
|
-
]);
|
|
3038
|
+
}, [isEnabled2, trimmed, isValid, setCustomDstAddress, customDstAddress]);
|
|
3025
3039
|
const onPaste = async () => {
|
|
3026
3040
|
try {
|
|
3027
3041
|
const text = await navigator.clipboard.readText?.() ?? "";
|
|
@@ -3078,9 +3092,7 @@ const AnotherAddress = () => {
|
|
|
3078
3092
|
),
|
|
3079
3093
|
value && /* @__PURE__ */ jsx(Fragment, { children: invalid ? /* @__PURE__ */ jsx("p", { className: "text-xs font-medium text-destructive", children: t2("bridge.addressDoesntMatch", {
|
|
3080
3094
|
network: toChain?.name ?? "selected"
|
|
3081
|
-
}) }) : /* @__PURE__ */ jsx("p", { className: "text-xs font-medium text-muted-foreground", children: t2("bridge.checkBeforeTransfer"
|
|
3082
|
-
defaultValue: "Check correctness before transfer"
|
|
3083
|
-
}) }) })
|
|
3095
|
+
}) }) : /* @__PURE__ */ jsx("p", { className: "text-xs font-medium text-muted-foreground", children: t2("bridge.checkBeforeTransfer") }) })
|
|
3084
3096
|
] }),
|
|
3085
3097
|
!value ? /* @__PURE__ */ jsx(
|
|
3086
3098
|
Button,
|
|
@@ -4353,14 +4365,85 @@ const WalletSelectModal = () => {
|
|
|
4353
4365
|
] }, category.title)) })
|
|
4354
4366
|
] }) });
|
|
4355
4367
|
};
|
|
4368
|
+
const CheckIcon = (props) => {
|
|
4369
|
+
return /* @__PURE__ */ jsx(
|
|
4370
|
+
"svg",
|
|
4371
|
+
{
|
|
4372
|
+
width: "20",
|
|
4373
|
+
height: "20",
|
|
4374
|
+
viewBox: "0 0 20 20",
|
|
4375
|
+
fill: "none",
|
|
4376
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4377
|
+
...props,
|
|
4378
|
+
children: /* @__PURE__ */ jsx(
|
|
4379
|
+
"path",
|
|
4380
|
+
{
|
|
4381
|
+
d: "M10 0C15.5228 0 20 4.47715 20 10C20 15.5228 15.5228 20 10 20C4.47715 20 0 15.5228 0 10C0 4.47715 4.47715 0 10 0ZM14.9219 6.0918C14.6056 5.81261 14.123 5.84198 13.8438 6.1582L8.7793 11.8926L5.79004 8.90332C5.49172 8.605 5.00828 8.605 4.70996 8.90332C4.41168 9.20164 4.41166 9.68509 4.70996 9.9834L7.8916 13.165C8.41076 13.6842 9.26014 13.6578 9.74609 13.1074L14.9893 7.16992C15.2685 6.85368 15.2381 6.37104 14.9219 6.0918Z",
|
|
4382
|
+
fill: "currentColor"
|
|
4383
|
+
}
|
|
4384
|
+
)
|
|
4385
|
+
}
|
|
4386
|
+
);
|
|
4387
|
+
};
|
|
4388
|
+
const CircleLinedIcon = (props) => {
|
|
4389
|
+
return /* @__PURE__ */ jsx(
|
|
4390
|
+
"svg",
|
|
4391
|
+
{
|
|
4392
|
+
width: "20",
|
|
4393
|
+
height: "20",
|
|
4394
|
+
viewBox: "0 0 20 20",
|
|
4395
|
+
fill: "none",
|
|
4396
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4397
|
+
...props,
|
|
4398
|
+
children: /* @__PURE__ */ jsx(
|
|
4399
|
+
"path",
|
|
4400
|
+
{
|
|
4401
|
+
d: "M10 0C15.5228 0 20 4.47715 20 10C20 15.5228 15.5228 20 10 20C4.47715 20 0 15.5228 0 10C0 4.47715 4.47715 0 10 0ZM10 6C7.79086 6 6 7.79086 6 10C6 12.2091 7.79086 14 10 14C12.2091 14 14 12.2091 14 10C14 7.79086 12.2091 6 10 6Z",
|
|
4402
|
+
fill: "currentColor"
|
|
4403
|
+
}
|
|
4404
|
+
)
|
|
4405
|
+
}
|
|
4406
|
+
);
|
|
4407
|
+
};
|
|
4356
4408
|
const ProgressStep = ({
|
|
4357
4409
|
icon = /* @__PURE__ */ jsx(Loader2, { className: "w-16 h-16 animate-spin" })
|
|
4358
4410
|
}) => {
|
|
4359
4411
|
const { t: t2 } = useBridgeTranslation();
|
|
4360
|
-
|
|
4412
|
+
const steps = [
|
|
4413
|
+
{
|
|
4414
|
+
icon: /* @__PURE__ */ jsx(CheckIcon, { className: "w-5 h-5 " }),
|
|
4415
|
+
title: t2("transaction.steps.sent")
|
|
4416
|
+
},
|
|
4417
|
+
{
|
|
4418
|
+
icon: /* @__PURE__ */ jsx(Loader2, { className: "w-5 h-5 text-primary animate-spin", strokeWidth: 3 }),
|
|
4419
|
+
title: t2("transaction.steps.processing"),
|
|
4420
|
+
description: t2("transaction.steps.processingNote")
|
|
4421
|
+
},
|
|
4422
|
+
{
|
|
4423
|
+
icon: /* @__PURE__ */ jsx(CircleLinedIcon, { className: "w-5 h-5" }),
|
|
4424
|
+
title: t2("transaction.steps.completed")
|
|
4425
|
+
}
|
|
4426
|
+
];
|
|
4427
|
+
return /* @__PURE__ */ jsx(DialogContent, { showCloseButton: false, className: "overflow-hidden md:max-w-[420px] p-10", children: /* @__PURE__ */ jsxs("div", { className: "flex relative flex-col gap-6 flex-1 items-center justify-start text-center bg-background p-6", children: [
|
|
4361
4428
|
icon,
|
|
4362
|
-
/* @__PURE__ */ jsx(DialogHeader, { className: "pr-0", children: /* @__PURE__ */ jsx(DialogTitle, { children: t2("transaction.inProgress") }) }),
|
|
4363
|
-
/* @__PURE__ */
|
|
4429
|
+
/* @__PURE__ */ jsx(DialogHeader, { className: "pr-0 !sm:text-center", children: /* @__PURE__ */ jsx(DialogTitle, { children: t2("transaction.inProgress") }) }),
|
|
4430
|
+
/* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
4431
|
+
/* @__PURE__ */ jsx("div", { className: "absolute left-5 top-5 bottom-5 border-l border-dashed border-foreground/50" }),
|
|
4432
|
+
/* @__PURE__ */ jsx("div", { className: "flex flex-col gap-6 relative z-10", children: steps.map((step) => /* @__PURE__ */ jsxs(
|
|
4433
|
+
"div",
|
|
4434
|
+
{
|
|
4435
|
+
className: "flex items-center gap-5 text-left",
|
|
4436
|
+
children: [
|
|
4437
|
+
/* @__PURE__ */ jsx("div", { className: "w-10 h-10 rounded-full bg-muted flex items-center justify-center text-foreground shadow-inner", children: step.icon }),
|
|
4438
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
|
|
4439
|
+
/* @__PURE__ */ jsx("span", { className: "text-base leading-5", children: step.title }),
|
|
4440
|
+
step.description && /* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground leading-4", children: step.description })
|
|
4441
|
+
] })
|
|
4442
|
+
]
|
|
4443
|
+
},
|
|
4444
|
+
step.title
|
|
4445
|
+
)) })
|
|
4446
|
+
] })
|
|
4364
4447
|
] }) });
|
|
4365
4448
|
};
|
|
4366
4449
|
const FailedStep = ({
|
|
@@ -4368,10 +4451,10 @@ const FailedStep = ({
|
|
|
4368
4451
|
}) => {
|
|
4369
4452
|
const { current, reset } = useTransactionStore();
|
|
4370
4453
|
const { t: t2 } = useBridgeTranslation();
|
|
4371
|
-
return /* @__PURE__ */ jsxs(DialogContent, { showCloseButton: true, className: "overflow-hidden p-
|
|
4372
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col relative gap-4 flex-1 items-center justify-start text-center
|
|
4454
|
+
return /* @__PURE__ */ jsxs(DialogContent, { showCloseButton: true, className: "overflow-hidden md:max-w-[420px] p-10", children: [
|
|
4455
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col relative gap-4 flex-1 items-center justify-start text-center", children: [
|
|
4373
4456
|
icon,
|
|
4374
|
-
/* @__PURE__ */ jsxs(DialogHeader, { className: "pr-0", children: [
|
|
4457
|
+
/* @__PURE__ */ jsxs(DialogHeader, { className: "pr-0 !sm:text-center", children: [
|
|
4375
4458
|
/* @__PURE__ */ jsx(DialogTitle, { children: t2("transaction.failed") }),
|
|
4376
4459
|
current?.errorCode && /* @__PURE__ */ jsx(DialogDescription$1, { children: t2(
|
|
4377
4460
|
`errors.${current.errorCode}`,
|
|
@@ -4483,10 +4566,10 @@ const SuccessStep = ({
|
|
|
4483
4566
|
openTransactionInExplorer(srcChainKey, srcTxHash);
|
|
4484
4567
|
}
|
|
4485
4568
|
};
|
|
4486
|
-
return /* @__PURE__ */ jsxs(DialogContent, { showCloseButton: true, className: "overflow-hidden p-
|
|
4487
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4 flex-1 justify-start items-center text-center
|
|
4569
|
+
return /* @__PURE__ */ jsxs(DialogContent, { showCloseButton: true, className: "overflow-hidden md:max-w-[420px] p-10", children: [
|
|
4570
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4 flex-1 justify-start items-center text-center bg-background", children: [
|
|
4488
4571
|
icon,
|
|
4489
|
-
/* @__PURE__ */ jsx(DialogHeader, { className: "pr-0", children: /* @__PURE__ */ jsx(DialogTitle, { children: t2("transaction.success") }) }),
|
|
4572
|
+
/* @__PURE__ */ jsx(DialogHeader, { className: "pr-0 !sm:text-center", children: /* @__PURE__ */ jsx(DialogTitle, { children: t2("transaction.success") }) }),
|
|
4490
4573
|
/* @__PURE__ */ jsxs("div", { className: "w-full space-y-2 mt-4 relative z-10 pb-14", children: [
|
|
4491
4574
|
metadata?.srcAmountHuman && /* @__PURE__ */ jsxs("div", { className: "flex justify-between items-center", children: [
|
|
4492
4575
|
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: t2("transaction.bridged") }),
|
|
@@ -4559,9 +4642,9 @@ const ConfirmStep = ({
|
|
|
4559
4642
|
}) => {
|
|
4560
4643
|
const { t: t2 } = useBridgeTranslation();
|
|
4561
4644
|
const { formatTime } = useCountdown(90);
|
|
4562
|
-
return /* @__PURE__ */ jsx(DialogContent, { showCloseButton: false, className: "overflow-hidden p-
|
|
4645
|
+
return /* @__PURE__ */ jsx(DialogContent, { showCloseButton: false, className: "overflow-hidden md:max-w-[420px] p-10", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col relative gap-4 flex-1 items-center justify-start text-center", children: [
|
|
4563
4646
|
icon,
|
|
4564
|
-
/* @__PURE__ */ jsxs(DialogHeader, { className: "pr-0", children: [
|
|
4647
|
+
/* @__PURE__ */ jsxs(DialogHeader, { className: "pr-0 !sm:text-center", children: [
|
|
4565
4648
|
/* @__PURE__ */ jsx(DialogTitle, { children: t2("transaction.confirm") }),
|
|
4566
4649
|
/* @__PURE__ */ jsx(DialogDescription, { children: t2("transaction.signTransaction") })
|
|
4567
4650
|
] }),
|
|
@@ -26034,7 +26117,7 @@ class WalletConnectModal {
|
|
|
26034
26117
|
}
|
|
26035
26118
|
async initUi() {
|
|
26036
26119
|
if (typeof window !== "undefined") {
|
|
26037
|
-
await import("./index-
|
|
26120
|
+
await import("./index-ieIpvYrV.js");
|
|
26038
26121
|
const modal = document.createElement("wcm-modal");
|
|
26039
26122
|
document.body.insertAdjacentElement("beforeend", modal);
|
|
26040
26123
|
OptionsCtrl.setIsUiLoaded(true);
|
|
@@ -26785,4 +26868,4 @@ export {
|
|
|
26785
26868
|
getQuoteFees as y,
|
|
26786
26869
|
calculateMinReceived as z
|
|
26787
26870
|
};
|
|
26788
|
-
//# sourceMappingURL=index-
|
|
26871
|
+
//# sourceMappingURL=index-BqFCsB_A.js.map
|