@rash2x/bridge-widget 0.6.67 → 0.6.68
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-Bf7M_Hjm.js → index-BwdYKUP-.js} +133 -184
- package/dist/index-BwdYKUP-.js.map +1 -0
- package/dist/{index-XPQb2NSf.cjs → index-D3Rdww1n.cjs} +133 -184
- package/dist/index-D3Rdww1n.cjs.map +1 -0
- package/dist/{index-DJrg5YQY.cjs → index-DNsYRKu0.cjs} +2 -2
- package/dist/{index-DJrg5YQY.cjs.map → index-DNsYRKu0.cjs.map} +1 -1
- package/dist/{index-PB3n7I7m.js → index-qL-cBcPF.js} +2 -2
- package/dist/{index-PB3n7I7m.js.map → index-qL-cBcPF.js.map} +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/dist/index-Bf7M_Hjm.js.map +0 -1
- package/dist/index-XPQb2NSf.cjs.map +0 -1
|
@@ -3478,7 +3478,6 @@ function useBridgeTransaction() {
|
|
|
3478
3478
|
const { assetMatrix, selectedAssetSymbol, allTokens } = useTokensStore();
|
|
3479
3479
|
const { chains } = useChainsStore();
|
|
3480
3480
|
const txStore = useTransactionStore();
|
|
3481
|
-
const [isProcessing, setIsProcessing] = react.useState(false);
|
|
3482
3481
|
const srcToken = react.useMemo(
|
|
3483
3482
|
() => resolveTokenOnChainFromMatrix$2(
|
|
3484
3483
|
assetMatrix,
|
|
@@ -3515,7 +3514,6 @@ function useBridgeTransaction() {
|
|
|
3515
3514
|
// Actual fee will be updated when transaction completes
|
|
3516
3515
|
};
|
|
3517
3516
|
txStore.setTransaction(quote, "executing", metadata);
|
|
3518
|
-
setIsProcessing(true);
|
|
3519
3517
|
try {
|
|
3520
3518
|
const steps = quote.steps || [];
|
|
3521
3519
|
if (steps.length === 0) {
|
|
@@ -3595,9 +3593,7 @@ function useBridgeTransaction() {
|
|
|
3595
3593
|
const { priceUsd } = findNativeMeta(allTokens, srcChain2);
|
|
3596
3594
|
const hashForSourceCost = quote.srcChainKey === "ton" ? messageHash : hashForLayerZero;
|
|
3597
3595
|
try {
|
|
3598
|
-
const sourceCost = await strategy.getSourceCost(
|
|
3599
|
-
hashForSourceCost
|
|
3600
|
-
);
|
|
3596
|
+
const sourceCost = await strategy.getSourceCost(hashForSourceCost);
|
|
3601
3597
|
if (sourceCost?.totalNative !== void 0 && isFinite(sourceCost.totalNative)) {
|
|
3602
3598
|
const feeUsd = priceUsd && priceUsd > 0 ? sourceCost.totalNative * priceUsd : void 0;
|
|
3603
3599
|
console.log("Source cost calculated:", {
|
|
@@ -3639,19 +3635,15 @@ function useBridgeTransaction() {
|
|
|
3639
3635
|
txStore.setError("COMPLETION_TRACKING_FAILED");
|
|
3640
3636
|
}
|
|
3641
3637
|
console.error("Error tracking completion:", err);
|
|
3642
|
-
}).finally(() => {
|
|
3643
|
-
setIsProcessing(false);
|
|
3644
3638
|
});
|
|
3645
3639
|
return txResult;
|
|
3646
3640
|
} else {
|
|
3647
|
-
setIsProcessing(false);
|
|
3648
3641
|
throw new TransactionFailedError(
|
|
3649
3642
|
chainKey,
|
|
3650
3643
|
"Transaction hash not received from wallet"
|
|
3651
3644
|
);
|
|
3652
3645
|
}
|
|
3653
3646
|
} catch (err) {
|
|
3654
|
-
setIsProcessing(false);
|
|
3655
3647
|
if (isUserRejection(err)) {
|
|
3656
3648
|
txStore.setError("TRANSACTION_REJECTED");
|
|
3657
3649
|
throw new TransactionFailedError(
|
|
@@ -3671,7 +3663,6 @@ function useBridgeTransaction() {
|
|
|
3671
3663
|
};
|
|
3672
3664
|
return {
|
|
3673
3665
|
executeTransaction,
|
|
3674
|
-
isProcessing,
|
|
3675
3666
|
hasQuote: !!quote
|
|
3676
3667
|
};
|
|
3677
3668
|
}
|
|
@@ -3839,7 +3830,7 @@ const MainButton = () => {
|
|
|
3839
3830
|
const { quote, status, inputAmount, noRoute } = useBridgeQuoteStore();
|
|
3840
3831
|
const { fromChain, toChain } = useChainsStore();
|
|
3841
3832
|
const { onOpen } = useWalletSelectModal();
|
|
3842
|
-
const { executeTransaction
|
|
3833
|
+
const { executeTransaction } = useBridgeTransaction();
|
|
3843
3834
|
const amountNum = Number(inputAmount || 0);
|
|
3844
3835
|
const gas = useGasEstimate(amountNum);
|
|
3845
3836
|
const { hasInsufficientBalance, isBalanceLoading } = useBalanceCheck(
|
|
@@ -3858,7 +3849,6 @@ const MainButton = () => {
|
|
|
3858
3849
|
const missingSrc = !srcConnectedOk || !srcAddressValid;
|
|
3859
3850
|
const missingDst = isCustomAddressEnabled ? !dstAddressValid : !dstConnectedOk || !dstAddressValid;
|
|
3860
3851
|
const requiresCustomAddress = isCustomAddressEnabled && !dstAddressValid;
|
|
3861
|
-
const isBusy = isTxProcessing;
|
|
3862
3852
|
const canTransfer = !missingSrc && !missingDst && amountNum > 0 && !!srcChainKey && !!dstChainKey;
|
|
3863
3853
|
const label = react.useMemo(() => {
|
|
3864
3854
|
switch (true) {
|
|
@@ -3866,10 +3856,6 @@ const MainButton = () => {
|
|
|
3866
3856
|
return t2("telegram.openWebVersion");
|
|
3867
3857
|
case status === "loading":
|
|
3868
3858
|
return t2("transaction.quoting");
|
|
3869
|
-
case isTxProcessing:
|
|
3870
|
-
return t2("transaction.processing");
|
|
3871
|
-
case isBusy:
|
|
3872
|
-
return t2("common.connecting");
|
|
3873
3859
|
case requiresCustomAddress:
|
|
3874
3860
|
return t2("transaction.pasteAddressToTransfer");
|
|
3875
3861
|
case missingSrc:
|
|
@@ -3899,8 +3885,6 @@ const MainButton = () => {
|
|
|
3899
3885
|
t2,
|
|
3900
3886
|
isTelegramRestricted,
|
|
3901
3887
|
status,
|
|
3902
|
-
isTxProcessing,
|
|
3903
|
-
isBusy,
|
|
3904
3888
|
missingSrc,
|
|
3905
3889
|
missingDst,
|
|
3906
3890
|
srcChainKey,
|
|
@@ -3917,7 +3901,6 @@ const MainButton = () => {
|
|
|
3917
3901
|
chainRegistry
|
|
3918
3902
|
]);
|
|
3919
3903
|
const handleClick = async () => {
|
|
3920
|
-
if (isBusy) return;
|
|
3921
3904
|
if (isTelegramRestricted) {
|
|
3922
3905
|
const searchParams = typeof window !== "undefined" ? window.location.search || "" : "";
|
|
3923
3906
|
const targetUrl = `https://app.evaa.finance/bridge${searchParams}`;
|
|
@@ -3944,9 +3927,16 @@ const MainButton = () => {
|
|
|
3944
3927
|
return;
|
|
3945
3928
|
}
|
|
3946
3929
|
};
|
|
3947
|
-
const disabled =
|
|
3930
|
+
const disabled = status === "loading" || requiresCustomAddress || !isTelegramRestricted && !missingSrc && !missingDst && (amountNum <= 0 || isBalanceLoading || hasInsufficientBalance || hasAmountTooLarge || !gas.hasEnoughGas || noRoute || !isValidForTransfer);
|
|
3948
3931
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pt-4 space-y-4", children: [
|
|
3949
|
-
isTelegramRestricted && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3932
|
+
isTelegramRestricted && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3933
|
+
alert.Alert,
|
|
3934
|
+
{
|
|
3935
|
+
variant: "warning",
|
|
3936
|
+
className: "mt-2 text-sm font-medium text-center px-2 py-2",
|
|
3937
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(alert.AlertDescription, { className: "leading-snug tracking-wide", children: t2("telegram.restrictionMessage") })
|
|
3938
|
+
}
|
|
3939
|
+
),
|
|
3950
3940
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3951
3941
|
button.Button,
|
|
3952
3942
|
{
|
|
@@ -4252,6 +4242,11 @@ const CircleLinedIcon = (props) => {
|
|
|
4252
4242
|
}
|
|
4253
4243
|
);
|
|
4254
4244
|
};
|
|
4245
|
+
const DevStatusControls = () => {
|
|
4246
|
+
const { current, updateStatus, setSrcHash, setError } = useTransactionStore();
|
|
4247
|
+
if (!current) return null;
|
|
4248
|
+
return null;
|
|
4249
|
+
};
|
|
4255
4250
|
const ProgressStep = ({
|
|
4256
4251
|
icon = /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "w-16 h-16 animate-spin" }),
|
|
4257
4252
|
isApproving = false
|
|
@@ -4259,6 +4254,7 @@ const ProgressStep = ({
|
|
|
4259
4254
|
const { t: t2 } = useBridgeTranslation();
|
|
4260
4255
|
const { current } = useTransactionStore();
|
|
4261
4256
|
const currentStep = current?.currentStep;
|
|
4257
|
+
const srcTxHash = current?.tonTransactionHash || current?.srcTxHash;
|
|
4262
4258
|
const steps = isApproving && currentStep ? [
|
|
4263
4259
|
{
|
|
4264
4260
|
icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "w-5 h-5 text-primary animate-spin", strokeWidth: 3 }),
|
|
@@ -4291,135 +4287,92 @@ const ProgressStep = ({
|
|
|
4291
4287
|
title: t2("transaction.steps.completed")
|
|
4292
4288
|
}
|
|
4293
4289
|
];
|
|
4294
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
4295
|
-
|
|
4296
|
-
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
|
-
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
|
|
4303
|
-
|
|
4304
|
-
|
|
4305
|
-
|
|
4306
|
-
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
|
|
4290
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(dialog.DialogContent, { showCloseButton: false, className: "overflow-hidden md:max-w-[420px] p-0 fixed top-0 left-0 right-0 bottom-0 translate-x-0 translate-y-0 md:left-[50%] md:top-[50%] md:translate-x-[-50%] md:translate-y-[-50%] rounded-none md:rounded-lg", children: [
|
|
4291
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex relative flex-col gap-6 flex-1 items-center justify-center md:justify-start text-center bg-background noise p-10", children: [
|
|
4292
|
+
icon,
|
|
4293
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2 pt-4 pb-2 text-center relative z-50", children: [
|
|
4294
|
+
/* @__PURE__ */ jsxRuntime.jsx(dialog.DialogTitle, { children: t2("transaction.inProgress") }),
|
|
4295
|
+
srcTxHash && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4296
|
+
"a",
|
|
4297
|
+
{
|
|
4298
|
+
href: `https://layerzeroscan.com/tx/${srcTxHash}`,
|
|
4299
|
+
target: "_blank",
|
|
4300
|
+
rel: "noopener noreferrer",
|
|
4301
|
+
className: "text-xs text-muted-foreground hover:text-foreground cursor-pointer underline hover:no-underline px-4 mt-1",
|
|
4302
|
+
children: [
|
|
4303
|
+
t2("transaction.hash"),
|
|
4304
|
+
": ",
|
|
4305
|
+
formatHash(srcTxHash)
|
|
4306
|
+
]
|
|
4307
|
+
}
|
|
4308
|
+
)
|
|
4309
|
+
] }),
|
|
4310
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
4311
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute left-5 top-5 bottom-5 border-l border-dashed border-foreground opacity-50" }),
|
|
4312
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-6 relative z-10", children: steps.map((step) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4313
|
+
"div",
|
|
4314
|
+
{
|
|
4315
|
+
className: "flex items-center gap-5 text-left",
|
|
4316
|
+
children: [
|
|
4317
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-10 h-10 rounded-full bg-muted flex items-center justify-center text-foreground shadow-inner", children: step.icon }),
|
|
4318
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col", children: [
|
|
4319
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-base leading-5", children: step.title }),
|
|
4320
|
+
step.description && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground leading-4", children: step.description })
|
|
4321
|
+
] })
|
|
4322
|
+
]
|
|
4323
|
+
},
|
|
4324
|
+
step.title
|
|
4325
|
+
)) })
|
|
4326
|
+
] })
|
|
4327
|
+
] }),
|
|
4328
|
+
/* @__PURE__ */ jsxRuntime.jsx(DevStatusControls, {})
|
|
4329
|
+
] });
|
|
4330
|
+
};
|
|
4331
|
+
const getLayerZeroScanUrl = (txHash) => {
|
|
4332
|
+
return `https://layerzeroscan.com/tx/${txHash}`;
|
|
4315
4333
|
};
|
|
4316
4334
|
const FailedStep = ({
|
|
4317
4335
|
icon = /* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlertCircleIcon, { className: "w-16 h-16" })
|
|
4318
4336
|
}) => {
|
|
4319
4337
|
const { current, reset } = useTransactionStore();
|
|
4320
4338
|
const { t: t2 } = useBridgeTranslation();
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
|
|
4328
|
-
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
}
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
|
|
4355
|
-
|
|
4356
|
-
|
|
4357
|
-
baseUrl: "https://bscscan.com",
|
|
4358
|
-
txPath: "/tx/"
|
|
4359
|
-
},
|
|
4360
|
-
"binance-smart-chain": {
|
|
4361
|
-
baseUrl: "https://bscscan.com",
|
|
4362
|
-
txPath: "/tx/"
|
|
4363
|
-
},
|
|
4364
|
-
// Polygon
|
|
4365
|
-
polygon: {
|
|
4366
|
-
baseUrl: "https://polygonscan.com",
|
|
4367
|
-
txPath: "/tx/"
|
|
4368
|
-
},
|
|
4369
|
-
matic: {
|
|
4370
|
-
baseUrl: "https://polygonscan.com",
|
|
4371
|
-
txPath: "/tx/"
|
|
4372
|
-
},
|
|
4373
|
-
// Avalanche
|
|
4374
|
-
avalanche: {
|
|
4375
|
-
baseUrl: "https://snowtrace.io",
|
|
4376
|
-
txPath: "/tx/"
|
|
4377
|
-
},
|
|
4378
|
-
avax: {
|
|
4379
|
-
baseUrl: "https://snowtrace.io",
|
|
4380
|
-
txPath: "/tx/"
|
|
4381
|
-
},
|
|
4382
|
-
// Arbitrum
|
|
4383
|
-
arbitrum: {
|
|
4384
|
-
baseUrl: "https://arbiscan.io",
|
|
4385
|
-
txPath: "/tx/"
|
|
4386
|
-
},
|
|
4387
|
-
// Optimism
|
|
4388
|
-
optimism: {
|
|
4389
|
-
baseUrl: "https://optimistic.etherscan.io",
|
|
4390
|
-
txPath: "/tx/"
|
|
4391
|
-
},
|
|
4392
|
-
// Base
|
|
4393
|
-
base: {
|
|
4394
|
-
baseUrl: "https://basescan.org",
|
|
4395
|
-
txPath: "/tx/"
|
|
4396
|
-
},
|
|
4397
|
-
// Fantom
|
|
4398
|
-
fantom: {
|
|
4399
|
-
baseUrl: "https://ftmscan.com",
|
|
4400
|
-
txPath: "/tx/"
|
|
4401
|
-
}
|
|
4339
|
+
const srcTxHash = current?.tonTransactionHash || current?.srcTxHash;
|
|
4340
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4341
|
+
dialog.DialogContent,
|
|
4342
|
+
{
|
|
4343
|
+
showCloseButton: true,
|
|
4344
|
+
className: "overflow-hidden md:max-w-[420px] p-0 fixed top-0 left-0 right-0 bottom-0 translate-x-0 translate-y-0 md:left-[50%] md:top-[50%] md:translate-x-[-50%] md:translate-y-[-50%] rounded-none md:rounded-lg",
|
|
4345
|
+
children: [
|
|
4346
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col relative gap-4 flex-1 items-center justify-center md:justify-start text-center noise p-10 pb-0", children: [
|
|
4347
|
+
icon,
|
|
4348
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2 pt-4 pb-2 text-center", children: [
|
|
4349
|
+
/* @__PURE__ */ jsxRuntime.jsx(dialog.DialogTitle, { children: t2("transaction.failed") }),
|
|
4350
|
+
current?.errorCode && /* @__PURE__ */ jsxRuntime.jsx(reactDialog.DialogDescription, { children: t2(
|
|
4351
|
+
`errors.${current.errorCode}`,
|
|
4352
|
+
current.errorParams || {}
|
|
4353
|
+
) }),
|
|
4354
|
+
srcTxHash && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4355
|
+
"a",
|
|
4356
|
+
{
|
|
4357
|
+
href: getLayerZeroScanUrl(srcTxHash),
|
|
4358
|
+
target: "_blank",
|
|
4359
|
+
rel: "noopener noreferrer",
|
|
4360
|
+
className: "text-xs text-muted-foreground hover:text-foreground cursor-pointer underline hover:no-underline px-4 mt-2",
|
|
4361
|
+
children: [
|
|
4362
|
+
t2("transaction.hash"),
|
|
4363
|
+
": ",
|
|
4364
|
+
formatHash(srcTxHash)
|
|
4365
|
+
]
|
|
4366
|
+
}
|
|
4367
|
+
)
|
|
4368
|
+
] })
|
|
4369
|
+
] }),
|
|
4370
|
+
/* @__PURE__ */ jsxRuntime.jsx(dialog.DialogFooter, { className: "px-10 pb-10 ", children: /* @__PURE__ */ jsxRuntime.jsx(button.Button, { variant: "outline", className: "w-full min-w-40", onClick: reset, children: t2("common.close") }) }),
|
|
4371
|
+
/* @__PURE__ */ jsxRuntime.jsx(DevStatusControls, {})
|
|
4372
|
+
]
|
|
4373
|
+
}
|
|
4374
|
+
);
|
|
4402
4375
|
};
|
|
4403
|
-
function getExplorerTxUrl(chainKey, txHash) {
|
|
4404
|
-
if (!txHash) {
|
|
4405
|
-
return null;
|
|
4406
|
-
}
|
|
4407
|
-
const normalizedChainKey = chainKey.toLowerCase();
|
|
4408
|
-
const config = EXPLORER_CONFIGS[normalizedChainKey];
|
|
4409
|
-
if (!config) {
|
|
4410
|
-
console.warn(
|
|
4411
|
-
`No explorer config found for chain: ${chainKey}. Please add it to EXPLORER_CONFIGS.`
|
|
4412
|
-
);
|
|
4413
|
-
return null;
|
|
4414
|
-
}
|
|
4415
|
-
return `${config.baseUrl}${config.txPath}${txHash}`;
|
|
4416
|
-
}
|
|
4417
|
-
function openTransactionInExplorer(chainKey, txHash) {
|
|
4418
|
-
const url = getExplorerTxUrl(chainKey, txHash);
|
|
4419
|
-
if (url && typeof window !== "undefined") {
|
|
4420
|
-
window.open(url, "_blank", "noopener,noreferrer");
|
|
4421
|
-
}
|
|
4422
|
-
}
|
|
4423
4376
|
const SuccessStep = ({
|
|
4424
4377
|
icon = /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckCircle2, { className: "w-16 h-16" })
|
|
4425
4378
|
}) => {
|
|
@@ -4427,8 +4380,7 @@ const SuccessStep = ({
|
|
|
4427
4380
|
const { t: t2 } = useBridgeTranslation();
|
|
4428
4381
|
const { chains } = useChainsStore();
|
|
4429
4382
|
const metadata = current?.metadata;
|
|
4430
|
-
const srcTxHash = current?.srcTxHash;
|
|
4431
|
-
const tonTransactionHash = current?.tonTransactionHash;
|
|
4383
|
+
const srcTxHash = current?.tonTransactionHash || current?.srcTxHash;
|
|
4432
4384
|
const srcChainKey = current?.quote?.srcChainKey;
|
|
4433
4385
|
const quote = current?.quote;
|
|
4434
4386
|
const layerZeroTotalFeeValue = metadata?.layerZeroTotalFeeValue;
|
|
@@ -4485,27 +4437,6 @@ const SuccessStep = ({
|
|
|
4485
4437
|
finalFee,
|
|
4486
4438
|
t2
|
|
4487
4439
|
]);
|
|
4488
|
-
const handleOpenExplorer = () => {
|
|
4489
|
-
if (srcChainKey === "ton") {
|
|
4490
|
-
if (tonTransactionHash) {
|
|
4491
|
-
window.open(
|
|
4492
|
-
`https://layerzeroscan.com/tx/${tonTransactionHash}`,
|
|
4493
|
-
"_blank",
|
|
4494
|
-
"noopener,noreferrer"
|
|
4495
|
-
);
|
|
4496
|
-
} else if (srcTxHash) {
|
|
4497
|
-
openTransactionInExplorer("ton", srcTxHash);
|
|
4498
|
-
}
|
|
4499
|
-
return;
|
|
4500
|
-
}
|
|
4501
|
-
if (srcTxHash) {
|
|
4502
|
-
window.open(
|
|
4503
|
-
`https://layerzeroscan.com/tx/${srcTxHash}`,
|
|
4504
|
-
"_blank",
|
|
4505
|
-
"noopener,noreferrer"
|
|
4506
|
-
);
|
|
4507
|
-
}
|
|
4508
|
-
};
|
|
4509
4440
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4510
4441
|
dialog.DialogContent,
|
|
4511
4442
|
{
|
|
@@ -4522,14 +4453,20 @@ const SuccessStep = ({
|
|
|
4522
4453
|
formatBalance(metadata.srcAmountHuman, 2),
|
|
4523
4454
|
" ",
|
|
4524
4455
|
metadata?.srcTokenSymbol,
|
|
4525
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4456
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4457
|
+
TokenSymbol,
|
|
4458
|
+
{
|
|
4459
|
+
className: "w-[18px] h-[18px]",
|
|
4460
|
+
symbol: metadata?.srcTokenSymbol
|
|
4461
|
+
}
|
|
4462
|
+
)
|
|
4526
4463
|
] })
|
|
4527
4464
|
] }),
|
|
4528
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between items-center", children: [
|
|
4465
|
+
metadata?.srcChainName && metadata?.dstChainName && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between items-center", children: [
|
|
4529
4466
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: t2("transaction.transferTitle") }),
|
|
4530
4467
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "font-medium flex gap-1 items-center", children: [
|
|
4531
4468
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "inline-flex gap-1 items-center", children: [
|
|
4532
|
-
metadata
|
|
4469
|
+
metadata.srcChainName,
|
|
4533
4470
|
" ",
|
|
4534
4471
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4535
4472
|
NetworkSymbol,
|
|
@@ -4541,7 +4478,7 @@ const SuccessStep = ({
|
|
|
4541
4478
|
] }),
|
|
4542
4479
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowRight, { className: "text-muted-foreground/50 size-4" }),
|
|
4543
4480
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "inline-flex gap-1 items-center", children: [
|
|
4544
|
-
metadata
|
|
4481
|
+
metadata.dstChainName,
|
|
4545
4482
|
" ",
|
|
4546
4483
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4547
4484
|
NetworkSymbol,
|
|
@@ -4554,11 +4491,13 @@ const SuccessStep = ({
|
|
|
4554
4491
|
] })
|
|
4555
4492
|
] }),
|
|
4556
4493
|
srcTxHash && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between items-center", children: [
|
|
4557
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children:
|
|
4494
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: t2("transaction.hash") }),
|
|
4558
4495
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4559
|
-
"
|
|
4496
|
+
"a",
|
|
4560
4497
|
{
|
|
4561
|
-
|
|
4498
|
+
href: `https://layerzeroscan.com/tx/${srcTxHash}`,
|
|
4499
|
+
target: "_blank",
|
|
4500
|
+
rel: "noopener noreferrer",
|
|
4562
4501
|
className: "font-medium cursor-pointer inline-flex items-center gap-1 underline hover:no-underline",
|
|
4563
4502
|
children: formatHash(srcTxHash)
|
|
4564
4503
|
}
|
|
@@ -4570,7 +4509,8 @@ const SuccessStep = ({
|
|
|
4570
4509
|
] })
|
|
4571
4510
|
] })
|
|
4572
4511
|
] }),
|
|
4573
|
-
/* @__PURE__ */ jsxRuntime.jsx(dialog.DialogFooter, { className: "px-10 pb-10 pt-12", children: /* @__PURE__ */ jsxRuntime.jsx(button.Button, { onClick: reset, className: "w-full", children: t2("transaction.done") }) })
|
|
4512
|
+
/* @__PURE__ */ jsxRuntime.jsx(dialog.DialogFooter, { className: "px-10 pb-10 pt-12", children: /* @__PURE__ */ jsxRuntime.jsx(button.Button, { onClick: reset, className: "w-full", children: t2("transaction.done") }) }),
|
|
4513
|
+
/* @__PURE__ */ jsxRuntime.jsx(DevStatusControls, {})
|
|
4574
4514
|
]
|
|
4575
4515
|
}
|
|
4576
4516
|
);
|
|
@@ -4597,20 +4537,28 @@ const ConfirmStep = ({
|
|
|
4597
4537
|
}) => {
|
|
4598
4538
|
const { t: t2 } = useBridgeTranslation();
|
|
4599
4539
|
const { formatTime } = useCountdown(90);
|
|
4600
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
4601
|
-
|
|
4602
|
-
|
|
4603
|
-
/* @__PURE__ */ jsxRuntime.
|
|
4604
|
-
|
|
4540
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(dialog.DialogContent, { className: "overflow-hidden md:max-w-[420px] p-0 fixed top-0 left-0 right-0 bottom-0 translate-x-0 translate-y-0 md:left-[50%] md:top-[50%] md:translate-x-[-50%] md:translate-y-[-50%] rounded-none md:rounded-lg", children: [
|
|
4541
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col relative gap-4 flex-1 items-center justify-center md:justify-start text-center noise p-10", children: [
|
|
4542
|
+
icon,
|
|
4543
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2 pt-4 pb-2 text-center", children: [
|
|
4544
|
+
/* @__PURE__ */ jsxRuntime.jsx(dialog.DialogTitle, { children: t2("transaction.confirm") }),
|
|
4545
|
+
/* @__PURE__ */ jsxRuntime.jsx(dialog.DialogDescription, { children: t2("transaction.signTransaction") })
|
|
4546
|
+
] }),
|
|
4547
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-3xl font-black relative z-10", children: formatTime })
|
|
4605
4548
|
] }),
|
|
4606
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4607
|
-
] })
|
|
4549
|
+
/* @__PURE__ */ jsxRuntime.jsx(DevStatusControls, {})
|
|
4550
|
+
] });
|
|
4608
4551
|
};
|
|
4609
4552
|
const StatusStepsDialog = ({
|
|
4610
4553
|
icons
|
|
4611
4554
|
}) => {
|
|
4612
4555
|
const { current, reset } = useTransactionStore();
|
|
4613
4556
|
const status = current?.status;
|
|
4557
|
+
const handleClose = () => {
|
|
4558
|
+
if (status === "completed" || status === "failed" || status === "executing") {
|
|
4559
|
+
reset();
|
|
4560
|
+
}
|
|
4561
|
+
};
|
|
4614
4562
|
if (!status || status === "idle") return null;
|
|
4615
4563
|
let step = null;
|
|
4616
4564
|
if (status === "executing") {
|
|
@@ -4628,7 +4576,8 @@ const StatusStepsDialog = ({
|
|
|
4628
4576
|
if (status === "failed") {
|
|
4629
4577
|
step = /* @__PURE__ */ jsxRuntime.jsx(FailedStep, { icon: icons?.failed });
|
|
4630
4578
|
}
|
|
4631
|
-
|
|
4579
|
+
if (!step) return null;
|
|
4580
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog, { open: true, onOpenChange: handleClose, children: step }) });
|
|
4632
4581
|
};
|
|
4633
4582
|
const useTokens = () => {
|
|
4634
4583
|
const { setTokens, setAllTokens, setSelectedToken, setSelectedAssetSymbol } = useTokensStore();
|
|
@@ -25878,7 +25827,7 @@ class WalletConnectModal {
|
|
|
25878
25827
|
}
|
|
25879
25828
|
async initUi() {
|
|
25880
25829
|
if (typeof window !== "undefined") {
|
|
25881
|
-
await Promise.resolve().then(() => require("./index-
|
|
25830
|
+
await Promise.resolve().then(() => require("./index-DNsYRKu0.cjs"));
|
|
25882
25831
|
const modal = document.createElement("wcm-modal");
|
|
25883
25832
|
document.body.insertAdjacentElement("beforeend", modal);
|
|
25884
25833
|
OptionsCtrl.setIsUiLoaded(true);
|
|
@@ -26645,4 +26594,4 @@ exports.useSettingsStore = useSettingsStore;
|
|
|
26645
26594
|
exports.useSwapModel = useSwapModel;
|
|
26646
26595
|
exports.useTokensStore = useTokensStore;
|
|
26647
26596
|
exports.useTransactionStore = useTransactionStore;
|
|
26648
|
-
//# sourceMappingURL=index-
|
|
26597
|
+
//# sourceMappingURL=index-D3Rdww1n.cjs.map
|