@rash2x/bridge-widget 0.6.77 → 0.6.79
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-Bwsox4tK.cjs → index-BCDV15a4.cjs} +2 -2
- package/dist/{index-Bwsox4tK.cjs.map → index-BCDV15a4.cjs.map} +1 -1
- package/dist/{index-CmGINAdQ.cjs → index-D0OSpIKz.cjs} +6 -19
- package/dist/index-D0OSpIKz.cjs.map +1 -0
- package/dist/{index-aQ85eLjl.js → index-DGozHzv0.js} +2 -2
- package/dist/{index-aQ85eLjl.js.map → index-DGozHzv0.js.map} +1 -1
- package/dist/{index-Cf0s9o1V.js → index-DtUNq3cs.js} +6 -19
- package/dist/index-DtUNq3cs.js.map +1 -0
- package/package.json +1 -1
- package/dist/index-Cf0s9o1V.js.map +0 -1
- package/dist/index-CmGINAdQ.cjs.map +0 -1
|
@@ -1366,7 +1366,8 @@ const useChainDerivations = () => {
|
|
|
1366
1366
|
return;
|
|
1367
1367
|
}
|
|
1368
1368
|
if (!fromChain) {
|
|
1369
|
-
|
|
1369
|
+
const ethereum = supportedFrom.find((c2) => c2.chainKey === "ethereum");
|
|
1370
|
+
setFromChain(ethereum || supportedFrom[0]);
|
|
1370
1371
|
setToChain(void 0);
|
|
1371
1372
|
setAllowedToChains([]);
|
|
1372
1373
|
return;
|
|
@@ -1427,7 +1428,8 @@ const useChainDerivations = () => {
|
|
|
1427
1428
|
setAllowedToChains(list);
|
|
1428
1429
|
if (isUrlInitialized) {
|
|
1429
1430
|
if (!toChain || !list.some((c2) => c2.chainKey === toChain.chainKey)) {
|
|
1430
|
-
|
|
1431
|
+
const ton2 = list.find((c2) => c2.chainKey === "ton");
|
|
1432
|
+
setToChain(ton2 || list[0]);
|
|
1431
1433
|
}
|
|
1432
1434
|
}
|
|
1433
1435
|
} catch (e2) {
|
|
@@ -2893,7 +2895,6 @@ function useGasEstimate(amountNum) {
|
|
|
2893
2895
|
const isNativeSelected = nativeSym === (selectedAssetSymbol || "").toUpperCase();
|
|
2894
2896
|
let requiredNative = 0;
|
|
2895
2897
|
let quoteFeesAvailable = false;
|
|
2896
|
-
console.log(quoteFees);
|
|
2897
2898
|
if (quoteFees && quoteSrcChainKey === chainKey) {
|
|
2898
2899
|
const fees = quoteFees;
|
|
2899
2900
|
const feesInNative = fees.filter(
|
|
@@ -2912,9 +2913,6 @@ function useGasEstimate(amountNum) {
|
|
|
2912
2913
|
} else {
|
|
2913
2914
|
hasEnoughGas = nativeBalance >= requiredNative;
|
|
2914
2915
|
}
|
|
2915
|
-
console.log("nativeBalance", nativeBalance);
|
|
2916
|
-
console.log("requiredNative", requiredNative);
|
|
2917
|
-
console.log("nativeBalance - (amountNum ?? 0)", nativeBalance - (amountNum ?? 0));
|
|
2918
2916
|
const shouldCheckGas = balancesKnown && quoteFeesAvailable;
|
|
2919
2917
|
return {
|
|
2920
2918
|
nativeSym,
|
|
@@ -3550,7 +3548,6 @@ function useBridgeTransaction() {
|
|
|
3550
3548
|
6e5,
|
|
3551
3549
|
1e4
|
|
3552
3550
|
);
|
|
3553
|
-
console.log("LayerZero delivery status:", lzResult.status);
|
|
3554
3551
|
if (lzResult.completed) {
|
|
3555
3552
|
if (lzResult.dstTxHash) {
|
|
3556
3553
|
txStore.setDstHash(lzResult.dstTxHash);
|
|
@@ -3566,12 +3563,6 @@ function useBridgeTransaction() {
|
|
|
3566
3563
|
const sourceCost = await strategy.getSourceCost(hashForSourceCost);
|
|
3567
3564
|
if (sourceCost?.totalNative !== void 0 && isFinite(sourceCost.totalNative)) {
|
|
3568
3565
|
const feeUsd = priceUsd && priceUsd > 0 ? sourceCost.totalNative * priceUsd : void 0;
|
|
3569
|
-
console.log("Source cost calculated:", {
|
|
3570
|
-
gasFee: sourceCost.breakdown?.gasFee + " " + feeSymbol,
|
|
3571
|
-
layerZeroFee: sourceCost.breakdown?.layerZeroFee + " " + feeSymbol,
|
|
3572
|
-
total: sourceCost.totalNative + " " + feeSymbol,
|
|
3573
|
-
totalUsd: feeUsd ? "$" + feeUsd.toFixed(2) : "N/A"
|
|
3574
|
-
});
|
|
3575
3566
|
txStore.updateLayerZeroTotalFee(
|
|
3576
3567
|
sourceCost.totalNative,
|
|
3577
3568
|
feeSymbol,
|
|
@@ -3583,7 +3574,6 @@ function useBridgeTransaction() {
|
|
|
3583
3574
|
}
|
|
3584
3575
|
}
|
|
3585
3576
|
txStore.updateStatus("completed");
|
|
3586
|
-
console.log("Transaction completed successfully via LayerZero");
|
|
3587
3577
|
} else {
|
|
3588
3578
|
if (lzResult.status === "FAILED") {
|
|
3589
3579
|
txStore.setError("TRANSACTION_FAILED_TO_COMPLETE");
|
|
@@ -3626,7 +3616,6 @@ function useBridgeTransaction() {
|
|
|
3626
3616
|
console.error("Chain strategy error:", err.toJSON());
|
|
3627
3617
|
throw err;
|
|
3628
3618
|
}
|
|
3629
|
-
console.log(err);
|
|
3630
3619
|
txStore.setError("UNKNOWN_ERROR");
|
|
3631
3620
|
throw err;
|
|
3632
3621
|
}
|
|
@@ -3662,8 +3651,6 @@ function useBalanceCheck(amountNum, gas) {
|
|
|
3662
3651
|
};
|
|
3663
3652
|
}
|
|
3664
3653
|
const hasEnoughGasForTx = gas.nativeBalance >= gasReserve;
|
|
3665
|
-
console.log("rawBalance", rawBalance);
|
|
3666
|
-
console.log("amountNum", amountNum);
|
|
3667
3654
|
return {
|
|
3668
3655
|
availableBalance: rawBalance,
|
|
3669
3656
|
hasInsufficientBalance: amountNum > rawBalance || !hasEnoughGasForTx,
|
|
@@ -25734,7 +25721,7 @@ class WalletConnectModal {
|
|
|
25734
25721
|
}
|
|
25735
25722
|
async initUi() {
|
|
25736
25723
|
if (typeof window !== "undefined") {
|
|
25737
|
-
await Promise.resolve().then(() => require("./index-
|
|
25724
|
+
await Promise.resolve().then(() => require("./index-BCDV15a4.cjs"));
|
|
25738
25725
|
const modal = document.createElement("wcm-modal");
|
|
25739
25726
|
document.body.insertAdjacentElement("beforeend", modal);
|
|
25740
25727
|
OptionsCtrl.setIsUiLoaded(true);
|
|
@@ -26527,4 +26514,4 @@ exports.useSettingsStore = useSettingsStore;
|
|
|
26527
26514
|
exports.useSwapModel = useSwapModel;
|
|
26528
26515
|
exports.useTokensStore = useTokensStore;
|
|
26529
26516
|
exports.useTransactionStore = useTransactionStore;
|
|
26530
|
-
//# sourceMappingURL=index-
|
|
26517
|
+
//# sourceMappingURL=index-D0OSpIKz.cjs.map
|