@rash2x/bridge-widget 0.7.3 → 0.7.4
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-BO18yuE2.cjs → index-B9T9OLH8.cjs} +2 -2
- package/dist/{index-BO18yuE2.cjs.map → index-B9T9OLH8.cjs.map} +1 -1
- package/dist/{index-B3z_l7uV.cjs → index-Cvo_dMKt.cjs} +27 -3
- package/dist/index-Cvo_dMKt.cjs.map +1 -0
- package/dist/{index-hcTHOiGQ.js → index-DGMnvCZU.js} +27 -3
- package/dist/index-DGMnvCZU.js.map +1 -0
- package/dist/{index-hG98qwY3.js → index-Giyq4_RJ.js} +2 -2
- package/dist/{index-hG98qwY3.js.map → index-Giyq4_RJ.js.map} +1 -1
- package/dist/index.d.ts +7 -2
- package/package.json +1 -1
- package/dist/index-B3z_l7uV.cjs.map +0 -1
- package/dist/index-hcTHOiGQ.js.map +0 -1
|
@@ -2386,6 +2386,9 @@ function computeFeeBreakdownUsd(quote, srcToken, tokens, chains) {
|
|
|
2386
2386
|
bridgeFeeAmount: 0,
|
|
2387
2387
|
bridgeFeeSymbol: "",
|
|
2388
2388
|
bridgeFeeUsd: 0,
|
|
2389
|
+
dstGasAmount: 0,
|
|
2390
|
+
dstGasSymbol: "",
|
|
2391
|
+
dstGasUsd: 0,
|
|
2389
2392
|
totalFeeUsd: 0
|
|
2390
2393
|
};
|
|
2391
2394
|
if (!quote || !srcToken) return empty;
|
|
@@ -2421,7 +2424,25 @@ function computeFeeBreakdownUsd(quote, srcToken, tokens, chains) {
|
|
|
2421
2424
|
bridgeFeeAmount = diff;
|
|
2422
2425
|
bridgeFeeUsd = (srcToken.price?.usd ?? 0) * diff;
|
|
2423
2426
|
}
|
|
2424
|
-
|
|
2427
|
+
let dstGasAmount = 0;
|
|
2428
|
+
let dstGasSymbol = "";
|
|
2429
|
+
let dstGasUsd = 0;
|
|
2430
|
+
const dstNativeAmountLD = quote.dstNativeAmount;
|
|
2431
|
+
if (dstNativeAmountLD && BigInt(dstNativeAmountLD || "0") > 0n) {
|
|
2432
|
+
const dstChain = chains?.find((c2) => c2.chainKey === quote.dstChainKey);
|
|
2433
|
+
if (dstChain) {
|
|
2434
|
+
const { decimals, priceUsd } = lookupTokenMeta(
|
|
2435
|
+
tokens,
|
|
2436
|
+
chains,
|
|
2437
|
+
dstChain.chainKey,
|
|
2438
|
+
dstChain.nativeCurrency.address
|
|
2439
|
+
);
|
|
2440
|
+
dstGasAmount = fromLD(dstNativeAmountLD, decimals);
|
|
2441
|
+
dstGasSymbol = dstChain.nativeCurrency.symbol?.toUpperCase() ?? "";
|
|
2442
|
+
dstGasUsd = dstGasAmount * (priceUsd ?? 0);
|
|
2443
|
+
}
|
|
2444
|
+
}
|
|
2445
|
+
const totalFeeUsd = messageFeeUsd + bridgeFeeUsd + dstGasUsd;
|
|
2425
2446
|
return {
|
|
2426
2447
|
messageFeeAmount,
|
|
2427
2448
|
messageFeeSymbol,
|
|
@@ -2429,6 +2450,9 @@ function computeFeeBreakdownUsd(quote, srcToken, tokens, chains) {
|
|
|
2429
2450
|
bridgeFeeAmount,
|
|
2430
2451
|
bridgeFeeSymbol,
|
|
2431
2452
|
bridgeFeeUsd,
|
|
2453
|
+
dstGasAmount,
|
|
2454
|
+
dstGasSymbol,
|
|
2455
|
+
dstGasUsd,
|
|
2432
2456
|
totalFeeUsd
|
|
2433
2457
|
};
|
|
2434
2458
|
}
|
|
@@ -26022,7 +26046,7 @@ class WalletConnectModal {
|
|
|
26022
26046
|
}
|
|
26023
26047
|
async initUi() {
|
|
26024
26048
|
if (typeof window !== "undefined") {
|
|
26025
|
-
await import("./index-
|
|
26049
|
+
await import("./index-Giyq4_RJ.js");
|
|
26026
26050
|
const modal = document.createElement("wcm-modal");
|
|
26027
26051
|
document.body.insertAdjacentElement("beforeend", modal);
|
|
26028
26052
|
OptionsCtrl.setIsUiLoaded(true);
|
|
@@ -26922,4 +26946,4 @@ export {
|
|
|
26922
26946
|
calculateMinReceived as y,
|
|
26923
26947
|
getQuoteDetails as z
|
|
26924
26948
|
};
|
|
26925
|
-
//# sourceMappingURL=index-
|
|
26949
|
+
//# sourceMappingURL=index-DGMnvCZU.js.map
|