@rash2x/bridge-widget 0.6.47 → 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.
- package/dist/evaa-bridge.cjs +1 -1
- package/dist/evaa-bridge.mjs +1 -1
- package/dist/{index-BpJB61tF.js → index--ChsB93S.js} +2 -2
- package/dist/{index-BpJB61tF.js.map → index--ChsB93S.js.map} +1 -1
- package/dist/{index-CdHojoQM.cjs → index-CJ7gSazU.cjs} +2 -2
- package/dist/{index-CdHojoQM.cjs.map → index-CJ7gSazU.cjs.map} +1 -1
- package/dist/{index-BtPPZlsB.cjs → index-Cobl4hz4.cjs} +5 -6
- package/dist/index-Cobl4hz4.cjs.map +1 -0
- package/dist/{index-BDeKdIW1.js → index-CumyB0Wj.js} +5 -6
- package/dist/index-CumyB0Wj.js.map +1 -0
- package/package.json +1 -1
- package/dist/index-BDeKdIW1.js.map +0 -1
- package/dist/index-BtPPZlsB.cjs.map +0 -1
|
@@ -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(
|
|
947
|
+
return truncated.toFixed(decimals).replace(/\.?0+$/, "");
|
|
948
948
|
};
|
|
949
949
|
const formatTokenAmount = (amount, symbol, options) => {
|
|
950
950
|
const normalizedSymbol = (symbol ?? "").toUpperCase();
|
|
@@ -968,7 +968,7 @@ const formatUsd = (value) => {
|
|
|
968
968
|
return `$${value.toFixed(6).replace(/0+$/, "").replace(/\.$/, "")}`;
|
|
969
969
|
};
|
|
970
970
|
const formatPercentage = (bps, decimals = 2) => {
|
|
971
|
-
return `${(bps / 100).toFixed(decimals)}%`;
|
|
971
|
+
return `${(bps / 100).toFixed(decimals).replace(/0+$/, "").replace(/\.$/, "")}%`;
|
|
972
972
|
};
|
|
973
973
|
const formatBalance = (amount, decimals = 2) => {
|
|
974
974
|
if (!isFinite(amount) || isNaN(amount) || amount <= 0) {
|
|
@@ -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),
|
|
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
|
|
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-
|
|
26726
|
+
//# sourceMappingURL=index-CumyB0Wj.js.map
|