@rash2x/bridge-widget 0.6.74 → 0.6.76
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-BXuhMmPg.cjs → index-D7rILjYR.cjs} +191 -212
- package/dist/index-D7rILjYR.cjs.map +1 -0
- package/dist/{index-ByJYFgBm.js → index-DGTEYGjh.js} +2 -2
- package/dist/{index-ByJYFgBm.js.map → index-DGTEYGjh.js.map} +1 -1
- package/dist/{index-8QY4DTwO.cjs → index-UP2rtmG0.cjs} +2 -2
- package/dist/{index-8QY4DTwO.cjs.map → index-UP2rtmG0.cjs.map} +1 -1
- package/dist/{index-CmwUxIdY.js → index-yABy9lq6.js} +191 -212
- package/dist/index-yABy9lq6.js.map +1 -0
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/dist/index-BXuhMmPg.cjs.map +0 -1
- package/dist/index-CmwUxIdY.js.map +0 -1
|
@@ -2381,58 +2381,51 @@ const ChainSelectModal = ({
|
|
|
2381
2381
|
chain2.chainKey
|
|
2382
2382
|
);
|
|
2383
2383
|
};
|
|
2384
|
-
return /* @__PURE__ */ jsx(Dialog, { open: isOpen, onOpenChange: (open) => !open && handleClose(), children: /* @__PURE__ */ jsxs(
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2384
|
+
return /* @__PURE__ */ jsx(Dialog, { open: isOpen, onOpenChange: (open) => !open && handleClose(), children: /* @__PURE__ */ jsxs(DialogContent, { className: "md:max-h-[90dvh] md:h-[90dvh] overflow-hidden flex flex-col", children: [
|
|
2385
|
+
/* @__PURE__ */ jsx(DialogHeader, { className: "text-left pb-2", children: /* @__PURE__ */ jsx(DialogTitle, { className: "text-xl leading-8", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-0", children: [
|
|
2386
|
+
/* @__PURE__ */ jsx("div", { children: t2("bridge.select") }),
|
|
2387
|
+
/* @__PURE__ */ jsx("div", { children: t2(
|
|
2388
|
+
isSource ? "bridge.sourceNetwork" : "bridge.destinationNetwork"
|
|
2389
|
+
) })
|
|
2390
|
+
] }) }) }),
|
|
2391
|
+
/* @__PURE__ */ jsx(
|
|
2392
|
+
SearchInput,
|
|
2393
|
+
{
|
|
2394
|
+
placeholder: t2("bridge.search"),
|
|
2395
|
+
value: query,
|
|
2396
|
+
onChange: setQuery,
|
|
2397
|
+
className: "text-foreground placeholder:text-muted-foreground"
|
|
2398
|
+
}
|
|
2399
|
+
),
|
|
2400
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1 overflow-y-auto [&::-webkit-scrollbar]:w-1 [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar-thumb]:bg-muted-foreground/20 [&::-webkit-scrollbar-thumb]:rounded-full hover:[&::-webkit-scrollbar-thumb]:bg-muted-foreground/30", children: [
|
|
2401
|
+
groupedChains.available.length > 0 && groupedChains.available.map((c2) => renderChainItem(c2, false)),
|
|
2402
|
+
groupedChains.willChangeSrc.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2396
2403
|
/* @__PURE__ */ jsx(
|
|
2397
|
-
|
|
2404
|
+
"p",
|
|
2398
2405
|
{
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
onChange: setQuery,
|
|
2402
|
-
className: "text-foreground placeholder:text-muted-foreground"
|
|
2406
|
+
className: `px-5 py-2 leading-4 text-base font-semibold text-muted-foreground uppercase ${groupedChains.available.length > 0 ? "mt-10" : ""}`,
|
|
2407
|
+
children: t2("bridge.willChangeSourceChain")
|
|
2403
2408
|
}
|
|
2404
2409
|
),
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
)
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
children: t2("bridge.willChangeSourceNetworkAndToken")
|
|
2425
|
-
}
|
|
2426
|
-
),
|
|
2427
|
-
groupedChains.willChangeTokenAndSrc.map(
|
|
2428
|
-
(c2) => renderChainItem(c2, false, true)
|
|
2429
|
-
)
|
|
2430
|
-
] }),
|
|
2431
|
-
groupedChains.available.length === 0 && groupedChains.willChangeSrc.length === 0 && groupedChains.willChangeTokenAndSrc.length === 0 && /* @__PURE__ */ jsx("div", { className: "text-sm text-muted-foreground px-12 py-2 h-28 flex items-center justify-center text-center", children: t2("bridge.chainNotFound") })
|
|
2432
|
-
] })
|
|
2433
|
-
]
|
|
2434
|
-
}
|
|
2435
|
-
) });
|
|
2410
|
+
groupedChains.willChangeSrc.map(
|
|
2411
|
+
(c2) => renderChainItem(c2, true, false)
|
|
2412
|
+
)
|
|
2413
|
+
] }),
|
|
2414
|
+
groupedChains.willChangeTokenAndSrc.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2415
|
+
/* @__PURE__ */ jsx(
|
|
2416
|
+
"p",
|
|
2417
|
+
{
|
|
2418
|
+
className: `px-5 py-2 leading-4 text-base font-semibold text-muted-foreground uppercase ${groupedChains.available.length > 0 || groupedChains.willChangeSrc.length > 0 ? "mt-10" : ""}`,
|
|
2419
|
+
children: t2("bridge.willChangeSourceNetworkAndToken")
|
|
2420
|
+
}
|
|
2421
|
+
),
|
|
2422
|
+
groupedChains.willChangeTokenAndSrc.map(
|
|
2423
|
+
(c2) => renderChainItem(c2, false, true)
|
|
2424
|
+
)
|
|
2425
|
+
] }),
|
|
2426
|
+
groupedChains.available.length === 0 && groupedChains.willChangeSrc.length === 0 && groupedChains.willChangeTokenAndSrc.length === 0 && /* @__PURE__ */ jsx("div", { className: "text-sm text-muted-foreground px-12 py-2 h-28 flex items-center justify-center text-center", children: t2("bridge.chainNotFound") })
|
|
2427
|
+
] })
|
|
2428
|
+
] }) });
|
|
2436
2429
|
};
|
|
2437
2430
|
const useWalletSelectModal = create((set2) => ({
|
|
2438
2431
|
isOpen: false,
|
|
@@ -4161,7 +4154,7 @@ const WalletSelectModal = () => {
|
|
|
4161
4154
|
}
|
|
4162
4155
|
return a2.order - b2.order;
|
|
4163
4156
|
});
|
|
4164
|
-
return /* @__PURE__ */ jsx(Dialog, { open: isOpen, onOpenChange: (open) => !open && onClose(), children: /* @__PURE__ */ jsxs(DialogContent, {
|
|
4157
|
+
return /* @__PURE__ */ jsx(Dialog, { open: isOpen, onOpenChange: (open) => !open && onClose(), children: /* @__PURE__ */ jsxs(DialogContent, { children: [
|
|
4165
4158
|
/* @__PURE__ */ jsxs(DialogHeader, { className: "text-left", children: [
|
|
4166
4159
|
/* @__PURE__ */ jsx(DialogTitle, { className: "text-2xl leading-8", children: t2("wallets.chooseWallet") }),
|
|
4167
4160
|
/* @__PURE__ */ jsx(DialogDescription, { children: t2("wallets.oneWalletPerEnv") })
|
|
@@ -4323,7 +4316,7 @@ const FailedStep = ({
|
|
|
4323
4316
|
current.errorParams || {}
|
|
4324
4317
|
) })
|
|
4325
4318
|
] }),
|
|
4326
|
-
/* @__PURE__ */ jsx(DialogFooter, { className: "w-full", children: /* @__PURE__ */ jsx(Button, { variant: "outline", className: "w-full min-w-40", onClick: reset, children: t2("common.close") }) })
|
|
4319
|
+
/* @__PURE__ */ jsx(DialogFooter, { className: "w-full pt-10", children: /* @__PURE__ */ jsx(Button, { variant: "outline", className: "w-full min-w-40", onClick: reset, children: t2("common.close") }) })
|
|
4327
4320
|
] });
|
|
4328
4321
|
};
|
|
4329
4322
|
const SuccessStep = ({
|
|
@@ -6497,103 +6490,96 @@ const SettingsModal = ({ isOpen, onClose }) => {
|
|
|
6497
6490
|
);
|
|
6498
6491
|
const activeBtn = "bg-primary hover:bg-primary/80 text-primary-foreground transition-colors";
|
|
6499
6492
|
const notActiveBtn = "bg-accent hover:bg-accent/80 text-accent-foreground transition-colors";
|
|
6500
|
-
return /* @__PURE__ */ jsx(Dialog, { open: isOpen, onOpenChange: (open) => !open && onClose(), children: /* @__PURE__ */ jsxs(
|
|
6501
|
-
|
|
6502
|
-
{
|
|
6503
|
-
|
|
6504
|
-
|
|
6505
|
-
|
|
6506
|
-
|
|
6507
|
-
|
|
6508
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-5", children: [
|
|
6509
|
-
/* @__PURE__ */ jsxs("div", { className: "flex justify-between items-center", children: [
|
|
6510
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
6511
|
-
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm font-medium leading-4", children: t2("settings.gasOnDestination") }),
|
|
6512
|
-
/* @__PURE__ */ jsx(Tip, { text: t2("settings.gasOnDestinationDescription"), children: /* @__PURE__ */ jsx(InfoIcon, { className: "w-4 h-4 text-muted-foreground" }) })
|
|
6513
|
-
] }),
|
|
6514
|
-
/* @__PURE__ */ jsx("p", { className: "text-foreground text-sm font-medium leading-4", children: formatUsd(gasUsdValue) })
|
|
6515
|
-
] }),
|
|
6516
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-3", children: [
|
|
6517
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center w-1/3 gap-2 shrink-0", children: [
|
|
6518
|
-
/* @__PURE__ */ jsx(
|
|
6519
|
-
TokenSymbol,
|
|
6520
|
-
{
|
|
6521
|
-
symbol: dstNativeToken?.symbol || "eth",
|
|
6522
|
-
className: "h-4 w-4 rounded-full",
|
|
6523
|
-
alt: dstNativeToken?.symbol || t2("common.nativeToken", { defaultValue: "Native Token" })
|
|
6524
|
-
}
|
|
6525
|
-
),
|
|
6526
|
-
/* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsx("p", { className: "text-lg text-foreground leading-5 font-semibold h-5", children: gasDisplayAmount % 1 === 0 ? gasDisplayAmount.toFixed(0) : gasDisplayAmount.toFixed(
|
|
6527
|
-
gasDisplayAmount < 1e-3 ? 6 : 3
|
|
6528
|
-
) }) })
|
|
6529
|
-
] }),
|
|
6530
|
-
/* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: gasPresets.map((g2) => /* @__PURE__ */ jsx(
|
|
6531
|
-
Badge,
|
|
6532
|
-
{
|
|
6533
|
-
onClick: () => setGasPreset(g2),
|
|
6534
|
-
className: cn$2(
|
|
6535
|
-
"cursor-pointer h-7 rounded px-2",
|
|
6536
|
-
gasPreset === g2 ? activeBtn : notActiveBtn
|
|
6537
|
-
),
|
|
6538
|
-
children: t2(`settings.gasPresets.${g2}`)
|
|
6539
|
-
},
|
|
6540
|
-
g2
|
|
6541
|
-
)) })
|
|
6542
|
-
] })
|
|
6493
|
+
return /* @__PURE__ */ jsx(Dialog, { open: isOpen, onOpenChange: (open) => !open && onClose(), children: /* @__PURE__ */ jsxs(DialogContent, { onOpenAutoFocus: (e2) => e2.preventDefault(), children: [
|
|
6494
|
+
/* @__PURE__ */ jsx(DialogHeader, { className: "text-left", children: /* @__PURE__ */ jsx(DialogTitle, { className: "text-2xl leading-8", children: t2("settings.title") }) }),
|
|
6495
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-5 flex-1 pt-4", children: [
|
|
6496
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-5", children: [
|
|
6497
|
+
/* @__PURE__ */ jsxs("div", { className: "flex justify-between items-center", children: [
|
|
6498
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
6499
|
+
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm font-medium leading-4", children: t2("settings.gasOnDestination") }),
|
|
6500
|
+
/* @__PURE__ */ jsx(Tip, { text: t2("settings.gasOnDestinationDescription"), children: /* @__PURE__ */ jsx(InfoIcon, { className: "w-4 h-4 text-muted-foreground" }) })
|
|
6543
6501
|
] }),
|
|
6544
|
-
/* @__PURE__ */ jsx("
|
|
6545
|
-
|
|
6546
|
-
|
|
6547
|
-
|
|
6548
|
-
|
|
6549
|
-
|
|
6550
|
-
] }),
|
|
6551
|
-
slippageBps >= 500 && /* @__PURE__ */ jsx("p", { className: "text-destructive text-xs font-medium", children: t2("settings.highSlippageWarning", {
|
|
6552
|
-
defaultValue: "High slippage warning"
|
|
6553
|
-
}) })
|
|
6554
|
-
] }),
|
|
6555
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-6", children: [
|
|
6556
|
-
/* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsx("p", { className: "text-lg text-foreground leading-5 font-semibold h-5", children: slippagePercent }) }),
|
|
6557
|
-
/* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: slippagePresets.map((p2) => /* @__PURE__ */ jsx(
|
|
6558
|
-
Badge,
|
|
6559
|
-
{
|
|
6560
|
-
onClick: () => {
|
|
6561
|
-
const bps = parseFloat(p2.replace("%", "")) * 100;
|
|
6562
|
-
setSlippageBps(bps);
|
|
6563
|
-
},
|
|
6564
|
-
className: cn$2(
|
|
6565
|
-
"cursor-pointer h-7 rounded px-2",
|
|
6566
|
-
activeSlippagePreset === p2 ? activeBtn : notActiveBtn
|
|
6567
|
-
),
|
|
6568
|
-
children: p2
|
|
6569
|
-
},
|
|
6570
|
-
p2
|
|
6571
|
-
)) })
|
|
6572
|
-
] })
|
|
6573
|
-
] }),
|
|
6574
|
-
/* @__PURE__ */ jsx("hr", {}),
|
|
6575
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-5", children: [
|
|
6576
|
-
/* @__PURE__ */ jsx("div", { className: "flex justify-between items-center", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
6577
|
-
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm font-medium leading-4", children: t2("settings.routePriority") }),
|
|
6578
|
-
/* @__PURE__ */ jsx(Tip, { text: t2("settings.routePriorityDescription"), children: /* @__PURE__ */ jsx(InfoIcon, { className: "w-4 h-4 text-muted-foreground" }) })
|
|
6579
|
-
] }) }),
|
|
6580
|
-
/* @__PURE__ */ jsx("div", { className: "flex items-center justify-end gap-2", children: routePresets.map((r2) => /* @__PURE__ */ jsx(
|
|
6581
|
-
Badge,
|
|
6502
|
+
/* @__PURE__ */ jsx("p", { className: "text-foreground text-sm font-medium leading-4", children: formatUsd(gasUsdValue) })
|
|
6503
|
+
] }),
|
|
6504
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-3", children: [
|
|
6505
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 shrink-0", children: [
|
|
6506
|
+
/* @__PURE__ */ jsx(
|
|
6507
|
+
TokenSymbol,
|
|
6582
6508
|
{
|
|
6583
|
-
|
|
6584
|
-
className:
|
|
6585
|
-
|
|
6586
|
-
|
|
6587
|
-
|
|
6588
|
-
|
|
6509
|
+
symbol: dstNativeToken?.symbol || "eth",
|
|
6510
|
+
className: "h-4 w-4 rounded-full",
|
|
6511
|
+
alt: dstNativeToken?.symbol || t2("common.nativeToken", { defaultValue: "Native Token" })
|
|
6512
|
+
}
|
|
6513
|
+
),
|
|
6514
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsx("p", { className: "text-lg text-foreground leading-5 font-semibold h-5", children: gasDisplayAmount % 1 === 0 ? gasDisplayAmount.toFixed(0) : gasDisplayAmount.toFixed(
|
|
6515
|
+
gasDisplayAmount < 1e-3 ? 6 : 3
|
|
6516
|
+
) }) })
|
|
6517
|
+
] }),
|
|
6518
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: gasPresets.map((g2) => /* @__PURE__ */ jsx(
|
|
6519
|
+
Badge,
|
|
6520
|
+
{
|
|
6521
|
+
onClick: () => setGasPreset(g2),
|
|
6522
|
+
className: cn$2(
|
|
6523
|
+
"cursor-pointer h-7 rounded px-2",
|
|
6524
|
+
gasPreset === g2 ? activeBtn : notActiveBtn
|
|
6525
|
+
),
|
|
6526
|
+
children: t2(`settings.gasPresets.${g2}`)
|
|
6527
|
+
},
|
|
6528
|
+
g2
|
|
6529
|
+
)) })
|
|
6530
|
+
] })
|
|
6531
|
+
] }),
|
|
6532
|
+
/* @__PURE__ */ jsx("hr", {}),
|
|
6533
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-5", children: [
|
|
6534
|
+
/* @__PURE__ */ jsxs("div", { className: "flex justify-between items-center", children: [
|
|
6535
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
6536
|
+
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm font-medium leading-4", children: t2("settings.slippageTolerance") }),
|
|
6537
|
+
/* @__PURE__ */ jsx(Tip, { text: t2("settings.slippageToleranceDescription"), children: /* @__PURE__ */ jsx(InfoIcon, { className: "w-4 h-4 text-muted-foreground" }) })
|
|
6538
|
+
] }),
|
|
6539
|
+
slippageBps >= 500 && /* @__PURE__ */ jsx("p", { className: "text-destructive text-xs font-medium", children: t2("settings.highSlippageWarning", {
|
|
6540
|
+
defaultValue: "High slippage warning"
|
|
6541
|
+
}) })
|
|
6542
|
+
] }),
|
|
6543
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-6", children: [
|
|
6544
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsx("p", { className: "text-lg text-foreground leading-5 font-semibold h-5", children: slippagePercent }) }),
|
|
6545
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: slippagePresets.map((p2) => /* @__PURE__ */ jsx(
|
|
6546
|
+
Badge,
|
|
6547
|
+
{
|
|
6548
|
+
onClick: () => {
|
|
6549
|
+
const bps = parseFloat(p2.replace("%", "")) * 100;
|
|
6550
|
+
setSlippageBps(bps);
|
|
6589
6551
|
},
|
|
6590
|
-
|
|
6591
|
-
|
|
6592
|
-
|
|
6552
|
+
className: cn$2(
|
|
6553
|
+
"cursor-pointer h-7 rounded px-2",
|
|
6554
|
+
activeSlippagePreset === p2 ? activeBtn : notActiveBtn
|
|
6555
|
+
),
|
|
6556
|
+
children: p2
|
|
6557
|
+
},
|
|
6558
|
+
p2
|
|
6559
|
+
)) })
|
|
6593
6560
|
] })
|
|
6594
|
-
]
|
|
6595
|
-
|
|
6596
|
-
|
|
6561
|
+
] }),
|
|
6562
|
+
/* @__PURE__ */ jsx("hr", {}),
|
|
6563
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-5", children: [
|
|
6564
|
+
/* @__PURE__ */ jsx("div", { className: "flex justify-between items-center", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
6565
|
+
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm font-medium leading-4", children: t2("settings.routePriority") }),
|
|
6566
|
+
/* @__PURE__ */ jsx(Tip, { text: t2("settings.routePriorityDescription"), children: /* @__PURE__ */ jsx(InfoIcon, { className: "w-4 h-4 text-muted-foreground" }) })
|
|
6567
|
+
] }) }),
|
|
6568
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center justify-end gap-2", children: routePresets.map((r2) => /* @__PURE__ */ jsx(
|
|
6569
|
+
Badge,
|
|
6570
|
+
{
|
|
6571
|
+
onClick: () => setRoutePriority(r2),
|
|
6572
|
+
className: cn$2(
|
|
6573
|
+
"cursor-pointer h-7 rounded px-2",
|
|
6574
|
+
routePriority === r2 ? activeBtn : notActiveBtn
|
|
6575
|
+
),
|
|
6576
|
+
children: t2(`settings.routePresets.${r2}`)
|
|
6577
|
+
},
|
|
6578
|
+
r2
|
|
6579
|
+
)) })
|
|
6580
|
+
] })
|
|
6581
|
+
] })
|
|
6582
|
+
] }) });
|
|
6597
6583
|
};
|
|
6598
6584
|
const TOKEN_ROW_HEIGHT = 52;
|
|
6599
6585
|
const TokenRow = ({
|
|
@@ -6891,74 +6877,67 @@ const TokenSelectModal = ({
|
|
|
6891
6877
|
},
|
|
6892
6878
|
[effectiveTab, virtualItems]
|
|
6893
6879
|
);
|
|
6894
|
-
return /* @__PURE__ */ jsx(Dialog, { open: isOpen, onOpenChange: (open) => !open && handleClose(), children: /* @__PURE__ */ jsxs(
|
|
6895
|
-
|
|
6896
|
-
|
|
6897
|
-
|
|
6898
|
-
|
|
6899
|
-
|
|
6900
|
-
|
|
6901
|
-
|
|
6902
|
-
|
|
6903
|
-
|
|
6904
|
-
|
|
6905
|
-
|
|
6906
|
-
|
|
6907
|
-
|
|
6908
|
-
|
|
6909
|
-
|
|
6910
|
-
|
|
6911
|
-
|
|
6912
|
-
|
|
6913
|
-
|
|
6914
|
-
|
|
6915
|
-
|
|
6916
|
-
|
|
6917
|
-
},
|
|
6918
|
-
size: "sm",
|
|
6919
|
-
className: cn$2(
|
|
6920
|
-
"px-4 h-9 cursor-pointer",
|
|
6921
|
-
effectiveTab !== "my" && "bg-muted hover:bg-accent"
|
|
6922
|
-
),
|
|
6923
|
-
children: t2("bridge.myTokens")
|
|
6924
|
-
}
|
|
6880
|
+
return /* @__PURE__ */ jsx(Dialog, { open: isOpen, onOpenChange: (open) => !open && handleClose(), children: /* @__PURE__ */ jsxs(DialogContent, { className: "md:max-h-[90dvh] md:h-[90dvh] overflow-hidden flex flex-col gap-4", children: [
|
|
6881
|
+
/* @__PURE__ */ jsx(DialogHeader, { className: "text-left pb-2", children: /* @__PURE__ */ jsx(DialogTitle, { className: "text-2xl leading-8", children: t2("bridge.selectToken") }) }),
|
|
6882
|
+
/* @__PURE__ */ jsx(
|
|
6883
|
+
SearchInput,
|
|
6884
|
+
{
|
|
6885
|
+
placeholder: t2("bridge.searchToken"),
|
|
6886
|
+
value: query,
|
|
6887
|
+
onChange: setQuery
|
|
6888
|
+
}
|
|
6889
|
+
),
|
|
6890
|
+
hasSourceWallet() && /* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
|
|
6891
|
+
/* @__PURE__ */ jsx(
|
|
6892
|
+
Button,
|
|
6893
|
+
{
|
|
6894
|
+
variant: effectiveTab === "my" ? "default" : "ghost",
|
|
6895
|
+
onClick: () => {
|
|
6896
|
+
setTab("my");
|
|
6897
|
+
setManualTabSwitch(true);
|
|
6898
|
+
},
|
|
6899
|
+
size: "sm",
|
|
6900
|
+
className: cn$2(
|
|
6901
|
+
"px-4 h-9 cursor-pointer",
|
|
6902
|
+
effectiveTab !== "my" && "bg-muted hover:bg-accent"
|
|
6925
6903
|
),
|
|
6926
|
-
|
|
6927
|
-
|
|
6928
|
-
|
|
6929
|
-
|
|
6930
|
-
|
|
6931
|
-
|
|
6932
|
-
|
|
6933
|
-
|
|
6934
|
-
|
|
6935
|
-
|
|
6936
|
-
|
|
6937
|
-
|
|
6938
|
-
|
|
6939
|
-
|
|
6940
|
-
|
|
6941
|
-
)
|
|
6942
|
-
|
|
6943
|
-
|
|
6944
|
-
|
|
6945
|
-
|
|
6946
|
-
|
|
6947
|
-
|
|
6948
|
-
|
|
6949
|
-
|
|
6950
|
-
|
|
6951
|
-
|
|
6952
|
-
|
|
6953
|
-
|
|
6954
|
-
|
|
6955
|
-
|
|
6956
|
-
|
|
6957
|
-
|
|
6958
|
-
|
|
6959
|
-
|
|
6960
|
-
|
|
6961
|
-
|
|
6904
|
+
children: t2("bridge.myTokens")
|
|
6905
|
+
}
|
|
6906
|
+
),
|
|
6907
|
+
/* @__PURE__ */ jsx(
|
|
6908
|
+
Button,
|
|
6909
|
+
{
|
|
6910
|
+
variant: effectiveTab === "all" ? "default" : "ghost",
|
|
6911
|
+
onClick: () => {
|
|
6912
|
+
setTab("all");
|
|
6913
|
+
setManualTabSwitch(true);
|
|
6914
|
+
},
|
|
6915
|
+
size: "sm",
|
|
6916
|
+
className: cn$2(
|
|
6917
|
+
"px-4 h-9 cursor-pointer",
|
|
6918
|
+
effectiveTab !== "all" && "bg-muted hover:bg-accent"
|
|
6919
|
+
),
|
|
6920
|
+
children: t2("bridge.allTokens")
|
|
6921
|
+
}
|
|
6922
|
+
)
|
|
6923
|
+
] }),
|
|
6924
|
+
/* @__PURE__ */ jsx("div", { id: "token-select-list", className: "flex-1 -mx-5 min-h-0", children: hasNoResults ? /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground px-12 py-2 h-28 flex items-center justify-center text-center", children: t2("bridge.tokenNotFound") }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
6925
|
+
effectiveTab === "my" && myTokens.length === 0 && /* @__PURE__ */ jsx("p", { className: "leading-4 px-5 text-base text-muted-foreground uppercase py-2", children: t2("bridge.noBalancesFound") }),
|
|
6926
|
+
/* @__PURE__ */ jsx(
|
|
6927
|
+
FixedSizeList,
|
|
6928
|
+
{
|
|
6929
|
+
height: listHeight,
|
|
6930
|
+
itemCount: virtualItems.length,
|
|
6931
|
+
itemSize: TOKEN_ROW_HEIGHT,
|
|
6932
|
+
width: "100%",
|
|
6933
|
+
itemKey,
|
|
6934
|
+
className: "[&::-webkit-scrollbar]:w-1 [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar-thumb]:bg-muted-foreground/20 [&::-webkit-scrollbar-thumb]:rounded-full hover:[&::-webkit-scrollbar-thumb]:bg-muted-foreground/30",
|
|
6935
|
+
overscanCount: 5,
|
|
6936
|
+
children: VirtualRow
|
|
6937
|
+
}
|
|
6938
|
+
)
|
|
6939
|
+
] }) })
|
|
6940
|
+
] }) });
|
|
6962
6941
|
};
|
|
6963
6942
|
function useBridgeRefresh() {
|
|
6964
6943
|
const qc = useQueryClient();
|
|
@@ -25777,7 +25756,7 @@ class WalletConnectModal {
|
|
|
25777
25756
|
}
|
|
25778
25757
|
async initUi() {
|
|
25779
25758
|
if (typeof window !== "undefined") {
|
|
25780
|
-
await import("./index-
|
|
25759
|
+
await import("./index-DGTEYGjh.js");
|
|
25781
25760
|
const modal = document.createElement("wcm-modal");
|
|
25782
25761
|
document.body.insertAdjacentElement("beforeend", modal);
|
|
25783
25762
|
OptionsCtrl.setIsUiLoaded(true);
|
|
@@ -26546,4 +26525,4 @@ export {
|
|
|
26546
26525
|
getQuoteFees as y,
|
|
26547
26526
|
calculateMinReceived as z
|
|
26548
26527
|
};
|
|
26549
|
-
//# sourceMappingURL=index-
|
|
26528
|
+
//# sourceMappingURL=index-yABy9lq6.js.map
|