@rash2x/bridge-widget 0.6.45 → 0.6.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/evaa-bridge.cjs +1 -1
- package/dist/evaa-bridge.mjs +1 -1
- package/dist/{index-HW3pzGO_.js → index-BDeKdIW1.js} +12 -12
- package/dist/index-BDeKdIW1.js.map +1 -0
- package/dist/{index-B5httmag.js → index-BpJB61tF.js} +2 -2
- package/dist/{index-B5httmag.js.map → index-BpJB61tF.js.map} +1 -1
- package/dist/{index-D4qTzY3O.cjs → index-BtPPZlsB.cjs} +12 -12
- package/dist/index-BtPPZlsB.cjs.map +1 -0
- package/dist/{index-CIai7CQu.cjs → index-CdHojoQM.cjs} +2 -2
- package/dist/{index-CIai7CQu.cjs.map → index-CdHojoQM.cjs.map} +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/dist/index-D4qTzY3O.cjs.map +0 -1
- package/dist/index-HW3pzGO_.js.map +0 -1
|
@@ -942,10 +942,10 @@ function useChainStrategies() {
|
|
|
942
942
|
return context;
|
|
943
943
|
}
|
|
944
944
|
const truncateToDecimals = (num, decimals) => {
|
|
945
|
-
if (!isFinite(num) || isNaN(num)) return "0
|
|
945
|
+
if (!isFinite(num) || isNaN(num)) return "0";
|
|
946
946
|
const multiplier = Math.pow(10, decimals);
|
|
947
947
|
const truncated = Math.floor(num * multiplier) / multiplier;
|
|
948
|
-
return truncated.toFixed(decimals);
|
|
948
|
+
return truncated.toFixed(decimals).replace(/0+$/, "").replace(/\.$/, "");
|
|
949
949
|
};
|
|
950
950
|
const formatTokenAmount = (amount, symbol, options) => {
|
|
951
951
|
const normalizedSymbol = (symbol ?? "").toUpperCase();
|
|
@@ -3372,12 +3372,12 @@ const Details = () => {
|
|
|
3372
3372
|
const bridgeData = useBridgeExternalData();
|
|
3373
3373
|
const symbol = (selectedAssetSymbol ?? bridgeData.dstToken?.symbol ?? "—").toUpperCase();
|
|
3374
3374
|
const isLoading = status === "loading";
|
|
3375
|
-
const receiveText = bridgeData.quoteDetails?.outputAmount != null ? Number(bridgeData.quoteDetails?.outputAmount)
|
|
3375
|
+
const receiveText = bridgeData.quoteDetails?.outputAmount != null ? truncateToDecimals(Number(bridgeData.quoteDetails?.outputAmount), quote ? 6 : 2) : "0";
|
|
3376
3376
|
const etaText = bridgeData.quoteDetails?.etaSeconds != null ? `≈ ${Math.max(
|
|
3377
3377
|
1,
|
|
3378
3378
|
Math.round(bridgeData.quoteDetails?.etaSeconds / 60)
|
|
3379
3379
|
)}m` : "—";
|
|
3380
|
-
const totalFeeDisplay = !quote ? "—" : gas.requiredNative > 0 ? `${gas.requiredNative
|
|
3380
|
+
const totalFeeDisplay = !quote ? "—" : gas.requiredNative > 0 ? `${truncateToDecimals(gas.requiredNative, 6)} ${gas.nativeSym}` : "—";
|
|
3381
3381
|
const currentSlippageText = !quote ? "—" : formatPercentage(slippageBps);
|
|
3382
3382
|
const routeText = getRouteDisplayName(quote?.route);
|
|
3383
3383
|
return /* @__PURE__ */ jsxRuntime.jsx(accordion.Accordion, { type: "single", collapsible: true, className: "w-full border-none", children: /* @__PURE__ */ jsxRuntime.jsxs(accordion.AccordionItem, { value: "item-1", className: "bg-muted rounded-sm", children: [
|
|
@@ -4421,7 +4421,7 @@ const ProgressStep = ({
|
|
|
4421
4421
|
];
|
|
4422
4422
|
return /* @__PURE__ */ jsxRuntime.jsx(dialog.DialogContent, { showCloseButton: false, className: "overflow-hidden md:max-w-[420px] p-0", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex relative flex-col gap-6 flex-1 items-center justify-start text-center bg-background noise p-10", children: [
|
|
4423
4423
|
icon,
|
|
4424
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-2 pb-2 text-center", children: /* @__PURE__ */ jsxRuntime.jsx(dialog.DialogTitle, { children: t2("transaction.inProgress") }) }),
|
|
4424
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-2 pt-4 pb-2 text-center", children: /* @__PURE__ */ jsxRuntime.jsx(dialog.DialogTitle, { children: t2("transaction.inProgress") }) }),
|
|
4425
4425
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
4426
4426
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute left-5 top-5 bottom-5 border-l border-dashed border-foreground/50" }),
|
|
4427
4427
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-6 relative z-10", children: steps.map((step) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -4449,7 +4449,7 @@ const FailedStep = ({
|
|
|
4449
4449
|
return /* @__PURE__ */ jsxRuntime.jsxs(dialog.DialogContent, { showCloseButton: true, className: "overflow-hidden md:max-w-[420px] p-0", children: [
|
|
4450
4450
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col relative gap-4 flex-1 items-center justify-start text-center noise p-10 pb-0", children: [
|
|
4451
4451
|
icon,
|
|
4452
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2 pb-2 text-center", children: [
|
|
4452
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2 pt-4 pb-2 text-center", children: [
|
|
4453
4453
|
/* @__PURE__ */ jsxRuntime.jsx(dialog.DialogTitle, { children: t2("transaction.failed") }),
|
|
4454
4454
|
current?.errorCode && /* @__PURE__ */ jsxRuntime.jsx(reactDialog.DialogDescription, { children: t2(
|
|
4455
4455
|
`errors.${current.errorCode}`,
|
|
@@ -4457,7 +4457,7 @@ const FailedStep = ({
|
|
|
4457
4457
|
) })
|
|
4458
4458
|
] })
|
|
4459
4459
|
] }),
|
|
4460
|
-
/* @__PURE__ */ jsxRuntime.jsx(dialog.DialogFooter, { className: "px-10 pb-10", children: /* @__PURE__ */ jsxRuntime.jsx(button.Button, { variant: "outline", className: "w-full min-w-40", onClick: reset, children: t2("common.close") }) })
|
|
4460
|
+
/* @__PURE__ */ jsxRuntime.jsx(dialog.DialogFooter, { className: "px-10 pb-10 ", children: /* @__PURE__ */ jsxRuntime.jsx(button.Button, { variant: "outline", className: "w-full min-w-40", onClick: reset, children: t2("common.close") }) })
|
|
4461
4461
|
] });
|
|
4462
4462
|
};
|
|
4463
4463
|
const EXPLORER_CONFIGS = {
|
|
@@ -4597,7 +4597,7 @@ const SuccessStep = ({
|
|
|
4597
4597
|
children: [
|
|
4598
4598
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-4 flex-1 justify-start items-center text-center bg-background noise p-10 pb-0", children: [
|
|
4599
4599
|
icon,
|
|
4600
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-2 text-center", children: /* @__PURE__ */ jsxRuntime.jsx(dialog.DialogTitle, { className: "text-[28px]", children: t2("transaction.success") }) }),
|
|
4600
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-2 pt-4 text-center", children: /* @__PURE__ */ jsxRuntime.jsx(dialog.DialogTitle, { className: "text-[28px]", children: t2("transaction.success") }) }),
|
|
4601
4601
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full space-y-2 mt-3 relative z-10 pb-14", children: [
|
|
4602
4602
|
metadata?.srcAmountHuman && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between items-center", children: [
|
|
4603
4603
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: t2("transaction.bridged") }),
|
|
@@ -4657,7 +4657,7 @@ const SuccessStep = ({
|
|
|
4657
4657
|
] })
|
|
4658
4658
|
] })
|
|
4659
4659
|
] }),
|
|
4660
|
-
/* @__PURE__ */ jsxRuntime.jsx(dialog.DialogFooter, { className: "px-10 pb-10", children: /* @__PURE__ */ jsxRuntime.jsx(button.Button, { onClick: reset, className: "w-full", children: t2("transaction.done") }) })
|
|
4660
|
+
/* @__PURE__ */ jsxRuntime.jsx(dialog.DialogFooter, { className: "px-10 pb-10 pt-12", children: /* @__PURE__ */ jsxRuntime.jsx(button.Button, { onClick: reset, className: "w-full", children: t2("transaction.done") }) })
|
|
4661
4661
|
]
|
|
4662
4662
|
}
|
|
4663
4663
|
);
|
|
@@ -4686,7 +4686,7 @@ const ConfirmStep = ({
|
|
|
4686
4686
|
const { formatTime } = useCountdown(90);
|
|
4687
4687
|
return /* @__PURE__ */ jsxRuntime.jsx(dialog.DialogContent, { showCloseButton: false, className: "overflow-hidden md:max-w-[420px] p-0", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col relative gap-4 flex-1 items-center justify-start text-center noise p-10", children: [
|
|
4688
4688
|
icon,
|
|
4689
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2 pb-2 text-center", children: [
|
|
4689
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2 pt-4 pb-2 text-center", children: [
|
|
4690
4690
|
/* @__PURE__ */ jsxRuntime.jsx(dialog.DialogTitle, { children: t2("transaction.confirm") }),
|
|
4691
4691
|
/* @__PURE__ */ jsxRuntime.jsx(dialog.DialogDescription, { children: t2("transaction.signTransaction") })
|
|
4692
4692
|
] }),
|
|
@@ -25966,7 +25966,7 @@ class WalletConnectModal {
|
|
|
25966
25966
|
}
|
|
25967
25967
|
async initUi() {
|
|
25968
25968
|
if (typeof window !== "undefined") {
|
|
25969
|
-
await Promise.resolve().then(() => require("./index-
|
|
25969
|
+
await Promise.resolve().then(() => require("./index-CdHojoQM.cjs"));
|
|
25970
25970
|
const modal = document.createElement("wcm-modal");
|
|
25971
25971
|
document.body.insertAdjacentElement("beforeend", modal);
|
|
25972
25972
|
OptionsCtrl.setIsUiLoaded(true);
|
|
@@ -26723,4 +26723,4 @@ exports.useSettingsStore = useSettingsStore;
|
|
|
26723
26723
|
exports.useSwapModel = useSwapModel;
|
|
26724
26724
|
exports.useTokensStore = useTokensStore;
|
|
26725
26725
|
exports.useTransactionStore = useTransactionStore;
|
|
26726
|
-
//# sourceMappingURL=index-
|
|
26726
|
+
//# sourceMappingURL=index-BtPPZlsB.cjs.map
|