kaleido-ui 0.1.44 → 0.1.46
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/web/index.cjs +106 -95
- package/dist/web/index.d.cts +8 -2
- package/dist/web/index.d.ts +8 -2
- package/dist/web/index.js +106 -95
- package/package.json +1 -1
package/dist/web/index.cjs
CHANGED
|
@@ -2631,7 +2631,7 @@ function InlineSelector({
|
|
|
2631
2631
|
),
|
|
2632
2632
|
children: [
|
|
2633
2633
|
renderPanelHeader?.(renderArgs),
|
|
2634
|
-
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "
|
|
2634
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "space-y-1", children: options.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex flex-col items-center gap-2 px-4 py-8 text-center text-sm text-white/30", children: [
|
|
2635
2635
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon, { name: "search", size: "md", className: "opacity-40" }),
|
|
2636
2636
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { children: "No results" })
|
|
2637
2637
|
] }) : options.map((option) => {
|
|
@@ -3379,7 +3379,8 @@ function BalanceBreakdown({
|
|
|
3379
3379
|
onRefresh,
|
|
3380
3380
|
isRefreshing = false,
|
|
3381
3381
|
onNavigate,
|
|
3382
|
-
compact = false
|
|
3382
|
+
compact = false,
|
|
3383
|
+
tokenValueSats
|
|
3383
3384
|
}) {
|
|
3384
3385
|
const [expanded, setExpanded] = (0, import_react10.useState)(false);
|
|
3385
3386
|
const fiatTotal = formatFiatValue(totalBTC);
|
|
@@ -3402,7 +3403,7 @@ function BalanceBreakdown({
|
|
|
3402
3403
|
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "h-9 w-36 animate-pulse rounded-lg bg-white/10" }),
|
|
3403
3404
|
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "h-3 w-20 animate-pulse rounded bg-white/5" })
|
|
3404
3405
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
|
|
3405
|
-
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex min-w-0 max-w-full flex-wrap items-baseline gap-x-
|
|
3406
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex min-w-0 max-w-full flex-wrap items-baseline gap-x-1.5 gap-y-1", children: [
|
|
3406
3407
|
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "text-display font-black leading-[1.1] tracking-tighter text-white drop-shadow-sm transition-all duration-300 group-active:scale-95 group-active:text-primary", children: balanceVisible ? numberOnly(format(totalBTC)) : "\u2022\u2022\u2022\u2022\u2022\u2022" }),
|
|
3407
3408
|
unit !== "fiat" && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "inline-block rounded-md border border-white/10 bg-white/5 px-2 py-0.5 text-tiny font-bold uppercase tracking-widest text-white/45", children: label }),
|
|
3408
3409
|
isPartial && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
@@ -3545,6 +3546,23 @@ function BalanceBreakdown({
|
|
|
3545
3546
|
}
|
|
3546
3547
|
),
|
|
3547
3548
|
rgbAssets.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(RgbAssetsBreakdown, { assets: rgbAssets, balanceVisible }),
|
|
3549
|
+
tokenValueSats !== void 0 && tokenValueSats > 0 && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "mt-3 border-t border-white/[0.08] pt-4", children: [
|
|
3550
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "mb-3 text-xxs font-bold uppercase tracking-widest text-white/30", children: "Token Holdings" }),
|
|
3551
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex items-center justify-between rounded-xl bg-white/[0.03] px-3 py-2", children: [
|
|
3552
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
3553
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "h-7 w-0.5 rounded-full bg-success opacity-80" }),
|
|
3554
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "flex size-7 items-center justify-center rounded-lg bg-white/5 text-icon-sm", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "material-symbols-outlined leading-none", style: { fontSize: "inherit" }, children: "payments" }) }),
|
|
3555
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex flex-col", children: [
|
|
3556
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "text-xs font-semibold leading-tight text-white/80", children: "Stablecoins & Tokens" }),
|
|
3557
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "mt-0.5 text-xxs font-medium leading-tight text-white/30", children: "Converted value in BTC" })
|
|
3558
|
+
] })
|
|
3559
|
+
] }),
|
|
3560
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex flex-col items-end", children: [
|
|
3561
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "tabular-nums text-xs font-bold text-white", children: balanceVisible ? format(tokenValueSats) : "\u2022\u2022\u2022\u2022\u2022\u2022" }),
|
|
3562
|
+
balanceVisible && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "mt-0.5 font-mono text-xxs text-white/35", children: formatFiatValue(tokenValueSats) })
|
|
3563
|
+
] })
|
|
3564
|
+
] })
|
|
3565
|
+
] }),
|
|
3548
3566
|
accounts.RGB?.connected && nodeInfo?.pubkey && /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "mt-3 border-t border-white/[0.08] pt-4", children: [
|
|
3549
3567
|
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "mb-3 text-xxs font-bold uppercase tracking-widest text-white/30", children: "RLN Details" }),
|
|
3550
3568
|
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "grid grid-cols-3 gap-2", children: [
|
|
@@ -3765,25 +3783,14 @@ function AssetSelector({
|
|
|
3765
3783
|
}
|
|
3766
3784
|
),
|
|
3767
3785
|
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("span", { className: "flex min-w-0 flex-1 items-center justify-between gap-3 text-left", children: [
|
|
3768
|
-
/* @__PURE__ */ (0, import_jsx_runtime37.
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
),
|
|
3777
|
-
option.network && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "mt-1", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3778
|
-
NetworkBadge,
|
|
3779
|
-
{
|
|
3780
|
-
network: option.network,
|
|
3781
|
-
showLabel: true,
|
|
3782
|
-
size: "sm",
|
|
3783
|
-
className: "py-[1px]"
|
|
3784
|
-
}
|
|
3785
|
-
) })
|
|
3786
|
-
] }),
|
|
3786
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "min-w-0 flex flex-col leading-tight", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3787
|
+
"span",
|
|
3788
|
+
{
|
|
3789
|
+
className: "max-w-full truncate text-base font-bold tracking-wide text-white",
|
|
3790
|
+
title: option.name ?? option.ticker,
|
|
3791
|
+
children: option.name ?? option.ticker
|
|
3792
|
+
}
|
|
3793
|
+
) }),
|
|
3787
3794
|
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("span", { className: "flex shrink-0 flex-col items-end gap-0.5", children: [
|
|
3788
3795
|
optionSelected ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "rounded-full border border-primary/25 bg-primary/[0.14] px-2 py-0.5 text-xxs font-bold uppercase tracking-wide text-primary", children: "Current" }) : optionCategoryLabel && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "rounded-full bg-surface-card px-2 py-0.5 text-tiny font-bold uppercase tracking-wide text-text-dimmed shadow-inner", children: optionCategoryLabel }),
|
|
3789
3796
|
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
@@ -3857,8 +3864,7 @@ function AssetSelector({
|
|
|
3857
3864
|
] }),
|
|
3858
3865
|
selected && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex items-center gap-2 rounded-full bg-white/5 px-2.5 py-1", children: [
|
|
3859
3866
|
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(AssetIcon, { ticker: selected.ticker, logoUri: selected.icon, size: 18 }),
|
|
3860
|
-
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "text-tiny font-semibold text-white", children: selected.ticker })
|
|
3861
|
-
selected.network && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(NetworkBadge, { network: selected.network, showLabel: true, className: "py-[1px]" })
|
|
3867
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "text-tiny font-semibold text-white", children: selected.ticker })
|
|
3862
3868
|
] })
|
|
3863
3869
|
] }) }),
|
|
3864
3870
|
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex-shrink-0 px-4 py-3", children: [
|
|
@@ -3972,21 +3978,11 @@ function AssetSelector({
|
|
|
3972
3978
|
onOpenPanelHeightChange,
|
|
3973
3979
|
renderTrigger: ({ open: open2 }) => /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("span", { className: "block", children: [
|
|
3974
3980
|
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "mb-1.5 ml-1 block text-xs font-semibold uppercase tracking-wider text-white/40", children: label }),
|
|
3975
|
-
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("span", { className: "flex w-full items-center justify-between rounded-
|
|
3981
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("span", { className: "flex w-full items-center justify-between rounded-2xl bg-card/70 px-4 py-3 text-left transition-all duration-200 hover:bg-card/90", children: [
|
|
3976
3982
|
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "flex items-center gap-3", children: selected ? /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_jsx_runtime37.Fragment, { children: [
|
|
3977
3983
|
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(AssetIcon, { ticker: selected.ticker, logoUri: selected.icon, size: 32 }),
|
|
3978
3984
|
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("span", { children: [
|
|
3979
|
-
/* @__PURE__ */ (0, import_jsx_runtime37.
|
|
3980
|
-
selected.ticker,
|
|
3981
|
-
selected.network && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3982
|
-
NetworkBadge,
|
|
3983
|
-
{
|
|
3984
|
-
network: selected.network,
|
|
3985
|
-
showLabel: true,
|
|
3986
|
-
className: "px-1.5 py-0 text-xxs"
|
|
3987
|
-
}
|
|
3988
|
-
)
|
|
3989
|
-
] }),
|
|
3985
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "text-sm font-semibold text-white", children: selected.ticker }),
|
|
3990
3986
|
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "mt-0.5 block text-xs text-white/35", children: selected.name })
|
|
3991
3987
|
] })
|
|
3992
3988
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "text-sm text-white/35", children: "Select asset..." }) }),
|
|
@@ -4019,8 +4015,7 @@ function AssetSelector({
|
|
|
4019
4015
|
] }),
|
|
4020
4016
|
selected && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex items-center gap-2 rounded-full bg-white/5 px-2.5 py-1", children: [
|
|
4021
4017
|
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(AssetIcon, { ticker: selected.ticker, logoUri: selected.icon, size: 18 }),
|
|
4022
|
-
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "text-tiny font-semibold text-white", children: selected.ticker })
|
|
4023
|
-
selected.network && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(NetworkBadge, { network: selected.network, showLabel: true, className: "py-[1px]" })
|
|
4018
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "text-tiny font-semibold text-white", children: selected.ticker })
|
|
4024
4019
|
] })
|
|
4025
4020
|
] }) }),
|
|
4026
4021
|
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "px-4 py-3", children: [
|
|
@@ -4795,42 +4790,53 @@ function WithdrawAmountInput({
|
|
|
4795
4790
|
}) {
|
|
4796
4791
|
const unitLabel = selectedAssetId === "BTC" ? "sats" : selectedAssetTicker ?? "units";
|
|
4797
4792
|
const showAmountInput = addressType === "bitcoin" || addressType === "spark" || addressType === "arkade" || addressType === "lightning-address" || addressType === "lnurl-pay" || addressType === "rgb" && !decodedRgbInvoice?.assignment?.value || addressType === "lightning" && !decodedLnInvoice?.amount && !decodedLnInvoice?.asset_amount;
|
|
4793
|
+
const enteredNum = parseFloat(amount.replace(/[^\d.-]/g, "") || "0") || 0;
|
|
4794
|
+
const balanceNum = parseFloat(formattedBalance.replace(/,/g, "") || "0") || 0;
|
|
4795
|
+
const isOverBalance = enteredNum > 0 && balanceNum > 0 && enteredNum > balanceNum;
|
|
4798
4796
|
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
|
|
4799
|
-
showAmountInput && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "space-y-
|
|
4797
|
+
showAmountInput && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "space-y-3", children: [
|
|
4800
4798
|
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("label", { className: "ml-1 text-xs font-bold uppercase tracking-wider text-muted-foreground", children: "Amount" }),
|
|
4801
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "
|
|
4802
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.
|
|
4803
|
-
|
|
4799
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "overflow-hidden rounded-2xl bg-card/70", children: [
|
|
4800
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex items-center gap-3 px-4 pt-3.5 pb-2.5", children: [
|
|
4801
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
4802
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
4803
|
+
"input",
|
|
4804
|
+
{
|
|
4805
|
+
type: "text",
|
|
4806
|
+
inputMode: "decimal",
|
|
4807
|
+
className: "w-full bg-transparent text-2xl font-bold text-white outline-none placeholder:text-white/15",
|
|
4808
|
+
placeholder: "0",
|
|
4809
|
+
value: amount,
|
|
4810
|
+
onChange: handleAmountChange
|
|
4811
|
+
}
|
|
4812
|
+
),
|
|
4813
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { className: "mt-0.5 text-xs text-muted-foreground", children: unitLabel })
|
|
4814
|
+
] }),
|
|
4804
4815
|
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
4805
|
-
"
|
|
4816
|
+
"button",
|
|
4806
4817
|
{
|
|
4807
|
-
type: "
|
|
4808
|
-
|
|
4809
|
-
|
|
4810
|
-
|
|
4811
|
-
value: amount,
|
|
4812
|
-
onChange: handleAmountChange
|
|
4818
|
+
type: "button",
|
|
4819
|
+
className: "shrink-0 rounded-lg bg-primary/15 px-3 py-1.5 text-xxs font-bold uppercase tracking-wider text-primary transition-colors hover:bg-primary/25",
|
|
4820
|
+
onClick: handleSetMax,
|
|
4821
|
+
children: "Max"
|
|
4813
4822
|
}
|
|
4814
|
-
)
|
|
4815
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "text-xl font-medium text-muted-foreground", children: unitLabel })
|
|
4823
|
+
)
|
|
4816
4824
|
] }),
|
|
4817
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.
|
|
4818
|
-
"
|
|
4819
|
-
|
|
4820
|
-
|
|
4821
|
-
|
|
4822
|
-
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
" ",
|
|
4831
|
-
unitLabel
|
|
4825
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: cn(
|
|
4826
|
+
"flex items-center justify-between border-t border-white/[0.05] px-4 py-2"
|
|
4827
|
+
), children: [
|
|
4828
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "text-xxs text-white/40", children: "Available" }),
|
|
4829
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("span", { className: cn(
|
|
4830
|
+
"tabular-nums text-xxs font-medium",
|
|
4831
|
+
isOverBalance ? "text-danger" : "text-white/55"
|
|
4832
|
+
), children: [
|
|
4833
|
+
formattedBalance,
|
|
4834
|
+
" ",
|
|
4835
|
+
unitLabel
|
|
4836
|
+
] })
|
|
4837
|
+
] })
|
|
4832
4838
|
] }),
|
|
4833
|
-
lnurlPayData && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "
|
|
4839
|
+
lnurlPayData && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "space-y-1 px-1", children: [
|
|
4834
4840
|
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("p", { className: "text-xs text-muted-foreground", children: [
|
|
4835
4841
|
Math.ceil(lnurlPayData.params.min).toLocaleString(),
|
|
4836
4842
|
" \u2013",
|
|
@@ -5020,9 +5026,25 @@ function RouteChoiceCard({
|
|
|
5020
5026
|
route,
|
|
5021
5027
|
selected,
|
|
5022
5028
|
recommended,
|
|
5023
|
-
onClick
|
|
5029
|
+
onClick,
|
|
5030
|
+
displayOnly
|
|
5024
5031
|
}) {
|
|
5025
5032
|
const { disabled = false, disabledReason, accountIcon, balanceLabel } = route;
|
|
5033
|
+
if (displayOnly) {
|
|
5034
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "rounded-2xl bg-card/50 px-4 py-3.5", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex items-center justify-between gap-3", children: [
|
|
5035
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex min-w-0 items-center gap-3", children: [
|
|
5036
|
+
accountIcon && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "shrink-0", children: accountIcon }),
|
|
5037
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "min-w-0", children: [
|
|
5038
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "text-sm font-semibold text-white", children: route.accountTitle }),
|
|
5039
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { className: "mt-0.5 text-xs text-white/45", children: route.methodLabel })
|
|
5040
|
+
] })
|
|
5041
|
+
] }),
|
|
5042
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex shrink-0 flex-col items-end gap-1", children: [
|
|
5043
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "text-xxs font-bold uppercase tracking-wider text-white/35", children: route.feeHint }),
|
|
5044
|
+
balanceLabel && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "font-mono text-xxs text-white/50", children: balanceLabel })
|
|
5045
|
+
] })
|
|
5046
|
+
] }) });
|
|
5047
|
+
}
|
|
5026
5048
|
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
5027
5049
|
"button",
|
|
5028
5050
|
{
|
|
@@ -5064,33 +5086,22 @@ function WithdrawRouteSelector({
|
|
|
5064
5086
|
routes,
|
|
5065
5087
|
activeRouteAccount,
|
|
5066
5088
|
recommendedRouteAccount,
|
|
5067
|
-
selectedRouteSummary,
|
|
5068
|
-
selectedAccountTitle,
|
|
5069
5089
|
onRouteChange
|
|
5070
5090
|
}) {
|
|
5071
|
-
|
|
5072
|
-
|
|
5073
|
-
|
|
5074
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { className: "ml-1 mt-1 text-xs text-muted-foreground", children: "Choose the account to spend from. The transfer method is derived from the destination you entered." })
|
|
5075
|
-
] }),
|
|
5091
|
+
const isDisplayOnly = routes.length === 1 && !routes[0].disabled;
|
|
5092
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "space-y-2", children: [
|
|
5093
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("label", { className: "ml-1 text-xs font-bold uppercase tracking-wider text-muted-foreground", children: "Route" }),
|
|
5076
5094
|
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "space-y-2", children: routes.map((route) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
5077
5095
|
RouteChoiceCard,
|
|
5078
5096
|
{
|
|
5079
5097
|
route,
|
|
5080
5098
|
selected: activeRouteAccount === route.account,
|
|
5081
5099
|
recommended: recommendedRouteAccount === route.account,
|
|
5082
|
-
onClick: () => onRouteChange(route.account)
|
|
5100
|
+
onClick: () => onRouteChange(route.account),
|
|
5101
|
+
displayOnly: isDisplayOnly
|
|
5083
5102
|
},
|
|
5084
5103
|
route.account
|
|
5085
|
-
)) })
|
|
5086
|
-
selectedRouteSummary && activeRouteAccount && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "rounded-2xl border bg-white/4 p-4", children: [
|
|
5087
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex items-center justify-between gap-3", children: [
|
|
5088
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "text-xs uppercase tracking-wider text-white/35", children: "Selected path" }),
|
|
5089
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "text-xs font-bold text-white", children: selectedAccountTitle })
|
|
5090
|
-
] }),
|
|
5091
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { className: "mt-2 text-sm font-semibold text-white", children: selectedRouteSummary.methodLabel }),
|
|
5092
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { className: "mt-1 text-xs text-muted-foreground", children: selectedRouteSummary.summary })
|
|
5093
|
-
] })
|
|
5104
|
+
)) })
|
|
5094
5105
|
] });
|
|
5095
5106
|
}
|
|
5096
5107
|
|
|
@@ -5115,7 +5126,7 @@ function WithdrawConfirmation({
|
|
|
5115
5126
|
amount,
|
|
5116
5127
|
handleConfirmSend
|
|
5117
5128
|
}) {
|
|
5118
|
-
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "relative
|
|
5129
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "relative flex h-screen flex-col overflow-hidden bg-background font-display text-foreground", children: [
|
|
5119
5130
|
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "absolute left-4 top-4 z-30", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
5120
5131
|
Button,
|
|
5121
5132
|
{
|
|
@@ -5132,7 +5143,7 @@ function WithdrawConfirmation({
|
|
|
5132
5143
|
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Icon, { name: "arrow_back", size: "xl" })
|
|
5133
5144
|
}
|
|
5134
5145
|
) }),
|
|
5135
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("main", { className: "space-y-6
|
|
5146
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ScrollArea, { className: "flex-1", viewportClassName: "px-5 pt-16 pb-6", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("main", { className: "space-y-6", children: [
|
|
5136
5147
|
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex flex-col items-center py-6", children: [
|
|
5137
5148
|
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "mb-1 text-sm uppercase tracking-wide text-muted-foreground", children: "Sending" }),
|
|
5138
5149
|
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("h1", { className: "mb-2 text-4xl font-bold", children: displayAmount.toLocaleString() }),
|
|
@@ -5213,7 +5224,7 @@ function WithdrawConfirmation({
|
|
|
5213
5224
|
] })
|
|
5214
5225
|
}
|
|
5215
5226
|
)
|
|
5216
|
-
] })
|
|
5227
|
+
] }) })
|
|
5217
5228
|
] });
|
|
5218
5229
|
}
|
|
5219
5230
|
|
|
@@ -7632,7 +7643,7 @@ function DepositAssetSelection({
|
|
|
7632
7643
|
{
|
|
7633
7644
|
autoFocus: true,
|
|
7634
7645
|
"data-testid": "deposit-asset-search",
|
|
7635
|
-
className: "w-full rounded-xl border border-
|
|
7646
|
+
className: "w-full rounded-xl border border-transparent bg-white/5 py-2.5 pl-10 pr-4 text-sm text-white outline-none transition-all placeholder:text-white/25 focus:border-primary/40 focus:bg-white/8",
|
|
7636
7647
|
onChange: (event) => setSearchQuery(event.target.value),
|
|
7637
7648
|
placeholder: "Search assets...",
|
|
7638
7649
|
type: "text",
|
|
@@ -7646,15 +7657,15 @@ function DepositAssetSelection({
|
|
|
7646
7657
|
{
|
|
7647
7658
|
type: "button",
|
|
7648
7659
|
"data-testid": "deposit-asset-btc",
|
|
7649
|
-
className: "group flex w-full items-center gap-3 rounded-2xl bg-white/3 px-4 py-3 text-sm transition-all hover:bg-accent",
|
|
7660
|
+
className: "group flex w-full min-w-0 items-center gap-3 overflow-hidden rounded-2xl bg-white/3 px-4 py-3 text-sm transition-all hover:bg-accent",
|
|
7650
7661
|
onClick: () => onSelectAsset(btcAsset),
|
|
7651
7662
|
children: [
|
|
7652
|
-
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(AssetIcon, { ticker: "BTC", size: 40 }),
|
|
7663
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(AssetIcon, { ticker: "BTC", size: 40, className: "flex-shrink-0" }),
|
|
7653
7664
|
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "min-w-0 flex-1 text-left", children: [
|
|
7654
7665
|
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "font-bold tracking-wide text-white transition-colors group-hover:text-primary/90", children: "Bitcoin" }),
|
|
7655
7666
|
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "mt-0.5 text-xs text-white/40", children: "Choose destination account next" })
|
|
7656
7667
|
] }),
|
|
7657
|
-
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "
|
|
7668
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "hidden min-w-0 max-w-[42%] flex-shrink flex-wrap justify-end gap-1 min-[380px]:flex", children: [
|
|
7658
7669
|
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(NetworkBadge, { network: "L1", size: "sm" }),
|
|
7659
7670
|
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(NetworkBadge, { network: "LN", size: "sm" }),
|
|
7660
7671
|
isSparkConnected && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(NetworkBadge, { network: "Spark", size: "sm" }),
|
|
@@ -7683,7 +7694,7 @@ function DepositAssetSelection({
|
|
|
7683
7694
|
),
|
|
7684
7695
|
children: [
|
|
7685
7696
|
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "text-xxs font-bold uppercase tracking-[0.18em] text-white/55", children: "Your assets" }),
|
|
7686
|
-
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "rounded-full bg-white/10
|
|
7697
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "inline-flex size-5 items-center justify-center rounded-full bg-white/10 text-tiny font-bold text-white/70", children: ownedAssetsCount }),
|
|
7687
7698
|
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "flex-1" }),
|
|
7688
7699
|
!isSearching && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "material-symbols-outlined text-icon-md text-white/40", children: showOwnedAssets ? "expand_less" : "expand_more" })
|
|
7689
7700
|
]
|
|
@@ -7697,12 +7708,12 @@ function DepositAssetSelection({
|
|
|
7697
7708
|
{
|
|
7698
7709
|
type: "button",
|
|
7699
7710
|
"data-testid": `deposit-asset-${asset.asset_id}`,
|
|
7700
|
-
className: "group flex w-full items-center gap-3 rounded-2xl border border-white/8 bg-white/3 px-4 py-3 text-sm transition-all hover:border-border hover:bg-accent",
|
|
7711
|
+
className: "group flex w-full min-w-0 items-center gap-3 overflow-hidden rounded-2xl border border-white/8 bg-white/3 px-4 py-3 text-sm transition-all hover:border-border hover:bg-accent",
|
|
7701
7712
|
onClick: () => onSelectAsset(asset),
|
|
7702
7713
|
children: [
|
|
7703
7714
|
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(AssetIcon, { ticker: asset.ticker, size: 40, className: "flex-shrink-0" }),
|
|
7704
7715
|
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "min-w-0 flex-1 text-left", children: [
|
|
7705
|
-
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "flex items-center gap-1.5", children: [
|
|
7716
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "flex min-w-0 items-center gap-1.5", children: [
|
|
7706
7717
|
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "truncate font-bold tracking-wide text-white transition-colors group-hover:text-primary/90", children: asset.ticker }),
|
|
7707
7718
|
protocolBadge && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
7708
7719
|
"span",
|
package/dist/web/index.d.cts
CHANGED
|
@@ -645,8 +645,14 @@ interface BalanceBreakdownProps {
|
|
|
645
645
|
onNavigate?: (view: 'deposit' | 'swap' | 'withdraw') => void;
|
|
646
646
|
/** Reduce vertical padding/margins so the card occupies less of the viewport. */
|
|
647
647
|
compact?: boolean;
|
|
648
|
+
/**
|
|
649
|
+
* Sats-equivalent value of all non-BTC assets with known USD prices
|
|
650
|
+
* (e.g. stablecoins). Included in totalBTC for the headline; surfaced
|
|
651
|
+
* separately here so the expanded breakdown can show it as its own row.
|
|
652
|
+
*/
|
|
653
|
+
tokenValueSats?: number;
|
|
648
654
|
}
|
|
649
|
-
declare function BalanceBreakdown({ btcOnchain, btcLightning, btcSpark, btcArkade, totalBTC, rgbAssets, accounts, nodeInfo, balanceVisible, format, formatFiatValue, unit, label, cycle, isLoading, isPartial, btcOnchainPending, btcLightningPending, btcSparkPending, btcArkadePending, onRefresh, isRefreshing, onNavigate, compact, }: BalanceBreakdownProps): react_jsx_runtime.JSX.Element;
|
|
655
|
+
declare function BalanceBreakdown({ btcOnchain, btcLightning, btcSpark, btcArkade, totalBTC, rgbAssets, accounts, nodeInfo, balanceVisible, format, formatFiatValue, unit, label, cycle, isLoading, isPartial, btcOnchainPending, btcLightningPending, btcSparkPending, btcArkadePending, onRefresh, isRefreshing, onNavigate, compact, tokenValueSats, }: BalanceBreakdownProps): react_jsx_runtime.JSX.Element;
|
|
650
656
|
|
|
651
657
|
interface AssetSelectorOption {
|
|
652
658
|
id: string;
|
|
@@ -924,7 +930,7 @@ interface WithdrawRouteSelectorProps<TAccount extends string = string> {
|
|
|
924
930
|
selectedAccountTitle?: string;
|
|
925
931
|
onRouteChange: (account: TAccount) => void;
|
|
926
932
|
}
|
|
927
|
-
declare function WithdrawRouteSelector<TAccount extends string = string>({ routes, activeRouteAccount, recommendedRouteAccount,
|
|
933
|
+
declare function WithdrawRouteSelector<TAccount extends string = string>({ routes, activeRouteAccount, recommendedRouteAccount, onRouteChange, }: WithdrawRouteSelectorProps<TAccount>): react_jsx_runtime.JSX.Element;
|
|
928
934
|
|
|
929
935
|
interface WithdrawConfirmationRgbInvoice {
|
|
930
936
|
recipient_type?: string;
|
package/dist/web/index.d.ts
CHANGED
|
@@ -645,8 +645,14 @@ interface BalanceBreakdownProps {
|
|
|
645
645
|
onNavigate?: (view: 'deposit' | 'swap' | 'withdraw') => void;
|
|
646
646
|
/** Reduce vertical padding/margins so the card occupies less of the viewport. */
|
|
647
647
|
compact?: boolean;
|
|
648
|
+
/**
|
|
649
|
+
* Sats-equivalent value of all non-BTC assets with known USD prices
|
|
650
|
+
* (e.g. stablecoins). Included in totalBTC for the headline; surfaced
|
|
651
|
+
* separately here so the expanded breakdown can show it as its own row.
|
|
652
|
+
*/
|
|
653
|
+
tokenValueSats?: number;
|
|
648
654
|
}
|
|
649
|
-
declare function BalanceBreakdown({ btcOnchain, btcLightning, btcSpark, btcArkade, totalBTC, rgbAssets, accounts, nodeInfo, balanceVisible, format, formatFiatValue, unit, label, cycle, isLoading, isPartial, btcOnchainPending, btcLightningPending, btcSparkPending, btcArkadePending, onRefresh, isRefreshing, onNavigate, compact, }: BalanceBreakdownProps): react_jsx_runtime.JSX.Element;
|
|
655
|
+
declare function BalanceBreakdown({ btcOnchain, btcLightning, btcSpark, btcArkade, totalBTC, rgbAssets, accounts, nodeInfo, balanceVisible, format, formatFiatValue, unit, label, cycle, isLoading, isPartial, btcOnchainPending, btcLightningPending, btcSparkPending, btcArkadePending, onRefresh, isRefreshing, onNavigate, compact, tokenValueSats, }: BalanceBreakdownProps): react_jsx_runtime.JSX.Element;
|
|
650
656
|
|
|
651
657
|
interface AssetSelectorOption {
|
|
652
658
|
id: string;
|
|
@@ -924,7 +930,7 @@ interface WithdrawRouteSelectorProps<TAccount extends string = string> {
|
|
|
924
930
|
selectedAccountTitle?: string;
|
|
925
931
|
onRouteChange: (account: TAccount) => void;
|
|
926
932
|
}
|
|
927
|
-
declare function WithdrawRouteSelector<TAccount extends string = string>({ routes, activeRouteAccount, recommendedRouteAccount,
|
|
933
|
+
declare function WithdrawRouteSelector<TAccount extends string = string>({ routes, activeRouteAccount, recommendedRouteAccount, onRouteChange, }: WithdrawRouteSelectorProps<TAccount>): react_jsx_runtime.JSX.Element;
|
|
928
934
|
|
|
929
935
|
interface WithdrawConfirmationRgbInvoice {
|
|
930
936
|
recipient_type?: string;
|
package/dist/web/index.js
CHANGED
|
@@ -2470,7 +2470,7 @@ function InlineSelector({
|
|
|
2470
2470
|
),
|
|
2471
2471
|
children: [
|
|
2472
2472
|
renderPanelHeader?.(renderArgs),
|
|
2473
|
-
/* @__PURE__ */ jsx29("div", { className: "
|
|
2473
|
+
/* @__PURE__ */ jsx29("div", { className: "space-y-1", children: options.length === 0 ? /* @__PURE__ */ jsxs16("div", { className: "flex flex-col items-center gap-2 px-4 py-8 text-center text-sm text-white/30", children: [
|
|
2474
2474
|
/* @__PURE__ */ jsx29(Icon, { name: "search", size: "md", className: "opacity-40" }),
|
|
2475
2475
|
/* @__PURE__ */ jsx29("span", { children: "No results" })
|
|
2476
2476
|
] }) : options.map((option) => {
|
|
@@ -3218,7 +3218,8 @@ function BalanceBreakdown({
|
|
|
3218
3218
|
onRefresh,
|
|
3219
3219
|
isRefreshing = false,
|
|
3220
3220
|
onNavigate,
|
|
3221
|
-
compact = false
|
|
3221
|
+
compact = false,
|
|
3222
|
+
tokenValueSats
|
|
3222
3223
|
}) {
|
|
3223
3224
|
const [expanded, setExpanded] = useState10(false);
|
|
3224
3225
|
const fiatTotal = formatFiatValue(totalBTC);
|
|
@@ -3241,7 +3242,7 @@ function BalanceBreakdown({
|
|
|
3241
3242
|
/* @__PURE__ */ jsx36("div", { className: "h-9 w-36 animate-pulse rounded-lg bg-white/10" }),
|
|
3242
3243
|
/* @__PURE__ */ jsx36("div", { className: "h-3 w-20 animate-pulse rounded bg-white/5" })
|
|
3243
3244
|
] }) : /* @__PURE__ */ jsxs23(Fragment5, { children: [
|
|
3244
|
-
/* @__PURE__ */ jsxs23("div", { className: "flex min-w-0 max-w-full flex-wrap items-baseline gap-x-
|
|
3245
|
+
/* @__PURE__ */ jsxs23("div", { className: "flex min-w-0 max-w-full flex-wrap items-baseline gap-x-1.5 gap-y-1", children: [
|
|
3245
3246
|
/* @__PURE__ */ jsx36("span", { className: "text-display font-black leading-[1.1] tracking-tighter text-white drop-shadow-sm transition-all duration-300 group-active:scale-95 group-active:text-primary", children: balanceVisible ? numberOnly(format(totalBTC)) : "\u2022\u2022\u2022\u2022\u2022\u2022" }),
|
|
3246
3247
|
unit !== "fiat" && /* @__PURE__ */ jsx36("span", { className: "inline-block rounded-md border border-white/10 bg-white/5 px-2 py-0.5 text-tiny font-bold uppercase tracking-widest text-white/45", children: label }),
|
|
3247
3248
|
isPartial && /* @__PURE__ */ jsx36(
|
|
@@ -3384,6 +3385,23 @@ function BalanceBreakdown({
|
|
|
3384
3385
|
}
|
|
3385
3386
|
),
|
|
3386
3387
|
rgbAssets.length > 0 && /* @__PURE__ */ jsx36(RgbAssetsBreakdown, { assets: rgbAssets, balanceVisible }),
|
|
3388
|
+
tokenValueSats !== void 0 && tokenValueSats > 0 && /* @__PURE__ */ jsxs23("div", { className: "mt-3 border-t border-white/[0.08] pt-4", children: [
|
|
3389
|
+
/* @__PURE__ */ jsx36("p", { className: "mb-3 text-xxs font-bold uppercase tracking-widest text-white/30", children: "Token Holdings" }),
|
|
3390
|
+
/* @__PURE__ */ jsxs23("div", { className: "flex items-center justify-between rounded-xl bg-white/[0.03] px-3 py-2", children: [
|
|
3391
|
+
/* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-3", children: [
|
|
3392
|
+
/* @__PURE__ */ jsx36("div", { className: "h-7 w-0.5 rounded-full bg-success opacity-80" }),
|
|
3393
|
+
/* @__PURE__ */ jsx36("div", { className: "flex size-7 items-center justify-center rounded-lg bg-white/5 text-icon-sm", children: /* @__PURE__ */ jsx36("span", { className: "material-symbols-outlined leading-none", style: { fontSize: "inherit" }, children: "payments" }) }),
|
|
3394
|
+
/* @__PURE__ */ jsxs23("div", { className: "flex flex-col", children: [
|
|
3395
|
+
/* @__PURE__ */ jsx36("span", { className: "text-xs font-semibold leading-tight text-white/80", children: "Stablecoins & Tokens" }),
|
|
3396
|
+
/* @__PURE__ */ jsx36("span", { className: "mt-0.5 text-xxs font-medium leading-tight text-white/30", children: "Converted value in BTC" })
|
|
3397
|
+
] })
|
|
3398
|
+
] }),
|
|
3399
|
+
/* @__PURE__ */ jsxs23("div", { className: "flex flex-col items-end", children: [
|
|
3400
|
+
/* @__PURE__ */ jsx36("span", { className: "tabular-nums text-xs font-bold text-white", children: balanceVisible ? format(tokenValueSats) : "\u2022\u2022\u2022\u2022\u2022\u2022" }),
|
|
3401
|
+
balanceVisible && /* @__PURE__ */ jsx36("span", { className: "mt-0.5 font-mono text-xxs text-white/35", children: formatFiatValue(tokenValueSats) })
|
|
3402
|
+
] })
|
|
3403
|
+
] })
|
|
3404
|
+
] }),
|
|
3387
3405
|
accounts.RGB?.connected && nodeInfo?.pubkey && /* @__PURE__ */ jsxs23("div", { className: "mt-3 border-t border-white/[0.08] pt-4", children: [
|
|
3388
3406
|
/* @__PURE__ */ jsx36("p", { className: "mb-3 text-xxs font-bold uppercase tracking-widest text-white/30", children: "RLN Details" }),
|
|
3389
3407
|
/* @__PURE__ */ jsxs23("div", { className: "grid grid-cols-3 gap-2", children: [
|
|
@@ -3604,25 +3622,14 @@ function AssetSelector({
|
|
|
3604
3622
|
}
|
|
3605
3623
|
),
|
|
3606
3624
|
/* @__PURE__ */ jsxs24("span", { className: "flex min-w-0 flex-1 items-center justify-between gap-3 text-left", children: [
|
|
3607
|
-
/* @__PURE__ */
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
),
|
|
3616
|
-
option.network && /* @__PURE__ */ jsx37("span", { className: "mt-1", children: /* @__PURE__ */ jsx37(
|
|
3617
|
-
NetworkBadge,
|
|
3618
|
-
{
|
|
3619
|
-
network: option.network,
|
|
3620
|
-
showLabel: true,
|
|
3621
|
-
size: "sm",
|
|
3622
|
-
className: "py-[1px]"
|
|
3623
|
-
}
|
|
3624
|
-
) })
|
|
3625
|
-
] }),
|
|
3625
|
+
/* @__PURE__ */ jsx37("span", { className: "min-w-0 flex flex-col leading-tight", children: /* @__PURE__ */ jsx37(
|
|
3626
|
+
"span",
|
|
3627
|
+
{
|
|
3628
|
+
className: "max-w-full truncate text-base font-bold tracking-wide text-white",
|
|
3629
|
+
title: option.name ?? option.ticker,
|
|
3630
|
+
children: option.name ?? option.ticker
|
|
3631
|
+
}
|
|
3632
|
+
) }),
|
|
3626
3633
|
/* @__PURE__ */ jsxs24("span", { className: "flex shrink-0 flex-col items-end gap-0.5", children: [
|
|
3627
3634
|
optionSelected ? /* @__PURE__ */ jsx37("span", { className: "rounded-full border border-primary/25 bg-primary/[0.14] px-2 py-0.5 text-xxs font-bold uppercase tracking-wide text-primary", children: "Current" }) : optionCategoryLabel && /* @__PURE__ */ jsx37("span", { className: "rounded-full bg-surface-card px-2 py-0.5 text-tiny font-bold uppercase tracking-wide text-text-dimmed shadow-inner", children: optionCategoryLabel }),
|
|
3628
3635
|
/* @__PURE__ */ jsx37(
|
|
@@ -3696,8 +3703,7 @@ function AssetSelector({
|
|
|
3696
3703
|
] }),
|
|
3697
3704
|
selected && /* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-2 rounded-full bg-white/5 px-2.5 py-1", children: [
|
|
3698
3705
|
/* @__PURE__ */ jsx37(AssetIcon, { ticker: selected.ticker, logoUri: selected.icon, size: 18 }),
|
|
3699
|
-
/* @__PURE__ */ jsx37("span", { className: "text-tiny font-semibold text-white", children: selected.ticker })
|
|
3700
|
-
selected.network && /* @__PURE__ */ jsx37(NetworkBadge, { network: selected.network, showLabel: true, className: "py-[1px]" })
|
|
3706
|
+
/* @__PURE__ */ jsx37("span", { className: "text-tiny font-semibold text-white", children: selected.ticker })
|
|
3701
3707
|
] })
|
|
3702
3708
|
] }) }),
|
|
3703
3709
|
/* @__PURE__ */ jsxs24("div", { className: "flex-shrink-0 px-4 py-3", children: [
|
|
@@ -3811,21 +3817,11 @@ function AssetSelector({
|
|
|
3811
3817
|
onOpenPanelHeightChange,
|
|
3812
3818
|
renderTrigger: ({ open: open2 }) => /* @__PURE__ */ jsxs24("span", { className: "block", children: [
|
|
3813
3819
|
/* @__PURE__ */ jsx37("span", { className: "mb-1.5 ml-1 block text-xs font-semibold uppercase tracking-wider text-white/40", children: label }),
|
|
3814
|
-
/* @__PURE__ */ jsxs24("span", { className: "flex w-full items-center justify-between rounded-
|
|
3820
|
+
/* @__PURE__ */ jsxs24("span", { className: "flex w-full items-center justify-between rounded-2xl bg-card/70 px-4 py-3 text-left transition-all duration-200 hover:bg-card/90", children: [
|
|
3815
3821
|
/* @__PURE__ */ jsx37("span", { className: "flex items-center gap-3", children: selected ? /* @__PURE__ */ jsxs24(Fragment6, { children: [
|
|
3816
3822
|
/* @__PURE__ */ jsx37(AssetIcon, { ticker: selected.ticker, logoUri: selected.icon, size: 32 }),
|
|
3817
3823
|
/* @__PURE__ */ jsxs24("span", { children: [
|
|
3818
|
-
/* @__PURE__ */
|
|
3819
|
-
selected.ticker,
|
|
3820
|
-
selected.network && /* @__PURE__ */ jsx37(
|
|
3821
|
-
NetworkBadge,
|
|
3822
|
-
{
|
|
3823
|
-
network: selected.network,
|
|
3824
|
-
showLabel: true,
|
|
3825
|
-
className: "px-1.5 py-0 text-xxs"
|
|
3826
|
-
}
|
|
3827
|
-
)
|
|
3828
|
-
] }),
|
|
3824
|
+
/* @__PURE__ */ jsx37("span", { className: "text-sm font-semibold text-white", children: selected.ticker }),
|
|
3829
3825
|
/* @__PURE__ */ jsx37("span", { className: "mt-0.5 block text-xs text-white/35", children: selected.name })
|
|
3830
3826
|
] })
|
|
3831
3827
|
] }) : /* @__PURE__ */ jsx37("span", { className: "text-sm text-white/35", children: "Select asset..." }) }),
|
|
@@ -3858,8 +3854,7 @@ function AssetSelector({
|
|
|
3858
3854
|
] }),
|
|
3859
3855
|
selected && /* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-2 rounded-full bg-white/5 px-2.5 py-1", children: [
|
|
3860
3856
|
/* @__PURE__ */ jsx37(AssetIcon, { ticker: selected.ticker, logoUri: selected.icon, size: 18 }),
|
|
3861
|
-
/* @__PURE__ */ jsx37("span", { className: "text-tiny font-semibold text-white", children: selected.ticker })
|
|
3862
|
-
selected.network && /* @__PURE__ */ jsx37(NetworkBadge, { network: selected.network, showLabel: true, className: "py-[1px]" })
|
|
3857
|
+
/* @__PURE__ */ jsx37("span", { className: "text-tiny font-semibold text-white", children: selected.ticker })
|
|
3863
3858
|
] })
|
|
3864
3859
|
] }) }),
|
|
3865
3860
|
/* @__PURE__ */ jsxs24("div", { className: "px-4 py-3", children: [
|
|
@@ -4634,42 +4629,53 @@ function WithdrawAmountInput({
|
|
|
4634
4629
|
}) {
|
|
4635
4630
|
const unitLabel = selectedAssetId === "BTC" ? "sats" : selectedAssetTicker ?? "units";
|
|
4636
4631
|
const showAmountInput = addressType === "bitcoin" || addressType === "spark" || addressType === "arkade" || addressType === "lightning-address" || addressType === "lnurl-pay" || addressType === "rgb" && !decodedRgbInvoice?.assignment?.value || addressType === "lightning" && !decodedLnInvoice?.amount && !decodedLnInvoice?.asset_amount;
|
|
4632
|
+
const enteredNum = parseFloat(amount.replace(/[^\d.-]/g, "") || "0") || 0;
|
|
4633
|
+
const balanceNum = parseFloat(formattedBalance.replace(/,/g, "") || "0") || 0;
|
|
4634
|
+
const isOverBalance = enteredNum > 0 && balanceNum > 0 && enteredNum > balanceNum;
|
|
4637
4635
|
return /* @__PURE__ */ jsxs33(Fragment9, { children: [
|
|
4638
|
-
showAmountInput && /* @__PURE__ */ jsxs33("div", { className: "space-y-
|
|
4636
|
+
showAmountInput && /* @__PURE__ */ jsxs33("div", { className: "space-y-3", children: [
|
|
4639
4637
|
/* @__PURE__ */ jsx46("label", { className: "ml-1 text-xs font-bold uppercase tracking-wider text-muted-foreground", children: "Amount" }),
|
|
4640
|
-
/* @__PURE__ */ jsxs33("div", { className: "
|
|
4641
|
-
/* @__PURE__ */
|
|
4642
|
-
|
|
4638
|
+
/* @__PURE__ */ jsxs33("div", { className: "overflow-hidden rounded-2xl bg-card/70", children: [
|
|
4639
|
+
/* @__PURE__ */ jsxs33("div", { className: "flex items-center gap-3 px-4 pt-3.5 pb-2.5", children: [
|
|
4640
|
+
/* @__PURE__ */ jsxs33("div", { className: "min-w-0 flex-1", children: [
|
|
4641
|
+
/* @__PURE__ */ jsx46(
|
|
4642
|
+
"input",
|
|
4643
|
+
{
|
|
4644
|
+
type: "text",
|
|
4645
|
+
inputMode: "decimal",
|
|
4646
|
+
className: "w-full bg-transparent text-2xl font-bold text-white outline-none placeholder:text-white/15",
|
|
4647
|
+
placeholder: "0",
|
|
4648
|
+
value: amount,
|
|
4649
|
+
onChange: handleAmountChange
|
|
4650
|
+
}
|
|
4651
|
+
),
|
|
4652
|
+
/* @__PURE__ */ jsx46("p", { className: "mt-0.5 text-xs text-muted-foreground", children: unitLabel })
|
|
4653
|
+
] }),
|
|
4643
4654
|
/* @__PURE__ */ jsx46(
|
|
4644
|
-
"
|
|
4655
|
+
"button",
|
|
4645
4656
|
{
|
|
4646
|
-
type: "
|
|
4647
|
-
|
|
4648
|
-
|
|
4649
|
-
|
|
4650
|
-
value: amount,
|
|
4651
|
-
onChange: handleAmountChange
|
|
4657
|
+
type: "button",
|
|
4658
|
+
className: "shrink-0 rounded-lg bg-primary/15 px-3 py-1.5 text-xxs font-bold uppercase tracking-wider text-primary transition-colors hover:bg-primary/25",
|
|
4659
|
+
onClick: handleSetMax,
|
|
4660
|
+
children: "Max"
|
|
4652
4661
|
}
|
|
4653
|
-
)
|
|
4654
|
-
/* @__PURE__ */ jsx46("span", { className: "text-xl font-medium text-muted-foreground", children: unitLabel })
|
|
4662
|
+
)
|
|
4655
4663
|
] }),
|
|
4656
|
-
/* @__PURE__ */
|
|
4657
|
-
"
|
|
4658
|
-
|
|
4659
|
-
|
|
4660
|
-
|
|
4661
|
-
|
|
4662
|
-
|
|
4663
|
-
|
|
4664
|
-
|
|
4665
|
-
|
|
4666
|
-
|
|
4667
|
-
|
|
4668
|
-
|
|
4669
|
-
" ",
|
|
4670
|
-
unitLabel
|
|
4664
|
+
/* @__PURE__ */ jsxs33("div", { className: cn(
|
|
4665
|
+
"flex items-center justify-between border-t border-white/[0.05] px-4 py-2"
|
|
4666
|
+
), children: [
|
|
4667
|
+
/* @__PURE__ */ jsx46("span", { className: "text-xxs text-white/40", children: "Available" }),
|
|
4668
|
+
/* @__PURE__ */ jsxs33("span", { className: cn(
|
|
4669
|
+
"tabular-nums text-xxs font-medium",
|
|
4670
|
+
isOverBalance ? "text-danger" : "text-white/55"
|
|
4671
|
+
), children: [
|
|
4672
|
+
formattedBalance,
|
|
4673
|
+
" ",
|
|
4674
|
+
unitLabel
|
|
4675
|
+
] })
|
|
4676
|
+
] })
|
|
4671
4677
|
] }),
|
|
4672
|
-
lnurlPayData && /* @__PURE__ */ jsxs33("div", { className: "
|
|
4678
|
+
lnurlPayData && /* @__PURE__ */ jsxs33("div", { className: "space-y-1 px-1", children: [
|
|
4673
4679
|
/* @__PURE__ */ jsxs33("p", { className: "text-xs text-muted-foreground", children: [
|
|
4674
4680
|
Math.ceil(lnurlPayData.params.min).toLocaleString(),
|
|
4675
4681
|
" \u2013",
|
|
@@ -4859,9 +4865,25 @@ function RouteChoiceCard({
|
|
|
4859
4865
|
route,
|
|
4860
4866
|
selected,
|
|
4861
4867
|
recommended,
|
|
4862
|
-
onClick
|
|
4868
|
+
onClick,
|
|
4869
|
+
displayOnly
|
|
4863
4870
|
}) {
|
|
4864
4871
|
const { disabled = false, disabledReason, accountIcon, balanceLabel } = route;
|
|
4872
|
+
if (displayOnly) {
|
|
4873
|
+
return /* @__PURE__ */ jsx48("div", { className: "rounded-2xl bg-card/50 px-4 py-3.5", children: /* @__PURE__ */ jsxs35("div", { className: "flex items-center justify-between gap-3", children: [
|
|
4874
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex min-w-0 items-center gap-3", children: [
|
|
4875
|
+
accountIcon && /* @__PURE__ */ jsx48("div", { className: "shrink-0", children: accountIcon }),
|
|
4876
|
+
/* @__PURE__ */ jsxs35("div", { className: "min-w-0", children: [
|
|
4877
|
+
/* @__PURE__ */ jsx48("span", { className: "text-sm font-semibold text-white", children: route.accountTitle }),
|
|
4878
|
+
/* @__PURE__ */ jsx48("p", { className: "mt-0.5 text-xs text-white/45", children: route.methodLabel })
|
|
4879
|
+
] })
|
|
4880
|
+
] }),
|
|
4881
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex shrink-0 flex-col items-end gap-1", children: [
|
|
4882
|
+
/* @__PURE__ */ jsx48("span", { className: "text-xxs font-bold uppercase tracking-wider text-white/35", children: route.feeHint }),
|
|
4883
|
+
balanceLabel && /* @__PURE__ */ jsx48("span", { className: "font-mono text-xxs text-white/50", children: balanceLabel })
|
|
4884
|
+
] })
|
|
4885
|
+
] }) });
|
|
4886
|
+
}
|
|
4865
4887
|
return /* @__PURE__ */ jsxs35(
|
|
4866
4888
|
"button",
|
|
4867
4889
|
{
|
|
@@ -4903,33 +4925,22 @@ function WithdrawRouteSelector({
|
|
|
4903
4925
|
routes,
|
|
4904
4926
|
activeRouteAccount,
|
|
4905
4927
|
recommendedRouteAccount,
|
|
4906
|
-
selectedRouteSummary,
|
|
4907
|
-
selectedAccountTitle,
|
|
4908
4928
|
onRouteChange
|
|
4909
4929
|
}) {
|
|
4910
|
-
|
|
4911
|
-
|
|
4912
|
-
|
|
4913
|
-
/* @__PURE__ */ jsx48("p", { className: "ml-1 mt-1 text-xs text-muted-foreground", children: "Choose the account to spend from. The transfer method is derived from the destination you entered." })
|
|
4914
|
-
] }),
|
|
4930
|
+
const isDisplayOnly = routes.length === 1 && !routes[0].disabled;
|
|
4931
|
+
return /* @__PURE__ */ jsxs35("div", { className: "space-y-2", children: [
|
|
4932
|
+
/* @__PURE__ */ jsx48("label", { className: "ml-1 text-xs font-bold uppercase tracking-wider text-muted-foreground", children: "Route" }),
|
|
4915
4933
|
/* @__PURE__ */ jsx48("div", { className: "space-y-2", children: routes.map((route) => /* @__PURE__ */ jsx48(
|
|
4916
4934
|
RouteChoiceCard,
|
|
4917
4935
|
{
|
|
4918
4936
|
route,
|
|
4919
4937
|
selected: activeRouteAccount === route.account,
|
|
4920
4938
|
recommended: recommendedRouteAccount === route.account,
|
|
4921
|
-
onClick: () => onRouteChange(route.account)
|
|
4939
|
+
onClick: () => onRouteChange(route.account),
|
|
4940
|
+
displayOnly: isDisplayOnly
|
|
4922
4941
|
},
|
|
4923
4942
|
route.account
|
|
4924
|
-
)) })
|
|
4925
|
-
selectedRouteSummary && activeRouteAccount && /* @__PURE__ */ jsxs35("div", { className: "rounded-2xl border bg-white/4 p-4", children: [
|
|
4926
|
-
/* @__PURE__ */ jsxs35("div", { className: "flex items-center justify-between gap-3", children: [
|
|
4927
|
-
/* @__PURE__ */ jsx48("span", { className: "text-xs uppercase tracking-wider text-white/35", children: "Selected path" }),
|
|
4928
|
-
/* @__PURE__ */ jsx48("span", { className: "text-xs font-bold text-white", children: selectedAccountTitle })
|
|
4929
|
-
] }),
|
|
4930
|
-
/* @__PURE__ */ jsx48("p", { className: "mt-2 text-sm font-semibold text-white", children: selectedRouteSummary.methodLabel }),
|
|
4931
|
-
/* @__PURE__ */ jsx48("p", { className: "mt-1 text-xs text-muted-foreground", children: selectedRouteSummary.summary })
|
|
4932
|
-
] })
|
|
4943
|
+
)) })
|
|
4933
4944
|
] });
|
|
4934
4945
|
}
|
|
4935
4946
|
|
|
@@ -4954,7 +4965,7 @@ function WithdrawConfirmation({
|
|
|
4954
4965
|
amount,
|
|
4955
4966
|
handleConfirmSend
|
|
4956
4967
|
}) {
|
|
4957
|
-
return /* @__PURE__ */ jsxs36("div", { className: "relative
|
|
4968
|
+
return /* @__PURE__ */ jsxs36("div", { className: "relative flex h-screen flex-col overflow-hidden bg-background font-display text-foreground", children: [
|
|
4958
4969
|
/* @__PURE__ */ jsx49("div", { className: "absolute left-4 top-4 z-30", children: /* @__PURE__ */ jsx49(
|
|
4959
4970
|
Button,
|
|
4960
4971
|
{
|
|
@@ -4971,7 +4982,7 @@ function WithdrawConfirmation({
|
|
|
4971
4982
|
children: /* @__PURE__ */ jsx49(Icon, { name: "arrow_back", size: "xl" })
|
|
4972
4983
|
}
|
|
4973
4984
|
) }),
|
|
4974
|
-
/* @__PURE__ */ jsxs36("main", { className: "space-y-6
|
|
4985
|
+
/* @__PURE__ */ jsx49(ScrollArea, { className: "flex-1", viewportClassName: "px-5 pt-16 pb-6", children: /* @__PURE__ */ jsxs36("main", { className: "space-y-6", children: [
|
|
4975
4986
|
/* @__PURE__ */ jsxs36("div", { className: "flex flex-col items-center py-6", children: [
|
|
4976
4987
|
/* @__PURE__ */ jsx49("p", { className: "mb-1 text-sm uppercase tracking-wide text-muted-foreground", children: "Sending" }),
|
|
4977
4988
|
/* @__PURE__ */ jsx49("h1", { className: "mb-2 text-4xl font-bold", children: displayAmount.toLocaleString() }),
|
|
@@ -5052,7 +5063,7 @@ function WithdrawConfirmation({
|
|
|
5052
5063
|
] })
|
|
5053
5064
|
}
|
|
5054
5065
|
)
|
|
5055
|
-
] })
|
|
5066
|
+
] }) })
|
|
5056
5067
|
] });
|
|
5057
5068
|
}
|
|
5058
5069
|
|
|
@@ -7471,7 +7482,7 @@ function DepositAssetSelection({
|
|
|
7471
7482
|
{
|
|
7472
7483
|
autoFocus: true,
|
|
7473
7484
|
"data-testid": "deposit-asset-search",
|
|
7474
|
-
className: "w-full rounded-xl border border-
|
|
7485
|
+
className: "w-full rounded-xl border border-transparent bg-white/5 py-2.5 pl-10 pr-4 text-sm text-white outline-none transition-all placeholder:text-white/25 focus:border-primary/40 focus:bg-white/8",
|
|
7475
7486
|
onChange: (event) => setSearchQuery(event.target.value),
|
|
7476
7487
|
placeholder: "Search assets...",
|
|
7477
7488
|
type: "text",
|
|
@@ -7485,15 +7496,15 @@ function DepositAssetSelection({
|
|
|
7485
7496
|
{
|
|
7486
7497
|
type: "button",
|
|
7487
7498
|
"data-testid": "deposit-asset-btc",
|
|
7488
|
-
className: "group flex w-full items-center gap-3 rounded-2xl bg-white/3 px-4 py-3 text-sm transition-all hover:bg-accent",
|
|
7499
|
+
className: "group flex w-full min-w-0 items-center gap-3 overflow-hidden rounded-2xl bg-white/3 px-4 py-3 text-sm transition-all hover:bg-accent",
|
|
7489
7500
|
onClick: () => onSelectAsset(btcAsset),
|
|
7490
7501
|
children: [
|
|
7491
|
-
/* @__PURE__ */ jsx65(AssetIcon, { ticker: "BTC", size: 40 }),
|
|
7502
|
+
/* @__PURE__ */ jsx65(AssetIcon, { ticker: "BTC", size: 40, className: "flex-shrink-0" }),
|
|
7492
7503
|
/* @__PURE__ */ jsxs51("div", { className: "min-w-0 flex-1 text-left", children: [
|
|
7493
7504
|
/* @__PURE__ */ jsx65("div", { className: "font-bold tracking-wide text-white transition-colors group-hover:text-primary/90", children: "Bitcoin" }),
|
|
7494
7505
|
/* @__PURE__ */ jsx65("div", { className: "mt-0.5 text-xs text-white/40", children: "Choose destination account next" })
|
|
7495
7506
|
] }),
|
|
7496
|
-
/* @__PURE__ */ jsxs51("div", { className: "
|
|
7507
|
+
/* @__PURE__ */ jsxs51("div", { className: "hidden min-w-0 max-w-[42%] flex-shrink flex-wrap justify-end gap-1 min-[380px]:flex", children: [
|
|
7497
7508
|
/* @__PURE__ */ jsx65(NetworkBadge, { network: "L1", size: "sm" }),
|
|
7498
7509
|
/* @__PURE__ */ jsx65(NetworkBadge, { network: "LN", size: "sm" }),
|
|
7499
7510
|
isSparkConnected && /* @__PURE__ */ jsx65(NetworkBadge, { network: "Spark", size: "sm" }),
|
|
@@ -7522,7 +7533,7 @@ function DepositAssetSelection({
|
|
|
7522
7533
|
),
|
|
7523
7534
|
children: [
|
|
7524
7535
|
/* @__PURE__ */ jsx65("span", { className: "text-xxs font-bold uppercase tracking-[0.18em] text-white/55", children: "Your assets" }),
|
|
7525
|
-
/* @__PURE__ */ jsx65("span", { className: "rounded-full bg-white/10
|
|
7536
|
+
/* @__PURE__ */ jsx65("span", { className: "inline-flex size-5 items-center justify-center rounded-full bg-white/10 text-tiny font-bold text-white/70", children: ownedAssetsCount }),
|
|
7526
7537
|
/* @__PURE__ */ jsx65("div", { className: "flex-1" }),
|
|
7527
7538
|
!isSearching && /* @__PURE__ */ jsx65("span", { className: "material-symbols-outlined text-icon-md text-white/40", children: showOwnedAssets ? "expand_less" : "expand_more" })
|
|
7528
7539
|
]
|
|
@@ -7536,12 +7547,12 @@ function DepositAssetSelection({
|
|
|
7536
7547
|
{
|
|
7537
7548
|
type: "button",
|
|
7538
7549
|
"data-testid": `deposit-asset-${asset.asset_id}`,
|
|
7539
|
-
className: "group flex w-full items-center gap-3 rounded-2xl border border-white/8 bg-white/3 px-4 py-3 text-sm transition-all hover:border-border hover:bg-accent",
|
|
7550
|
+
className: "group flex w-full min-w-0 items-center gap-3 overflow-hidden rounded-2xl border border-white/8 bg-white/3 px-4 py-3 text-sm transition-all hover:border-border hover:bg-accent",
|
|
7540
7551
|
onClick: () => onSelectAsset(asset),
|
|
7541
7552
|
children: [
|
|
7542
7553
|
/* @__PURE__ */ jsx65(AssetIcon, { ticker: asset.ticker, size: 40, className: "flex-shrink-0" }),
|
|
7543
7554
|
/* @__PURE__ */ jsxs51("div", { className: "min-w-0 flex-1 text-left", children: [
|
|
7544
|
-
/* @__PURE__ */ jsxs51("div", { className: "flex items-center gap-1.5", children: [
|
|
7555
|
+
/* @__PURE__ */ jsxs51("div", { className: "flex min-w-0 items-center gap-1.5", children: [
|
|
7545
7556
|
/* @__PURE__ */ jsx65("span", { className: "truncate font-bold tracking-wide text-white transition-colors group-hover:text-primary/90", children: asset.ticker }),
|
|
7546
7557
|
protocolBadge && /* @__PURE__ */ jsx65(
|
|
7547
7558
|
"span",
|
package/package.json
CHANGED