@rash2x/bridge-widget 0.6.43 → 0.6.45

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.
@@ -18,13 +18,14 @@ import { Skeleton } from "@/components/ui/skeleton";
18
18
  import { Input } from "@/components/ui/input";
19
19
  import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter } from "@/components/ui/dialog";
20
20
  import { Switch } from "@/components/ui/switch";
21
- import { X as X$3, Loader2, ArrowRight, CheckCircle2, Clock } from "lucide-react";
21
+ import { X as X$3, Loader2, AlertCircleIcon, ArrowRight, CheckCircle2, Clock } from "lucide-react";
22
22
  import { AnimatePresence, motion } from "framer-motion";
23
23
  import { Accordion, AccordionItem, AccordionTrigger, AccordionContent } from "@/components/ui/accordion";
24
24
  import { Tooltip, TooltipTrigger, TooltipContent } from "@/components/ui/tooltip";
25
25
  import { Alert, AlertDescription } from "@/components/ui/alert";
26
26
  import { toast, Toaster } from "sonner";
27
27
  import { Badge } from "@/components/ui/badge";
28
+ import { DialogDescription as DialogDescription$1 } from "@radix-ui/react-dialog";
28
29
  import { isAddress, formatUnits, parseUnits } from "viem";
29
30
  import { TronLinkAdapterName } from "@tronweb3/tronwallet-adapters";
30
31
  import { TronWeb } from "tronweb";
@@ -4417,7 +4418,7 @@ const ProgressStep = ({
4417
4418
  title: t2("transaction.steps.completed")
4418
4419
  }
4419
4420
  ];
4420
- return /* @__PURE__ */ jsx(DialogContent, { showCloseButton: false, className: "overflow-hidden md:max-w-[420px]", children: /* @__PURE__ */ jsxs("div", { className: "flex relative flex-col gap-6 flex-1 items-center justify-start text-center bg-background noise p-10 pb-0", children: [
4421
+ return /* @__PURE__ */ jsx(DialogContent, { showCloseButton: false, className: "overflow-hidden md:max-w-[420px] p-0", children: /* @__PURE__ */ jsxs("div", { className: "flex relative flex-col gap-6 flex-1 items-center justify-start text-center bg-background noise p-10", children: [
4421
4422
  icon,
4422
4423
  /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-2 pb-2 text-center", children: /* @__PURE__ */ jsx(DialogTitle, { children: t2("transaction.inProgress") }) }),
4423
4424
  /* @__PURE__ */ jsxs("div", { className: "relative", children: [
@@ -4439,6 +4440,25 @@ const ProgressStep = ({
4439
4440
  ] })
4440
4441
  ] }) });
4441
4442
  };
4443
+ const FailedStep = ({
4444
+ icon = /* @__PURE__ */ jsx(AlertCircleIcon, { className: "w-16 h-16" })
4445
+ }) => {
4446
+ const { current, reset } = useTransactionStore();
4447
+ const { t: t2 } = useBridgeTranslation();
4448
+ return /* @__PURE__ */ jsxs(DialogContent, { showCloseButton: true, className: "overflow-hidden md:max-w-[420px] p-0", children: [
4449
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col relative gap-4 flex-1 items-center justify-start text-center noise p-10 pb-0", children: [
4450
+ icon,
4451
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2 pb-2 text-center", children: [
4452
+ /* @__PURE__ */ jsx(DialogTitle, { children: t2("transaction.failed") }),
4453
+ current?.errorCode && /* @__PURE__ */ jsx(DialogDescription$1, { children: t2(
4454
+ `errors.${current.errorCode}`,
4455
+ current.errorParams || {}
4456
+ ) })
4457
+ ] })
4458
+ ] }),
4459
+ /* @__PURE__ */ jsx(DialogFooter, { className: "px-10 pb-10", children: /* @__PURE__ */ jsx(Button, { variant: "outline", className: "w-full min-w-40", onClick: reset, children: t2("common.close") }) })
4460
+ ] });
4461
+ };
4442
4462
  const EXPLORER_CONFIGS = {
4443
4463
  // TON
4444
4464
  ton: {
@@ -4663,7 +4683,7 @@ const ConfirmStep = ({
4663
4683
  }) => {
4664
4684
  const { t: t2 } = useBridgeTranslation();
4665
4685
  const { formatTime } = useCountdown(90);
4666
- return /* @__PURE__ */ jsx(DialogContent, { showCloseButton: false, className: "overflow-hidden md:max-w-[420px] p-0", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col relative gap-4 flex-1 items-center justify-start text-center noise p-10 pb-0", children: [
4686
+ return /* @__PURE__ */ jsx(DialogContent, { showCloseButton: false, className: "overflow-hidden md:max-w-[420px] p-0", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col relative gap-4 flex-1 items-center justify-start text-center noise p-10", children: [
4667
4687
  icon,
4668
4688
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2 pb-2 text-center", children: [
4669
4689
  /* @__PURE__ */ jsx(DialogTitle, { children: t2("transaction.confirm") }),
@@ -4689,7 +4709,7 @@ const StatusStepsDialog = ({
4689
4709
  step = /* @__PURE__ */ jsx(SuccessStep, { icon: icons?.success });
4690
4710
  }
4691
4711
  if (status === "failed") {
4692
- step = /* @__PURE__ */ jsx(SuccessStep, { icon: icons?.failed });
4712
+ step = /* @__PURE__ */ jsx(FailedStep, { icon: icons?.failed });
4693
4713
  }
4694
4714
  return /* @__PURE__ */ jsx(Dialog, { open: true, onOpenChange: () => reset(), children: step });
4695
4715
  };
@@ -25945,7 +25965,7 @@ class WalletConnectModal {
25945
25965
  }
25946
25966
  async initUi() {
25947
25967
  if (typeof window !== "undefined") {
25948
- await import("./index-DnmdzSj9.js");
25968
+ await import("./index-B5httmag.js");
25949
25969
  const modal = document.createElement("wcm-modal");
25950
25970
  document.body.insertAdjacentElement("beforeend", modal);
25951
25971
  OptionsCtrl.setIsUiLoaded(true);
@@ -26704,4 +26724,4 @@ export {
26704
26724
  getQuoteFees as y,
26705
26725
  calculateMinReceived as z
26706
26726
  };
26707
- //# sourceMappingURL=index-B6AZb_BQ.js.map
26727
+ //# sourceMappingURL=index-HW3pzGO_.js.map