@rash2x/bridge-widget 0.6.46 → 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-C-Rv5dlA.js → index-BDeKdIW1.js} +6 -6
- package/dist/index-BDeKdIW1.js.map +1 -0
- package/dist/{index-DlXh95vJ.js → index-BpJB61tF.js} +2 -2
- package/dist/{index-DlXh95vJ.js.map → index-BpJB61tF.js.map} +1 -1
- package/dist/{index-dS_Zjwua.cjs → index-BtPPZlsB.cjs} +6 -6
- package/dist/index-BtPPZlsB.cjs.map +1 -0
- package/dist/{index-D87zq9PV.cjs → index-CdHojoQM.cjs} +2 -2
- package/dist/{index-D87zq9PV.cjs.map → index-CdHojoQM.cjs.map} +1 -1
- package/package.json +1 -1
- package/dist/index-C-Rv5dlA.js.map +0 -1
- package/dist/index-dS_Zjwua.cjs.map +0 -1
package/dist/evaa-bridge.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const index = require("./index-
|
|
3
|
+
const index = require("./index-BtPPZlsB.cjs");
|
|
4
4
|
exports.DEFAULT_SLIPPAGE_BPS = index.DEFAULT_SLIPPAGE_BPS;
|
|
5
5
|
exports.EvaaBridge = index.EvaaBridge;
|
|
6
6
|
exports.RoutePriority = index.RoutePriority;
|
package/dist/evaa-bridge.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { U, d, f, e, H, B, F, X, N, z, $, G, A, D, Z, w, s, v, r, p, q, L, a2, aa, a4, a7, x, I, y, a5, J, a3, a8, a9, Y, a6, W, P, _, a1, ab, Q, S, a0, K, V, t, o, i, u, l, m, j, n, h, k } from "./index-
|
|
1
|
+
import { U, d, f, e, H, B, F, X, N, z, $, G, A, D, Z, w, s, v, r, p, q, L, a2, aa, a4, a7, x, I, y, a5, J, a3, a8, a9, Y, a6, W, P, _, a1, ab, Q, S, a0, K, V, t, o, i, u, l, m, j, n, h, k } from "./index-BDeKdIW1.js";
|
|
2
2
|
export {
|
|
3
3
|
U as DEFAULT_SLIPPAGE_BPS,
|
|
4
4
|
d as EvaaBridge,
|
|
@@ -941,10 +941,10 @@ function useChainStrategies() {
|
|
|
941
941
|
return context;
|
|
942
942
|
}
|
|
943
943
|
const truncateToDecimals = (num, decimals) => {
|
|
944
|
-
if (!isFinite(num) || isNaN(num)) return "0
|
|
944
|
+
if (!isFinite(num) || isNaN(num)) return "0";
|
|
945
945
|
const multiplier = Math.pow(10, decimals);
|
|
946
946
|
const truncated = Math.floor(num * multiplier) / multiplier;
|
|
947
|
-
return truncated.toFixed(decimals);
|
|
947
|
+
return truncated.toFixed(decimals).replace(/0+$/, "").replace(/\.$/, "");
|
|
948
948
|
};
|
|
949
949
|
const formatTokenAmount = (amount, symbol, options) => {
|
|
950
950
|
const normalizedSymbol = (symbol ?? "").toUpperCase();
|
|
@@ -3371,12 +3371,12 @@ const Details = () => {
|
|
|
3371
3371
|
const bridgeData = useBridgeExternalData();
|
|
3372
3372
|
const symbol = (selectedAssetSymbol ?? bridgeData.dstToken?.symbol ?? "—").toUpperCase();
|
|
3373
3373
|
const isLoading = status === "loading";
|
|
3374
|
-
const receiveText = bridgeData.quoteDetails?.outputAmount != null ? Number(bridgeData.quoteDetails?.outputAmount)
|
|
3374
|
+
const receiveText = bridgeData.quoteDetails?.outputAmount != null ? truncateToDecimals(Number(bridgeData.quoteDetails?.outputAmount), quote ? 6 : 2) : "0";
|
|
3375
3375
|
const etaText = bridgeData.quoteDetails?.etaSeconds != null ? `≈ ${Math.max(
|
|
3376
3376
|
1,
|
|
3377
3377
|
Math.round(bridgeData.quoteDetails?.etaSeconds / 60)
|
|
3378
3378
|
)}m` : "—";
|
|
3379
|
-
const totalFeeDisplay = !quote ? "—" : gas.requiredNative > 0 ? `${gas.requiredNative
|
|
3379
|
+
const totalFeeDisplay = !quote ? "—" : gas.requiredNative > 0 ? `${truncateToDecimals(gas.requiredNative, 6)} ${gas.nativeSym}` : "—";
|
|
3380
3380
|
const currentSlippageText = !quote ? "—" : formatPercentage(slippageBps);
|
|
3381
3381
|
const routeText = getRouteDisplayName(quote?.route);
|
|
3382
3382
|
return /* @__PURE__ */ jsx(Accordion, { type: "single", collapsible: true, className: "w-full border-none", children: /* @__PURE__ */ jsxs(AccordionItem, { value: "item-1", className: "bg-muted rounded-sm", children: [
|
|
@@ -25965,7 +25965,7 @@ class WalletConnectModal {
|
|
|
25965
25965
|
}
|
|
25966
25966
|
async initUi() {
|
|
25967
25967
|
if (typeof window !== "undefined") {
|
|
25968
|
-
await import("./index-
|
|
25968
|
+
await import("./index-BpJB61tF.js");
|
|
25969
25969
|
const modal = document.createElement("wcm-modal");
|
|
25970
25970
|
document.body.insertAdjacentElement("beforeend", modal);
|
|
25971
25971
|
OptionsCtrl.setIsUiLoaded(true);
|
|
@@ -26724,4 +26724,4 @@ export {
|
|
|
26724
26724
|
getQuoteFees as y,
|
|
26725
26725
|
calculateMinReceived as z
|
|
26726
26726
|
};
|
|
26727
|
-
//# sourceMappingURL=index-
|
|
26727
|
+
//# sourceMappingURL=index-BDeKdIW1.js.map
|