@rash2x/bridge-widget 0.1.11 → 0.1.12
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 +18 -0
- package/dist/evaa-bridge.cjs +87 -460
- package/dist/evaa-bridge.cjs.map +1 -1
- package/dist/evaa-bridge.mjs +14 -367
- package/dist/evaa-bridge.mjs.map +1 -1
- package/package.json +1 -1
package/dist/evaa-bridge.cjs
CHANGED
|
@@ -28,49 +28,29 @@ const jsxRuntime = require("react/jsx-runtime");
|
|
|
28
28
|
const reactI18next = require("react-i18next");
|
|
29
29
|
const require$$0 = require("react");
|
|
30
30
|
const zustand = require("zustand");
|
|
31
|
-
const
|
|
32
|
-
const
|
|
33
|
-
const
|
|
34
|
-
const
|
|
35
|
-
const
|
|
36
|
-
const lucideReact = require("lucide-react");
|
|
37
|
-
const TooltipPrimitive = require("@radix-ui/react-tooltip");
|
|
31
|
+
const button = require("@/components/ui/button");
|
|
32
|
+
const dialog = require("@/components/ui/dialog");
|
|
33
|
+
const tooltip = require("@/components/ui/tooltip");
|
|
34
|
+
const utils = require("@/lib/utils");
|
|
35
|
+
const input = require("@/components/ui/input");
|
|
38
36
|
const wagmi = require("wagmi");
|
|
39
37
|
const tronwalletAdapterReactHooks = require("@tronweb3/tronwallet-adapter-react-hooks");
|
|
40
38
|
const uiReact = require("@tonconnect/ui-react");
|
|
41
39
|
const reactQuery = require("@tanstack/react-query");
|
|
42
40
|
const core = require("@ton/core");
|
|
43
41
|
const reactWindow = require("react-window");
|
|
44
|
-
const
|
|
42
|
+
const skeleton = require("@/components/ui/skeleton");
|
|
43
|
+
const card = require("@/components/ui/card");
|
|
44
|
+
const _switch = require("@/components/ui/switch");
|
|
45
|
+
const lucideReact = require("lucide-react");
|
|
45
46
|
const framerMotion = require("framer-motion");
|
|
46
|
-
const
|
|
47
|
+
const accordion = require("@/components/ui/accordion");
|
|
47
48
|
const i18next = require("i18next");
|
|
48
49
|
const sonner = require("sonner");
|
|
49
50
|
const ethers = require("ethers");
|
|
50
51
|
const viem = require("viem");
|
|
51
52
|
const ton = require("@ton/ton");
|
|
52
53
|
const tronwalletAdapters = require("@tronweb3/tronwallet-adapters");
|
|
53
|
-
function _interopNamespaceDefault(e) {
|
|
54
|
-
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
55
|
-
if (e) {
|
|
56
|
-
for (const k in e) {
|
|
57
|
-
if (k !== "default") {
|
|
58
|
-
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
59
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
60
|
-
enumerable: true,
|
|
61
|
-
get: () => e[k]
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
n.default = e;
|
|
67
|
-
return Object.freeze(n);
|
|
68
|
-
}
|
|
69
|
-
const require$$0__namespace = /* @__PURE__ */ _interopNamespaceDefault(require$$0);
|
|
70
|
-
const DialogPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(DialogPrimitive);
|
|
71
|
-
const TooltipPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(TooltipPrimitive);
|
|
72
|
-
const SwitchPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(SwitchPrimitive);
|
|
73
|
-
const AccordionPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(AccordionPrimitive);
|
|
74
54
|
const norm = (s) => (s ?? "").toUpperCase().replace(/₮/g, "T").replace(/[^A-Z0-9]/g, "");
|
|
75
55
|
const POPULAR_ORDER = [
|
|
76
56
|
"USDT",
|
|
@@ -523,147 +503,6 @@ const ExitIcon = (props) => {
|
|
|
523
503
|
}
|
|
524
504
|
);
|
|
525
505
|
};
|
|
526
|
-
function cn(...inputs) {
|
|
527
|
-
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
528
|
-
}
|
|
529
|
-
const buttonVariants = classVarianceAuthority.cva(
|
|
530
|
-
"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",
|
|
531
|
-
{
|
|
532
|
-
variants: {
|
|
533
|
-
variant: {
|
|
534
|
-
default: "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
|
|
535
|
-
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",
|
|
536
|
-
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",
|
|
537
|
-
secondary: "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
|
|
538
|
-
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
539
|
-
link: "text-primary underline-offset-4 hover:underline"
|
|
540
|
-
},
|
|
541
|
-
size: {
|
|
542
|
-
default: "h-13 px-4 py-2 has-[>svg]:px-3",
|
|
543
|
-
sm: "h-9 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
|
|
544
|
-
lg: "h-15 font-semibold rounded-full text-lg px-6 has-[>svg]:px-4",
|
|
545
|
-
icon: "size-9"
|
|
546
|
-
}
|
|
547
|
-
},
|
|
548
|
-
defaultVariants: {
|
|
549
|
-
variant: "default",
|
|
550
|
-
size: "default"
|
|
551
|
-
}
|
|
552
|
-
}
|
|
553
|
-
);
|
|
554
|
-
const Button = require$$0__namespace.forwardRef(
|
|
555
|
-
({ className, variant, size, asChild = false, type, ...props }, ref) => {
|
|
556
|
-
const Comp = asChild ? reactSlot.Slot : "button";
|
|
557
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
558
|
-
Comp,
|
|
559
|
-
{
|
|
560
|
-
ref,
|
|
561
|
-
"data-slot": "button",
|
|
562
|
-
...!asChild ? { type: type ?? "button" } : null,
|
|
563
|
-
className: cn(buttonVariants({ variant, size }), className),
|
|
564
|
-
...props
|
|
565
|
-
}
|
|
566
|
-
);
|
|
567
|
-
}
|
|
568
|
-
);
|
|
569
|
-
Button.displayName = "Button";
|
|
570
|
-
function Dialog({
|
|
571
|
-
...props
|
|
572
|
-
}) {
|
|
573
|
-
return /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Root, { "data-slot": "dialog", ...props });
|
|
574
|
-
}
|
|
575
|
-
function DialogPortal({
|
|
576
|
-
...props
|
|
577
|
-
}) {
|
|
578
|
-
return /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Portal, { "data-slot": "dialog-portal", ...props });
|
|
579
|
-
}
|
|
580
|
-
function DialogOverlay({
|
|
581
|
-
className,
|
|
582
|
-
...props
|
|
583
|
-
}) {
|
|
584
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
585
|
-
DialogPrimitive__namespace.Overlay,
|
|
586
|
-
{
|
|
587
|
-
"data-slot": "dialog-overlay",
|
|
588
|
-
className: cn(
|
|
589
|
-
"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",
|
|
590
|
-
className
|
|
591
|
-
),
|
|
592
|
-
...props
|
|
593
|
-
}
|
|
594
|
-
);
|
|
595
|
-
}
|
|
596
|
-
function DialogContent({
|
|
597
|
-
className,
|
|
598
|
-
children,
|
|
599
|
-
showCloseButton = true,
|
|
600
|
-
...props
|
|
601
|
-
}) {
|
|
602
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(DialogPortal, { "data-slot": "dialog-portal", children: [
|
|
603
|
-
/* @__PURE__ */ jsxRuntime.jsx(DialogOverlay, {}),
|
|
604
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
605
|
-
DialogPrimitive__namespace.Content,
|
|
606
|
-
{
|
|
607
|
-
"data-slot": "dialog-content",
|
|
608
|
-
className: cn(
|
|
609
|
-
"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",
|
|
610
|
-
className
|
|
611
|
-
),
|
|
612
|
-
...props,
|
|
613
|
-
children: [
|
|
614
|
-
children,
|
|
615
|
-
showCloseButton && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
616
|
-
DialogPrimitive__namespace.Close,
|
|
617
|
-
{
|
|
618
|
-
"data-slot": "dialog-close",
|
|
619
|
-
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",
|
|
620
|
-
children: [
|
|
621
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.XIcon, {}),
|
|
622
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
|
|
623
|
-
]
|
|
624
|
-
}
|
|
625
|
-
)
|
|
626
|
-
]
|
|
627
|
-
}
|
|
628
|
-
)
|
|
629
|
-
] });
|
|
630
|
-
}
|
|
631
|
-
function DialogHeader({ className, ...props }) {
|
|
632
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
633
|
-
"div",
|
|
634
|
-
{
|
|
635
|
-
"data-slot": "dialog-header",
|
|
636
|
-
className: cn("flex flex-col gap-2 text-center sm:text-left", className),
|
|
637
|
-
...props
|
|
638
|
-
}
|
|
639
|
-
);
|
|
640
|
-
}
|
|
641
|
-
function DialogTitle({
|
|
642
|
-
className,
|
|
643
|
-
...props
|
|
644
|
-
}) {
|
|
645
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
646
|
-
DialogPrimitive__namespace.Title,
|
|
647
|
-
{
|
|
648
|
-
"data-slot": "dialog-title",
|
|
649
|
-
className: cn("text-lg leading-none font-semibold", className),
|
|
650
|
-
...props
|
|
651
|
-
}
|
|
652
|
-
);
|
|
653
|
-
}
|
|
654
|
-
function DialogDescription({
|
|
655
|
-
className,
|
|
656
|
-
...props
|
|
657
|
-
}) {
|
|
658
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
659
|
-
DialogPrimitive__namespace.Description,
|
|
660
|
-
{
|
|
661
|
-
"data-slot": "dialog-description",
|
|
662
|
-
className: cn("text-muted-foreground text-sm", className),
|
|
663
|
-
...props
|
|
664
|
-
}
|
|
665
|
-
);
|
|
666
|
-
}
|
|
667
506
|
const TipIcon = (props) => {
|
|
668
507
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
669
508
|
"svg",
|
|
@@ -720,57 +559,11 @@ const TipIcon = (props) => {
|
|
|
720
559
|
}
|
|
721
560
|
);
|
|
722
561
|
};
|
|
723
|
-
function TooltipProvider({
|
|
724
|
-
delayDuration = 0,
|
|
725
|
-
...props
|
|
726
|
-
}) {
|
|
727
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
728
|
-
TooltipPrimitive__namespace.Provider,
|
|
729
|
-
{
|
|
730
|
-
"data-slot": "tooltip-provider",
|
|
731
|
-
delayDuration,
|
|
732
|
-
...props
|
|
733
|
-
}
|
|
734
|
-
);
|
|
735
|
-
}
|
|
736
|
-
function Tooltip({
|
|
737
|
-
...props
|
|
738
|
-
}) {
|
|
739
|
-
return /* @__PURE__ */ jsxRuntime.jsx(TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Root, { "data-slot": "tooltip", ...props }) });
|
|
740
|
-
}
|
|
741
|
-
function TooltipTrigger({
|
|
742
|
-
...props
|
|
743
|
-
}) {
|
|
744
|
-
return /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Trigger, { "data-slot": "tooltip-trigger", ...props });
|
|
745
|
-
}
|
|
746
|
-
function TooltipContent({
|
|
747
|
-
className,
|
|
748
|
-
sideOffset = 0,
|
|
749
|
-
children,
|
|
750
|
-
...props
|
|
751
|
-
}) {
|
|
752
|
-
return /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
753
|
-
TooltipPrimitive__namespace.Content,
|
|
754
|
-
{
|
|
755
|
-
"data-slot": "tooltip-content",
|
|
756
|
-
sideOffset,
|
|
757
|
-
className: cn(
|
|
758
|
-
"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",
|
|
759
|
-
className
|
|
760
|
-
),
|
|
761
|
-
...props,
|
|
762
|
-
children: [
|
|
763
|
-
children,
|
|
764
|
-
/* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Arrow, { className: "bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })
|
|
765
|
-
]
|
|
766
|
-
}
|
|
767
|
-
) });
|
|
768
|
-
}
|
|
769
562
|
const Tip = (props) => {
|
|
770
563
|
const { children, text } = props;
|
|
771
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(Tooltip, { children: [
|
|
772
|
-
/* @__PURE__ */ jsxRuntime.jsx(TooltipTrigger, { children }),
|
|
773
|
-
/* @__PURE__ */ jsxRuntime.jsx(TooltipContent, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { children: text }) })
|
|
564
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(tooltip.Tooltip, { children: [
|
|
565
|
+
/* @__PURE__ */ jsxRuntime.jsx(tooltip.TooltipTrigger, { children }),
|
|
566
|
+
/* @__PURE__ */ jsxRuntime.jsx(tooltip.TooltipContent, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { children: text }) })
|
|
774
567
|
] });
|
|
775
568
|
};
|
|
776
569
|
async function getChains() {
|
|
@@ -1070,8 +863,8 @@ const SettingModal = ({ isOpen, onClose }) => {
|
|
|
1070
863
|
);
|
|
1071
864
|
const activeBtn = "bg-settings-active hover:bg-settings-active/80 text-settings-active-foreground";
|
|
1072
865
|
const notActiveBtn = "bg-settings-button hover:bg-settings-button/80 text-settings-button-foreground";
|
|
1073
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Dialog, { open: isOpen, onOpenChange: (open) => !open && onClose(), children: /* @__PURE__ */ jsxRuntime.jsxs(DialogContent, { children: [
|
|
1074
|
-
/* @__PURE__ */ jsxRuntime.jsx(DialogHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { children: t("settings.title", { defaultValue: "Settings" }) }) }),
|
|
866
|
+
return /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog, { open: isOpen, onOpenChange: (open) => !open && onClose(), children: /* @__PURE__ */ jsxRuntime.jsxs(dialog.DialogContent, { children: [
|
|
867
|
+
/* @__PURE__ */ jsxRuntime.jsx(dialog.DialogHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(dialog.DialogTitle, { children: t("settings.title", { defaultValue: "Settings" }) }) }),
|
|
1075
868
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-5", children: [
|
|
1076
869
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-5", children: [
|
|
1077
870
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between items-center", children: [
|
|
@@ -1096,11 +889,11 @@ const SettingModal = ({ isOpen, onClose }) => {
|
|
|
1096
889
|
) }) })
|
|
1097
890
|
] }),
|
|
1098
891
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1.5", children: gasPresets.map((g) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1099
|
-
Button,
|
|
892
|
+
button.Button,
|
|
1100
893
|
{
|
|
1101
894
|
type: "button",
|
|
1102
895
|
onClick: () => setGasPreset(g),
|
|
1103
|
-
className: cn(
|
|
896
|
+
className: utils.cn(
|
|
1104
897
|
`cursor-pointer rounded-6 px-2 py-2.5 h-7 text-xs font-semibold leading-2 transition`,
|
|
1105
898
|
gasPreset === g ? activeBtn : notActiveBtn
|
|
1106
899
|
),
|
|
@@ -1124,14 +917,14 @@ const SettingModal = ({ isOpen, onClose }) => {
|
|
|
1124
917
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-6", children: [
|
|
1125
918
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-lg text-foreground leading-4.5 font-semibold h-4.5", children: slippagePercent }) }),
|
|
1126
919
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2", children: slippagePresets.map((p) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1127
|
-
Button,
|
|
920
|
+
button.Button,
|
|
1128
921
|
{
|
|
1129
922
|
type: "button",
|
|
1130
923
|
onClick: () => {
|
|
1131
924
|
const bps = parseFloat(p.replace("%", "")) * 100;
|
|
1132
925
|
setSlippageBps(bps);
|
|
1133
926
|
},
|
|
1134
|
-
className: cn(
|
|
927
|
+
className: utils.cn(
|
|
1135
928
|
`cursor-pointer rounded-6 px-2 py-2.5 h-7 text-xs font-semibold leading-2 transition`,
|
|
1136
929
|
activeSlippagePreset === p ? activeBtn : notActiveBtn
|
|
1137
930
|
),
|
|
@@ -1148,11 +941,11 @@ const SettingModal = ({ isOpen, onClose }) => {
|
|
|
1148
941
|
/* @__PURE__ */ jsxRuntime.jsx(Tip, { text: t("settings.routePriority"), children: /* @__PURE__ */ jsxRuntime.jsx(TipIcon, { className: "size-4 text-muted-foreground" }) })
|
|
1149
942
|
] }) }),
|
|
1150
943
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-end gap-2", children: routePresets.map((r) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1151
|
-
Button,
|
|
944
|
+
button.Button,
|
|
1152
945
|
{
|
|
1153
946
|
type: "button",
|
|
1154
947
|
onClick: () => setRoutePriority(r),
|
|
1155
|
-
className: cn(
|
|
948
|
+
className: utils.cn(
|
|
1156
949
|
`cursor-pointer rounded-6 px-2 py-2.5 h-7 text-xs font-semibold leading-2 transition`,
|
|
1157
950
|
routePriority === r ? activeBtn : notActiveBtn
|
|
1158
951
|
),
|
|
@@ -1164,21 +957,6 @@ const SettingModal = ({ isOpen, onClose }) => {
|
|
|
1164
957
|
] })
|
|
1165
958
|
] }) });
|
|
1166
959
|
};
|
|
1167
|
-
function Input({ className, type, ...props }) {
|
|
1168
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1169
|
-
"input",
|
|
1170
|
-
{
|
|
1171
|
-
type,
|
|
1172
|
-
"data-slot": "input",
|
|
1173
|
-
className: cn(
|
|
1174
|
-
"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",
|
|
1175
|
-
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
1176
|
-
className
|
|
1177
|
-
),
|
|
1178
|
-
...props
|
|
1179
|
-
}
|
|
1180
|
-
);
|
|
1181
|
-
}
|
|
1182
960
|
function useAddresses() {
|
|
1183
961
|
const { fromChain, toChain } = useChainsStore();
|
|
1184
962
|
const { address: evmAddress } = wagmi.useAccount();
|
|
@@ -1570,9 +1348,6 @@ function useTokenSelectData(items) {
|
|
|
1570
1348
|
hasAnyWallet
|
|
1571
1349
|
};
|
|
1572
1350
|
}
|
|
1573
|
-
function Skeleton({ className }) {
|
|
1574
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("animate-pulse rounded-md bg-[#999]", className) });
|
|
1575
|
-
}
|
|
1576
1351
|
const TokenRow = ({
|
|
1577
1352
|
symbol,
|
|
1578
1353
|
name,
|
|
@@ -1584,7 +1359,7 @@ const TokenRow = ({
|
|
|
1584
1359
|
onPick
|
|
1585
1360
|
}) => {
|
|
1586
1361
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1587
|
-
Button,
|
|
1362
|
+
button.Button,
|
|
1588
1363
|
{
|
|
1589
1364
|
onClick: onPick,
|
|
1590
1365
|
className: `w-full h-12.5 rounded-md cursor-pointer bg-transparent flex shadow-none items-center justify-between gap-2.5 px-5 py-2.5 hover:bg-modal-item-hover transition-[300] ${isSelected ? "border border-ring" : ""}`,
|
|
@@ -1604,8 +1379,8 @@ const TokenRow = ({
|
|
|
1604
1379
|
] })
|
|
1605
1380
|
] }),
|
|
1606
1381
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-right space-y-1", children: isBalanceLoading && hasAnyWallet ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-end gap-1", children: [
|
|
1607
|
-
/* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-5 w-16 rounded-md" }),
|
|
1608
|
-
/* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-3 w-12 rounded-md" })
|
|
1382
|
+
/* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-5 w-16 rounded-md" }),
|
|
1383
|
+
/* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-3 w-12 rounded-md" })
|
|
1609
1384
|
] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1610
1385
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-extrabold text-foreground text-lg leading-4 truncate", children: hasAnyWallet ? formatBalance(balance) : "—" }),
|
|
1611
1386
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-xs leading-3 text-muted-foreground", children: hasAnyWallet && balance > 0 && usdValue > 0 ? formatUsd(usdValue) : "—" })
|
|
@@ -1761,8 +1536,8 @@ const TokenSelectModal = ({
|
|
|
1761
1536
|
}
|
|
1762
1537
|
return out;
|
|
1763
1538
|
}, [effectiveTab, myTokens, groupedTokens, t]);
|
|
1764
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Dialog, { open: isOpen, onOpenChange: (open) => !open && handleClose(), children: /* @__PURE__ */ jsxRuntime.jsxs(DialogContent, { className: "!max-h-[80dvh] overflow-auto", children: [
|
|
1765
|
-
/* @__PURE__ */ jsxRuntime.jsx(DialogHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { children: t("bridge.selectToken") }) }),
|
|
1539
|
+
return /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog, { open: isOpen, onOpenChange: (open) => !open && handleClose(), children: /* @__PURE__ */ jsxRuntime.jsxs(dialog.DialogContent, { className: "!max-h-[80dvh] overflow-auto", children: [
|
|
1540
|
+
/* @__PURE__ */ jsxRuntime.jsx(dialog.DialogHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(dialog.DialogTitle, { children: t("bridge.selectToken") }) }),
|
|
1766
1541
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1767
1542
|
"div",
|
|
1768
1543
|
{
|
|
@@ -1770,7 +1545,7 @@ const TokenSelectModal = ({
|
|
|
1770
1545
|
children: [
|
|
1771
1546
|
/* @__PURE__ */ jsxRuntime.jsx(SearchIcon, { className: "size-6 text-input-icon" }),
|
|
1772
1547
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1773
|
-
Input,
|
|
1548
|
+
input.Input,
|
|
1774
1549
|
{
|
|
1775
1550
|
placeholder: t("bridge.searchToken"),
|
|
1776
1551
|
className: "w-full outline-none leading-0 p-0 h-6 text-base text-input-text placeholder:text-input-placeholder bg-none dark:bg-transparent",
|
|
@@ -1785,7 +1560,7 @@ const TokenSelectModal = ({
|
|
|
1785
1560
|
),
|
|
1786
1561
|
hasAnyWallet() && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
|
|
1787
1562
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1788
|
-
Button,
|
|
1563
|
+
button.Button,
|
|
1789
1564
|
{
|
|
1790
1565
|
variant: tab === "my" ? "default" : "outline",
|
|
1791
1566
|
onClick: () => setTab("my"),
|
|
@@ -1794,7 +1569,7 @@ const TokenSelectModal = ({
|
|
|
1794
1569
|
}
|
|
1795
1570
|
),
|
|
1796
1571
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1797
|
-
Button,
|
|
1572
|
+
button.Button,
|
|
1798
1573
|
{
|
|
1799
1574
|
variant: tab === "all" ? "default" : "outline",
|
|
1800
1575
|
onClick: () => setTab("all"),
|
|
@@ -1895,7 +1670,7 @@ const RefreshButton = () => {
|
|
|
1895
1670
|
refresh();
|
|
1896
1671
|
}, [refresh]);
|
|
1897
1672
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1898
|
-
Button,
|
|
1673
|
+
button.Button,
|
|
1899
1674
|
{
|
|
1900
1675
|
onClick: handleRefresh,
|
|
1901
1676
|
disabled: spinning,
|
|
@@ -1922,7 +1697,7 @@ const SelectTokenButton = ({
|
|
|
1922
1697
|
return token?.symbol ?? t("bridge.selectToken");
|
|
1923
1698
|
}, [token, t]);
|
|
1924
1699
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1925
|
-
Button,
|
|
1700
|
+
button.Button,
|
|
1926
1701
|
{
|
|
1927
1702
|
onClick,
|
|
1928
1703
|
size: "sm",
|
|
@@ -1946,75 +1721,6 @@ const SelectTokenButton = ({
|
|
|
1946
1721
|
}
|
|
1947
1722
|
);
|
|
1948
1723
|
};
|
|
1949
|
-
function Card({ className, ...props }) {
|
|
1950
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1951
|
-
"div",
|
|
1952
|
-
{
|
|
1953
|
-
"data-slot": "card",
|
|
1954
|
-
className: cn(
|
|
1955
|
-
"bg-card text-card-foreground flex flex-col gap-4 rounded-lg border py-4 shadow-sm",
|
|
1956
|
-
className
|
|
1957
|
-
),
|
|
1958
|
-
...props
|
|
1959
|
-
}
|
|
1960
|
-
);
|
|
1961
|
-
}
|
|
1962
|
-
function CardHeader({ className, ...props }) {
|
|
1963
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1964
|
-
"div",
|
|
1965
|
-
{
|
|
1966
|
-
"data-slot": "card-header",
|
|
1967
|
-
className: cn(
|
|
1968
|
-
"@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",
|
|
1969
|
-
className
|
|
1970
|
-
),
|
|
1971
|
-
...props
|
|
1972
|
-
}
|
|
1973
|
-
);
|
|
1974
|
-
}
|
|
1975
|
-
function CardTitle({ className, ...props }) {
|
|
1976
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1977
|
-
"div",
|
|
1978
|
-
{
|
|
1979
|
-
"data-slot": "card-title",
|
|
1980
|
-
className: cn("leading-none font-semibold", className),
|
|
1981
|
-
...props
|
|
1982
|
-
}
|
|
1983
|
-
);
|
|
1984
|
-
}
|
|
1985
|
-
function CardAction({ className, ...props }) {
|
|
1986
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1987
|
-
"div",
|
|
1988
|
-
{
|
|
1989
|
-
"data-slot": "card-action",
|
|
1990
|
-
className: cn(
|
|
1991
|
-
"col-start-2 row-span-2 row-start-1 self-start justify-self-end",
|
|
1992
|
-
className
|
|
1993
|
-
),
|
|
1994
|
-
...props
|
|
1995
|
-
}
|
|
1996
|
-
);
|
|
1997
|
-
}
|
|
1998
|
-
function CardContent({ className, ...props }) {
|
|
1999
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2000
|
-
"div",
|
|
2001
|
-
{
|
|
2002
|
-
"data-slot": "card-content",
|
|
2003
|
-
className: cn("px-4", className),
|
|
2004
|
-
...props
|
|
2005
|
-
}
|
|
2006
|
-
);
|
|
2007
|
-
}
|
|
2008
|
-
function CardFooter({ className, ...props }) {
|
|
2009
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2010
|
-
"div",
|
|
2011
|
-
{
|
|
2012
|
-
"data-slot": "card-footer",
|
|
2013
|
-
className: cn("flex items-center px-4 [.border-t]:pt-4", className),
|
|
2014
|
-
...props
|
|
2015
|
-
}
|
|
2016
|
-
);
|
|
2017
|
-
}
|
|
2018
1724
|
const FormHeaderComponent = () => {
|
|
2019
1725
|
const { t } = reactI18next.useTranslation();
|
|
2020
1726
|
const { isOpen, onClose, onOpen } = useModal();
|
|
@@ -2031,14 +1737,14 @@ const FormHeaderComponent = () => {
|
|
|
2031
1737
|
const sum = selectedAssetSymbol.toUpperCase();
|
|
2032
1738
|
return assets.find((a) => a.symbol.toUpperCase() === sum) ?? assets[0];
|
|
2033
1739
|
}, [assets, selectedAssetSymbol]);
|
|
2034
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(CardHeader, { className: "gap-y-0 flex justify-between items-center", children: [
|
|
2035
|
-
/* @__PURE__ */ jsxRuntime.jsxs(CardTitle, { className: "flex items-center gap-2.5", children: [
|
|
1740
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(card.CardHeader, { className: "gap-y-0 flex justify-between items-center", children: [
|
|
1741
|
+
/* @__PURE__ */ jsxRuntime.jsxs(card.CardTitle, { className: "flex items-center gap-2.5", children: [
|
|
2036
1742
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-normal leading-3.5 text-muted-foreground", children: t("bridge.selectToken") }),
|
|
2037
1743
|
/* @__PURE__ */ jsxRuntime.jsx(SelectTokenButton, { token: current, onClick: onOpen })
|
|
2038
1744
|
] }),
|
|
2039
|
-
/* @__PURE__ */ jsxRuntime.jsxs(CardAction, { className: "flex items-center gap-2.5", children: [
|
|
1745
|
+
/* @__PURE__ */ jsxRuntime.jsxs(card.CardAction, { className: "flex items-center gap-2.5", children: [
|
|
2040
1746
|
/* @__PURE__ */ jsxRuntime.jsx(RefreshButton, {}),
|
|
2041
|
-
/* @__PURE__ */ jsxRuntime.jsx(Button, { onClick: onOpenSettings, size: "sm", variant: "secondary", children: /* @__PURE__ */ jsxRuntime.jsx(BoltIcon, { stroke: "currentColor" }) })
|
|
1747
|
+
/* @__PURE__ */ jsxRuntime.jsx(button.Button, { onClick: onOpenSettings, size: "sm", variant: "secondary", children: /* @__PURE__ */ jsxRuntime.jsx(BoltIcon, { stroke: "currentColor" }) })
|
|
2042
1748
|
] }),
|
|
2043
1749
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2044
1750
|
TokenSelectModal,
|
|
@@ -2134,7 +1840,7 @@ function useBridgeQuote() {
|
|
|
2134
1840
|
setNoRoute,
|
|
2135
1841
|
resetWithIdle
|
|
2136
1842
|
} = useBridgeQuoteStore();
|
|
2137
|
-
const
|
|
1843
|
+
const input2 = inputAmount;
|
|
2138
1844
|
const srcTokenOnFrom = require$$0.useMemo(
|
|
2139
1845
|
() => resolveTokenOnChainFromMatrix$2(
|
|
2140
1846
|
assetMatrix,
|
|
@@ -2153,11 +1859,11 @@ function useBridgeQuote() {
|
|
|
2153
1859
|
);
|
|
2154
1860
|
const [loading, setLoading] = require$$0.useState(false);
|
|
2155
1861
|
require$$0.useEffect(() => {
|
|
2156
|
-
if (!
|
|
1862
|
+
if (!input2 || input2 === "") {
|
|
2157
1863
|
setLoading(false);
|
|
2158
1864
|
resetWithIdle();
|
|
2159
1865
|
}
|
|
2160
|
-
}, [
|
|
1866
|
+
}, [input2, resetWithIdle]);
|
|
2161
1867
|
require$$0.useEffect(() => {
|
|
2162
1868
|
const resetUi = (withError) => {
|
|
2163
1869
|
setLoading(false);
|
|
@@ -2165,7 +1871,7 @@ function useBridgeQuote() {
|
|
|
2165
1871
|
resetWithIdle();
|
|
2166
1872
|
}
|
|
2167
1873
|
};
|
|
2168
|
-
if (!
|
|
1874
|
+
if (!input2 || Number(input2) <= 0 || !fromChain?.chainKey || !toChain?.chainKey || !srcTokenOnFrom || !dstTokenOnTo || !srcAddress || !dstAddress) {
|
|
2169
1875
|
resetUi();
|
|
2170
1876
|
return;
|
|
2171
1877
|
}
|
|
@@ -2191,7 +1897,7 @@ function useBridgeQuote() {
|
|
|
2191
1897
|
return;
|
|
2192
1898
|
}
|
|
2193
1899
|
}
|
|
2194
|
-
const srcAmountLD = toLD(
|
|
1900
|
+
const srcAmountLD = toLD(input2, srcTokenOnFrom.decimals);
|
|
2195
1901
|
const srcAddrApi = addrForApi(fromChain.chainKey, srcAddress);
|
|
2196
1902
|
const dstAddrApi = addrForApi(toChain.chainKey, dstAddress);
|
|
2197
1903
|
const dstNativeAmount = getDstNativeAmount(toChain.chainKey);
|
|
@@ -2236,7 +1942,7 @@ function useBridgeQuote() {
|
|
|
2236
1942
|
cancelled = true;
|
|
2237
1943
|
};
|
|
2238
1944
|
}, [
|
|
2239
|
-
|
|
1945
|
+
input2,
|
|
2240
1946
|
fromChain?.chainKey,
|
|
2241
1947
|
toChain?.chainKey,
|
|
2242
1948
|
srcTokenOnFrom,
|
|
@@ -2472,13 +2178,13 @@ const SwapButton = () => {
|
|
|
2472
2178
|
}, 300);
|
|
2473
2179
|
}, [canSwap, isSwapping, swapModel.actions]);
|
|
2474
2180
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2475
|
-
Button,
|
|
2181
|
+
button.Button,
|
|
2476
2182
|
{
|
|
2477
2183
|
onClick: handleSwap,
|
|
2478
2184
|
disabled: !canSwap || isSwapping,
|
|
2479
2185
|
variant: "secondary",
|
|
2480
2186
|
size: "sm",
|
|
2481
|
-
className: cn(
|
|
2187
|
+
className: utils.cn(
|
|
2482
2188
|
"absolute top-1/2 -translate-y-1/2 left-1/2 -translate-x-1/2",
|
|
2483
2189
|
!canSwap || isSwapping ? "opacity-50 cursor-not-allowed" : "hover:scale-110"
|
|
2484
2190
|
),
|
|
@@ -2499,7 +2205,7 @@ const WalletBalance = (props) => {
|
|
|
2499
2205
|
if (isLoading) {
|
|
2500
2206
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-1.5 items-center", children: [
|
|
2501
2207
|
/* @__PURE__ */ jsxRuntime.jsx(WalletIcon, { className: "text-muted-foreground" }),
|
|
2502
|
-
/* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-4 w-16 rounded-md" })
|
|
2208
|
+
/* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-4 w-16 rounded-md" })
|
|
2503
2209
|
] });
|
|
2504
2210
|
}
|
|
2505
2211
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-1.5 items-center", children: [
|
|
@@ -2526,7 +2232,7 @@ const SelectNetworkButton = ({
|
|
|
2526
2232
|
return network?.name ?? t("bridge.selectNetwork");
|
|
2527
2233
|
}, [network, t]);
|
|
2528
2234
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2529
|
-
Button,
|
|
2235
|
+
button.Button,
|
|
2530
2236
|
{
|
|
2531
2237
|
onClick,
|
|
2532
2238
|
size: "sm",
|
|
@@ -2587,10 +2293,10 @@ const CurrencyInput = require$$0.forwardRef(
|
|
|
2587
2293
|
[max, onAmountChange]
|
|
2588
2294
|
);
|
|
2589
2295
|
if (showSkeleton && readOnly) {
|
|
2590
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: cn("h-8 w-1/3 rounded-md", className) });
|
|
2296
|
+
return /* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: utils.cn("h-8 w-1/3 rounded-md", className) });
|
|
2591
2297
|
}
|
|
2592
2298
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2593
|
-
Input,
|
|
2299
|
+
input.Input,
|
|
2594
2300
|
{
|
|
2595
2301
|
ref,
|
|
2596
2302
|
value: inputVal,
|
|
@@ -2600,7 +2306,7 @@ const CurrencyInput = require$$0.forwardRef(
|
|
|
2600
2306
|
inputMode: "decimal",
|
|
2601
2307
|
pattern: "[0-9]*[.,]?[0-9]*",
|
|
2602
2308
|
readOnly,
|
|
2603
|
-
className: cn(
|
|
2309
|
+
className: utils.cn(
|
|
2604
2310
|
"text-[32px] h-8.5 font-medium leading-8.5 rounded-none text-end bg-transparent dark:bg-transparent text-foreground shadow-none border-none outline-none ring-0 focus:outline-none",
|
|
2605
2311
|
className
|
|
2606
2312
|
),
|
|
@@ -2682,7 +2388,7 @@ const ChainSelectModal = ({
|
|
|
2682
2388
|
const renderChainItem = (chain, willChangeSrc) => {
|
|
2683
2389
|
const isSelected = fromChain?.chainKey === chain.chainKey || toChain?.chainKey === chain.chainKey;
|
|
2684
2390
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2685
|
-
Button,
|
|
2391
|
+
button.Button,
|
|
2686
2392
|
{
|
|
2687
2393
|
onClick: () => onChainPick(chain, willChangeSrc),
|
|
2688
2394
|
className: `w-full cursor-pointer flex shadow-none items-center justify-between gap-2.5 px-5 py-3.5 h-12.5 font-extrabold capitalize hover:bg-muted bg-transparent rounded-12 transition-[300] ${isSelected ? "border border-ring" : ""}`,
|
|
@@ -2701,8 +2407,8 @@ const ChainSelectModal = ({
|
|
|
2701
2407
|
chain.chainKey
|
|
2702
2408
|
);
|
|
2703
2409
|
};
|
|
2704
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Dialog, { open: isOpen, onOpenChange: (open) => !open && handleClose(), children: /* @__PURE__ */ jsxRuntime.jsxs(DialogContent, { className: "!max-h-[80dvh] overflow-hidden", children: [
|
|
2705
|
-
/* @__PURE__ */ jsxRuntime.jsx(DialogHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { children: t("bridge.selectNetwork") }) }),
|
|
2410
|
+
return /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog, { open: isOpen, onOpenChange: (open) => !open && handleClose(), children: /* @__PURE__ */ jsxRuntime.jsxs(dialog.DialogContent, { className: "!max-h-[80dvh] overflow-hidden", children: [
|
|
2411
|
+
/* @__PURE__ */ jsxRuntime.jsx(dialog.DialogHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(dialog.DialogTitle, { children: t("bridge.selectNetwork") }) }),
|
|
2706
2412
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2707
2413
|
"div",
|
|
2708
2414
|
{
|
|
@@ -2710,7 +2416,7 @@ const ChainSelectModal = ({
|
|
|
2710
2416
|
children: [
|
|
2711
2417
|
/* @__PURE__ */ jsxRuntime.jsx(SearchIcon, { className: "size-6 text-muted-foreground" }),
|
|
2712
2418
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2713
|
-
Input,
|
|
2419
|
+
input.Input,
|
|
2714
2420
|
{
|
|
2715
2421
|
placeholder: t("bridge.searchDestinationChain"),
|
|
2716
2422
|
className: "w-full outline-none leading-0 p-0 h-6 text-base text-foreground placeholder:text-muted-foreground bg-none dark:bg-transparent",
|
|
@@ -2788,7 +2494,7 @@ const WalletButton = ({
|
|
|
2788
2494
|
const isButtonDisabled = (wallet === "metamask" || wallet === "tronlink") && !isInitialized || isConnecting;
|
|
2789
2495
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "inline-flex flex-col items-start gap-1", children: [
|
|
2790
2496
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2791
|
-
Button,
|
|
2497
|
+
button.Button,
|
|
2792
2498
|
{
|
|
2793
2499
|
type: "button",
|
|
2794
2500
|
onClick: handleClick,
|
|
@@ -2865,7 +2571,7 @@ const SwapSection = ({
|
|
|
2865
2571
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2866
2572
|
"div",
|
|
2867
2573
|
{
|
|
2868
|
-
className: cn(
|
|
2574
|
+
className: utils.cn(
|
|
2869
2575
|
"p-4 flex flex-col gap-4 transition-colors bg-muted",
|
|
2870
2576
|
isSource && isFocused ? "bg-accent" : "",
|
|
2871
2577
|
className
|
|
@@ -2913,7 +2619,7 @@ const SwapSection = ({
|
|
|
2913
2619
|
addressType: isSource ? "src" : "dst"
|
|
2914
2620
|
}
|
|
2915
2621
|
),
|
|
2916
|
-
isUsdLoading ? /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-4 w-12 rounded-md" }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "leading-4.5 text-sm font-medium text-muted-foreground", children: computedFiat })
|
|
2622
|
+
isUsdLoading ? /* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-4 w-12 rounded-md" }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "leading-4.5 text-sm font-medium text-muted-foreground", children: computedFiat })
|
|
2917
2623
|
] })
|
|
2918
2624
|
]
|
|
2919
2625
|
}
|
|
@@ -2930,31 +2636,6 @@ const SwapSection = ({
|
|
|
2930
2636
|
)
|
|
2931
2637
|
] });
|
|
2932
2638
|
};
|
|
2933
|
-
function Switch({
|
|
2934
|
-
className,
|
|
2935
|
-
...props
|
|
2936
|
-
}) {
|
|
2937
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2938
|
-
SwitchPrimitive__namespace.Root,
|
|
2939
|
-
{
|
|
2940
|
-
"data-slot": "switch",
|
|
2941
|
-
className: cn(
|
|
2942
|
-
"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",
|
|
2943
|
-
className
|
|
2944
|
-
),
|
|
2945
|
-
...props,
|
|
2946
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2947
|
-
SwitchPrimitive__namespace.Thumb,
|
|
2948
|
-
{
|
|
2949
|
-
"data-slot": "switch-thumb",
|
|
2950
|
-
className: cn(
|
|
2951
|
-
"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"
|
|
2952
|
-
)
|
|
2953
|
-
}
|
|
2954
|
-
)
|
|
2955
|
-
}
|
|
2956
|
-
);
|
|
2957
|
-
}
|
|
2958
2639
|
const useCustomAddressStore = zustand.create((set) => ({
|
|
2959
2640
|
customDstAddress: void 0,
|
|
2960
2641
|
setCustomDstAddress: (address) => set({ customDstAddress: address }),
|
|
@@ -3035,7 +2716,7 @@ const ToggleRow = ({ enabled, onToggle }) => {
|
|
|
3035
2716
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
3036
2717
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm leading-4.5 font-medium text-muted-foreground", children: t("bridge.sendToAnotherAddress") }),
|
|
3037
2718
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3038
|
-
Switch,
|
|
2719
|
+
_switch.Switch,
|
|
3039
2720
|
{
|
|
3040
2721
|
className: "data-[state=unchecked]:bg-switch-inactive data-[state=checked]:bg-switch-active",
|
|
3041
2722
|
"aria-pressed": enabled,
|
|
@@ -3059,7 +2740,7 @@ const ToggleRow = ({ enabled, onToggle }) => {
|
|
|
3059
2740
|
children: [
|
|
3060
2741
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1.5 w-full", children: [
|
|
3061
2742
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3062
|
-
Input,
|
|
2743
|
+
input.Input,
|
|
3063
2744
|
{
|
|
3064
2745
|
className: "p-0 h-auto text-base leading-5 font-semibold w-full bg-transparent dark:bg-transparent placeholder:text-input-placeholder text-input-text border-none",
|
|
3065
2746
|
placeholder: toChain?.chainKey === "ton" ? t("bridge.tonAddressPlaceholder") : t("bridge.evmAddressPlaceholder"),
|
|
@@ -3075,7 +2756,7 @@ const ToggleRow = ({ enabled, onToggle }) => {
|
|
|
3075
2756
|
}) }) })
|
|
3076
2757
|
] }),
|
|
3077
2758
|
!value ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
3078
|
-
Button,
|
|
2759
|
+
button.Button,
|
|
3079
2760
|
{
|
|
3080
2761
|
variant: "default",
|
|
3081
2762
|
className: "self-center py-2 h-8.5 px-3 hover:bg-input-button bg-input-button text-input-button-foreground text-sm leading-4.5 font-semibold uppercase !rounded-40",
|
|
@@ -3083,7 +2764,7 @@ const ToggleRow = ({ enabled, onToggle }) => {
|
|
|
3083
2764
|
children: t("common.paste")
|
|
3084
2765
|
}
|
|
3085
2766
|
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
3086
|
-
Button,
|
|
2767
|
+
button.Button,
|
|
3087
2768
|
{
|
|
3088
2769
|
variant: "ghost",
|
|
3089
2770
|
className: "h-5 w-5 self-start\n bg-input-x-bg hover:bg-input-x-bg \n p-0.5 m-0 rounded-full\n border-0 shadow-none\n focus:outline-none focus:ring-0 has-[>svg]:px-0",
|
|
@@ -3099,60 +2780,6 @@ const ToggleRow = ({ enabled, onToggle }) => {
|
|
|
3099
2780
|
) })
|
|
3100
2781
|
] });
|
|
3101
2782
|
};
|
|
3102
|
-
function Accordion({
|
|
3103
|
-
...props
|
|
3104
|
-
}) {
|
|
3105
|
-
return /* @__PURE__ */ jsxRuntime.jsx(AccordionPrimitive__namespace.Root, { "data-slot": "accordion", ...props });
|
|
3106
|
-
}
|
|
3107
|
-
function AccordionItem({
|
|
3108
|
-
className,
|
|
3109
|
-
...props
|
|
3110
|
-
}) {
|
|
3111
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3112
|
-
AccordionPrimitive__namespace.Item,
|
|
3113
|
-
{
|
|
3114
|
-
"data-slot": "accordion-item",
|
|
3115
|
-
className: cn("border-b last:border-b-0", className),
|
|
3116
|
-
...props
|
|
3117
|
-
}
|
|
3118
|
-
);
|
|
3119
|
-
}
|
|
3120
|
-
function AccordionTrigger({
|
|
3121
|
-
className,
|
|
3122
|
-
children,
|
|
3123
|
-
...props
|
|
3124
|
-
}) {
|
|
3125
|
-
return /* @__PURE__ */ jsxRuntime.jsx(AccordionPrimitive__namespace.Header, { className: "flex", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3126
|
-
AccordionPrimitive__namespace.Trigger,
|
|
3127
|
-
{
|
|
3128
|
-
"data-slot": "accordion-trigger",
|
|
3129
|
-
className: cn(
|
|
3130
|
-
"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",
|
|
3131
|
-
className
|
|
3132
|
-
),
|
|
3133
|
-
...props,
|
|
3134
|
-
children: [
|
|
3135
|
-
children,
|
|
3136
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, { className: "text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0 transition-transform duration-200" })
|
|
3137
|
-
]
|
|
3138
|
-
}
|
|
3139
|
-
) });
|
|
3140
|
-
}
|
|
3141
|
-
function AccordionContent({
|
|
3142
|
-
className,
|
|
3143
|
-
children,
|
|
3144
|
-
...props
|
|
3145
|
-
}) {
|
|
3146
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3147
|
-
AccordionPrimitive__namespace.Content,
|
|
3148
|
-
{
|
|
3149
|
-
"data-slot": "accordion-content",
|
|
3150
|
-
className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",
|
|
3151
|
-
...props,
|
|
3152
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("pt-0 pb-4", className), children })
|
|
3153
|
-
}
|
|
3154
|
-
);
|
|
3155
|
-
}
|
|
3156
2783
|
function getQuoteAmounts(quote, srcToken, dstToken) {
|
|
3157
2784
|
if (!quote || !srcToken || !dstToken) {
|
|
3158
2785
|
return {
|
|
@@ -3299,19 +2926,19 @@ const Details = () => {
|
|
|
3299
2926
|
})();
|
|
3300
2927
|
const currentSlippageText = formatPercentage(slippageBps);
|
|
3301
2928
|
const routeText = quote?.route ? getRouteDisplayName(quote.route) : t(`settings.routePresets.${routePriority}`);
|
|
3302
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Accordion, { type: "single", collapsible: true, className: "w-full", children: /* @__PURE__ */ jsxRuntime.jsxs(AccordionItem, { value: "item-1", className: "bg-muted rounded-lg", children: [
|
|
3303
|
-
/* @__PURE__ */ jsxRuntime.jsx(AccordionTrigger, { className: "w-full gap-1 items-center py-6 px-5 rounded-b-lg data-[state=open]:pb-3", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full flex items-center justify-between", children: [
|
|
2929
|
+
return /* @__PURE__ */ jsxRuntime.jsx(accordion.Accordion, { type: "single", collapsible: true, className: "w-full", children: /* @__PURE__ */ jsxRuntime.jsxs(accordion.AccordionItem, { value: "item-1", className: "bg-muted rounded-lg", children: [
|
|
2930
|
+
/* @__PURE__ */ jsxRuntime.jsx(accordion.AccordionTrigger, { className: "w-full gap-1 items-center py-6 px-5 rounded-b-lg data-[state=open]:pb-3", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full flex items-center justify-between", children: [
|
|
3304
2931
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-normal text-priority leading-3.5", children: t("bridge.youWillReceive", { defaultValue: "You will receive" }) }),
|
|
3305
2932
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-transparent hover:bg-transparent shadow-none h-4 p-0 px-0 py-0 flex items-center gap-1.5", children: [
|
|
3306
2933
|
/* @__PURE__ */ jsxRuntime.jsx(TokenSymbol, { symbol, className: "w-4 h-4", alt: "token" }),
|
|
3307
|
-
isLoading ? /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-4 w-24 rounded-md" }) : /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm font-semibold leading-3.5 text-foreground", children: [
|
|
2934
|
+
isLoading ? /* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-4 w-24 rounded-md" }) : /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm font-semibold leading-3.5 text-foreground", children: [
|
|
3308
2935
|
receiveText,
|
|
3309
2936
|
" ",
|
|
3310
2937
|
symbol
|
|
3311
2938
|
] })
|
|
3312
2939
|
] })
|
|
3313
2940
|
] }) }),
|
|
3314
|
-
/* @__PURE__ */ jsxRuntime.jsxs(AccordionContent, { className: "px-5 flex flex-col gap-3", children: [
|
|
2941
|
+
/* @__PURE__ */ jsxRuntime.jsxs(accordion.AccordionContent, { className: "px-5 flex flex-col gap-3", children: [
|
|
3315
2942
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3316
2943
|
DetailsRow,
|
|
3317
2944
|
{
|
|
@@ -3360,7 +2987,7 @@ const DetailsRow = ({
|
|
|
3360
2987
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-priority font-normal", children: label }),
|
|
3361
2988
|
/* @__PURE__ */ jsxRuntime.jsx(Tip, { text: label, children: /* @__PURE__ */ jsxRuntime.jsx(TipIcon, { className: "size-4 text-receive-icon" }) })
|
|
3362
2989
|
] }),
|
|
3363
|
-
isLoading ? /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-4 w-16 rounded-md" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-foreground text-sm", children: value ?? "—" })
|
|
2990
|
+
isLoading ? /* @__PURE__ */ jsxRuntime.jsx(skeleton.Skeleton, { className: "h-4 w-16 rounded-md" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-foreground text-sm", children: value ?? "—" })
|
|
3364
2991
|
] });
|
|
3365
2992
|
const useTransactionStore = zustand.create((set, get) => ({
|
|
3366
2993
|
current: void 0,
|
|
@@ -3996,7 +3623,7 @@ const SubmitButton = () => {
|
|
|
3996
3623
|
}
|
|
3997
3624
|
};
|
|
3998
3625
|
const disabled = isBusy || amountNum <= 0 || status === "loading" || isBalanceLoading || hasInsufficientBalance || hasAmountTooLarge || !gas.hasEnoughGas || noRoute || !isValidForTransfer;
|
|
3999
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Button, { onClick: handleClick, disabled, className: "w-full mt-4", children: label });
|
|
3626
|
+
return /* @__PURE__ */ jsxRuntime.jsx(button.Button, { onClick: handleClick, disabled, className: "w-full mt-4", children: label });
|
|
4000
3627
|
};
|
|
4001
3628
|
function short(addr) {
|
|
4002
3629
|
return addr.slice(0, 4) + "…" + addr.slice(-4);
|
|
@@ -4101,17 +3728,17 @@ const WalletSelectModal = () => {
|
|
|
4101
3728
|
console.error("Failed to connect wallet:", error);
|
|
4102
3729
|
}
|
|
4103
3730
|
};
|
|
4104
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Dialog, { open: isOpen, onOpenChange: (open) => !open && onClose(), children: /* @__PURE__ */ jsxRuntime.jsxs(DialogContent, { children: [
|
|
4105
|
-
/* @__PURE__ */ jsxRuntime.jsxs(DialogHeader, { children: [
|
|
4106
|
-
/* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { children: t("wallets.chooseWallet") }),
|
|
4107
|
-
/* @__PURE__ */ jsxRuntime.jsx(DialogDescription, { children: t("wallets.oneWalletPerEnv") })
|
|
3731
|
+
return /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog, { open: isOpen, onOpenChange: (open) => !open && onClose(), children: /* @__PURE__ */ jsxRuntime.jsxs(dialog.DialogContent, { children: [
|
|
3732
|
+
/* @__PURE__ */ jsxRuntime.jsxs(dialog.DialogHeader, { children: [
|
|
3733
|
+
/* @__PURE__ */ jsxRuntime.jsx(dialog.DialogTitle, { children: t("wallets.chooseWallet") }),
|
|
3734
|
+
/* @__PURE__ */ jsxRuntime.jsx(dialog.DialogDescription, { children: t("wallets.oneWalletPerEnv") })
|
|
4108
3735
|
] }),
|
|
4109
3736
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-4", children: [
|
|
4110
3737
|
connectedWallets.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
4111
3738
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "py-2 font-semibold text-muted-foreground uppercase", children: t("wallets.connected") }),
|
|
4112
3739
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "", children: connectedWallets.map((wallet) => {
|
|
4113
3740
|
const IconComponent = wallet.icon;
|
|
4114
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "-mx-5", children: /* @__PURE__ */ jsxRuntime.jsxs(Button, { className: "w-full cursor-pointer bg-transparent flex shadow-none items-center justify-between gap-2.5 px-5 py-2.5 hover:bg-muted h-auto rounded-12 transition-[300]", children: [
|
|
3741
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "-mx-5", children: /* @__PURE__ */ jsxRuntime.jsxs(button.Button, { className: "w-full cursor-pointer bg-transparent flex shadow-none items-center justify-between gap-2.5 px-5 py-2.5 hover:bg-muted h-auto rounded-12 transition-[300]", children: [
|
|
4115
3742
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-3 min-w-0", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2.5", children: [
|
|
4116
3743
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-7.5 h-7.5 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(IconComponent, { className: "size-7.5" }) }),
|
|
4117
3744
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-start min-w-0", children: [
|
|
@@ -4140,7 +3767,7 @@ const WalletSelectModal = () => {
|
|
|
4140
3767
|
const isEvmConnector = category.title === t("wallets.evmWallets");
|
|
4141
3768
|
const connector = isEvmConnector ? connectors.find((c) => c.id === wallet.id) : null;
|
|
4142
3769
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4143
|
-
Button,
|
|
3770
|
+
button.Button,
|
|
4144
3771
|
{
|
|
4145
3772
|
type: "button",
|
|
4146
3773
|
onClick: () => {
|
|
@@ -4227,7 +3854,7 @@ const TransactionProgressVector = (props) => {
|
|
|
4227
3854
|
] });
|
|
4228
3855
|
};
|
|
4229
3856
|
const ProgressStep = () => {
|
|
4230
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Card, { className: "flex flex-col border-none h-full overflow-hidden bg-background rounded-none md:rounded-lg", children: /* @__PURE__ */ jsxRuntime.jsxs(CardContent, { className: "flex relative flex-col gap-4 py-10 px-8 flex-1 items-center justify-start text-center noise bg-background", children: [
|
|
3857
|
+
return /* @__PURE__ */ jsxRuntime.jsx(card.Card, { className: "flex flex-col border-none h-full overflow-hidden bg-background rounded-none md:rounded-lg", children: /* @__PURE__ */ jsxRuntime.jsxs(card.CardContent, { className: "flex relative flex-col gap-4 py-10 px-8 flex-1 items-center justify-start text-center noise bg-background", children: [
|
|
4231
3858
|
/* @__PURE__ */ jsxRuntime.jsx(TransactionProgressVector, { className: "progress-rocket" }),
|
|
4232
3859
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "on-circle on-circle-progress-small under-noise" }),
|
|
4233
3860
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "on-circle on-circle-progress-big under-noise" }),
|
|
@@ -4491,15 +4118,15 @@ const TransactionFailedVector = (props) => {
|
|
|
4491
4118
|
};
|
|
4492
4119
|
const FailedStep = () => {
|
|
4493
4120
|
const { current, reset } = useTransactionStore();
|
|
4494
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(Card, { className: "flex flex-col h-full border-none overflow-hidden bg-background rounded-none md:rounded-lg", children: [
|
|
4495
|
-
/* @__PURE__ */ jsxRuntime.jsxs(CardContent, { className: "flex flex-col relative gap-4 pt-10 px-8 flex-1 items-center justify-start text-center noise noise", children: [
|
|
4121
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(card.Card, { className: "flex flex-col h-full border-none overflow-hidden bg-background rounded-none md:rounded-lg", children: [
|
|
4122
|
+
/* @__PURE__ */ jsxRuntime.jsxs(card.CardContent, { className: "flex flex-col relative gap-4 pt-10 px-8 flex-1 items-center justify-start text-center noise noise", children: [
|
|
4496
4123
|
/* @__PURE__ */ jsxRuntime.jsx(TransactionFailedVector, {}),
|
|
4497
4124
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "on-circle on-circle-failed-small under-noise" }),
|
|
4498
4125
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "on-circle on-circle-failed-big under-noise" }),
|
|
4499
4126
|
/* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-2xl font-display font-black relative z-10", children: i18next.t("transaction.failed") }),
|
|
4500
4127
|
current?.error && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full space-y-2 mt-6 relative z-10", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: current.error }) })
|
|
4501
4128
|
] }),
|
|
4502
|
-
/* @__PURE__ */ jsxRuntime.jsx(CardFooter, { className: "flex-col gap-3 pb-10 px-8", children: /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "outline", className: "w-full", onClick: reset, children: i18next.t("common.close") }) })
|
|
4129
|
+
/* @__PURE__ */ jsxRuntime.jsx(card.CardFooter, { className: "flex-col gap-3 pb-10 px-8", children: /* @__PURE__ */ jsxRuntime.jsx(button.Button, { variant: "outline", className: "w-full", onClick: reset, children: i18next.t("common.close") }) })
|
|
4503
4130
|
] });
|
|
4504
4131
|
};
|
|
4505
4132
|
const TransactionSuccessVector = (props) => {
|
|
@@ -5870,8 +5497,8 @@ const SuccessStep = () => {
|
|
|
5870
5497
|
sonner.toast.success("Hash copied to clipboard");
|
|
5871
5498
|
}
|
|
5872
5499
|
};
|
|
5873
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(Card, { className: "flex flex-col h-full border-none relative overflow-hidden bg-background rounded-none md:rounded-lg min-h-[540px]", children: [
|
|
5874
|
-
/* @__PURE__ */ jsxRuntime.jsxs(CardContent, { className: "flex flex-col gap-4 pt-10 px-8 flex-1 justify-start items-center text-center noise bg-background", children: [
|
|
5500
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(card.Card, { className: "flex flex-col h-full border-none relative overflow-hidden bg-background rounded-none md:rounded-lg min-h-[540px]", children: [
|
|
5501
|
+
/* @__PURE__ */ jsxRuntime.jsxs(card.CardContent, { className: "flex flex-col gap-4 pt-10 px-8 flex-1 justify-start items-center text-center noise bg-background", children: [
|
|
5875
5502
|
/* @__PURE__ */ jsxRuntime.jsx(TransactionSuccessVector, {}),
|
|
5876
5503
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5877
5504
|
Fireworks,
|
|
@@ -5935,7 +5562,7 @@ const SuccessStep = () => {
|
|
|
5935
5562
|
] })
|
|
5936
5563
|
] })
|
|
5937
5564
|
] }),
|
|
5938
|
-
/* @__PURE__ */ jsxRuntime.jsx(CardFooter, { className: "pb-10 px-8", children: /* @__PURE__ */ jsxRuntime.jsx(Button, { onClick: reset, className: "w-full", children: t("done") }) })
|
|
5565
|
+
/* @__PURE__ */ jsxRuntime.jsx(card.CardFooter, { className: "pb-10 px-8", children: /* @__PURE__ */ jsxRuntime.jsx(button.Button, { onClick: reset, className: "w-full", children: t("done") }) })
|
|
5939
5566
|
] });
|
|
5940
5567
|
};
|
|
5941
5568
|
const TransactionConfirmVector = (props) => {
|
|
@@ -6082,7 +5709,7 @@ const useCountdown = (initialSeconds) => {
|
|
|
6082
5709
|
const ConfirmStep = () => {
|
|
6083
5710
|
const { t } = reactI18next.useTranslation();
|
|
6084
5711
|
const { formatTime } = useCountdown(90);
|
|
6085
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Card, { className: "flex flex-col border-none h-full bg-background overflow-hidden rounded-none md:rounded-lg", children: /* @__PURE__ */ jsxRuntime.jsxs(CardContent, { className: "flex flex-col relative gap-4 py-10 px-8 flex-1 items-center justify-start text-center noise", children: [
|
|
5712
|
+
return /* @__PURE__ */ jsxRuntime.jsx(card.Card, { className: "flex flex-col border-none h-full bg-background overflow-hidden rounded-none md:rounded-lg", children: /* @__PURE__ */ jsxRuntime.jsxs(card.CardContent, { className: "flex flex-col relative gap-4 py-10 px-8 flex-1 items-center justify-start text-center noise", children: [
|
|
6086
5713
|
/* @__PURE__ */ jsxRuntime.jsx(TransactionConfirmVector, {}),
|
|
6087
5714
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "on-circle on-circle-confirm-small under-noise" }),
|
|
6088
5715
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "on-circle on-circle-confirm-big under-noise" }),
|
|
@@ -6108,8 +5735,8 @@ const TransactionManager = () => {
|
|
|
6108
5735
|
if (status === "completed") {
|
|
6109
5736
|
step = /* @__PURE__ */ jsxRuntime.jsx(SuccessStep, {});
|
|
6110
5737
|
}
|
|
6111
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Dialog, { open: true, onOpenChange: () => {
|
|
6112
|
-
}, children: /* @__PURE__ */ jsxRuntime.jsx(DialogContent, { showCloseButton: false, className: "p-0 gap-0 border-none max-w-[calc(100%-2rem)] sm:max-w-md", children: step }) });
|
|
5738
|
+
return /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog, { open: true, onOpenChange: () => {
|
|
5739
|
+
}, children: /* @__PURE__ */ jsxRuntime.jsx(dialog.DialogContent, { showCloseButton: false, className: "p-0 gap-0 border-none max-w-[calc(100%-2rem)] sm:max-w-md", children: step }) });
|
|
6113
5740
|
};
|
|
6114
5741
|
const useTokensRequest = () => {
|
|
6115
5742
|
const { setTokens, setSelectedToken, setSelectedAssetSymbol } = useTokensStore();
|
|
@@ -7649,8 +7276,8 @@ class TronChainStrategy {
|
|
|
7649
7276
|
shift += 7;
|
|
7650
7277
|
}
|
|
7651
7278
|
const dataBytes = bytes.slice(i, i + len);
|
|
7652
|
-
const
|
|
7653
|
-
return { contractAddress, input, callValue };
|
|
7279
|
+
const input2 = "0x" + Array.from(dataBytes).map((b) => b.toString(16).padStart(2, "0")).join("");
|
|
7280
|
+
return { contractAddress, input: input2, callValue };
|
|
7654
7281
|
} catch {
|
|
7655
7282
|
return null;
|
|
7656
7283
|
}
|
|
@@ -8005,15 +7632,15 @@ const EvaaBridgeContent = ({
|
|
|
8005
7632
|
}, [chains, assetMatrix, allowedFromChains]);
|
|
8006
7633
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
8007
7634
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
8008
|
-
Card,
|
|
7635
|
+
card.Card,
|
|
8009
7636
|
{
|
|
8010
|
-
className: cn(
|
|
7637
|
+
className: utils.cn(
|
|
8011
7638
|
"max-w-md w-full mx-auto flex flex-col relative",
|
|
8012
7639
|
className
|
|
8013
7640
|
),
|
|
8014
7641
|
children: [
|
|
8015
7642
|
/* @__PURE__ */ jsxRuntime.jsx(FormHeader, {}),
|
|
8016
|
-
/* @__PURE__ */ jsxRuntime.jsxs(CardContent, { className: "space-y-[1px]", children: [
|
|
7643
|
+
/* @__PURE__ */ jsxRuntime.jsxs(card.CardContent, { className: "space-y-[1px]", children: [
|
|
8017
7644
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8018
7645
|
SwapSection,
|
|
8019
7646
|
{
|
|
@@ -8052,7 +7679,7 @@ const EvaaBridgeContent = ({
|
|
|
8052
7679
|
),
|
|
8053
7680
|
/* @__PURE__ */ jsxRuntime.jsx(SubmitButton, {})
|
|
8054
7681
|
] }),
|
|
8055
|
-
/* @__PURE__ */ jsxRuntime.jsx(CardFooter, { children: /* @__PURE__ */ jsxRuntime.jsx(Details, {}) })
|
|
7682
|
+
/* @__PURE__ */ jsxRuntime.jsx(card.CardFooter, { children: /* @__PURE__ */ jsxRuntime.jsx(Details, {}) })
|
|
8056
7683
|
]
|
|
8057
7684
|
}
|
|
8058
7685
|
),
|