@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.
@@ -34,7 +34,7 @@ const card = require("@/components/ui/card");
34
34
  const common$1 = { "connecting": "Connecting…", "initializing": "Initializing...", "loading": "Loading...", "paste": "paste", "close": "Close", "zeroPlaceholder": "0", "nativeToken": "Native Token" };
35
35
  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" };
36
36
  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" };
37
- 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": "Processing...", "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" };
37
+ 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" } };
38
38
  const telegram$1 = { "openWebVersion": "Open EVAA Web to Bridge", "restrictionMessage": "You can bridge between the chosen networks on EVAA web version" };
39
39
  const app$1 = { "stargateWidgetName": "Stargate Bridge Widget", "liveWidget": "Live Widget", "getStarted": "Get Started" };
40
40
  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" } };
@@ -52,7 +52,7 @@ const en$3 = {
52
52
  const common = { "connecting": "Подключение…", "initializing": "Инициализация...", "loading": "Загрузка...", "paste": "вставить", "close": "Закрыть", "zeroPlaceholder": "0", "nativeToken": "Нативный токен" };
53
53
  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": "Подключить кошелёк" };
54
54
  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": "Проверьте корректность перед переводом" };
55
- 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": "Ошибка котировки" };
55
+ 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": "Завершено" } };
56
56
  const telegram = { "openWebVersion": "Открыть EVAA веб для трансфера", "restrictionMessage": "Трансфер между выбранными сетями доступен только в веб-версии EVAA" };
57
57
  const app = { "stargateWidgetName": "Виджет Stargate Bridge", "liveWidget": "Живой виджет", "getStarted": "Начало работы" };
58
58
  const settings = { "title": "Настройки", "gasOnDestination": "Газ на назначении", "gasOnDestinationDescription": "Значение по умолчанию позволяет выполнить пару транзакций (например, Approve и Swap).", "slippageTolerance": "Толерантность к проскальзыванию", "slippageToleranceDescription": "Ваша транзакция будет отклонена, если получаемая сумма выйдет за пределы этой допустимой погрешности.", "routePriority": "Приоритет маршрута", "routePriorityDescription": "Выберите, как будет выполняться ваш трансфер. Recommended — выбирает оптимальный маршрут с учётом общей стоимости. Fastest — отдаёт приоритет максимальной скорости.", "highSlippageWarning": "Высокое проскальзывание", "gasPresets": { "auto": "Авто", "none": "Нет", "medium": "Средний", "max": "Макс" }, "routePresets": { "fastest": "Быстрейший", "cheapest": "Дешевейший", "recommended": "Рекомендуемый" } };
@@ -1303,6 +1303,19 @@ function getRouteDisplayName(route) {
1303
1303
  if (routeLower.includes("v2")) return "Stargate V2";
1304
1304
  return route.split(/[/\-_]/).map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join(" ");
1305
1305
  }
1306
+ const toSharedDecimals = (amount, fromDecimals, toDecimals) => {
1307
+ const value = BigInt(amount);
1308
+ const diff = BigInt(toDecimals) - BigInt(fromDecimals);
1309
+ if (diff === 0n) return value.toString();
1310
+ if (diff > 0n) return (value * 10n ** diff).toString();
1311
+ const divisor = 10n ** -diff;
1312
+ if (value % divisor !== 0n) {
1313
+ throw new Error(
1314
+ `Cannot convert amount ${amount} from ${fromDecimals} to ${toDecimals} decimals. Got dust: ${value % divisor}`
1315
+ );
1316
+ }
1317
+ return (value / divisor).toString();
1318
+ };
1306
1319
  function useBridgeQuote() {
1307
1320
  const { assetMatrix, selectedAssetSymbol } = useTokensStore();
1308
1321
  const { fromChain, toChain, chains } = useChainsStore();
@@ -1381,14 +1394,19 @@ function useBridgeQuote() {
1381
1394
  const dstAddrApi = addrForApi(toChain.chainKey, dstAddress);
1382
1395
  const dstNativeAmount = getDstNativeAmount(toChain.chainKey);
1383
1396
  const slippageDecimal = getSlippageDecimal();
1384
- const approximateMinLD = BigInt(srcAmountLD) * BigInt(9500) / BigInt(1e4);
1397
+ const dstAmountLD = toSharedDecimals(
1398
+ srcAmountLD,
1399
+ srcTokenOnFrom.decimals,
1400
+ dstTokenOnTo.decimals
1401
+ );
1402
+ const dstAmountMinLD = (BigInt(dstAmountLD) * BigInt(9500) / BigInt(1e4)).toString();
1385
1403
  const quoteRoute = await getQuotesByPriority({
1386
1404
  srcChainKey: fromChain.chainKey,
1387
1405
  dstChainKey: toChain.chainKey,
1388
1406
  srcToken: srcTokenOnFrom.address,
1389
1407
  dstToken: dstTokenOnTo.address,
1390
1408
  srcAmountLD,
1391
- dstAmountMinLD: approximateMinLD.toString(),
1409
+ dstAmountMinLD,
1392
1410
  srcAddress: srcAddrApi,
1393
1411
  dstAddress: dstAddrApi,
1394
1412
  dstNativeAmount,
@@ -2891,7 +2909,6 @@ const SwapSection = ({
2891
2909
  return formatUsd(amt * priceUsd);
2892
2910
  }, [amount, priceUsd]);
2893
2911
  const isUsdLoading = Boolean(amount && parseFloat(amount) > 0 && !priceUsd);
2894
- const isInsufficientBalance = !!(amount && balance.balance && parseFloat(amount) > balance.balance);
2895
2912
  const onChangeChain = react.useCallback(
2896
2913
  (c2) => {
2897
2914
  onSelect?.(c2);
@@ -2904,6 +2921,9 @@ const SwapSection = ({
2904
2921
  onAmountChange(balance.balance.toString());
2905
2922
  }
2906
2923
  }, [balance.balance, onAmountChange]);
2924
+ const isInsufficientBalance = react.useMemo(() => {
2925
+ return !!(isSource && amount && balance.balance && parseFloat(amount) > balance.balance);
2926
+ }, [amount, balance.balance, isSource]);
2907
2927
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2908
2928
  /* @__PURE__ */ jsxRuntime.jsxs(
2909
2929
  "div",
@@ -2960,7 +2980,7 @@ const SwapSection = ({
2960
2980
  addressType: isSource ? "src" : "dst"
2961
2981
  }
2962
2982
  ),
2963
- amount && balance.balance && parseFloat(amount) > balance.balance ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "leading-5 text-sm font-medium text-destructive", children: t2("transaction.insufficientBalance") }) : isUsdLoading ? /* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-4 w-12 rounded-md" }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "leading-5 text-sm font-medium text-muted-foreground", children: computedFiat })
2983
+ isInsufficientBalance ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "leading-5 text-sm font-medium text-destructive", children: t2("transaction.insufficientBalance") }) : isUsdLoading ? /* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-4 w-12 rounded-md" }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "leading-5 text-sm font-medium text-muted-foreground", children: computedFiat })
2964
2984
  ] })
2965
2985
  ]
2966
2986
  }
@@ -3016,13 +3036,7 @@ const AnotherAddress = () => {
3016
3036
  if (customDstAddress !== trimmed) {
3017
3037
  setCustomDstAddress(trimmed);
3018
3038
  }
3019
- }, [
3020
- isEnabled2,
3021
- trimmed,
3022
- isValid,
3023
- setCustomDstAddress,
3024
- customDstAddress
3025
- ]);
3039
+ }, [isEnabled2, trimmed, isValid, setCustomDstAddress, customDstAddress]);
3026
3040
  const onPaste = async () => {
3027
3041
  try {
3028
3042
  const text = await navigator.clipboard.readText?.() ?? "";
@@ -3079,9 +3093,7 @@ const AnotherAddress = () => {
3079
3093
  ),
3080
3094
  value && /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: invalid ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-medium text-destructive", children: t2("bridge.addressDoesntMatch", {
3081
3095
  network: toChain?.name ?? "selected"
3082
- }) }) : /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-medium text-muted-foreground", children: t2("bridge.checkBeforeTransfer", {
3083
- defaultValue: "Check correctness before transfer"
3084
- }) }) })
3096
+ }) }) : /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-medium text-muted-foreground", children: t2("bridge.checkBeforeTransfer") }) })
3085
3097
  ] }),
3086
3098
  !value ? /* @__PURE__ */ jsxRuntime.jsx(
3087
3099
  button.Button,
@@ -4354,14 +4366,85 @@ const WalletSelectModal = () => {
4354
4366
  ] }, category.title)) })
4355
4367
  ] }) });
4356
4368
  };
4369
+ const CheckIcon = (props) => {
4370
+ return /* @__PURE__ */ jsxRuntime.jsx(
4371
+ "svg",
4372
+ {
4373
+ width: "20",
4374
+ height: "20",
4375
+ viewBox: "0 0 20 20",
4376
+ fill: "none",
4377
+ xmlns: "http://www.w3.org/2000/svg",
4378
+ ...props,
4379
+ children: /* @__PURE__ */ jsxRuntime.jsx(
4380
+ "path",
4381
+ {
4382
+ 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",
4383
+ fill: "currentColor"
4384
+ }
4385
+ )
4386
+ }
4387
+ );
4388
+ };
4389
+ const CircleLinedIcon = (props) => {
4390
+ return /* @__PURE__ */ jsxRuntime.jsx(
4391
+ "svg",
4392
+ {
4393
+ width: "20",
4394
+ height: "20",
4395
+ viewBox: "0 0 20 20",
4396
+ fill: "none",
4397
+ xmlns: "http://www.w3.org/2000/svg",
4398
+ ...props,
4399
+ children: /* @__PURE__ */ jsxRuntime.jsx(
4400
+ "path",
4401
+ {
4402
+ 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",
4403
+ fill: "currentColor"
4404
+ }
4405
+ )
4406
+ }
4407
+ );
4408
+ };
4357
4409
  const ProgressStep = ({
4358
4410
  icon = /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "w-16 h-16 animate-spin" })
4359
4411
  }) => {
4360
4412
  const { t: t2 } = useBridgeTranslation();
4361
- return /* @__PURE__ */ jsxRuntime.jsx(dialog.DialogContent, { showCloseButton: false, className: "overflow-hidden p-0", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex relative flex-col gap-4 flex-1 items-center justify-start text-center noise bg-background", children: [
4413
+ const steps = [
4414
+ {
4415
+ icon: /* @__PURE__ */ jsxRuntime.jsx(CheckIcon, { className: "w-5 h-5 " }),
4416
+ title: t2("transaction.steps.sent")
4417
+ },
4418
+ {
4419
+ icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "w-5 h-5 text-primary animate-spin", strokeWidth: 3 }),
4420
+ title: t2("transaction.steps.processing"),
4421
+ description: t2("transaction.steps.processingNote")
4422
+ },
4423
+ {
4424
+ icon: /* @__PURE__ */ jsxRuntime.jsx(CircleLinedIcon, { className: "w-5 h-5" }),
4425
+ title: t2("transaction.steps.completed")
4426
+ }
4427
+ ];
4428
+ return /* @__PURE__ */ jsxRuntime.jsx(dialog.DialogContent, { showCloseButton: false, className: "overflow-hidden md:max-w-[420px] p-10", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex relative flex-col gap-6 flex-1 items-center justify-start text-center bg-background p-6", children: [
4362
4429
  icon,
4363
- /* @__PURE__ */ jsxRuntime.jsx(dialog.DialogHeader, { className: "pr-0", children: /* @__PURE__ */ jsxRuntime.jsx(dialog.DialogTitle, { children: t2("transaction.inProgress") }) }),
4364
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative mt-5 z-10", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute dot-vertical h-full left-5 top-0 bottom-0 z-0" }) })
4430
+ /* @__PURE__ */ jsxRuntime.jsx(dialog.DialogHeader, { className: "pr-0 !sm:text-center", children: /* @__PURE__ */ jsxRuntime.jsx(dialog.DialogTitle, { children: t2("transaction.inProgress") }) }),
4431
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
4432
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute left-5 top-5 bottom-5 border-l border-dashed border-foreground/50" }),
4433
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-6 relative z-10", children: steps.map((step) => /* @__PURE__ */ jsxRuntime.jsxs(
4434
+ "div",
4435
+ {
4436
+ className: "flex items-center gap-5 text-left",
4437
+ children: [
4438
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-10 h-10 rounded-full bg-muted flex items-center justify-center text-foreground shadow-inner", children: step.icon }),
4439
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col", children: [
4440
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-base leading-5", children: step.title }),
4441
+ step.description && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground leading-4", children: step.description })
4442
+ ] })
4443
+ ]
4444
+ },
4445
+ step.title
4446
+ )) })
4447
+ ] })
4365
4448
  ] }) });
4366
4449
  };
4367
4450
  const FailedStep = ({
@@ -4369,10 +4452,10 @@ const FailedStep = ({
4369
4452
  }) => {
4370
4453
  const { current, reset } = useTransactionStore();
4371
4454
  const { t: t2 } = useBridgeTranslation();
4372
- return /* @__PURE__ */ jsxRuntime.jsxs(dialog.DialogContent, { showCloseButton: true, className: "overflow-hidden p-0", children: [
4373
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col relative gap-4 flex-1 items-center justify-start text-center noise", children: [
4455
+ return /* @__PURE__ */ jsxRuntime.jsxs(dialog.DialogContent, { showCloseButton: true, className: "overflow-hidden md:max-w-[420px] p-10", children: [
4456
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col relative gap-4 flex-1 items-center justify-start text-center", children: [
4374
4457
  icon,
4375
- /* @__PURE__ */ jsxRuntime.jsxs(dialog.DialogHeader, { className: "pr-0", children: [
4458
+ /* @__PURE__ */ jsxRuntime.jsxs(dialog.DialogHeader, { className: "pr-0 !sm:text-center", children: [
4376
4459
  /* @__PURE__ */ jsxRuntime.jsx(dialog.DialogTitle, { children: t2("transaction.failed") }),
4377
4460
  current?.errorCode && /* @__PURE__ */ jsxRuntime.jsx(reactDialog.DialogDescription, { children: t2(
4378
4461
  `errors.${current.errorCode}`,
@@ -4484,10 +4567,10 @@ const SuccessStep = ({
4484
4567
  openTransactionInExplorer(srcChainKey, srcTxHash);
4485
4568
  }
4486
4569
  };
4487
- return /* @__PURE__ */ jsxRuntime.jsxs(dialog.DialogContent, { showCloseButton: true, className: "overflow-hidden p-0", children: [
4488
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-4 flex-1 justify-start items-center text-center noise bg-background", children: [
4570
+ return /* @__PURE__ */ jsxRuntime.jsxs(dialog.DialogContent, { showCloseButton: true, className: "overflow-hidden md:max-w-[420px] p-10", children: [
4571
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-4 flex-1 justify-start items-center text-center bg-background", children: [
4489
4572
  icon,
4490
- /* @__PURE__ */ jsxRuntime.jsx(dialog.DialogHeader, { className: "pr-0", children: /* @__PURE__ */ jsxRuntime.jsx(dialog.DialogTitle, { children: t2("transaction.success") }) }),
4573
+ /* @__PURE__ */ jsxRuntime.jsx(dialog.DialogHeader, { className: "pr-0 !sm:text-center", children: /* @__PURE__ */ jsxRuntime.jsx(dialog.DialogTitle, { children: t2("transaction.success") }) }),
4491
4574
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full space-y-2 mt-4 relative z-10 pb-14", children: [
4492
4575
  metadata?.srcAmountHuman && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between items-center", children: [
4493
4576
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: t2("transaction.bridged") }),
@@ -4560,9 +4643,9 @@ const ConfirmStep = ({
4560
4643
  }) => {
4561
4644
  const { t: t2 } = useBridgeTranslation();
4562
4645
  const { formatTime } = useCountdown(90);
4563
- return /* @__PURE__ */ jsxRuntime.jsx(dialog.DialogContent, { showCloseButton: false, className: "overflow-hidden p-0", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col relative gap-4 flex-1 items-center justify-start text-center noise", children: [
4646
+ return /* @__PURE__ */ jsxRuntime.jsx(dialog.DialogContent, { showCloseButton: false, className: "overflow-hidden md:max-w-[420px] p-10", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col relative gap-4 flex-1 items-center justify-start text-center", children: [
4564
4647
  icon,
4565
- /* @__PURE__ */ jsxRuntime.jsxs(dialog.DialogHeader, { className: "pr-0", children: [
4648
+ /* @__PURE__ */ jsxRuntime.jsxs(dialog.DialogHeader, { className: "pr-0 !sm:text-center", children: [
4566
4649
  /* @__PURE__ */ jsxRuntime.jsx(dialog.DialogTitle, { children: t2("transaction.confirm") }),
4567
4650
  /* @__PURE__ */ jsxRuntime.jsx(dialog.DialogDescription, { children: t2("transaction.signTransaction") })
4568
4651
  ] }),
@@ -26035,7 +26118,7 @@ class WalletConnectModal {
26035
26118
  }
26036
26119
  async initUi() {
26037
26120
  if (typeof window !== "undefined") {
26038
- await Promise.resolve().then(() => require("./index-CqrB7Lf4.cjs"));
26121
+ await Promise.resolve().then(() => require("./index-BsYvWq1w.cjs"));
26039
26122
  const modal = document.createElement("wcm-modal");
26040
26123
  document.body.insertAdjacentElement("beforeend", modal);
26041
26124
  OptionsCtrl.setIsUiLoaded(true);
@@ -26784,4 +26867,4 @@ exports.useSettingsStore = useSettingsStore;
26784
26867
  exports.useSwapModel = useSwapModel;
26785
26868
  exports.useTokensStore = useTokensStore;
26786
26869
  exports.useTransactionStore = useTransactionStore;
26787
- //# sourceMappingURL=index-BFKnX_pU.cjs.map
26870
+ //# sourceMappingURL=index-BtLimmVe.cjs.map