@yieldfabric/wallet 0.2.0 → 0.2.1
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/README.md +16 -1
- package/dist/index.cjs +270 -162
- package/dist/index.d.cts +38 -10
- package/dist/index.d.ts +38 -10
- package/dist/index.js +270 -163
- package/package.json +4 -3
package/dist/index.js
CHANGED
|
@@ -5345,7 +5345,7 @@ var init_SignupFlow = __esm({
|
|
|
5345
5345
|
};
|
|
5346
5346
|
AvererSidebar = ({ onError }) => {
|
|
5347
5347
|
const navigate = useWalletNavigate();
|
|
5348
|
-
return /* @__PURE__ */ jsxs("aside", { className: "w-full md:w-[360px] md:h-screen bg-background flex md:flex-col items-start justify-between md:justify-between gap-4 px-6 py-5 md:p-10 border-b md:border-b-0 md:border-r border-border-light
|
|
5348
|
+
return /* @__PURE__ */ jsxs("aside", { className: "w-full md:w-[360px] md:h-screen bg-background flex md:flex-col items-start justify-between md:justify-between gap-4 px-6 py-5 md:p-10 border-b md:border-b-0 md:border-r border-border-light", children: [
|
|
5349
5349
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-6 md:gap-10", children: [
|
|
5350
5350
|
/* @__PURE__ */ jsx("div", { className: "text-text-primary", children: /* @__PURE__ */ jsx(YieldFabricLockup, { size: 32 }) }),
|
|
5351
5351
|
/* @__PURE__ */ jsxs("div", { className: "hidden md:block space-y-3 max-w-[260px]", children: [
|
|
@@ -8786,6 +8786,16 @@ var WalletCenterContext = createContext(null);
|
|
|
8786
8786
|
function WalletCenterProvider({ children }) {
|
|
8787
8787
|
const [isOpen, setIsOpen] = useState(false);
|
|
8788
8788
|
const [requestedView, setRequestedView] = useState("menu");
|
|
8789
|
+
const [host, setHostElement] = useState(null);
|
|
8790
|
+
const [hostOptions, setHostOptions] = useState({});
|
|
8791
|
+
const [hostTitle, setHostTitle] = useState(null);
|
|
8792
|
+
const setHost = useCallback((next) => {
|
|
8793
|
+
setHostElement((current) => {
|
|
8794
|
+
if (current === next) return current;
|
|
8795
|
+
if (!next) setHostTitle(null);
|
|
8796
|
+
return next;
|
|
8797
|
+
});
|
|
8798
|
+
}, []);
|
|
8789
8799
|
const openWalletCenter = useCallback((view = "menu") => {
|
|
8790
8800
|
setRequestedView(view);
|
|
8791
8801
|
setIsOpen(true);
|
|
@@ -8795,8 +8805,8 @@ function WalletCenterProvider({ children }) {
|
|
|
8795
8805
|
setRequestedView("menu");
|
|
8796
8806
|
}, []);
|
|
8797
8807
|
const value = useMemo(
|
|
8798
|
-
() => ({ isOpen, requestedView, openWalletCenter, closeWalletCenter }),
|
|
8799
|
-
[isOpen, requestedView, openWalletCenter, closeWalletCenter]
|
|
8808
|
+
() => ({ isOpen, requestedView, openWalletCenter, closeWalletCenter, host, setHost, hostOptions, setHostOptions, hostTitle, setHostTitle }),
|
|
8809
|
+
[isOpen, requestedView, openWalletCenter, closeWalletCenter, host, setHost, hostOptions, hostTitle]
|
|
8800
8810
|
);
|
|
8801
8811
|
return /* @__PURE__ */ jsx(WalletCenterContext.Provider, { value, children });
|
|
8802
8812
|
}
|
|
@@ -8824,53 +8834,105 @@ function RedirectTo({ href, replace = true }) {
|
|
|
8824
8834
|
return null;
|
|
8825
8835
|
}
|
|
8826
8836
|
|
|
8827
|
-
// src/core/
|
|
8828
|
-
|
|
8829
|
-
init_config();
|
|
8830
|
-
function subscribeEntityEvents(entityId, onEvent, onError) {
|
|
8831
|
-
let eventSource = null;
|
|
8832
|
-
let reconnectTimeout = null;
|
|
8833
|
-
let attempts = 0;
|
|
8837
|
+
// src/core/jsonEventStream.ts
|
|
8838
|
+
function subscribeJsonEvents(options) {
|
|
8834
8839
|
let closed = false;
|
|
8835
|
-
|
|
8840
|
+
let retry = 0;
|
|
8841
|
+
let timer;
|
|
8842
|
+
let controller;
|
|
8843
|
+
const connect = async () => {
|
|
8836
8844
|
if (closed) return;
|
|
8837
|
-
const
|
|
8838
|
-
|
|
8839
|
-
|
|
8840
|
-
|
|
8841
|
-
|
|
8842
|
-
|
|
8843
|
-
|
|
8844
|
-
const url = `${baseUrl}/api/events/stream?entity_id=${encodeURIComponent(entityId)}&access_token=${encodeURIComponent(token)}`;
|
|
8845
|
-
eventSource = new EventSource(url);
|
|
8846
|
-
eventSource.onmessage = (e) => {
|
|
8847
|
-
try {
|
|
8848
|
-
onEvent(JSON.parse(e.data));
|
|
8849
|
-
} catch {
|
|
8850
|
-
}
|
|
8851
|
-
};
|
|
8852
|
-
eventSource.onopen = () => {
|
|
8853
|
-
attempts = 0;
|
|
8845
|
+
const attempt = new AbortController();
|
|
8846
|
+
controller = attempt;
|
|
8847
|
+
let reader;
|
|
8848
|
+
let stall;
|
|
8849
|
+
const renewDeadline = () => {
|
|
8850
|
+
if (stall) clearTimeout(stall);
|
|
8851
|
+
stall = setTimeout(() => attempt.abort(), 75e3);
|
|
8854
8852
|
};
|
|
8855
|
-
|
|
8856
|
-
|
|
8857
|
-
|
|
8858
|
-
if (
|
|
8859
|
-
|
|
8860
|
-
|
|
8861
|
-
|
|
8862
|
-
|
|
8863
|
-
|
|
8864
|
-
|
|
8865
|
-
|
|
8853
|
+
try {
|
|
8854
|
+
renewDeadline();
|
|
8855
|
+
const token = options.token();
|
|
8856
|
+
if (!token) throw new Error("Sign in to receive live updates.");
|
|
8857
|
+
const response = await fetch(options.url(), {
|
|
8858
|
+
headers: { Authorization: `Bearer ${token}`, Accept: "text/event-stream" },
|
|
8859
|
+
signal: attempt.signal,
|
|
8860
|
+
credentials: "omit",
|
|
8861
|
+
cache: "no-store",
|
|
8862
|
+
redirect: "error"
|
|
8863
|
+
});
|
|
8864
|
+
if (!response.ok || !response.headers.get("content-type")?.includes("text/event-stream") || !response.body) {
|
|
8865
|
+
throw new Error(`Live updates unavailable (HTTP ${response.status}).`);
|
|
8866
|
+
}
|
|
8867
|
+
reader = response.body.getReader();
|
|
8868
|
+
const decoder = new TextDecoder();
|
|
8869
|
+
let buffer = "", data = [], size = 0;
|
|
8870
|
+
while (!closed) {
|
|
8871
|
+
const part = await reader.read();
|
|
8872
|
+
if (part.done) break;
|
|
8873
|
+
renewDeadline();
|
|
8874
|
+
buffer += decoder.decode(part.value, { stream: true });
|
|
8875
|
+
for (; ; ) {
|
|
8876
|
+
const end = buffer.search(/[\r\n]/);
|
|
8877
|
+
if (end < 0 || buffer[end] === "\r" && end === buffer.length - 1) break;
|
|
8878
|
+
const line = buffer.slice(0, end);
|
|
8879
|
+
const delimiter = buffer[end] === "\r" && buffer[end + 1] === "\n" ? 2 : 1;
|
|
8880
|
+
buffer = buffer.slice(end + delimiter);
|
|
8881
|
+
size += line.length;
|
|
8882
|
+
if (size > 262144) throw new Error("Live update exceeded its size limit.");
|
|
8883
|
+
if (!line) {
|
|
8884
|
+
if (data.length) {
|
|
8885
|
+
let value;
|
|
8886
|
+
try {
|
|
8887
|
+
value = JSON.parse(data.join("\n"));
|
|
8888
|
+
} catch {
|
|
8889
|
+
}
|
|
8890
|
+
if (value !== void 0 && !closed) {
|
|
8891
|
+
retry = 0;
|
|
8892
|
+
options.onEvent(value);
|
|
8893
|
+
}
|
|
8894
|
+
}
|
|
8895
|
+
data = [];
|
|
8896
|
+
size = 0;
|
|
8897
|
+
} else if (line.startsWith("data:")) {
|
|
8898
|
+
data.push(line.slice(5).replace(/^ /, ""));
|
|
8899
|
+
}
|
|
8900
|
+
}
|
|
8901
|
+
if (buffer.length + size > 262144) throw new Error("Live update exceeded its size limit.");
|
|
8902
|
+
}
|
|
8903
|
+
if (!closed) throw new Error("Live updates disconnected.");
|
|
8904
|
+
} catch (error) {
|
|
8905
|
+
if (!closed) options.onError?.(error instanceof Error ? error : new Error("Live updates unavailable."));
|
|
8906
|
+
} finally {
|
|
8907
|
+
if (stall) clearTimeout(stall);
|
|
8908
|
+
attempt.abort();
|
|
8909
|
+
if (reader) {
|
|
8910
|
+
void reader.cancel().catch(() => void 0);
|
|
8911
|
+
reader.releaseLock();
|
|
8912
|
+
}
|
|
8913
|
+
if (!closed) timer = setTimeout(() => void connect(), Math.min(1e3 * 2 ** Math.min(retry++, 5), 3e4));
|
|
8914
|
+
}
|
|
8915
|
+
};
|
|
8916
|
+
void connect();
|
|
8866
8917
|
return () => {
|
|
8867
8918
|
closed = true;
|
|
8868
|
-
|
|
8869
|
-
|
|
8870
|
-
if (reconnectTimeout) clearTimeout(reconnectTimeout);
|
|
8919
|
+
if (timer) clearTimeout(timer);
|
|
8920
|
+
controller?.abort();
|
|
8871
8921
|
};
|
|
8872
8922
|
}
|
|
8873
8923
|
|
|
8924
|
+
// src/core/entityEvents.ts
|
|
8925
|
+
init_tokenManager();
|
|
8926
|
+
init_config();
|
|
8927
|
+
function subscribeEntityEvents(entityId, onEvent, onError) {
|
|
8928
|
+
return subscribeJsonEvents({
|
|
8929
|
+
url: () => `${getPaymentsServiceUrl()}/api/events/stream?entity_id=${encodeURIComponent(entityId)}`,
|
|
8930
|
+
token: () => tokenManager.getCurrentToken(),
|
|
8931
|
+
onEvent,
|
|
8932
|
+
onError
|
|
8933
|
+
});
|
|
8934
|
+
}
|
|
8935
|
+
|
|
8874
8936
|
// src/core/globalNotificationService.ts
|
|
8875
8937
|
var _GlobalNotificationService = class _GlobalNotificationService {
|
|
8876
8938
|
constructor(callbacks) {
|
|
@@ -9382,7 +9444,7 @@ function CenterPrimaryButton({
|
|
|
9382
9444
|
size = "sm",
|
|
9383
9445
|
className = ""
|
|
9384
9446
|
}) {
|
|
9385
|
-
const sizeClasses2 = size === "md" ? "text-[12px] px-3 py-1.5" : "text-[11px] px-2.5 py-1";
|
|
9447
|
+
const sizeClasses2 = size === "md" ? "text-[12px] px-3 py-1.5 max-lg:min-h-[44px] max-lg:px-4 max-lg:text-[13px]" : "text-[11px] px-2.5 py-1 max-lg:min-h-[44px] max-lg:px-4 max-lg:text-[13px]";
|
|
9386
9448
|
return /* @__PURE__ */ jsx(
|
|
9387
9449
|
"button",
|
|
9388
9450
|
{
|
|
@@ -9391,7 +9453,7 @@ function CenterPrimaryButton({
|
|
|
9391
9453
|
onClick,
|
|
9392
9454
|
className: [
|
|
9393
9455
|
"font-medium rounded-md transition-colors",
|
|
9394
|
-
"bg-cta text-on-cta hover:bg-cta-hover",
|
|
9456
|
+
"bg-cta text-on-cta hover:bg-cta-hover active:opacity-90",
|
|
9395
9457
|
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
9396
9458
|
sizeClasses2,
|
|
9397
9459
|
className
|
|
@@ -11452,7 +11514,7 @@ function StripeProgressPanel({
|
|
|
11452
11514
|
detail ? /* @__PURE__ */ jsx("p", { className: "mt-2 text-[10px] leading-relaxed text-text-secondary/75", children: detail }) : null
|
|
11453
11515
|
] })
|
|
11454
11516
|
] }),
|
|
11455
|
-
/* @__PURE__ */ jsx("div", { className: "h-1.5 w-full overflow-hidden rounded-full bg-border-default
|
|
11517
|
+
/* @__PURE__ */ jsx("div", { className: "h-1.5 w-full overflow-hidden rounded-full bg-border-default", children: /* @__PURE__ */ jsx("div", { className: `h-full w-2/3 rounded-full ${delayed ? "bg-status-warning-text" : "bg-cta"} motion-safe:animate-pulse` }) })
|
|
11456
11518
|
] });
|
|
11457
11519
|
}
|
|
11458
11520
|
function StripeResultPanel({
|
|
@@ -11858,7 +11920,7 @@ function ProgressPanel({
|
|
|
11858
11920
|
/* @__PURE__ */ jsx("h1", { className: "text-[16px] font-medium text-text-primary leading-snug", children: title }),
|
|
11859
11921
|
/* @__PURE__ */ jsx("p", { className: "mt-1 text-[12px] leading-relaxed text-text-secondary", children: body })
|
|
11860
11922
|
] }),
|
|
11861
|
-
/* @__PURE__ */ jsx("div", { className: "h-1.5 w-full overflow-hidden rounded-full bg-border-default
|
|
11923
|
+
/* @__PURE__ */ jsx("div", { className: "h-1.5 w-full overflow-hidden rounded-full bg-border-default", children: /* @__PURE__ */ jsx(
|
|
11862
11924
|
"div",
|
|
11863
11925
|
{
|
|
11864
11926
|
className: `h-full w-2/3 rounded-full motion-safe:animate-pulse ${delayed ? "bg-status-warning-text" : "bg-cta"}`
|
|
@@ -14927,7 +14989,7 @@ function RecoveryPanel({
|
|
|
14927
14989
|
return /* @__PURE__ */ jsx(
|
|
14928
14990
|
"div",
|
|
14929
14991
|
{
|
|
14930
|
-
className: "rounded-lg border border-status-warning-text/25 bg-status-warning-bg
|
|
14992
|
+
className: "rounded-lg border border-status-warning-text/25 bg-status-warning-bg px-3.5 py-3 text-status-warning-text",
|
|
14931
14993
|
role: "alert",
|
|
14932
14994
|
children: /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3", children: [
|
|
14933
14995
|
/* @__PURE__ */ jsx("div", { className: `mt-0.5 h-8 w-8 shrink-0 rounded-full flex items-center justify-center ${iconClass}`, children: /* @__PURE__ */ jsx(ExclamationTriangleIcon, { className: "h-4 w-4", strokeWidth: 1.8 }) }),
|
|
@@ -15368,7 +15430,7 @@ function AddWalletsStep({ chrome } = {}) {
|
|
|
15368
15430
|
showDynamic && /* @__PURE__ */ jsx(
|
|
15369
15431
|
"div",
|
|
15370
15432
|
{
|
|
15371
|
-
className: "fixed inset-0 z-
|
|
15433
|
+
className: "fixed inset-0 z-[10000] flex items-center justify-center bg-black/70 p-4",
|
|
15372
15434
|
role: "dialog",
|
|
15373
15435
|
"aria-modal": "true",
|
|
15374
15436
|
children: /* @__PURE__ */ jsxs("div", { className: "w-full max-w-md rounded-lg border border-border-default bg-surface p-4", children: [
|
|
@@ -15448,6 +15510,8 @@ var Drawer = ({
|
|
|
15448
15510
|
useEffect(() => {
|
|
15449
15511
|
if (!isOpen || typeof document === "undefined") return;
|
|
15450
15512
|
const previouslyFocused = document.activeElement;
|
|
15513
|
+
const bodyOverflow = document.body.style.overflow;
|
|
15514
|
+
document.body.style.overflow = "hidden";
|
|
15451
15515
|
const initialFocus = panelRef.current?.querySelector("[data-drawer-initial-focus]") ?? closeButtonRef.current;
|
|
15452
15516
|
initialFocus?.focus();
|
|
15453
15517
|
const handleKeyDown = (event) => {
|
|
@@ -15478,11 +15542,16 @@ var Drawer = ({
|
|
|
15478
15542
|
document.addEventListener("keydown", handleKeyDown);
|
|
15479
15543
|
return () => {
|
|
15480
15544
|
document.removeEventListener("keydown", handleKeyDown);
|
|
15545
|
+
document.body.style.overflow = bodyOverflow;
|
|
15481
15546
|
previouslyFocused?.focus?.();
|
|
15482
15547
|
};
|
|
15483
15548
|
}, [isOpen, onClose]);
|
|
15484
|
-
const widthClass = maxWidth === "sm" ? "w-full max-w-sm" : maxWidth === "md" ? "w-full max-w-md" : maxWidth === "lg" ? "w-full max-w-2xl" : maxWidth === "half" ? "w-1/2" : maxWidth === "full-mobile" ? "w-full xl:w-1/2" : maxWidth === "full" ? "w-full" : "w-full max-w-md";
|
|
15485
|
-
const widthStyle = maxWidth === "lg" ? { width: "672px", maxWidth: "672px" } :
|
|
15549
|
+
const widthClass = maxWidth === "sm" ? "w-full max-w-sm" : maxWidth === "md" ? "w-full max-w-md" : maxWidth === "lg" ? "w-full max-w-2xl" : maxWidth === "half" ? "w-full lg:w-1/2" : maxWidth === "full-mobile" ? "w-full xl:w-1/2" : maxWidth === "full" ? "w-full" : "w-full max-w-md";
|
|
15550
|
+
const widthStyle = maxWidth === "lg" ? { width: "672px", maxWidth: "672px" } : (
|
|
15551
|
+
// 'half' is a desk shape; a hard 50vw made it 187px on a phone. The
|
|
15552
|
+
// class carries the split now, so there is no inline width to fight.
|
|
15553
|
+
maxWidth === "half" ? {} : maxWidth === "full-mobile" ? {} : {}
|
|
15554
|
+
);
|
|
15486
15555
|
return /* @__PURE__ */ jsx(Fragment, { children: isOpen && /* @__PURE__ */ jsx("div", { className: "fixed inset-0 overflow-hidden z-[10000]", children: /* @__PURE__ */ jsxs("div", { className: "absolute inset-0 overflow-hidden", children: [
|
|
15487
15556
|
/* @__PURE__ */ jsx(
|
|
15488
15557
|
"div",
|
|
@@ -15519,12 +15588,12 @@ var Drawer = ({
|
|
|
15519
15588
|
/* @__PURE__ */ jsx(
|
|
15520
15589
|
"div",
|
|
15521
15590
|
{
|
|
15522
|
-
className: `flex-1 px-3 pt-2 ${panelBg} ${fillHeight ? "flex flex-col overflow-hidden pb-0" : "overflow-y-auto pb-
|
|
15591
|
+
className: `flex-1 px-3 pt-2 ${panelBg} ${fillHeight ? "flex flex-col overflow-hidden pb-0" : "overflow-y-auto pb-[max(1.5rem,env(safe-area-inset-bottom))]"} ${contentClassName}`,
|
|
15523
15592
|
style: contentStyle,
|
|
15524
15593
|
children
|
|
15525
15594
|
}
|
|
15526
15595
|
),
|
|
15527
|
-
footer && /* @__PURE__ */ jsx("div", { className: `
|
|
15596
|
+
footer && /* @__PURE__ */ jsx("div", { className: `flex-shrink-0 border-t border-border-default px-6 py-4 pb-[max(1rem,env(safe-area-inset-bottom))] ${panelBg} ${footerClassName}`, children: footer })
|
|
15528
15597
|
]
|
|
15529
15598
|
}
|
|
15530
15599
|
) })
|
|
@@ -16131,7 +16200,7 @@ var AccountOpeningPanel = ({ onContinue, continueLabel = "Continue" }) => {
|
|
|
16131
16200
|
/* @__PURE__ */ jsx("h1", { className: "text-[16px] font-medium text-text-primary leading-snug", children: copy.title }),
|
|
16132
16201
|
/* @__PURE__ */ jsx("p", { className: "mt-1 text-[12px] leading-relaxed text-text-secondary", children: showExit && !terminalFailure ? "This is taking longer than usual. We'll let you know as soon as it's ready \u2014 you can carry on in the meantime." : copy.body })
|
|
16133
16202
|
] }),
|
|
16134
|
-
terminalFailure ? null : /* @__PURE__ */ jsx("div", { className: "h-1.5 w-full overflow-hidden rounded-full bg-border-default
|
|
16203
|
+
terminalFailure ? null : /* @__PURE__ */ jsx("div", { className: "h-1.5 w-full overflow-hidden rounded-full bg-border-default", children: /* @__PURE__ */ jsx(
|
|
16135
16204
|
"div",
|
|
16136
16205
|
{
|
|
16137
16206
|
className: `h-full w-2/3 rounded-full motion-safe:animate-pulse ${impatient ? "bg-status-warning-text" : "bg-cta"}`
|
|
@@ -20514,14 +20583,14 @@ function SignatureWorkflow({
|
|
|
20514
20583
|
{
|
|
20515
20584
|
id: `signature-${pending.id}`,
|
|
20516
20585
|
type: "action",
|
|
20517
|
-
title: "Signature
|
|
20518
|
-
message: "
|
|
20586
|
+
title: "Signature needed",
|
|
20587
|
+
message: "Something is waiting for your signature.",
|
|
20519
20588
|
duration: 0,
|
|
20520
20589
|
showProgress: false,
|
|
20521
20590
|
onClose: dismissPending,
|
|
20522
20591
|
onClick: () => openSigner(pending),
|
|
20523
20592
|
action: {
|
|
20524
|
-
label: "Review
|
|
20593
|
+
label: "Review and sign",
|
|
20525
20594
|
onClick: () => openSigner(pending)
|
|
20526
20595
|
}
|
|
20527
20596
|
}
|
|
@@ -20531,7 +20600,7 @@ function SignatureWorkflow({
|
|
|
20531
20600
|
{
|
|
20532
20601
|
isOpen: true,
|
|
20533
20602
|
onClose: closeSigner,
|
|
20534
|
-
title: currentMessage.data?.message_type ? `${currentMessage.data.message_type} \u2014 Sign` : "Sign
|
|
20603
|
+
title: currentMessage.data?.message_type ? `${humanizeMessageType(currentMessage.data.message_type)} \u2014 Sign` : "Sign this request",
|
|
20535
20604
|
maxWidth: "lg",
|
|
20536
20605
|
fillHeight: true,
|
|
20537
20606
|
children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col h-full", children: [
|
|
@@ -22160,10 +22229,10 @@ function SecurityPage() {
|
|
|
22160
22229
|
const [generateDescription, setGenerateDescription] = useState("");
|
|
22161
22230
|
const [freshApiKey, setFreshApiKey] = useState(null);
|
|
22162
22231
|
const [freshApiKeyCopied, setFreshApiKeyCopied] = useState(false);
|
|
22163
|
-
const refresh = useCallback(async () => {
|
|
22232
|
+
const refresh = useCallback(async (opts) => {
|
|
22164
22233
|
setError(null);
|
|
22165
22234
|
try {
|
|
22166
|
-
invalidateWalletCount();
|
|
22235
|
+
if (opts?.invalidate !== false) invalidateWalletCount();
|
|
22167
22236
|
const [k, l] = await Promise.all([
|
|
22168
22237
|
listMyLoginKeys(),
|
|
22169
22238
|
keysService.getLockdownStatus().catch(() => null)
|
|
@@ -22177,7 +22246,7 @@ function SecurityPage() {
|
|
|
22177
22246
|
}
|
|
22178
22247
|
}, []);
|
|
22179
22248
|
useEffect(() => {
|
|
22180
|
-
refresh();
|
|
22249
|
+
void refresh({ invalidate: false });
|
|
22181
22250
|
}, [refresh]);
|
|
22182
22251
|
const refreshApiKeys = useCallback(async () => {
|
|
22183
22252
|
try {
|
|
@@ -23015,7 +23084,7 @@ function SecurityPage() {
|
|
|
23015
23084
|
(account) => !(account.chain_id === activeChainId && account.wallet_address.toLowerCase() === target)
|
|
23016
23085
|
);
|
|
23017
23086
|
if (otherAccounts.length === 0) return null;
|
|
23018
|
-
return /* @__PURE__ */ jsxs("div", { className: "rounded-lg bg-status-warning-bg
|
|
23087
|
+
return /* @__PURE__ */ jsxs("div", { className: "rounded-lg bg-status-warning-bg border border-status-warning-text/30 px-3 py-2 space-y-1", children: [
|
|
23019
23088
|
/* @__PURE__ */ jsxs("p", { className: "text-[11px] text-status-warning-text font-medium", children: [
|
|
23020
23089
|
"This key also owns ",
|
|
23021
23090
|
otherAccounts.length,
|
|
@@ -23330,7 +23399,7 @@ function RowGhostButton({
|
|
|
23330
23399
|
type: "button",
|
|
23331
23400
|
disabled,
|
|
23332
23401
|
onClick,
|
|
23333
|
-
className: "
|
|
23402
|
+
className: "rounded-md px-2.5 py-1 text-[11px] font-medium text-text-secondary transition-colors hover:bg-chip hover:text-text-primary active:bg-chip-active disabled:cursor-not-allowed disabled:opacity-50 max-lg:min-h-[44px] max-lg:px-4 max-lg:text-[13px]",
|
|
23334
23403
|
children
|
|
23335
23404
|
}
|
|
23336
23405
|
);
|
|
@@ -23346,7 +23415,7 @@ function RowNeutralButton({
|
|
|
23346
23415
|
type: "button",
|
|
23347
23416
|
disabled,
|
|
23348
23417
|
onClick,
|
|
23349
|
-
className: "
|
|
23418
|
+
className: "rounded-md bg-chip px-2.5 py-1 text-[11px] font-medium text-text-primary transition-colors hover:bg-chip-hover active:bg-chip-active disabled:cursor-not-allowed disabled:opacity-50 max-lg:min-h-[44px] max-lg:px-4 max-lg:text-[13px]",
|
|
23350
23419
|
children
|
|
23351
23420
|
}
|
|
23352
23421
|
);
|
|
@@ -25157,7 +25226,10 @@ var WalletCenterSurface = ({
|
|
|
25157
25226
|
modules,
|
|
25158
25227
|
actors,
|
|
25159
25228
|
identity,
|
|
25160
|
-
initialView = "menu"
|
|
25229
|
+
initialView = "menu",
|
|
25230
|
+
embedded = false,
|
|
25231
|
+
backLabel = "Back",
|
|
25232
|
+
onTitle
|
|
25161
25233
|
}) => {
|
|
25162
25234
|
const { pendingList, refreshPending } = useSignatureQueue();
|
|
25163
25235
|
const {
|
|
@@ -25185,6 +25257,10 @@ var WalletCenterSurface = ({
|
|
|
25185
25257
|
const cancelGuardRef = useRef(/* @__PURE__ */ new Map());
|
|
25186
25258
|
const wasOpenRef = useRef(false);
|
|
25187
25259
|
const walletRootRef = useRef(null);
|
|
25260
|
+
const leaveSection = useCallback(() => {
|
|
25261
|
+
if (embedded && initialView !== "menu") onClose();
|
|
25262
|
+
else setSection("menu");
|
|
25263
|
+
}, [embedded, initialView, onClose]);
|
|
25188
25264
|
useEffect(() => {
|
|
25189
25265
|
const justOpened = isOpen && !wasOpenRef.current;
|
|
25190
25266
|
wasOpenRef.current = isOpen;
|
|
@@ -25202,9 +25278,9 @@ var WalletCenterSurface = ({
|
|
|
25202
25278
|
useEffect(() => {
|
|
25203
25279
|
if (!isOpen) return;
|
|
25204
25280
|
if (activeBuiltinFor(section, modules) === "transactions" && pendingList.length === 0) {
|
|
25205
|
-
|
|
25281
|
+
leaveSection();
|
|
25206
25282
|
}
|
|
25207
|
-
}, [isOpen, modules, pendingList.length, section]);
|
|
25283
|
+
}, [isOpen, leaveSection, modules, pendingList.length, section]);
|
|
25208
25284
|
const delegatedGroupId = useMemo(() => {
|
|
25209
25285
|
if (!delegationToken || typeof window === "undefined") return null;
|
|
25210
25286
|
return window.localStorage.getItem("delegation_group_id");
|
|
@@ -25457,11 +25533,11 @@ var WalletCenterSurface = ({
|
|
|
25457
25533
|
setActionError(null);
|
|
25458
25534
|
try {
|
|
25459
25535
|
await actor.onSelect();
|
|
25460
|
-
|
|
25536
|
+
leaveSection();
|
|
25461
25537
|
} catch (error) {
|
|
25462
25538
|
setActionError(error?.message ?? "Failed to switch signing context.");
|
|
25463
25539
|
}
|
|
25464
|
-
}, []);
|
|
25540
|
+
}, [leaveSection]);
|
|
25465
25541
|
const drawerTitle = useMemo(() => {
|
|
25466
25542
|
if (selected) {
|
|
25467
25543
|
const label = humanizeMessageType(selected.data?.message_type);
|
|
@@ -25469,11 +25545,117 @@ var WalletCenterSurface = ({
|
|
|
25469
25545
|
}
|
|
25470
25546
|
return "Wallet";
|
|
25471
25547
|
}, [selected, selectedSource]);
|
|
25548
|
+
const hostedTitle = !embedded ? null : selected ? drawerTitle : section === "actors" ? "Signing context" : activeModule?.label ?? null;
|
|
25549
|
+
useEffect(() => {
|
|
25550
|
+
if (!embedded) return void 0;
|
|
25551
|
+
onTitle?.(hostedTitle);
|
|
25552
|
+
return () => onTitle?.(null);
|
|
25553
|
+
}, [embedded, hostedTitle, onTitle]);
|
|
25472
25554
|
const isCompactView = !selected;
|
|
25473
25555
|
const drawerPanelClass = isCompactView ? stripLayoutUtilities(walletCenterUi?.drawer?.panel, ["height"]) : walletCenterUi?.drawer?.panel;
|
|
25474
25556
|
const drawerContentClass = isCompactView ? stripLayoutUtilities(walletCenterUi?.drawer?.content, ["overflow"]) : walletCenterUi?.drawer?.content;
|
|
25475
|
-
const walletRootClass = isCompactView ? stripLayoutUtilities(walletCenterUi?.root, ["height", "overflow"]) : walletCenterUi?.root;
|
|
25476
|
-
const walletMainClass = isCompactView ? stripLayoutUtilities(walletCenterUi?.main, ["height", "overflow"]) : walletCenterUi?.main;
|
|
25557
|
+
const walletRootClass = embedded ? void 0 : isCompactView ? stripLayoutUtilities(walletCenterUi?.root, ["height", "overflow"]) : walletCenterUi?.root;
|
|
25558
|
+
const walletMainClass = embedded ? void 0 : isCompactView ? stripLayoutUtilities(walletCenterUi?.main, ["height", "overflow"]) : walletCenterUi?.main;
|
|
25559
|
+
const body = /* @__PURE__ */ jsx("div", { ref: walletRootRef, className: cx4(isCompactView ? "w-full" : "flex h-full overflow-hidden", walletRootClass), children: /* @__PURE__ */ jsx("div", { className: cx4(isCompactView ? "min-h-0 w-full" : "flex-1 min-h-0 overflow-hidden", walletMainClass), children: selected ? /* @__PURE__ */ jsx(
|
|
25560
|
+
DetailPane,
|
|
25561
|
+
{
|
|
25562
|
+
message: selected,
|
|
25563
|
+
source: selectedSource,
|
|
25564
|
+
userId,
|
|
25565
|
+
onBack: handleBackToList,
|
|
25566
|
+
hideBack: embedded,
|
|
25567
|
+
onSigned: async (m) => {
|
|
25568
|
+
onSigned?.(m);
|
|
25569
|
+
setSelected(null);
|
|
25570
|
+
await refreshPending();
|
|
25571
|
+
},
|
|
25572
|
+
onRetry: handleRetry,
|
|
25573
|
+
onSwitchToSign: () => setSelectedSource("pending"),
|
|
25574
|
+
selectorRegistry,
|
|
25575
|
+
addressLabels,
|
|
25576
|
+
renderSimpleSummary
|
|
25577
|
+
}
|
|
25578
|
+
) : section === "menu" ? /* @__PURE__ */ jsx(
|
|
25579
|
+
WalletMenu,
|
|
25580
|
+
{
|
|
25581
|
+
identity: resolvedIdentity,
|
|
25582
|
+
items: menuItems,
|
|
25583
|
+
actors: resolvedActors,
|
|
25584
|
+
actionError,
|
|
25585
|
+
onSelectModule: handleSelectModule,
|
|
25586
|
+
onOpenActors: () => setSection("actors"),
|
|
25587
|
+
onClose: embedded ? void 0 : onClose,
|
|
25588
|
+
onSignOut: handleSignOut
|
|
25589
|
+
}
|
|
25590
|
+
) : section === "actors" ? /* @__PURE__ */ jsxs("div", { className: "flex min-h-0 flex-col", children: [
|
|
25591
|
+
embedded ? null : /* @__PURE__ */ jsx(SectionHeader, { title: "Signing context", onBack: leaveSection }),
|
|
25592
|
+
/* @__PURE__ */ jsx(
|
|
25593
|
+
ActorsPane,
|
|
25594
|
+
{
|
|
25595
|
+
actors: resolvedActors,
|
|
25596
|
+
error: actionError,
|
|
25597
|
+
onSelect: handleSelectActor
|
|
25598
|
+
}
|
|
25599
|
+
)
|
|
25600
|
+
] }) : /* @__PURE__ */ jsxs("div", { className: "flex min-h-0 flex-col", children: [
|
|
25601
|
+
embedded ? null : /* @__PURE__ */ jsx(SectionHeader, { title: activeModule?.label ?? "Wallet", onBack: leaveSection }),
|
|
25602
|
+
/* @__PURE__ */ jsx("div", { className: "min-h-0", children: activeModule ? /* @__PURE__ */ jsx(
|
|
25603
|
+
SectionPane,
|
|
25604
|
+
{
|
|
25605
|
+
module: activeModule,
|
|
25606
|
+
panelContext,
|
|
25607
|
+
pendingList,
|
|
25608
|
+
busyId,
|
|
25609
|
+
actionError,
|
|
25610
|
+
onSelectPending: (m) => handleSelect(m, "pending"),
|
|
25611
|
+
onSign: handleSign,
|
|
25612
|
+
onCancel: handleCancel,
|
|
25613
|
+
historyItems: filteredHistoryItems,
|
|
25614
|
+
historyFilter,
|
|
25615
|
+
historyLoading,
|
|
25616
|
+
historyError,
|
|
25617
|
+
historyHasMore: historyHasMore && historyItems.length < HISTORY_MAX_ITEMS,
|
|
25618
|
+
historyAtCap: historyItems.length >= HISTORY_MAX_ITEMS,
|
|
25619
|
+
historyLoadedOnce,
|
|
25620
|
+
showHistoryFilters: !embedded,
|
|
25621
|
+
onFilterChange: handleFilterChange,
|
|
25622
|
+
onLoadMore: handleLoadMore,
|
|
25623
|
+
onSelectHistory: (m) => handleSelect(m, "history"),
|
|
25624
|
+
onRetry: handleRetryFromRow,
|
|
25625
|
+
classNames: walletCenterUi
|
|
25626
|
+
}
|
|
25627
|
+
) : /* @__PURE__ */ jsx(
|
|
25628
|
+
EmptyState,
|
|
25629
|
+
{
|
|
25630
|
+
title: "This wallet view is unavailable",
|
|
25631
|
+
subtitle: "Return to the wallet menu and choose another destination.",
|
|
25632
|
+
classNames: walletCenterUi
|
|
25633
|
+
}
|
|
25634
|
+
) })
|
|
25635
|
+
] }) }) });
|
|
25636
|
+
if (embedded) {
|
|
25637
|
+
const back = selected ? { label: activeModule?.label ?? "Wallet", onPick: handleBackToList } : section === "menu" ? null : { label: backLabel, onPick: leaveSection };
|
|
25638
|
+
const sectionControls = !selected && activeBuiltin === "history" ? /* @__PURE__ */ jsx(FilterChips, { filter: historyFilter, onChange: handleFilterChange }) : null;
|
|
25639
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex h-full min-h-0 flex-col", children: [
|
|
25640
|
+
/* @__PURE__ */ jsx("div", { className: cx4("min-h-0 flex-1", isCompactView ? "overflow-y-auto" : "overflow-hidden"), children: body }),
|
|
25641
|
+
back || sectionControls ? /* @__PURE__ */ jsxs("nav", { "aria-label": "Wallet controls", className: "flex h-12 shrink-0 items-center gap-2 border-t border-border-light px-4", children: [
|
|
25642
|
+
back ? /* @__PURE__ */ jsxs(
|
|
25643
|
+
"button",
|
|
25644
|
+
{
|
|
25645
|
+
type: "button",
|
|
25646
|
+
onClick: back.onPick,
|
|
25647
|
+
className: "flex h-8 shrink-0 items-center gap-1.5 rounded-full bg-chip-hover pl-2 pr-3 text-[12.5px] font-medium text-text-primary transition-colors hover:bg-raised-hover",
|
|
25648
|
+
children: [
|
|
25649
|
+
/* @__PURE__ */ jsx(IconChevronLeft, {}),
|
|
25650
|
+
back.label
|
|
25651
|
+
]
|
|
25652
|
+
}
|
|
25653
|
+
) : null,
|
|
25654
|
+
back && sectionControls ? /* @__PURE__ */ jsx("span", { className: "h-5 w-px shrink-0 bg-border-strong", "aria-hidden": "true" }) : null,
|
|
25655
|
+
sectionControls ? /* @__PURE__ */ jsx("div", { className: "flex min-w-0 flex-1 items-center gap-2 overflow-x-auto", children: sectionControls }) : null
|
|
25656
|
+
] }) : null
|
|
25657
|
+
] });
|
|
25658
|
+
}
|
|
25477
25659
|
return /* @__PURE__ */ jsx(
|
|
25478
25660
|
Drawer,
|
|
25479
25661
|
{
|
|
@@ -25491,89 +25673,7 @@ var WalletCenterSurface = ({
|
|
|
25491
25673
|
closeButtonClassName: walletCenterUi?.drawer?.closeButton,
|
|
25492
25674
|
contentClassName: drawerContentClass,
|
|
25493
25675
|
contentStyle: isCompactView ? { flex: "0 1 auto", maxHeight: "calc(100vh - 24px)", overflowY: "auto", paddingBottom: 12 } : void 0,
|
|
25494
|
-
children:
|
|
25495
|
-
DetailPane,
|
|
25496
|
-
{
|
|
25497
|
-
message: selected,
|
|
25498
|
-
source: selectedSource,
|
|
25499
|
-
userId,
|
|
25500
|
-
onBack: handleBackToList,
|
|
25501
|
-
onSigned: async (m) => {
|
|
25502
|
-
onSigned?.(m);
|
|
25503
|
-
setSelected(null);
|
|
25504
|
-
await refreshPending();
|
|
25505
|
-
},
|
|
25506
|
-
onRetry: handleRetry,
|
|
25507
|
-
onSwitchToSign: () => setSelectedSource("pending"),
|
|
25508
|
-
selectorRegistry,
|
|
25509
|
-
addressLabels,
|
|
25510
|
-
renderSimpleSummary
|
|
25511
|
-
}
|
|
25512
|
-
) : section === "menu" ? /* @__PURE__ */ jsx(
|
|
25513
|
-
WalletMenu,
|
|
25514
|
-
{
|
|
25515
|
-
identity: resolvedIdentity,
|
|
25516
|
-
items: menuItems,
|
|
25517
|
-
actors: resolvedActors,
|
|
25518
|
-
actionError,
|
|
25519
|
-
onSelectModule: handleSelectModule,
|
|
25520
|
-
onOpenActors: () => setSection("actors"),
|
|
25521
|
-
onClose,
|
|
25522
|
-
onSignOut: handleSignOut
|
|
25523
|
-
}
|
|
25524
|
-
) : section === "actors" ? /* @__PURE__ */ jsxs("div", { className: "flex min-h-0 flex-col", children: [
|
|
25525
|
-
/* @__PURE__ */ jsx(SectionHeader, { title: "Signing context", onBack: () => setSection("menu") }),
|
|
25526
|
-
/* @__PURE__ */ jsx(
|
|
25527
|
-
ActorsPane,
|
|
25528
|
-
{
|
|
25529
|
-
actors: resolvedActors,
|
|
25530
|
-
error: actionError,
|
|
25531
|
-
onSelect: handleSelectActor
|
|
25532
|
-
}
|
|
25533
|
-
)
|
|
25534
|
-
] }) : /* @__PURE__ */ jsxs("div", { className: "flex min-h-0 flex-col", children: [
|
|
25535
|
-
/* @__PURE__ */ jsx(
|
|
25536
|
-
SectionHeader,
|
|
25537
|
-
{
|
|
25538
|
-
title: activeModule?.label ?? "Wallet",
|
|
25539
|
-
onBack: () => {
|
|
25540
|
-
setSection("menu");
|
|
25541
|
-
}
|
|
25542
|
-
}
|
|
25543
|
-
),
|
|
25544
|
-
/* @__PURE__ */ jsx("div", { className: "min-h-0", children: activeModule ? /* @__PURE__ */ jsx(
|
|
25545
|
-
SectionPane,
|
|
25546
|
-
{
|
|
25547
|
-
module: activeModule,
|
|
25548
|
-
panelContext,
|
|
25549
|
-
pendingList,
|
|
25550
|
-
busyId,
|
|
25551
|
-
actionError,
|
|
25552
|
-
onSelectPending: (m) => handleSelect(m, "pending"),
|
|
25553
|
-
onSign: handleSign,
|
|
25554
|
-
onCancel: handleCancel,
|
|
25555
|
-
historyItems: filteredHistoryItems,
|
|
25556
|
-
historyFilter,
|
|
25557
|
-
historyLoading,
|
|
25558
|
-
historyError,
|
|
25559
|
-
historyHasMore: historyHasMore && historyItems.length < HISTORY_MAX_ITEMS,
|
|
25560
|
-
historyAtCap: historyItems.length >= HISTORY_MAX_ITEMS,
|
|
25561
|
-
historyLoadedOnce,
|
|
25562
|
-
onFilterChange: handleFilterChange,
|
|
25563
|
-
onLoadMore: handleLoadMore,
|
|
25564
|
-
onSelectHistory: (m) => handleSelect(m, "history"),
|
|
25565
|
-
onRetry: handleRetryFromRow,
|
|
25566
|
-
classNames: walletCenterUi
|
|
25567
|
-
}
|
|
25568
|
-
) : /* @__PURE__ */ jsx(
|
|
25569
|
-
EmptyState,
|
|
25570
|
-
{
|
|
25571
|
-
title: "This wallet view is unavailable",
|
|
25572
|
-
subtitle: "Return to the wallet menu and choose another destination.",
|
|
25573
|
-
classNames: walletCenterUi
|
|
25574
|
-
}
|
|
25575
|
-
) })
|
|
25576
|
-
] }) }) })
|
|
25676
|
+
children: body
|
|
25577
25677
|
}
|
|
25578
25678
|
);
|
|
25579
25679
|
};
|
|
@@ -25695,7 +25795,7 @@ function WalletMenu({
|
|
|
25695
25795
|
action.id
|
|
25696
25796
|
);
|
|
25697
25797
|
}),
|
|
25698
|
-
/* @__PURE__ */ jsx(
|
|
25798
|
+
onClose ? /* @__PURE__ */ jsx(
|
|
25699
25799
|
"button",
|
|
25700
25800
|
{
|
|
25701
25801
|
type: "button",
|
|
@@ -25705,7 +25805,7 @@ function WalletMenu({
|
|
|
25705
25805
|
"aria-label": "Close wallet center",
|
|
25706
25806
|
children: /* @__PURE__ */ jsx(IconX, {})
|
|
25707
25807
|
}
|
|
25708
|
-
)
|
|
25808
|
+
) : null
|
|
25709
25809
|
] })
|
|
25710
25810
|
] }),
|
|
25711
25811
|
/* @__PURE__ */ jsx(ActiveEnvironmentBadge, {})
|
|
@@ -25836,6 +25936,7 @@ function SectionPane(props) {
|
|
|
25836
25936
|
{
|
|
25837
25937
|
items: props.historyItems,
|
|
25838
25938
|
filter: props.historyFilter,
|
|
25939
|
+
showFilters: props.showHistoryFilters ?? true,
|
|
25839
25940
|
onFilterChange: props.onFilterChange,
|
|
25840
25941
|
loading: props.historyLoading,
|
|
25841
25942
|
error: props.historyError,
|
|
@@ -26067,6 +26168,7 @@ function PendingSection({
|
|
|
26067
26168
|
)) });
|
|
26068
26169
|
}
|
|
26069
26170
|
function HistorySection({
|
|
26171
|
+
showFilters = true,
|
|
26070
26172
|
items,
|
|
26071
26173
|
filter,
|
|
26072
26174
|
onFilterChange,
|
|
@@ -26082,7 +26184,7 @@ function HistorySection({
|
|
|
26082
26184
|
classNames
|
|
26083
26185
|
}) {
|
|
26084
26186
|
return /* @__PURE__ */ jsxs("div", { className: cx4("p-3 space-y-3", classNames?.listSection), children: [
|
|
26085
|
-
/* @__PURE__ */ jsx(FilterChips, { filter, onChange: onFilterChange }),
|
|
26187
|
+
showFilters ? /* @__PURE__ */ jsx(FilterChips, { filter, onChange: onFilterChange }) : null,
|
|
26086
26188
|
error && /* @__PURE__ */ jsx(ErrorBanner, { children: error }),
|
|
26087
26189
|
!loadedOnce && loading && /* @__PURE__ */ jsx("div", { className: "py-10 flex justify-center", children: /* @__PURE__ */ jsx(LoadingSpinner, { size: "md" }) }),
|
|
26088
26190
|
loadedOnce && items.length === 0 && !loading && /* @__PURE__ */ jsx(
|
|
@@ -26165,6 +26267,7 @@ function DetailPane({
|
|
|
26165
26267
|
source,
|
|
26166
26268
|
userId,
|
|
26167
26269
|
onBack,
|
|
26270
|
+
hideBack = false,
|
|
26168
26271
|
onSigned,
|
|
26169
26272
|
onRetry,
|
|
26170
26273
|
onSwitchToSign,
|
|
@@ -26174,7 +26277,7 @@ function DetailPane({
|
|
|
26174
26277
|
}) {
|
|
26175
26278
|
const drawerKey = `signature-${source}-${message.id}`;
|
|
26176
26279
|
return /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col h-full", children: [
|
|
26177
|
-
/* @__PURE__ */ jsx("div", { className: "px-3 py-2.5 border-b border-border-light", children: /* @__PURE__ */ jsxs(
|
|
26280
|
+
hideBack ? null : /* @__PURE__ */ jsx("div", { className: "px-3 py-2.5 border-b border-border-light", children: /* @__PURE__ */ jsxs(
|
|
26178
26281
|
"button",
|
|
26179
26282
|
{
|
|
26180
26283
|
type: "button",
|
|
@@ -26259,9 +26362,9 @@ function WalletCenter({
|
|
|
26259
26362
|
onCanceled
|
|
26260
26363
|
}) {
|
|
26261
26364
|
const { user } = useAuth();
|
|
26262
|
-
const { isOpen, requestedView, closeWalletCenter } = useWalletCenter();
|
|
26365
|
+
const { isOpen, requestedView, closeWalletCenter, host, hostOptions, setHostTitle } = useWalletCenter();
|
|
26263
26366
|
if (!isOpen || !user?.id) return null;
|
|
26264
|
-
|
|
26367
|
+
const surface = /* @__PURE__ */ jsx(
|
|
26265
26368
|
WalletCenterSurface,
|
|
26266
26369
|
{
|
|
26267
26370
|
isOpen: true,
|
|
@@ -26276,9 +26379,13 @@ function WalletCenter({
|
|
|
26276
26379
|
renderSimpleSummary,
|
|
26277
26380
|
onSigned,
|
|
26278
26381
|
onRetried,
|
|
26279
|
-
onCanceled
|
|
26382
|
+
onCanceled,
|
|
26383
|
+
embedded: Boolean(host),
|
|
26384
|
+
backLabel: hostOptions.backLabel,
|
|
26385
|
+
onTitle: setHostTitle
|
|
26280
26386
|
}
|
|
26281
26387
|
);
|
|
26388
|
+
return host ? createPortal(surface, host) : surface;
|
|
26282
26389
|
}
|
|
26283
26390
|
function WalletCenterTrigger({
|
|
26284
26391
|
variant = "icon",
|
|
@@ -30737,7 +30844,7 @@ var PendingPaymentCard = ({
|
|
|
30737
30844
|
{
|
|
30738
30845
|
className: [
|
|
30739
30846
|
"flex items-center gap-3 px-3 py-2 border-b transition-colors",
|
|
30740
|
-
isHighlighted ? "border-status-warning-text/40 bg-status-warning-bg
|
|
30847
|
+
isHighlighted ? "border-status-warning-text/40 bg-status-warning-bg" : "border-border-light hover:bg-chip",
|
|
30741
30848
|
className
|
|
30742
30849
|
].join(" "),
|
|
30743
30850
|
children: [
|
|
@@ -30805,7 +30912,7 @@ var PendingPaymentCard = ({
|
|
|
30805
30912
|
{
|
|
30806
30913
|
className: [
|
|
30807
30914
|
"rounded-lg border p-4 transition-shadow",
|
|
30808
|
-
isHighlighted ? "border-status-warning-text/40 bg-status-warning-bg
|
|
30915
|
+
isHighlighted ? "border-status-warning-text/40 bg-status-warning-bg" : "border-border-default bg-surface",
|
|
30809
30916
|
"hover:shadow-sm",
|
|
30810
30917
|
className
|
|
30811
30918
|
].join(" "),
|
|
@@ -31447,4 +31554,4 @@ init_YieldFabricLogo();
|
|
|
31447
31554
|
//! This service handles all key management operations including creation, retrieval,
|
|
31448
31555
|
//! rotation, deletion, and cryptographic operations.
|
|
31449
31556
|
|
|
31450
|
-
export { AccessFlow, AccountOpeningPanel, AddCardDialog, AvatarPicker, BankAccountCard, BillingCenter, BillingChip, BrandingProvider, BrowserLocalStorageTokenStore, BusinessVerificationSection, Button, BuyCreditsDialog, CHOOSER_META, CREDIT_CHECKOUT_RETRY_REQUESTED_EVENT, CREDIT_CHECKOUT_RETRY_REQUIRED_EVENT, CREDIT_CHECKOUT_SYNCED_EVENT, Card, CardRequiredError, CardRequiredHost, ChainAccountActivationError, ChainAccountActivationHttpError, ChainAccountRequiredError, ChainAccountRequiredHost, ChainMismatchError, ChainNotConfiguredError, ChangePasswordModal_default as ChangePasswordModal, CreditExhaustedHost, CreditRequiredError, DEFAULT_APP_DELEGATION_SCOPE, DEFAULT_AUTH_PROVIDERS, DEFAULT_KYC_PROVIDERS, DEFAULT_MESSAGES, DEFAULT_OWNED_GROUP_DELEGATION_SCOPE, DailySpendChart, Drawer, EarningsSection, EntitySSEProvider, GROUP_ACCOUNT_OPERATION_KEYS, GenericSignDialog, globalNotificationService_default as GlobalNotificationService, GroupBillingSection, GroupOwnershipPanel, IdentityCard, IncomingPaymentsCenter, IncomingPaymentsInbox, IncomingPaymentsLauncher, KeyBalances_default as KeyBalances, SecurityPage as KeysManager, LineItemDrawer, LineItemsTable, LoadingSpinner, LoginAltMethods, LoginComponent, LoginForm, LoginLayout, LoginPage, LoginShell, METER_LABELS, OnboardingMethodCard, OnboardingPlanHttpError, OnboardingPolicyHttpError, OnboardingPolicySection, OnboardingWizard, PaymentStatusEnum, PendingPaymentCard, PhoneVerification, Profile as ProfileEditor, ProviderConfigProvider, RedirectTo, SendFromKey_default as SendFromKey, SendPaymentDrawer, SendPaymentForm, SignatureCenterRow, SignaturePreviewDrawer as SignatureDrawer, SignatureQueueProvider, SignatureWorkflow, SkeletonAvatar, SponsorshipSessionError, StepShell, Toast, VerificationRequiredError, VerificationRequiredHost, VerifiedBadge, WalletAuthProvider, WalletCenter, WalletCenterProvider, WalletCenterTrigger, WalletConfigProvider, WalletIdentityError, WalletNotRegisteredError, WalletProvider, YieldFabricLockup, activateChainAccount, activateChainAccountAndRefresh, addChainParamsByChainId, agentMinutesFromMicros, apiKeysService, assertChain, authService, balanceService, billingGateInfoForActiveToken, billingGateInfoFromToken, billingRecoveryAction, billingService, breakdownKeyLabel, buildAuthRegistry, buildCreditCheckoutReturnUrls, buildInbox, buildKycRegistry, buildSendParams, canReexecuteMessage, canonicalEip155ChainId, canonicalEvmAddress, canonicalGroupOperationUuid, canonicalU256Decimal, cardRequiredGate, chainAccountMode, chainAccountRequiredGate, chainAddressesToLabels, chainIdToHex, chainNames, computeMetaTransactionDigest, confirmMyEmailVerification, contractNeedsObligationAccept, convertAmountToRaw, createPasskey, createStripeIdentitySession, createSumsubAccessToken, creditCheckoutTargetGroupId, creditGateInfoForActiveToken, creditPlanTotalAllowanceUsd, creditRequiredGate, decodeJwtPayload as decodeJwtClaims, defaultTokenStore, defaultWalletCenterModules, defineWalletDirectory, defineWalletPanel, defineWalletRoute, delegationService, effectiveStatus, enabledPaymentChainIds, encodeApprove, encodeBalanceOf, encodeTransfer, ensureCardOnFile, ensureCreditAvailable, ensureVerified, exchange, extractCurrency, extractTokenAssetId, featureLabel, fetchAccountOpeningStatus, fetchNonce, fetchVerificationStatus, fetchWithChainAccountActivationRetry, findWalletRegistration, formatAgentMinutes, formatAgentTime, formatPages, formatPayment, formatRelativeTime, formatTxHashShort, formatUnits, formatUsdMicros, freshTokenForSameChainActor, gasOpLabel, getActiveChainId, getActiveUserChainId, getAddChainParams, getAuthServiceUrl, getBlockExplorer, getBlockExplorerAddressUrl, getBlockExplorerTxUrl, getChainAccountActivationStatus, getChainConfig, getChainIdFromToken, getCurrentChainId, getDefaultChainAddressLabels, getDefaultChainId, getErc20Allowance, getErc20Balance, getErc20Decimals, getErc20Symbol, getIdentityStatus, getIdentityStatusForProviders, getMyEmailVerificationStatus, getMyProfile, getNativeBalance, getPaymentsServiceUrl, getReceipt, getWebSocketUrl, groupInbox, groupsService, hasActiveAuthToken, humanizeMessageType, invalidateOnboardingState, invalidateWalletCount, isEoaKey, isExactSponsoredUserToken, isLiveMode, isPaymentChainEnabled, isStaffRole, itemAgentTime, itemLabel, keyPairToEoaHandle, keysService, knownAuthProviderIds, knownKycProviderIds, kycKindOf, link, listMyLoginKeys, listMyVerifications, llmCategoryLabel, makeWalletId, manualChainAccountRequiredContext, messagesService, needsPaymentAcceptance, nftOwnedSignerBinding, onboardingPlanService, onboardingPolicyService, ownedGroupUserSignerCustody, parseChainAccountRequired, parseChainAccountRequiredRest, parseGroupAccountOperationWire, parseUnits, parseVerificationRequired, parseWalletId, passkeyLabel, patchMyEmail, patchMyProfile, paymentsService, paymentsUrlMap, personalJwtHasGroupPayer, personalSessionHasGroupPayer, promptCardCapture, promptCreditPurchase, promptVerification, readCreditCheckoutReturnMarker, recordCredentialIssued, refreshChainAccountSession, registerBlockExplorer, registeredWalletsFromMetadata, remintTokensAfterCardChange, requireActiveUserChainId, requireChainIdFromToken, requireWalletRegistrationChain, requireWalletRegistrationSessionChain, resetDecimalsWarningCache, resolveAuth, resolveKyc, resolveKycInstance, resolvePaymentDirection, resolveWalletIdentityForChain, retryOnceAfterChainAccountActivation, selectWalletRegistration, setAuthRegistry, setGroupVerificationProfiles, setKycRegistry, setModeConfig, signInChallengeViaPasskey, signInWithPasskey, signUpRegisterViaPasskey, signUpWithPasskey, signWithPasskey, signatureSignin, snapshotNeedsPrepaidPlan, startMyEmailVerification, statusToColor, subscribeEntityEvents, switchChain, syntheticPasskeyAddress, testChainIds, tokenManager, tryParseWalletId, unlink, useAuth, useAuthContext, useBranding, useEntitySSE, useEoaSend, useForm, useGenericSigner, useIncomingPaymentDecimals, useIncomingPayments, useKeyBalance, useLogin, useLoginWithForm, useOnboardingState2 as useOnboardingRouting, useOnboardingState, usePaymentDecimals, useProviderConfig, useSendPayment, useSignatureQueue, useTapToCancel, useThemeClasses, useTokenStore, useWalletCenter, useWalletConfig, useWalletNavigate, useWalletSigner, userIdentityStatusScopes, validateWalletCenterModules, verificationRequiredGate, verifyMetaTransactionDigest, verifyNftAuthorizationBinding, walletCenter, walletRegistrationAuthContext, walletRegistrationMatches, walletRegistrationsForChain, withoutCreditCheckoutReturnMarker };
|
|
31557
|
+
export { AccessFlow, AccountOpeningPanel, AddCardDialog, AvatarPicker, BankAccountCard, BillingCenter, BillingChip, BrandingProvider, BrowserLocalStorageTokenStore, BusinessVerificationSection, Button, BuyCreditsDialog, CHOOSER_META, CREDIT_CHECKOUT_RETRY_REQUESTED_EVENT, CREDIT_CHECKOUT_RETRY_REQUIRED_EVENT, CREDIT_CHECKOUT_SYNCED_EVENT, Card, CardRequiredError, CardRequiredHost, ChainAccountActivationError, ChainAccountActivationHttpError, ChainAccountRequiredError, ChainAccountRequiredHost, ChainMismatchError, ChainNotConfiguredError, ChangePasswordModal_default as ChangePasswordModal, CreditExhaustedHost, CreditRequiredError, DEFAULT_APP_DELEGATION_SCOPE, DEFAULT_AUTH_PROVIDERS, DEFAULT_KYC_PROVIDERS, DEFAULT_MESSAGES, DEFAULT_OWNED_GROUP_DELEGATION_SCOPE, DailySpendChart, Drawer, EarningsSection, EntitySSEProvider, GROUP_ACCOUNT_OPERATION_KEYS, GenericSignDialog, globalNotificationService_default as GlobalNotificationService, GroupBillingSection, GroupOwnershipPanel, IdentityCard, IncomingPaymentsCenter, IncomingPaymentsInbox, IncomingPaymentsLauncher, KeyBalances_default as KeyBalances, SecurityPage as KeysManager, LineItemDrawer, LineItemsTable, LoadingSpinner, LoginAltMethods, LoginComponent, LoginForm, LoginLayout, LoginPage, LoginShell, METER_LABELS, OnboardingMethodCard, OnboardingPlanHttpError, OnboardingPolicyHttpError, OnboardingPolicySection, OnboardingWizard, PaymentStatusEnum, PendingPaymentCard, PhoneVerification, Profile as ProfileEditor, ProviderConfigProvider, RedirectTo, SendFromKey_default as SendFromKey, SendPaymentDrawer, SendPaymentForm, SignatureCenterRow, SignaturePreviewDrawer as SignatureDrawer, SignatureQueueProvider, SignatureWorkflow, SkeletonAvatar, SponsorshipSessionError, StepShell, Toast, VerificationRequiredError, VerificationRequiredHost, VerifiedBadge, WalletAuthProvider, WalletCenter, WalletCenterProvider, WalletCenterTrigger, WalletConfigProvider, WalletIdentityError, WalletNotRegisteredError, WalletProvider, YieldFabricLockup, activateChainAccount, activateChainAccountAndRefresh, addChainParamsByChainId, agentMinutesFromMicros, apiKeysService, assertChain, authService, balanceService, billingGateInfoForActiveToken, billingGateInfoFromToken, billingRecoveryAction, billingService, breakdownKeyLabel, buildAuthRegistry, buildCreditCheckoutReturnUrls, buildInbox, buildKycRegistry, buildSendParams, canReexecuteMessage, canonicalEip155ChainId, canonicalEvmAddress, canonicalGroupOperationUuid, canonicalU256Decimal, cardRequiredGate, chainAccountMode, chainAccountRequiredGate, chainAddressesToLabels, chainIdToHex, chainNames, computeMetaTransactionDigest, confirmMyEmailVerification, contractNeedsObligationAccept, convertAmountToRaw, createPasskey, createStripeIdentitySession, createSumsubAccessToken, creditCheckoutTargetGroupId, creditGateInfoForActiveToken, creditPlanTotalAllowanceUsd, creditRequiredGate, decodeJwtPayload as decodeJwtClaims, defaultTokenStore, defaultWalletCenterModules, defineWalletDirectory, defineWalletPanel, defineWalletRoute, delegationService, effectiveStatus, enabledPaymentChainIds, encodeApprove, encodeBalanceOf, encodeTransfer, ensureCardOnFile, ensureCreditAvailable, ensureVerified, exchange, extractCurrency, extractTokenAssetId, featureLabel, fetchAccountOpeningStatus, fetchNonce, fetchVerificationStatus, fetchWithChainAccountActivationRetry, findWalletRegistration, formatAgentMinutes, formatAgentTime, formatPages, formatPayment, formatRelativeTime, formatTxHashShort, formatUnits, formatUsdMicros, freshTokenForSameChainActor, gasOpLabel, getActiveChainId, getActiveUserChainId, getAddChainParams, getAuthServiceUrl, getBlockExplorer, getBlockExplorerAddressUrl, getBlockExplorerTxUrl, getChainAccountActivationStatus, getChainConfig, getChainIdFromToken, getCurrentChainId, getDefaultChainAddressLabels, getDefaultChainId, getErc20Allowance, getErc20Balance, getErc20Decimals, getErc20Symbol, getIdentityStatus, getIdentityStatusForProviders, getMyEmailVerificationStatus, getMyProfile, getNativeBalance, getPaymentsServiceUrl, getReceipt, getWebSocketUrl, groupInbox, groupsService, hasActiveAuthToken, humanizeMessageType, invalidateOnboardingState, invalidateWalletCount, isEoaKey, isExactSponsoredUserToken, isLiveMode, isPaymentChainEnabled, isStaffRole, itemAgentTime, itemLabel, keyPairToEoaHandle, keysService, knownAuthProviderIds, knownKycProviderIds, kycKindOf, link, listMyLoginKeys, listMyVerifications, llmCategoryLabel, makeWalletId, manualChainAccountRequiredContext, messagesService, needsPaymentAcceptance, nftOwnedSignerBinding, onboardingPlanService, onboardingPolicyService, ownedGroupUserSignerCustody, parseChainAccountRequired, parseChainAccountRequiredRest, parseGroupAccountOperationWire, parseUnits, parseVerificationRequired, parseWalletId, passkeyLabel, patchMyEmail, patchMyProfile, paymentsService, paymentsUrlMap, personalJwtHasGroupPayer, personalSessionHasGroupPayer, promptCardCapture, promptCreditPurchase, promptVerification, readCreditCheckoutReturnMarker, recordCredentialIssued, refreshChainAccountSession, registerBlockExplorer, registeredWalletsFromMetadata, remintTokensAfterCardChange, requireActiveUserChainId, requireChainIdFromToken, requireWalletRegistrationChain, requireWalletRegistrationSessionChain, resetDecimalsWarningCache, resolveAuth, resolveKyc, resolveKycInstance, resolvePaymentDirection, resolveWalletIdentityForChain, retryOnceAfterChainAccountActivation, selectWalletRegistration, setAuthRegistry, setGroupVerificationProfiles, setKycRegistry, setModeConfig, signInChallengeViaPasskey, signInWithPasskey, signUpRegisterViaPasskey, signUpWithPasskey, signWithPasskey, signatureSignin, snapshotNeedsPrepaidPlan, startMyEmailVerification, statusToColor, subscribeEntityEvents, subscribeJsonEvents, switchChain, syntheticPasskeyAddress, testChainIds, tokenManager, tryParseWalletId, unlink, useAuth, useAuthContext, useBranding, useEntitySSE, useEoaSend, useForm, useGenericSigner, useIncomingPaymentDecimals, useIncomingPayments, useKeyBalance, useLogin, useLoginWithForm, useOnboardingState2 as useOnboardingRouting, useOnboardingState, usePaymentDecimals, useProviderConfig, useSendPayment, useSignatureQueue, useTapToCancel, useThemeClasses, useTokenStore, useWalletCenter, useWalletConfig, useWalletNavigate, useWalletSigner, userIdentityStatusScopes, validateWalletCenterModules, verificationRequiredGate, verifyMetaTransactionDigest, verifyNftAuthorizationBinding, walletCenter, walletRegistrationAuthContext, walletRegistrationMatches, walletRegistrationsForChain, withoutCreditCheckoutReturnMarker };
|