@rash2x/bridge-widget 0.1.11 → 0.1.13
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/README.md +23 -2
- package/dist/evaa-bridge.cjs +181 -480
- package/dist/evaa-bridge.cjs.map +1 -1
- package/dist/evaa-bridge.mjs +109 -388
- package/dist/evaa-bridge.mjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/package.json +1 -1
package/dist/evaa-bridge.mjs
CHANGED
|
@@ -2,32 +2,97 @@ var __defProp = Object.defineProperty;
|
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
4
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
5
|
+
import require$$0, { useEffect, useState, useCallback, useMemo, createContext, useContext, memo, forwardRef, useRef } from "react";
|
|
6
|
+
import { initReactI18next, useTranslation, I18nextProvider } from "react-i18next";
|
|
7
|
+
import i18n, { t } from "i18next";
|
|
8
8
|
import { create as create$1 } from "zustand";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
14
|
-
import { XIcon, X, ChevronDownIcon } from "lucide-react";
|
|
15
|
-
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
9
|
+
import { Button } from "@/components/ui/button";
|
|
10
|
+
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription } from "@/components/ui/dialog";
|
|
11
|
+
import { Tooltip, TooltipTrigger, TooltipContent } from "@/components/ui/tooltip";
|
|
12
|
+
import { cn } from "@/lib/utils";
|
|
13
|
+
import { Input } from "@/components/ui/input";
|
|
16
14
|
import { useAccount, useConnect, useDisconnect, useWalletClient, usePublicClient } from "wagmi";
|
|
17
15
|
import { useWallet } from "@tronweb3/tronwallet-adapter-react-hooks";
|
|
18
16
|
import { useTonAddress, useTonConnectUI } from "@tonconnect/ui-react";
|
|
19
17
|
import { useQuery, useQueryClient } from "@tanstack/react-query";
|
|
20
18
|
import { Address, beginCell as beginCell$1, storeMessage, loadMessage, Cell } from "@ton/core";
|
|
21
19
|
import { VariableSizeList } from "react-window";
|
|
22
|
-
import
|
|
20
|
+
import { Skeleton } from "@/components/ui/skeleton";
|
|
21
|
+
import { CardHeader, CardTitle, CardAction, Card, CardContent, CardFooter } from "@/components/ui/card";
|
|
22
|
+
import { Switch } from "@/components/ui/switch";
|
|
23
|
+
import { X } from "lucide-react";
|
|
23
24
|
import { AnimatePresence, motion } from "framer-motion";
|
|
24
|
-
import
|
|
25
|
-
import { t } from "i18next";
|
|
25
|
+
import { Accordion, AccordionItem, AccordionTrigger, AccordionContent } from "@/components/ui/accordion";
|
|
26
26
|
import { toast, Toaster } from "sonner";
|
|
27
27
|
import { BrowserProvider, Contract, parseUnits } from "ethers";
|
|
28
28
|
import { isAddress, formatUnits } from "viem";
|
|
29
29
|
import { TonClient, Address as Address$1, beginCell } from "@ton/ton";
|
|
30
30
|
import { TronLinkAdapterName } from "@tronweb3/tronwallet-adapters";
|
|
31
|
+
const common$1 = { "connecting": "Connecting…", "initializing": "Initializing...", "loading": "Loading...", "paste": "paste", "close": "Close", "zeroPlaceholder": "0", "nativeToken": "Native Token" };
|
|
32
|
+
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", "tonKeeper": "TonKeeper", "metaMask": "WalletConnect", "tronLink": "TronLink", "addTronWallet": "Add Tron wallet", "comingSoon": "Coming Soon", "connected": "CONNECTED", "disconnect": "Disconnect", "chooseWallet": "Choose wallet", "oneWalletPerEnv": "You can only connect one wallet per environment.", "connect": "Connect", "connectTronWallet": "Connect Tron wallet", "connectWallet": "Connect wallet" };
|
|
33
|
+
const bridge$1 = { "sourceNetwork": "Source network", "destinationNetwork": "Destination network", "selectToken": "Select token", "selectNetwork": "Select network", "searchToken": "Search token", "searchDestinationChain": "Search destination chain", "myTokens": "My tokens", "allTokens": "All tokens", "willChangeSourceChain": "Will Change Source Chain", "noBalancesFound": "No balances found.", "noResults": "No results", "sendToAnotherAddress": "Send to another address", "youWillReceive": "You will receive", "tonAddressPlaceholder": "TON address", "evmAddressPlaceholder": "0x… EVM address", "addressDoesntMatch": "Address doesn't match the {{network}} network", "checkBeforeTransfer": "Check correctness before transfer" };
|
|
34
|
+
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}}", "successTitle": "Success", "bridged": "Bridged", "transferTitle": "Transfer", "hash": "Hash", "route": "Route", "estTime": "Est. Time", "slippage": "Slippage", "minimumReceived": "Minimum received", "totalFee": "Total Fee", "noRouteFound": "No route found", "notEnoughGas": "Not enough gas", "noRouteFoundForSettings": "No route found for current settings.", "tryAdjustSettings": "Try disabling Gas on Destination, or adjust amount/networks.", "quoteError": "Quote error" };
|
|
35
|
+
const app$1 = { "stargateWidgetName": "Stargate Bridge Widget", "liveWidget": "Live Widget", "getStarted": "Get Started" };
|
|
36
|
+
const settings$1 = { "title": "Settings", "gasOnDestination": "Gas on destination", "slippageTolerance": "Slippage tolerance", "routePriority": "Route Priority", "highSlippageWarning": "High slippage warning", "gasPresets": { "auto": "Auto", "none": "None", "medium": "Medium", "max": "Max" }, "routePresets": { "fastest": "Fastest", "cheapest": "Cheapest", "recommended": "Recommended" } };
|
|
37
|
+
const en = {
|
|
38
|
+
common: common$1,
|
|
39
|
+
wallets: wallets$1,
|
|
40
|
+
bridge: bridge$1,
|
|
41
|
+
transaction: transaction$1,
|
|
42
|
+
app: app$1,
|
|
43
|
+
settings: settings$1
|
|
44
|
+
};
|
|
45
|
+
const common = { "connecting": "Подключение…", "initializing": "Инициализация...", "loading": "Загрузка...", "paste": "вставить", "close": "Закрыть", "zeroPlaceholder": "0", "nativeToken": "Нативный токен" };
|
|
46
|
+
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", "tonKeeper": "TonKeeper", "metaMask": "WalletConnect", "tronLink": "TronLink", "addTronWallet": "Добавить Tron кошелёк", "comingSoon": "Скоро", "connected": "ПОДКЛЮЧЕНО", "disconnect": "Отключить", "chooseWallet": "Выберите кошелёк", "oneWalletPerEnv": "Можно подключить только один кошелёк на окружение.", "connect": "Подключить", "connectTronWallet": "Подключить Tron кошелёк", "connectWallet": "Подключить кошелёк" };
|
|
47
|
+
const bridge = { "sourceNetwork": "Исходная сеть", "destinationNetwork": "Целевая сеть", "selectToken": "Выбрать токен", "selectNetwork": "Выбрать сеть", "searchToken": "Поиск токена", "searchDestinationChain": "Поиск целевой сети", "myTokens": "Мои токены", "allTokens": "Все токены", "willChangeSourceChain": "Сменит исходную сеть", "noBalancesFound": "Балансы не найдены.", "noResults": "Нет результатов", "sendToAnotherAddress": "Отправить на другой адрес", "youWillReceive": "Вы получите", "tonAddressPlaceholder": "TON адрес", "evmAddressPlaceholder": "0x… EVM адрес", "addressDoesntMatch": "Адрес не соответствует сети {{network}}", "checkBeforeTransfer": "Проверьте корректность перед переводом" };
|
|
48
|
+
const transaction = { "enterAmount": "Введите сумму", "transfer": "Перевести", "getQuote": "Получить котировку", "quoting": "Расчет котировки...", "failed": "Ошибка транзакции", "confirm": "Подтвердите транзакцию", "signTransaction": "Подпишите транзакцию в кошельке", "inProgress": "Выполнение...", "checkingBalance": "Проверка баланса...", "insufficientBalance": "Недостаточно средств", "amountTooSmall": "Минимум {{min}}", "amountTooLarge": "Максимум {{max}}", "successTitle": "Успех", "bridged": "Переведено", "transferTitle": "Перевод", "hash": "Хэш", "route": "Маршрут", "estTime": "Время", "slippage": "Проскальзывание", "minimumReceived": "Минимум к получению", "totalFee": "Общая комиссия", "noRouteFound": "Маршрут не найден", "notEnoughGas": "Недостаточно газа", "noRouteFoundForSettings": "Маршрут не найден для текущих настроек.", "tryAdjustSettings": "Попробуйте отключить Gas on Destination или измените сумму/сети.", "quoteError": "Ошибка котировки" };
|
|
49
|
+
const app = { "stargateWidgetName": "Виджет Stargate Bridge", "liveWidget": "Живой виджет", "getStarted": "Начало работы" };
|
|
50
|
+
const settings = { "title": "Настройки", "gasOnDestination": "Газ на назначении", "slippageTolerance": "Толерантность к проскальзыванию", "routePriority": "Приоритет маршрута", "highSlippageWarning": "Высокое проскальзывание", "gasPresets": { "auto": "Авто", "none": "Нет", "medium": "Средний", "max": "Макс" }, "routePresets": { "fastest": "Быстрейший", "cheapest": "Дешевейший", "recommended": "Рекомендуемый" } };
|
|
51
|
+
const ru = {
|
|
52
|
+
common,
|
|
53
|
+
wallets,
|
|
54
|
+
bridge,
|
|
55
|
+
transaction,
|
|
56
|
+
app,
|
|
57
|
+
settings
|
|
58
|
+
};
|
|
59
|
+
const bridgeI18n = i18n.createInstance();
|
|
60
|
+
const resources = {
|
|
61
|
+
en: {
|
|
62
|
+
"evaa-bridge": en
|
|
63
|
+
},
|
|
64
|
+
ru: {
|
|
65
|
+
"evaa-bridge": ru
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
bridgeI18n.use(initReactI18next).init({
|
|
69
|
+
resources,
|
|
70
|
+
lng: "en",
|
|
71
|
+
// Will be overridden by defaultLanguage prop
|
|
72
|
+
fallbackLng: "en",
|
|
73
|
+
debug: false,
|
|
74
|
+
// Use a dedicated namespace to avoid conflicts
|
|
75
|
+
defaultNS: "evaa-bridge",
|
|
76
|
+
ns: ["evaa-bridge"],
|
|
77
|
+
interpolation: {
|
|
78
|
+
escapeValue: false
|
|
79
|
+
// react already does escaping
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
function BridgeI18nProvider({
|
|
83
|
+
children,
|
|
84
|
+
defaultLanguage = "en"
|
|
85
|
+
}) {
|
|
86
|
+
useEffect(() => {
|
|
87
|
+
if (bridgeI18n.language !== defaultLanguage) {
|
|
88
|
+
bridgeI18n.changeLanguage(defaultLanguage);
|
|
89
|
+
}
|
|
90
|
+
}, [defaultLanguage]);
|
|
91
|
+
return /* @__PURE__ */ jsx(I18nextProvider, { i18n: bridgeI18n, children });
|
|
92
|
+
}
|
|
93
|
+
function useBridgeTranslation() {
|
|
94
|
+
return useTranslation("evaa-bridge", { i18n: bridgeI18n });
|
|
95
|
+
}
|
|
31
96
|
const norm = (s) => (s ?? "").toUpperCase().replace(/₮/g, "T").replace(/[^A-Z0-9]/g, "");
|
|
32
97
|
const POPULAR_ORDER = [
|
|
33
98
|
"USDT",
|
|
@@ -480,147 +545,6 @@ const ExitIcon = (props) => {
|
|
|
480
545
|
}
|
|
481
546
|
);
|
|
482
547
|
};
|
|
483
|
-
function cn(...inputs) {
|
|
484
|
-
return twMerge(clsx(inputs));
|
|
485
|
-
}
|
|
486
|
-
const buttonVariants = cva(
|
|
487
|
-
"inline-flex items-center rounded-full text-lg justify-center gap-2 whitespace-nowrap text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
488
|
-
{
|
|
489
|
-
variants: {
|
|
490
|
-
variant: {
|
|
491
|
-
default: "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
|
|
492
|
-
destructive: "bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
493
|
-
outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
|
|
494
|
-
secondary: "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
|
|
495
|
-
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
496
|
-
link: "text-primary underline-offset-4 hover:underline"
|
|
497
|
-
},
|
|
498
|
-
size: {
|
|
499
|
-
default: "h-13 px-4 py-2 has-[>svg]:px-3",
|
|
500
|
-
sm: "h-9 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
|
|
501
|
-
lg: "h-15 font-semibold rounded-full text-lg px-6 has-[>svg]:px-4",
|
|
502
|
-
icon: "size-9"
|
|
503
|
-
}
|
|
504
|
-
},
|
|
505
|
-
defaultVariants: {
|
|
506
|
-
variant: "default",
|
|
507
|
-
size: "default"
|
|
508
|
-
}
|
|
509
|
-
}
|
|
510
|
-
);
|
|
511
|
-
const Button = require$$0.forwardRef(
|
|
512
|
-
({ className, variant, size, asChild = false, type, ...props }, ref) => {
|
|
513
|
-
const Comp = asChild ? Slot : "button";
|
|
514
|
-
return /* @__PURE__ */ jsx(
|
|
515
|
-
Comp,
|
|
516
|
-
{
|
|
517
|
-
ref,
|
|
518
|
-
"data-slot": "button",
|
|
519
|
-
...!asChild ? { type: type ?? "button" } : null,
|
|
520
|
-
className: cn(buttonVariants({ variant, size }), className),
|
|
521
|
-
...props
|
|
522
|
-
}
|
|
523
|
-
);
|
|
524
|
-
}
|
|
525
|
-
);
|
|
526
|
-
Button.displayName = "Button";
|
|
527
|
-
function Dialog({
|
|
528
|
-
...props
|
|
529
|
-
}) {
|
|
530
|
-
return /* @__PURE__ */ jsx(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
|
|
531
|
-
}
|
|
532
|
-
function DialogPortal({
|
|
533
|
-
...props
|
|
534
|
-
}) {
|
|
535
|
-
return /* @__PURE__ */ jsx(DialogPrimitive.Portal, { "data-slot": "dialog-portal", ...props });
|
|
536
|
-
}
|
|
537
|
-
function DialogOverlay({
|
|
538
|
-
className,
|
|
539
|
-
...props
|
|
540
|
-
}) {
|
|
541
|
-
return /* @__PURE__ */ jsx(
|
|
542
|
-
DialogPrimitive.Overlay,
|
|
543
|
-
{
|
|
544
|
-
"data-slot": "dialog-overlay",
|
|
545
|
-
className: cn(
|
|
546
|
-
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
|
|
547
|
-
className
|
|
548
|
-
),
|
|
549
|
-
...props
|
|
550
|
-
}
|
|
551
|
-
);
|
|
552
|
-
}
|
|
553
|
-
function DialogContent({
|
|
554
|
-
className,
|
|
555
|
-
children,
|
|
556
|
-
showCloseButton = true,
|
|
557
|
-
...props
|
|
558
|
-
}) {
|
|
559
|
-
return /* @__PURE__ */ jsxs(DialogPortal, { "data-slot": "dialog-portal", children: [
|
|
560
|
-
/* @__PURE__ */ jsx(DialogOverlay, {}),
|
|
561
|
-
/* @__PURE__ */ jsxs(
|
|
562
|
-
DialogPrimitive.Content,
|
|
563
|
-
{
|
|
564
|
-
"data-slot": "dialog-content",
|
|
565
|
-
className: cn(
|
|
566
|
-
"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
|
|
567
|
-
className
|
|
568
|
-
),
|
|
569
|
-
...props,
|
|
570
|
-
children: [
|
|
571
|
-
children,
|
|
572
|
-
showCloseButton && /* @__PURE__ */ jsxs(
|
|
573
|
-
DialogPrimitive.Close,
|
|
574
|
-
{
|
|
575
|
-
"data-slot": "dialog-close",
|
|
576
|
-
className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
577
|
-
children: [
|
|
578
|
-
/* @__PURE__ */ jsx(XIcon, {}),
|
|
579
|
-
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
580
|
-
]
|
|
581
|
-
}
|
|
582
|
-
)
|
|
583
|
-
]
|
|
584
|
-
}
|
|
585
|
-
)
|
|
586
|
-
] });
|
|
587
|
-
}
|
|
588
|
-
function DialogHeader({ className, ...props }) {
|
|
589
|
-
return /* @__PURE__ */ jsx(
|
|
590
|
-
"div",
|
|
591
|
-
{
|
|
592
|
-
"data-slot": "dialog-header",
|
|
593
|
-
className: cn("flex flex-col gap-2 text-center sm:text-left", className),
|
|
594
|
-
...props
|
|
595
|
-
}
|
|
596
|
-
);
|
|
597
|
-
}
|
|
598
|
-
function DialogTitle({
|
|
599
|
-
className,
|
|
600
|
-
...props
|
|
601
|
-
}) {
|
|
602
|
-
return /* @__PURE__ */ jsx(
|
|
603
|
-
DialogPrimitive.Title,
|
|
604
|
-
{
|
|
605
|
-
"data-slot": "dialog-title",
|
|
606
|
-
className: cn("text-lg leading-none font-semibold", className),
|
|
607
|
-
...props
|
|
608
|
-
}
|
|
609
|
-
);
|
|
610
|
-
}
|
|
611
|
-
function DialogDescription({
|
|
612
|
-
className,
|
|
613
|
-
...props
|
|
614
|
-
}) {
|
|
615
|
-
return /* @__PURE__ */ jsx(
|
|
616
|
-
DialogPrimitive.Description,
|
|
617
|
-
{
|
|
618
|
-
"data-slot": "dialog-description",
|
|
619
|
-
className: cn("text-muted-foreground text-sm", className),
|
|
620
|
-
...props
|
|
621
|
-
}
|
|
622
|
-
);
|
|
623
|
-
}
|
|
624
548
|
const TipIcon = (props) => {
|
|
625
549
|
return /* @__PURE__ */ jsxs(
|
|
626
550
|
"svg",
|
|
@@ -677,52 +601,6 @@ const TipIcon = (props) => {
|
|
|
677
601
|
}
|
|
678
602
|
);
|
|
679
603
|
};
|
|
680
|
-
function TooltipProvider({
|
|
681
|
-
delayDuration = 0,
|
|
682
|
-
...props
|
|
683
|
-
}) {
|
|
684
|
-
return /* @__PURE__ */ jsx(
|
|
685
|
-
TooltipPrimitive.Provider,
|
|
686
|
-
{
|
|
687
|
-
"data-slot": "tooltip-provider",
|
|
688
|
-
delayDuration,
|
|
689
|
-
...props
|
|
690
|
-
}
|
|
691
|
-
);
|
|
692
|
-
}
|
|
693
|
-
function Tooltip({
|
|
694
|
-
...props
|
|
695
|
-
}) {
|
|
696
|
-
return /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsx(TooltipPrimitive.Root, { "data-slot": "tooltip", ...props }) });
|
|
697
|
-
}
|
|
698
|
-
function TooltipTrigger({
|
|
699
|
-
...props
|
|
700
|
-
}) {
|
|
701
|
-
return /* @__PURE__ */ jsx(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
|
|
702
|
-
}
|
|
703
|
-
function TooltipContent({
|
|
704
|
-
className,
|
|
705
|
-
sideOffset = 0,
|
|
706
|
-
children,
|
|
707
|
-
...props
|
|
708
|
-
}) {
|
|
709
|
-
return /* @__PURE__ */ jsx(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
|
|
710
|
-
TooltipPrimitive.Content,
|
|
711
|
-
{
|
|
712
|
-
"data-slot": "tooltip-content",
|
|
713
|
-
sideOffset,
|
|
714
|
-
className: cn(
|
|
715
|
-
"bg-primary text-primary-foreground text-xs animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5",
|
|
716
|
-
className
|
|
717
|
-
),
|
|
718
|
-
...props,
|
|
719
|
-
children: [
|
|
720
|
-
children,
|
|
721
|
-
/* @__PURE__ */ jsx(TooltipPrimitive.Arrow, { className: "bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })
|
|
722
|
-
]
|
|
723
|
-
}
|
|
724
|
-
) });
|
|
725
|
-
}
|
|
726
604
|
const Tip = (props) => {
|
|
727
605
|
const { children, text } = props;
|
|
728
606
|
return /* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
@@ -995,7 +873,7 @@ const routePresets = [
|
|
|
995
873
|
RoutePriority.RECOMMENDED
|
|
996
874
|
];
|
|
997
875
|
const SettingModal = ({ isOpen, onClose }) => {
|
|
998
|
-
const { t: t2 } =
|
|
876
|
+
const { t: t2 } = useBridgeTranslation();
|
|
999
877
|
const { toChain } = useChainsStore();
|
|
1000
878
|
const { tokens } = useTokensStore();
|
|
1001
879
|
const {
|
|
@@ -1121,21 +999,6 @@ const SettingModal = ({ isOpen, onClose }) => {
|
|
|
1121
999
|
] })
|
|
1122
1000
|
] }) });
|
|
1123
1001
|
};
|
|
1124
|
-
function Input({ className, type, ...props }) {
|
|
1125
|
-
return /* @__PURE__ */ jsx(
|
|
1126
|
-
"input",
|
|
1127
|
-
{
|
|
1128
|
-
type,
|
|
1129
|
-
"data-slot": "input",
|
|
1130
|
-
className: cn(
|
|
1131
|
-
"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md bg-transparent px-3 py-1 text-base transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
1132
|
-
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
1133
|
-
className
|
|
1134
|
-
),
|
|
1135
|
-
...props
|
|
1136
|
-
}
|
|
1137
|
-
);
|
|
1138
|
-
}
|
|
1139
1002
|
function useAddresses() {
|
|
1140
1003
|
const { fromChain, toChain } = useChainsStore();
|
|
1141
1004
|
const { address: evmAddress } = useAccount();
|
|
@@ -1527,9 +1390,6 @@ function useTokenSelectData(items) {
|
|
|
1527
1390
|
hasAnyWallet
|
|
1528
1391
|
};
|
|
1529
1392
|
}
|
|
1530
|
-
function Skeleton({ className }) {
|
|
1531
|
-
return /* @__PURE__ */ jsx("div", { className: cn("animate-pulse rounded-md bg-[#999]", className) });
|
|
1532
|
-
}
|
|
1533
1393
|
const TokenRow = ({
|
|
1534
1394
|
symbol,
|
|
1535
1395
|
name,
|
|
@@ -1640,7 +1500,7 @@ const TokenSelectModal = ({
|
|
|
1640
1500
|
items,
|
|
1641
1501
|
onChangeAsset
|
|
1642
1502
|
}) => {
|
|
1643
|
-
const { t: t2 } =
|
|
1503
|
+
const { t: t2 } = useBridgeTranslation();
|
|
1644
1504
|
const {
|
|
1645
1505
|
query,
|
|
1646
1506
|
setQuery,
|
|
@@ -1874,7 +1734,7 @@ const SelectTokenButton = ({
|
|
|
1874
1734
|
onClick,
|
|
1875
1735
|
token
|
|
1876
1736
|
}) => {
|
|
1877
|
-
const { t: t2 } =
|
|
1737
|
+
const { t: t2 } = useBridgeTranslation();
|
|
1878
1738
|
const label = useMemo(() => {
|
|
1879
1739
|
return token?.symbol ?? t2("bridge.selectToken");
|
|
1880
1740
|
}, [token, t2]);
|
|
@@ -1903,77 +1763,8 @@ const SelectTokenButton = ({
|
|
|
1903
1763
|
}
|
|
1904
1764
|
);
|
|
1905
1765
|
};
|
|
1906
|
-
function Card({ className, ...props }) {
|
|
1907
|
-
return /* @__PURE__ */ jsx(
|
|
1908
|
-
"div",
|
|
1909
|
-
{
|
|
1910
|
-
"data-slot": "card",
|
|
1911
|
-
className: cn(
|
|
1912
|
-
"bg-card text-card-foreground flex flex-col gap-4 rounded-lg border py-4 shadow-sm",
|
|
1913
|
-
className
|
|
1914
|
-
),
|
|
1915
|
-
...props
|
|
1916
|
-
}
|
|
1917
|
-
);
|
|
1918
|
-
}
|
|
1919
|
-
function CardHeader({ className, ...props }) {
|
|
1920
|
-
return /* @__PURE__ */ jsx(
|
|
1921
|
-
"div",
|
|
1922
|
-
{
|
|
1923
|
-
"data-slot": "card-header",
|
|
1924
|
-
className: cn(
|
|
1925
|
-
"@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-4 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-4",
|
|
1926
|
-
className
|
|
1927
|
-
),
|
|
1928
|
-
...props
|
|
1929
|
-
}
|
|
1930
|
-
);
|
|
1931
|
-
}
|
|
1932
|
-
function CardTitle({ className, ...props }) {
|
|
1933
|
-
return /* @__PURE__ */ jsx(
|
|
1934
|
-
"div",
|
|
1935
|
-
{
|
|
1936
|
-
"data-slot": "card-title",
|
|
1937
|
-
className: cn("leading-none font-semibold", className),
|
|
1938
|
-
...props
|
|
1939
|
-
}
|
|
1940
|
-
);
|
|
1941
|
-
}
|
|
1942
|
-
function CardAction({ className, ...props }) {
|
|
1943
|
-
return /* @__PURE__ */ jsx(
|
|
1944
|
-
"div",
|
|
1945
|
-
{
|
|
1946
|
-
"data-slot": "card-action",
|
|
1947
|
-
className: cn(
|
|
1948
|
-
"col-start-2 row-span-2 row-start-1 self-start justify-self-end",
|
|
1949
|
-
className
|
|
1950
|
-
),
|
|
1951
|
-
...props
|
|
1952
|
-
}
|
|
1953
|
-
);
|
|
1954
|
-
}
|
|
1955
|
-
function CardContent({ className, ...props }) {
|
|
1956
|
-
return /* @__PURE__ */ jsx(
|
|
1957
|
-
"div",
|
|
1958
|
-
{
|
|
1959
|
-
"data-slot": "card-content",
|
|
1960
|
-
className: cn("px-4", className),
|
|
1961
|
-
...props
|
|
1962
|
-
}
|
|
1963
|
-
);
|
|
1964
|
-
}
|
|
1965
|
-
function CardFooter({ className, ...props }) {
|
|
1966
|
-
return /* @__PURE__ */ jsx(
|
|
1967
|
-
"div",
|
|
1968
|
-
{
|
|
1969
|
-
"data-slot": "card-footer",
|
|
1970
|
-
className: cn("flex items-center px-4 [.border-t]:pt-4", className),
|
|
1971
|
-
...props
|
|
1972
|
-
}
|
|
1973
|
-
);
|
|
1974
|
-
}
|
|
1975
1766
|
const FormHeaderComponent = () => {
|
|
1976
|
-
const { t: t2 } =
|
|
1767
|
+
const { t: t2 } = useBridgeTranslation();
|
|
1977
1768
|
const { isOpen, onClose, onOpen } = useModal();
|
|
1978
1769
|
const {
|
|
1979
1770
|
isOpen: isOpenSettings,
|
|
@@ -2478,7 +2269,7 @@ const SelectNetworkButton = ({
|
|
|
2478
2269
|
onClick,
|
|
2479
2270
|
network
|
|
2480
2271
|
}) => {
|
|
2481
|
-
const { t: t2 } =
|
|
2272
|
+
const { t: t2 } = useBridgeTranslation();
|
|
2482
2273
|
const label = useMemo(() => {
|
|
2483
2274
|
return network?.name ?? t2("bridge.selectNetwork");
|
|
2484
2275
|
}, [network, t2]);
|
|
@@ -2575,7 +2366,7 @@ const ChainSelectModal = ({
|
|
|
2575
2366
|
allowedItems,
|
|
2576
2367
|
onChangeChain
|
|
2577
2368
|
}) => {
|
|
2578
|
-
const { t: t2 } =
|
|
2369
|
+
const { t: t2 } = useBridgeTranslation();
|
|
2579
2370
|
const [query, setQuery] = useState("");
|
|
2580
2371
|
const [isFocused, setIsFocused] = useState(false);
|
|
2581
2372
|
const { setFromChain, chains, fromChain, toChain } = useChainsStore();
|
|
@@ -2720,7 +2511,7 @@ const WalletButton = ({
|
|
|
2720
2511
|
wallet,
|
|
2721
2512
|
addressType
|
|
2722
2513
|
}) => {
|
|
2723
|
-
const { t: t2 } =
|
|
2514
|
+
const { t: t2 } = useBridgeTranslation();
|
|
2724
2515
|
const { onOpen } = useWalletSelectModal();
|
|
2725
2516
|
const { chainRegistry } = useChainStrategies();
|
|
2726
2517
|
const walletType = mapWalletToType(wallet);
|
|
@@ -2887,31 +2678,6 @@ const SwapSection = ({
|
|
|
2887
2678
|
)
|
|
2888
2679
|
] });
|
|
2889
2680
|
};
|
|
2890
|
-
function Switch({
|
|
2891
|
-
className,
|
|
2892
|
-
...props
|
|
2893
|
-
}) {
|
|
2894
|
-
return /* @__PURE__ */ jsx(
|
|
2895
|
-
SwitchPrimitive.Root,
|
|
2896
|
-
{
|
|
2897
|
-
"data-slot": "switch",
|
|
2898
|
-
className: cn(
|
|
2899
|
-
"peer data-[state=checked]:bg-[#0095F9] data-[state=unchecked]:bg-[#CACFD3] focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
|
|
2900
|
-
className
|
|
2901
|
-
),
|
|
2902
|
-
...props,
|
|
2903
|
-
children: /* @__PURE__ */ jsx(
|
|
2904
|
-
SwitchPrimitive.Thumb,
|
|
2905
|
-
{
|
|
2906
|
-
"data-slot": "switch-thumb",
|
|
2907
|
-
className: cn(
|
|
2908
|
-
"bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0"
|
|
2909
|
-
)
|
|
2910
|
-
}
|
|
2911
|
-
)
|
|
2912
|
-
}
|
|
2913
|
-
);
|
|
2914
|
-
}
|
|
2915
2681
|
const useCustomAddressStore = create$1((set) => ({
|
|
2916
2682
|
customDstAddress: void 0,
|
|
2917
2683
|
setCustomDstAddress: (address) => set({ customDstAddress: address }),
|
|
@@ -2932,7 +2698,7 @@ const tonNormalize = (addr) => {
|
|
|
2932
2698
|
}
|
|
2933
2699
|
};
|
|
2934
2700
|
const ToggleRow = ({ enabled, onToggle }) => {
|
|
2935
|
-
const { t: t2 } =
|
|
2701
|
+
const { t: t2 } = useBridgeTranslation();
|
|
2936
2702
|
const { toChain } = useChainsStore();
|
|
2937
2703
|
const { dstAddress } = useAddresses();
|
|
2938
2704
|
const { setCustomDstAddress, clearCustomDstAddress } = useCustomAddressStore();
|
|
@@ -3056,60 +2822,6 @@ const ToggleRow = ({ enabled, onToggle }) => {
|
|
|
3056
2822
|
) })
|
|
3057
2823
|
] });
|
|
3058
2824
|
};
|
|
3059
|
-
function Accordion({
|
|
3060
|
-
...props
|
|
3061
|
-
}) {
|
|
3062
|
-
return /* @__PURE__ */ jsx(AccordionPrimitive.Root, { "data-slot": "accordion", ...props });
|
|
3063
|
-
}
|
|
3064
|
-
function AccordionItem({
|
|
3065
|
-
className,
|
|
3066
|
-
...props
|
|
3067
|
-
}) {
|
|
3068
|
-
return /* @__PURE__ */ jsx(
|
|
3069
|
-
AccordionPrimitive.Item,
|
|
3070
|
-
{
|
|
3071
|
-
"data-slot": "accordion-item",
|
|
3072
|
-
className: cn("border-b last:border-b-0", className),
|
|
3073
|
-
...props
|
|
3074
|
-
}
|
|
3075
|
-
);
|
|
3076
|
-
}
|
|
3077
|
-
function AccordionTrigger({
|
|
3078
|
-
className,
|
|
3079
|
-
children,
|
|
3080
|
-
...props
|
|
3081
|
-
}) {
|
|
3082
|
-
return /* @__PURE__ */ jsx(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
|
|
3083
|
-
AccordionPrimitive.Trigger,
|
|
3084
|
-
{
|
|
3085
|
-
"data-slot": "accordion-trigger",
|
|
3086
|
-
className: cn(
|
|
3087
|
-
"focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
|
|
3088
|
-
className
|
|
3089
|
-
),
|
|
3090
|
-
...props,
|
|
3091
|
-
children: [
|
|
3092
|
-
children,
|
|
3093
|
-
/* @__PURE__ */ jsx(ChevronDownIcon, { className: "text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0 transition-transform duration-200" })
|
|
3094
|
-
]
|
|
3095
|
-
}
|
|
3096
|
-
) });
|
|
3097
|
-
}
|
|
3098
|
-
function AccordionContent({
|
|
3099
|
-
className,
|
|
3100
|
-
children,
|
|
3101
|
-
...props
|
|
3102
|
-
}) {
|
|
3103
|
-
return /* @__PURE__ */ jsx(
|
|
3104
|
-
AccordionPrimitive.Content,
|
|
3105
|
-
{
|
|
3106
|
-
"data-slot": "accordion-content",
|
|
3107
|
-
className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",
|
|
3108
|
-
...props,
|
|
3109
|
-
children: /* @__PURE__ */ jsx("div", { className: cn("pt-0 pb-4", className), children })
|
|
3110
|
-
}
|
|
3111
|
-
);
|
|
3112
|
-
}
|
|
3113
2825
|
function getQuoteAmounts(quote, srcToken, dstToken) {
|
|
3114
2826
|
if (!quote || !srcToken || !dstToken) {
|
|
3115
2827
|
return {
|
|
@@ -3212,7 +2924,7 @@ function getRouteDisplayName(route) {
|
|
|
3212
2924
|
return route.split(/[/\-_]/).map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join(" ");
|
|
3213
2925
|
}
|
|
3214
2926
|
const Details = () => {
|
|
3215
|
-
const { t: t2 } =
|
|
2927
|
+
const { t: t2 } = useBridgeTranslation();
|
|
3216
2928
|
const { selectedAssetSymbol, assetMatrix, tokens } = useTokensStore();
|
|
3217
2929
|
const { toChain, fromChain, chains } = useChainsStore();
|
|
3218
2930
|
const { quote, status } = useBridgeQuoteStore();
|
|
@@ -3858,7 +3570,7 @@ function useSilentValidations(amountString) {
|
|
|
3858
3570
|
return validationResult;
|
|
3859
3571
|
}
|
|
3860
3572
|
const SubmitButton = () => {
|
|
3861
|
-
const { t: t2 } =
|
|
3573
|
+
const { t: t2 } = useBridgeTranslation();
|
|
3862
3574
|
const { chainRegistry } = useChainStrategies();
|
|
3863
3575
|
const { srcAddress, dstAddress } = useAddresses();
|
|
3864
3576
|
const { quote, status, inputAmount, noRoute } = useBridgeQuoteStore();
|
|
@@ -3953,13 +3665,22 @@ const SubmitButton = () => {
|
|
|
3953
3665
|
}
|
|
3954
3666
|
};
|
|
3955
3667
|
const disabled = isBusy || amountNum <= 0 || status === "loading" || isBalanceLoading || hasInsufficientBalance || hasAmountTooLarge || !gas.hasEnoughGas || noRoute || !isValidForTransfer;
|
|
3956
|
-
return /* @__PURE__ */ jsx(
|
|
3668
|
+
return /* @__PURE__ */ jsx(
|
|
3669
|
+
Button,
|
|
3670
|
+
{
|
|
3671
|
+
onClick: handleClick,
|
|
3672
|
+
disabled,
|
|
3673
|
+
size: "lg",
|
|
3674
|
+
className: "w-full mt-4",
|
|
3675
|
+
children: label
|
|
3676
|
+
}
|
|
3677
|
+
);
|
|
3957
3678
|
};
|
|
3958
3679
|
function short(addr) {
|
|
3959
3680
|
return addr.slice(0, 4) + "…" + addr.slice(-4);
|
|
3960
3681
|
}
|
|
3961
3682
|
const WalletSelectModal = () => {
|
|
3962
|
-
const { t: t2 } =
|
|
3683
|
+
const { t: t2 } = useBridgeTranslation();
|
|
3963
3684
|
const { isOpen, onClose } = useWalletSelectModal();
|
|
3964
3685
|
const { connect, connectors, isPending } = useConnect();
|
|
3965
3686
|
const { chainRegistry } = useChainStrategies();
|
|
@@ -5493,7 +5214,7 @@ function requireDist() {
|
|
|
5493
5214
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
5494
5215
|
};
|
|
5495
5216
|
Object.defineProperty(dist, "__esModule", { value: true });
|
|
5496
|
-
var react_1 = __importStar(require$$
|
|
5217
|
+
var react_1 = __importStar(require$$0);
|
|
5497
5218
|
var canvas_confetti_1 = __importDefault(require$$1);
|
|
5498
5219
|
var DEFAULT_GLOBAL_OPTIONS = {
|
|
5499
5220
|
resize: true,
|
|
@@ -5607,7 +5328,7 @@ function requirePresets() {
|
|
|
5607
5328
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
5608
5329
|
};
|
|
5609
5330
|
Object.defineProperty(presets, "__esModule", { value: true });
|
|
5610
|
-
var react_1 = __importStar(require$$
|
|
5331
|
+
var react_1 = __importStar(require$$0);
|
|
5611
5332
|
var index_1 = __importDefault(requireDist());
|
|
5612
5333
|
var DEFAULT_DECORATE_OPTIONS = function(o) {
|
|
5613
5334
|
return o;
|
|
@@ -5805,7 +5526,7 @@ function requireFireworks() {
|
|
|
5805
5526
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
5806
5527
|
};
|
|
5807
5528
|
Object.defineProperty(fireworks$1, "__esModule", { value: true });
|
|
5808
|
-
var react_1 = __importDefault(require$$
|
|
5529
|
+
var react_1 = __importDefault(require$$0);
|
|
5809
5530
|
var index_1 = __importDefault(requirePresets());
|
|
5810
5531
|
var fireworks_1 = __importDefault(requireFireworks$1());
|
|
5811
5532
|
function Fireworks2(props) {
|
|
@@ -5818,7 +5539,7 @@ var fireworksExports = requireFireworks();
|
|
|
5818
5539
|
const Fireworks = /* @__PURE__ */ getDefaultExportFromCjs(fireworksExports);
|
|
5819
5540
|
const SuccessStep = () => {
|
|
5820
5541
|
const { current, reset } = useTransactionStore();
|
|
5821
|
-
const { t: t2 } =
|
|
5542
|
+
const { t: t2 } = useBridgeTranslation();
|
|
5822
5543
|
const metadata = current?.metadata;
|
|
5823
5544
|
const srcTxHash = current?.srcTxHash;
|
|
5824
5545
|
const handleCopyHash = () => {
|
|
@@ -6037,7 +5758,7 @@ const useCountdown = (initialSeconds) => {
|
|
|
6037
5758
|
};
|
|
6038
5759
|
};
|
|
6039
5760
|
const ConfirmStep = () => {
|
|
6040
|
-
const { t: t2 } =
|
|
5761
|
+
const { t: t2 } = useBridgeTranslation();
|
|
6041
5762
|
const { formatTime } = useCountdown(90);
|
|
6042
5763
|
return /* @__PURE__ */ jsx(Card, { className: "flex flex-col border-none h-full bg-background overflow-hidden rounded-none md:rounded-lg", children: /* @__PURE__ */ jsxs(CardContent, { className: "flex flex-col relative gap-4 py-10 px-8 flex-1 items-center justify-start text-center noise", children: [
|
|
6043
5764
|
/* @__PURE__ */ jsx(TransactionConfirmVector, {}),
|
|
@@ -7012,12 +6733,12 @@ class TonChainStrategy {
|
|
|
7012
6733
|
payload: msg.payload
|
|
7013
6734
|
})
|
|
7014
6735
|
);
|
|
7015
|
-
const
|
|
6736
|
+
const transaction2 = {
|
|
7016
6737
|
validUntil: Math.floor(Date.now() / 1e3) + TON_CONFIG.validUntil,
|
|
7017
6738
|
messages: tonMessages
|
|
7018
6739
|
};
|
|
7019
6740
|
const result = await this.config.tonConnectUI.sendTransaction(
|
|
7020
|
-
|
|
6741
|
+
transaction2
|
|
7021
6742
|
);
|
|
7022
6743
|
return {
|
|
7023
6744
|
chainKey: "ton",
|
|
@@ -7836,7 +7557,7 @@ const EvaaBridgeWithProviders = (props) => {
|
|
|
7836
7557
|
useEffect(() => {
|
|
7837
7558
|
setTronConnected(!!tronConnected);
|
|
7838
7559
|
}, [tronConnected, setTronConnected]);
|
|
7839
|
-
return /* @__PURE__ */ jsx(
|
|
7560
|
+
return /* @__PURE__ */ jsx(BridgeI18nProvider, { defaultLanguage: props.defaultLanguage, children: /* @__PURE__ */ jsx(
|
|
7840
7561
|
ChainStrategyProvider,
|
|
7841
7562
|
{
|
|
7842
7563
|
evmWallet: {
|
|
@@ -7861,7 +7582,7 @@ const EvaaBridgeWithProviders = (props) => {
|
|
|
7861
7582
|
tonApiKey: props.tonApiKey,
|
|
7862
7583
|
children: /* @__PURE__ */ jsx(EvaaBridgeContent, { ...props })
|
|
7863
7584
|
}
|
|
7864
|
-
);
|
|
7585
|
+
) });
|
|
7865
7586
|
};
|
|
7866
7587
|
const EvaaBridgeContent = ({
|
|
7867
7588
|
className,
|
|
@@ -7869,7 +7590,7 @@ const EvaaBridgeContent = ({
|
|
|
7869
7590
|
onAmountChange,
|
|
7870
7591
|
onChainChange
|
|
7871
7592
|
} = {}) => {
|
|
7872
|
-
const { t: t2 } =
|
|
7593
|
+
const { t: t2 } = useBridgeTranslation();
|
|
7873
7594
|
useTokensRequest();
|
|
7874
7595
|
useChainsRequest();
|
|
7875
7596
|
const [sendToAnother, setSendToAnother] = useState(false);
|