@rash2x/bridge-widget 0.6.48 → 0.6.49

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.
@@ -944,7 +944,7 @@ const truncateToDecimals = (num, decimals) => {
944
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).replace(/0+$/, "").replace(/\.$/, "");
947
+ return truncated.toFixed(decimals).replace(/\.?0+$/, "");
948
948
  };
949
949
  const formatTokenAmount = (amount, symbol, options) => {
950
950
  const normalizedSymbol = (symbol ?? "").toUpperCase();
@@ -3371,7 +3371,7 @@ 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 ? truncateToDecimals(Number(bridgeData.quoteDetails?.outputAmount), quote ? 6 : 2) : "0";
3374
+ const receiveText = bridgeData.quoteDetails?.outputAmount != null ? truncateToDecimals(Number(bridgeData.quoteDetails?.outputAmount), 6) : "0";
3375
3375
  const etaText = bridgeData.quoteDetails?.etaSeconds != null ? `≈ ${Math.max(
3376
3376
  1,
3377
3377
  Math.round(bridgeData.quoteDetails?.etaSeconds / 60)
@@ -4141,7 +4141,6 @@ const WalletModalButton = (props) => {
4141
4141
  type: "button",
4142
4142
  onClick: () => {
4143
4143
  onDisconnect();
4144
- onClose?.();
4145
4144
  },
4146
4145
  className: "text-sm font-medium text-muted-foreground hover:text-foreground transition-colors",
4147
4146
  children: /* @__PURE__ */ jsx(ExitIcon, { className: "w-6 h-6" })
@@ -25965,7 +25964,7 @@ class WalletConnectModal {
25965
25964
  }
25966
25965
  async initUi() {
25967
25966
  if (typeof window !== "undefined") {
25968
- await import("./index-DdlydK6S.js");
25967
+ await import("./index--ChsB93S.js");
25969
25968
  const modal = document.createElement("wcm-modal");
25970
25969
  document.body.insertAdjacentElement("beforeend", modal);
25971
25970
  OptionsCtrl.setIsUiLoaded(true);
@@ -26724,4 +26723,4 @@ export {
26724
26723
  getQuoteFees as y,
26725
26724
  calculateMinReceived as z
26726
26725
  };
26727
- //# sourceMappingURL=index-3hA-1OJw.js.map
26726
+ //# sourceMappingURL=index-CumyB0Wj.js.map