@yieldfabric/wallet 0.2.1 → 0.2.3
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/index.cjs +155 -202
- package/dist/index.d.cts +18 -14
- package/dist/index.d.ts +18 -14
- package/dist/index.js +156 -203
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import React54, { createContext, lazy, useContext, useState, useEffect, useRef,
|
|
|
9
9
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
10
10
|
import { AvererSdkProvider, useAvererWallet, AvererWebSdk } from '@averer/averer-websdk';
|
|
11
11
|
import sha3, { keccak256 } from 'js-sha3';
|
|
12
|
-
import { XMarkIcon, IdentificationIcon, CheckCircleIcon, ExclamationTriangleIcon, SparklesIcon, EnvelopeIcon, ArrowPathIcon,
|
|
12
|
+
import { ChevronRightIcon, XMarkIcon, IdentificationIcon, CheckCircleIcon, ExclamationTriangleIcon, SparklesIcon, EnvelopeIcon, ArrowPathIcon, ShieldCheckIcon, KeyIcon, CreditCardIcon, UserIcon, UserGroupIcon } from '@heroicons/react/24/outline';
|
|
13
13
|
import { Avatar } from '@avatune/react';
|
|
14
14
|
import theme from '@avatune/kyute-theme/react';
|
|
15
15
|
import { AnimatePresence, motion } from 'framer-motion';
|
|
@@ -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
|
|
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 pt-[calc(1.25rem+env(safe-area-inset-top))] pb-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: [
|
|
@@ -5362,7 +5362,7 @@ var init_SignupFlow = __esm({
|
|
|
5362
5362
|
navigate("/onboarding/choose");
|
|
5363
5363
|
},
|
|
5364
5364
|
className: "text-[12px] text-text-muted hover:text-text-primary transition-colors text-left",
|
|
5365
|
-
children: "\
|
|
5365
|
+
children: "\u2039 Try a different method"
|
|
5366
5366
|
}
|
|
5367
5367
|
) })
|
|
5368
5368
|
] });
|
|
@@ -5778,6 +5778,7 @@ async function fetchSnapshot() {
|
|
|
5778
5778
|
return {
|
|
5779
5779
|
profileCompleted: !!profile && !!profile.profile_completed,
|
|
5780
5780
|
keyCount: keys.length,
|
|
5781
|
+
keyDeferred: me?.id ? keyStepDeferred(me.id) : false,
|
|
5781
5782
|
emailVerified: email.verified,
|
|
5782
5783
|
emailSynthetic: email.is_synthetic,
|
|
5783
5784
|
identityStatus: identity && identity.status !== "unverified" ? identity : null,
|
|
@@ -5810,6 +5811,24 @@ async function getSnapshot() {
|
|
|
5810
5811
|
cache = { kind: "inflight", promise };
|
|
5811
5812
|
return promise;
|
|
5812
5813
|
}
|
|
5814
|
+
var keyDeferredKey = (userId) => `yf.onboarding.keyDeferred.${userId}`;
|
|
5815
|
+
var keyDeferredHere = /* @__PURE__ */ new Set();
|
|
5816
|
+
function keyStepDeferred(userId) {
|
|
5817
|
+
if (keyDeferredHere.has(userId)) return true;
|
|
5818
|
+
try {
|
|
5819
|
+
return window.localStorage.getItem(keyDeferredKey(userId)) === "1";
|
|
5820
|
+
} catch {
|
|
5821
|
+
return false;
|
|
5822
|
+
}
|
|
5823
|
+
}
|
|
5824
|
+
function deferKeyStep(userId) {
|
|
5825
|
+
keyDeferredHere.add(userId);
|
|
5826
|
+
try {
|
|
5827
|
+
window.localStorage.setItem(keyDeferredKey(userId), "1");
|
|
5828
|
+
} catch {
|
|
5829
|
+
}
|
|
5830
|
+
invalidateOnboardingState();
|
|
5831
|
+
}
|
|
5813
5832
|
function invalidateOnboardingState() {
|
|
5814
5833
|
cache = { kind: "empty" };
|
|
5815
5834
|
scopedIdentity = null;
|
|
@@ -5836,10 +5855,10 @@ function decide(snapshot, ctx) {
|
|
|
5836
5855
|
if (ctx.kycVerifiesEmail) {
|
|
5837
5856
|
if (identityStep) return identityStep;
|
|
5838
5857
|
if (!emailOk) return "email-required";
|
|
5839
|
-
if (snapshot.keyCount < MIN_USER_KEYS) return "wallets-required";
|
|
5858
|
+
if (snapshot.keyCount < MIN_USER_KEYS && !snapshot.keyDeferred) return "wallets-required";
|
|
5840
5859
|
} else {
|
|
5841
5860
|
if (!emailOk) return "email-required";
|
|
5842
|
-
if (snapshot.keyCount < MIN_USER_KEYS) return "wallets-required";
|
|
5861
|
+
if (snapshot.keyCount < MIN_USER_KEYS && !snapshot.keyDeferred) return "wallets-required";
|
|
5843
5862
|
if (identityStep) return identityStep;
|
|
5844
5863
|
}
|
|
5845
5864
|
if (!snapshot.profileCompleted) return "profile-required";
|
|
@@ -5954,7 +5973,7 @@ function clearDynamicSession() {
|
|
|
5954
5973
|
init_WalletConfigContext();
|
|
5955
5974
|
var WalletAuthContext = createContext(void 0);
|
|
5956
5975
|
function WalletAuthProvider({ children }) {
|
|
5957
|
-
const { onSessionBootstrapped } = useWalletConfig();
|
|
5976
|
+
const { onSessionBootstrapped, onBeforeLogout } = useWalletConfig();
|
|
5958
5977
|
const [user, setUser] = useState(null);
|
|
5959
5978
|
const [isLoading, setIsLoading] = useState(true);
|
|
5960
5979
|
const [error, setError] = useState(null);
|
|
@@ -6047,6 +6066,7 @@ function WalletAuthProvider({ children }) {
|
|
|
6047
6066
|
setIsLoading(true);
|
|
6048
6067
|
setError(null);
|
|
6049
6068
|
tokenRenewalService.stopRenewal();
|
|
6069
|
+
await Promise.resolve().then(() => onBeforeLogout?.()).catch(() => void 0);
|
|
6050
6070
|
await authService.logout();
|
|
6051
6071
|
clearDynamicSession();
|
|
6052
6072
|
setUser(null);
|
|
@@ -6062,6 +6082,7 @@ function WalletAuthProvider({ children }) {
|
|
|
6062
6082
|
setIsLoading(true);
|
|
6063
6083
|
setError(null);
|
|
6064
6084
|
tokenRenewalService.stopRenewal();
|
|
6085
|
+
await Promise.resolve().then(() => onBeforeLogout?.()).catch(() => void 0);
|
|
6065
6086
|
await authService.logoutAll();
|
|
6066
6087
|
clearDynamicSession();
|
|
6067
6088
|
setUser(null);
|
|
@@ -9309,11 +9330,11 @@ function humanizeMessageType(messageType) {
|
|
|
9309
9330
|
return spaced.charAt(0).toUpperCase() + spaced.slice(1);
|
|
9310
9331
|
}
|
|
9311
9332
|
var TONE_COLORS = {
|
|
9312
|
-
success: { dotClass: "bg-emerald-300", textClass: "text-emerald-300", bgClass: "bg-emerald-950/[0.16]" },
|
|
9313
|
-
danger: { dotClass: "bg-red-300", textClass: "text-red-200", bgClass: "bg-red-950/[0.16]" },
|
|
9314
|
-
warn: { dotClass: "bg-amber-300", textClass: "text-amber-200", bgClass: "bg-amber-950/[0.14]" },
|
|
9315
|
-
info: { dotClass: "bg-blue-300", textClass: "text-blue-200", bgClass: "bg-blue-950/[0.14]" },
|
|
9316
|
-
neutral: { dotClass: "bg-white/[0.34]", textClass: "text-white/[0.56]", bgClass: "bg-white/[0.045]" }
|
|
9333
|
+
success: { dotClass: "bg-emerald-300", textClass: "text-status-success-text dark:text-emerald-300", bgClass: "bg-status-success-bg dark:bg-emerald-950/[0.16]" },
|
|
9334
|
+
danger: { dotClass: "bg-red-300", textClass: "text-status-error-text dark:text-red-200", bgClass: "bg-status-error-bg dark:bg-red-950/[0.16]" },
|
|
9335
|
+
warn: { dotClass: "bg-amber-300", textClass: "text-status-warning-text dark:text-amber-200", bgClass: "bg-status-warning-bg dark:bg-amber-950/[0.14]" },
|
|
9336
|
+
info: { dotClass: "bg-blue-300", textClass: "text-azure dark:text-blue-200", bgClass: "bg-azure-tint dark:bg-blue-950/[0.14]" },
|
|
9337
|
+
neutral: { dotClass: "bg-text-muted dark:bg-white/[0.34]", textClass: "text-text-muted dark:text-white/[0.56]", bgClass: "bg-chip dark:bg-white/[0.045]" }
|
|
9317
9338
|
};
|
|
9318
9339
|
var STATUS_TO_TONE = {
|
|
9319
9340
|
completed: "success",
|
|
@@ -10257,7 +10278,7 @@ var DEFAULT_MESSAGES = {
|
|
|
10257
10278
|
},
|
|
10258
10279
|
email: {
|
|
10259
10280
|
title: "Continue with email",
|
|
10260
|
-
description: "
|
|
10281
|
+
description: "An email and a password. You can add a passkey later."
|
|
10261
10282
|
},
|
|
10262
10283
|
haveAccountPrompt: "Already have an account?",
|
|
10263
10284
|
signInLinkText: "Sign in"
|
|
@@ -10268,7 +10289,7 @@ var DEFAULT_MESSAGES = {
|
|
|
10268
10289
|
},
|
|
10269
10290
|
emailSignup: {
|
|
10270
10291
|
header: "Create your account",
|
|
10271
|
-
subheader: "
|
|
10292
|
+
subheader: "An email and a password is all it takes.",
|
|
10272
10293
|
submitButtonText: "Continue",
|
|
10273
10294
|
submittingButtonText: "Creating account\u2026",
|
|
10274
10295
|
backButtonText: "\u2039 Back",
|
|
@@ -10377,7 +10398,7 @@ function LoginPage({
|
|
|
10377
10398
|
align = "center",
|
|
10378
10399
|
logo
|
|
10379
10400
|
}) {
|
|
10380
|
-
const alignClass = align === "top" ? "items-start pt-
|
|
10401
|
+
const alignClass = align === "top" ? "items-start pt-[calc(3rem+env(safe-area-inset-top))] pb-12" : "items-center pt-[env(safe-area-inset-top)]";
|
|
10381
10402
|
return /* @__PURE__ */ jsx(
|
|
10382
10403
|
"div",
|
|
10383
10404
|
{
|
|
@@ -10516,7 +10537,7 @@ function OnboardingChoosePath({ chrome } = {}) {
|
|
|
10516
10537
|
/* @__PURE__ */ jsxs("div", { className: "mx-auto max-w-[520px] text-center space-y-1.5", children: [
|
|
10517
10538
|
/* @__PURE__ */ jsx("h2", { className: "text-[18px] text-text-primary font-medium", children: messages.choosePath.header }),
|
|
10518
10539
|
/* @__PURE__ */ jsx("p", { className: "text-[12px] text-text-secondary", children: messages.choosePath.subheader }),
|
|
10519
|
-
configError && /* @__PURE__ */ jsx("p", { className: "text-[10px] text-orange-400 mt-2", children: "Provider config unavailable \u2014 falling back to email only." })
|
|
10540
|
+
configError && /* @__PURE__ */ jsx("p", { className: "text-[10px] text-status-warning-text dark:text-orange-400 mt-2", children: "Provider config unavailable \u2014 falling back to email only." })
|
|
10520
10541
|
] }),
|
|
10521
10542
|
/* @__PURE__ */ jsxs("div", { className: "mx-auto w-full max-w-[480px] space-y-2.5", children: [
|
|
10522
10543
|
avererEnabled && /* @__PURE__ */ jsx(
|
|
@@ -10616,7 +10637,7 @@ function PlanOfferCard({
|
|
|
10616
10637
|
/* @__PURE__ */ jsx("span", { className: "block text-[8px] font-medium uppercase tracking-[0.1em] text-text-muted", children: "Pay monthly" }),
|
|
10617
10638
|
/* @__PURE__ */ jsx("span", { className: "mt-1 block text-[16px] font-semibold leading-none tracking-tight text-text-primary tabular-nums", children: price })
|
|
10618
10639
|
] }),
|
|
10619
|
-
/* @__PURE__ */ jsx(
|
|
10640
|
+
/* @__PURE__ */ jsx(ChevronRightIcon, { className: "h-3.5 w-3.5 shrink-0 text-text-muted", strokeWidth: 1.7 }),
|
|
10620
10641
|
/* @__PURE__ */ jsxs("span", { children: [
|
|
10621
10642
|
/* @__PURE__ */ jsx("span", { className: "block text-[8px] font-medium uppercase tracking-[0.1em] text-text-muted", children: "Cycle credit" }),
|
|
10622
10643
|
/* @__PURE__ */ jsx("span", { className: "mt-1 block text-[16px] font-semibold leading-none tracking-tight text-text-primary tabular-nums", children: allowance })
|
|
@@ -10786,7 +10807,7 @@ function OnboardingMethodCard({
|
|
|
10786
10807
|
/* @__PURE__ */ jsx("div", { className: "text-sm text-text-primary", children: label }),
|
|
10787
10808
|
/* @__PURE__ */ jsx("div", { className: "text-[11px] text-text-secondary", children: sublabel })
|
|
10788
10809
|
] }),
|
|
10789
|
-
/* @__PURE__ */ jsx("
|
|
10810
|
+
/* @__PURE__ */ jsx(ChevronRightIcon, { "aria-hidden": "true", className: "h-4 w-4 text-text-secondary" })
|
|
10790
10811
|
]
|
|
10791
10812
|
}
|
|
10792
10813
|
);
|
|
@@ -12265,7 +12286,7 @@ function OnboardingChooseMethod({ chrome } = {}) {
|
|
|
12265
12286
|
return /* @__PURE__ */ jsx(StepShell, { chrome, children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
12266
12287
|
/* @__PURE__ */ jsxs("div", { className: "text-center", children: [
|
|
12267
12288
|
/* @__PURE__ */ jsx("h2", { className: "text-[16px] text-text-primary", children: messages.chooseMethod.header }),
|
|
12268
|
-
configError && /* @__PURE__ */ jsx("p", { className: "text-[10px] text-orange-400 mt-2", children: "Provider config unavailable \u2014 falling back to email only." })
|
|
12289
|
+
configError && /* @__PURE__ */ jsx("p", { className: "text-[10px] text-status-warning-text dark:text-orange-400 mt-2", children: "Provider config unavailable \u2014 falling back to email only." })
|
|
12269
12290
|
] }),
|
|
12270
12291
|
/* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
|
|
12271
12292
|
enabled.map(({ id, impl }) => {
|
|
@@ -13058,7 +13079,7 @@ function SkeletonAvatar({
|
|
|
13058
13079
|
{
|
|
13059
13080
|
role: "img",
|
|
13060
13081
|
"aria-label": choice ? `${name} - ${choice.label} avatar` : `${name}'s avatar`,
|
|
13061
|
-
className: `rounded-full overflow-hidden flex items-center justify-center select-none bg-[#252525] ${className}`,
|
|
13082
|
+
className: `rounded-full overflow-hidden flex items-center justify-center select-none bg-surface-alt dark:bg-[#252525] ${className}`,
|
|
13062
13083
|
style: {
|
|
13063
13084
|
width: size,
|
|
13064
13085
|
height: size
|
|
@@ -13111,7 +13132,7 @@ function AvatarPicker({
|
|
|
13111
13132
|
onClick: () => onChange(c.id),
|
|
13112
13133
|
className: [
|
|
13113
13134
|
"rounded-full flex items-center justify-center select-none overflow-hidden",
|
|
13114
|
-
"transition-all border-2 bg-[#252525]",
|
|
13135
|
+
"transition-all border-2 bg-surface-alt dark:bg-[#252525]",
|
|
13115
13136
|
selected ? "border-primary scale-105" : "border-transparent hover:border-border-light"
|
|
13116
13137
|
].join(" "),
|
|
13117
13138
|
style: { width: tileSize, height: tileSize },
|
|
@@ -14923,35 +14944,6 @@ function providerLabel(p) {
|
|
|
14923
14944
|
function ProviderIcon({ provider }) {
|
|
14924
14945
|
return /* @__PURE__ */ jsx(KeyIcon, { className: "h-4 w-4 text-text-secondary", strokeWidth: 1.5 });
|
|
14925
14946
|
}
|
|
14926
|
-
function setupCopy(args) {
|
|
14927
|
-
const { keyCount, busy } = args;
|
|
14928
|
-
if (keyCount >= MIN_KEYS) {
|
|
14929
|
-
return {
|
|
14930
|
-
title: "Ready to sign",
|
|
14931
|
-
body: keyCount >= RECOMMENDED_KEYS ? "Your signing keys are ready, including a backup recovery path." : "Your signing key is ready. Adding a second key gives you a recovery path, but you can continue now.",
|
|
14932
|
-
tone: "done"
|
|
14933
|
-
};
|
|
14934
|
-
}
|
|
14935
|
-
if (busy === "passkey" || busy === "metamask") {
|
|
14936
|
-
return {
|
|
14937
|
-
title: "Saving your signing key",
|
|
14938
|
-
body: "Complete the passkey or wallet prompt. Your smart account will be activated later, only when an on-chain action requires it.",
|
|
14939
|
-
tone: "active"
|
|
14940
|
-
};
|
|
14941
|
-
}
|
|
14942
|
-
return {
|
|
14943
|
-
title: "Choose a signing key",
|
|
14944
|
-
body: "Use a passkey for quick device-native signing, or connect MetaMask if you prefer an external wallet.",
|
|
14945
|
-
tone: "waiting"
|
|
14946
|
-
};
|
|
14947
|
-
}
|
|
14948
|
-
function StepDot({
|
|
14949
|
-
state,
|
|
14950
|
-
icon
|
|
14951
|
-
}) {
|
|
14952
|
-
const className = state === "done" ? "bg-status-success-bg text-status-success-text border-status-success-text/30" : state === "active" ? "bg-status-warning-bg text-status-warning-text border-status-warning-text/30" : "bg-chip text-text-secondary border-border-default";
|
|
14953
|
-
return /* @__PURE__ */ jsx("div", { className: `h-8 w-8 rounded-full border flex items-center justify-center ${className}`, children: state === "done" ? /* @__PURE__ */ jsx(CheckCircleIcon, { className: "h-4 w-4", strokeWidth: 1.8 }) : state === "active" ? /* @__PURE__ */ jsx(ArrowPathIcon, { className: "h-4 w-4 animate-spin", strokeWidth: 1.8 }) : icon });
|
|
14954
|
-
}
|
|
14955
14947
|
function SuccessMoment({ visible }) {
|
|
14956
14948
|
if (!visible) return null;
|
|
14957
14949
|
return /* @__PURE__ */ jsx(
|
|
@@ -15022,65 +15014,6 @@ function RecoveryPanel({
|
|
|
15022
15014
|
}
|
|
15023
15015
|
);
|
|
15024
15016
|
}
|
|
15025
|
-
function SetupStep({
|
|
15026
|
-
label,
|
|
15027
|
-
detail,
|
|
15028
|
-
state,
|
|
15029
|
-
icon
|
|
15030
|
-
}) {
|
|
15031
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2.5 min-w-0", children: [
|
|
15032
|
-
/* @__PURE__ */ jsx(StepDot, { state, icon }),
|
|
15033
|
-
/* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
15034
|
-
/* @__PURE__ */ jsx("div", { className: "text-[12px] text-text-primary truncate", children: label }),
|
|
15035
|
-
/* @__PURE__ */ jsx("div", { className: "text-[10px] text-text-secondary truncate", children: detail })
|
|
15036
|
-
] })
|
|
15037
|
-
] });
|
|
15038
|
-
}
|
|
15039
|
-
function SetupStatusPanel({
|
|
15040
|
-
keyCount,
|
|
15041
|
-
busy
|
|
15042
|
-
}) {
|
|
15043
|
-
const copy = setupCopy({ keyCount, busy });
|
|
15044
|
-
const keyState = keyCount >= MIN_KEYS ? "done" : busy === "passkey" || busy === "metamask" ? "active" : "waiting";
|
|
15045
|
-
const readyState = keyCount >= MIN_KEYS ? "done" : "waiting";
|
|
15046
|
-
return /* @__PURE__ */ jsxs(
|
|
15047
|
-
"section",
|
|
15048
|
-
{
|
|
15049
|
-
className: "rounded-lg border border-border-default bg-input-bg px-4 py-4 space-y-4",
|
|
15050
|
-
role: "status",
|
|
15051
|
-
"aria-live": "polite",
|
|
15052
|
-
children: [
|
|
15053
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-3", children: [
|
|
15054
|
-
/* @__PURE__ */ jsxs("div", { className: "space-y-1 min-w-0", children: [
|
|
15055
|
-
/* @__PURE__ */ jsx("h2", { className: "text-[18px] text-text-primary font-medium tracking-normal", children: copy.title }),
|
|
15056
|
-
/* @__PURE__ */ jsx("p", { className: "text-[12px] text-text-secondary leading-relaxed", children: copy.body })
|
|
15057
|
-
] }),
|
|
15058
|
-
/* @__PURE__ */ jsx("div", { className: `shrink-0 h-9 w-9 rounded-full flex items-center justify-center ${copy.tone === "done" ? "bg-status-success-bg text-status-success-text" : copy.tone === "active" ? "bg-status-warning-bg text-status-warning-text" : "bg-chip text-text-secondary"}`, children: copy.tone === "done" ? /* @__PURE__ */ jsx(CheckCircleIcon, { className: "h-5 w-5", strokeWidth: 1.8 }) : copy.tone === "active" ? /* @__PURE__ */ jsx(ArrowPathIcon, { className: "h-5 w-5 animate-spin", strokeWidth: 1.8 }) : /* @__PURE__ */ jsx(ShieldCheckIcon, { className: "h-5 w-5", strokeWidth: 1.8 }) })
|
|
15059
|
-
] }),
|
|
15060
|
-
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 gap-2.5", children: [
|
|
15061
|
-
/* @__PURE__ */ jsx(
|
|
15062
|
-
SetupStep,
|
|
15063
|
-
{
|
|
15064
|
-
label: "Signing key",
|
|
15065
|
-
detail: keyCount >= MIN_KEYS ? "Ready to authorize" : "Choose one below",
|
|
15066
|
-
state: keyState,
|
|
15067
|
-
icon: /* @__PURE__ */ jsx(KeyIcon, { className: "h-4 w-4", strokeWidth: 1.7 })
|
|
15068
|
-
}
|
|
15069
|
-
),
|
|
15070
|
-
/* @__PURE__ */ jsx(
|
|
15071
|
-
SetupStep,
|
|
15072
|
-
{
|
|
15073
|
-
label: "Continue",
|
|
15074
|
-
detail: readyState === "done" ? "Unlocked" : "Unlocks automatically",
|
|
15075
|
-
state: readyState,
|
|
15076
|
-
icon: /* @__PURE__ */ jsx(ClockIcon, { className: "h-4 w-4", strokeWidth: 1.7 })
|
|
15077
|
-
}
|
|
15078
|
-
)
|
|
15079
|
-
] })
|
|
15080
|
-
]
|
|
15081
|
-
}
|
|
15082
|
-
);
|
|
15083
|
-
}
|
|
15084
15017
|
function AddWalletsStep({ chrome } = {}) {
|
|
15085
15018
|
const navigate = useWizardNavigate();
|
|
15086
15019
|
const { bootstrapSession, user } = useAuth();
|
|
@@ -15094,6 +15027,7 @@ function AddWalletsStep({ chrome } = {}) {
|
|
|
15094
15027
|
const [autoAdvanceArmed, setAutoAdvanceArmed] = useState(false);
|
|
15095
15028
|
const [emailDraft, setEmailDraft] = useState("");
|
|
15096
15029
|
const [showDynamic, setShowDynamic] = useState(false);
|
|
15030
|
+
const [walletsOpen, setWalletsOpen] = useState(false);
|
|
15097
15031
|
const hasSyntheticEmail = !!user?.email && user.email.toLowerCase().endsWith("@external.yieldfabric.local");
|
|
15098
15032
|
const { snapshot: gateSnapshot } = useOnboardingState();
|
|
15099
15033
|
const emailOk = !!gateSnapshot && snapshotEmailOk(gateSnapshot);
|
|
@@ -15120,7 +15054,7 @@ function AddWalletsStep({ chrome } = {}) {
|
|
|
15120
15054
|
}, [refresh]);
|
|
15121
15055
|
const keyCount = keys.length;
|
|
15122
15056
|
const canContinue = keyCount >= MIN_KEYS;
|
|
15123
|
-
const continueLabel = canContinue ? autoAdvanceArmed ? "Ready - continuing..." : "Continue" : "Add a
|
|
15057
|
+
const continueLabel = canContinue ? autoAdvanceArmed ? "Ready - continuing..." : "Continue" : "Add a passkey to continue";
|
|
15124
15058
|
async function addMetaMask() {
|
|
15125
15059
|
setError(null);
|
|
15126
15060
|
setLastFailedAction(null);
|
|
@@ -15139,7 +15073,7 @@ function AddWalletsStep({ chrome } = {}) {
|
|
|
15139
15073
|
await impl.directLink({
|
|
15140
15074
|
onComplete: async () => {
|
|
15141
15075
|
setBusy(null);
|
|
15142
|
-
setStatus("
|
|
15076
|
+
setStatus("Saved. One moment\u2026");
|
|
15143
15077
|
await refresh({ invalidate: true });
|
|
15144
15078
|
},
|
|
15145
15079
|
onError: (msg) => {
|
|
@@ -15195,7 +15129,7 @@ function AddWalletsStep({ chrome } = {}) {
|
|
|
15195
15129
|
credential_id: created.credentialId
|
|
15196
15130
|
}
|
|
15197
15131
|
}, { purpose: "user" });
|
|
15198
|
-
setStatus("
|
|
15132
|
+
setStatus("Saved. One moment\u2026");
|
|
15199
15133
|
await refresh({ invalidate: true });
|
|
15200
15134
|
const after = await listMyLoginKeys();
|
|
15201
15135
|
const found = after.some(
|
|
@@ -15250,8 +15184,7 @@ function AddWalletsStep({ chrome } = {}) {
|
|
|
15250
15184
|
setBusy(null);
|
|
15251
15185
|
}
|
|
15252
15186
|
}
|
|
15253
|
-
const
|
|
15254
|
-
if (!canContinue) return;
|
|
15187
|
+
const goOn = useCallback(async () => {
|
|
15255
15188
|
setBusy("continue");
|
|
15256
15189
|
setLastFailedAction(null);
|
|
15257
15190
|
try {
|
|
@@ -15278,7 +15211,16 @@ function AddWalletsStep({ chrome } = {}) {
|
|
|
15278
15211
|
setError(friendlyActionError(e, "refresh"));
|
|
15279
15212
|
setBusy(null);
|
|
15280
15213
|
}
|
|
15281
|
-
}, [bootstrapSession,
|
|
15214
|
+
}, [bootstrapSession, config, navigate, user?.role]);
|
|
15215
|
+
const onContinue = useCallback(async () => {
|
|
15216
|
+
if (!canContinue) return;
|
|
15217
|
+
await goOn();
|
|
15218
|
+
}, [canContinue, goOn]);
|
|
15219
|
+
const onSkip = useCallback(async () => {
|
|
15220
|
+
if (!user?.id) return;
|
|
15221
|
+
deferKeyStep(user.id);
|
|
15222
|
+
await goOn();
|
|
15223
|
+
}, [goOn, user?.id]);
|
|
15282
15224
|
useEffect(() => {
|
|
15283
15225
|
if (!autoAdvanceArmed || !canContinue || busy) return;
|
|
15284
15226
|
const timeout = window.setTimeout(() => {
|
|
@@ -15304,9 +15246,8 @@ function AddWalletsStep({ chrome } = {}) {
|
|
|
15304
15246
|
}
|
|
15305
15247
|
return /* @__PURE__ */ jsx(StepShell, { chrome, wide: true, children: /* @__PURE__ */ jsxs("div", { className: "space-y-4 sm:space-y-5 max-w-[420px] mx-auto", children: [
|
|
15306
15248
|
/* @__PURE__ */ jsxs("div", { className: "text-center space-y-2", children: [
|
|
15307
|
-
/* @__PURE__ */ jsx("
|
|
15308
|
-
/* @__PURE__ */ jsx("
|
|
15309
|
-
/* @__PURE__ */ jsx("p", { className: "text-[12px] leading-relaxed text-text-secondary max-w-[330px] mx-auto", children: "Add a signing key now. Your smart account is activated later, only when an on-chain action needs it." })
|
|
15249
|
+
/* @__PURE__ */ jsx("h2", { className: "text-[21px] text-text-primary font-medium leading-tight", children: "Secure your account" }),
|
|
15250
|
+
/* @__PURE__ */ jsx("p", { className: "text-[13px] leading-relaxed text-text-secondary max-w-[340px] mx-auto", children: "A passkey means only you can approve what is done in your name \u2014 one tap with Face ID, a fingerprint or your PIN. You can also do this later." })
|
|
15310
15251
|
] }),
|
|
15311
15252
|
hasSyntheticEmail && /* @__PURE__ */ jsxs("div", { className: "rounded-lg bg-status-warning-bg border border-status-warning-text/20 p-3 space-y-2", children: [
|
|
15312
15253
|
/* @__PURE__ */ jsx("div", { className: "text-[11px] text-status-warning-text", children: "Your account email is a temporary placeholder. Set a real one so you can recover access and (if you ever want it) link Averer KYC." }),
|
|
@@ -15333,20 +15274,10 @@ function AddWalletsStep({ chrome } = {}) {
|
|
|
15333
15274
|
)
|
|
15334
15275
|
] })
|
|
15335
15276
|
] }),
|
|
15336
|
-
!loading && /* @__PURE__ */ jsx(
|
|
15337
|
-
SetupStatusPanel,
|
|
15338
|
-
{
|
|
15339
|
-
keyCount,
|
|
15340
|
-
busy
|
|
15341
|
-
}
|
|
15342
|
-
),
|
|
15343
15277
|
/* @__PURE__ */ jsx(SuccessMoment, { visible: canContinue && autoAdvanceArmed && !error }),
|
|
15344
|
-
loading ? /* @__PURE__ */ jsx("div", { className: "rounded-lg border border-dashed border-border-default bg-input-bg px-4 py-8 text-center text-[11px] text-text-secondary", children: "Loading\u2026" }) : keys.length === 0 ? /* @__PURE__ */ jsxs("div", { className: "
|
|
15345
|
-
/* @__PURE__ */ jsx("div", { className: "w-11 h-11 rounded-full bg-chip flex items-center justify-center", children: /* @__PURE__ */ jsx(KeyIcon, { className: "h-5 w-5 text-text-secondary", strokeWidth: 1.5 }) }),
|
|
15346
|
-
/* @__PURE__ */ jsx("div", { className: "text-[11px] text-text-secondary", children: "No signing keys yet" })
|
|
15347
|
-
] }) : /* @__PURE__ */ jsxs("div", { className: "bg-input-bg rounded-lg px-4 py-3.5 space-y-3", children: [
|
|
15278
|
+
loading ? /* @__PURE__ */ jsx("div", { className: "rounded-lg border border-dashed border-border-default bg-input-bg px-4 py-8 text-center text-[11px] text-text-secondary", children: "Loading\u2026" }) : keys.length === 0 ? null : /* @__PURE__ */ jsxs("div", { className: "bg-input-bg rounded-lg px-4 py-3.5 space-y-3", children: [
|
|
15348
15279
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between text-[11px]", children: [
|
|
15349
|
-
/* @__PURE__ */ jsx("span", { className: "text-text-secondary", children: "
|
|
15280
|
+
/* @__PURE__ */ jsx("span", { className: "text-text-secondary", children: "Your keys" }),
|
|
15350
15281
|
/* @__PURE__ */ jsxs("span", { className: keyCount < RECOMMENDED_KEYS ? "text-status-warning-text" : "text-status-success-text", children: [
|
|
15351
15282
|
keyCount === 1 && "1 key \xB7 add a backup",
|
|
15352
15283
|
keyCount >= RECOMMENDED_KEYS && `${keyCount} keys`
|
|
@@ -15373,7 +15304,7 @@ function AddWalletsStep({ chrome } = {}) {
|
|
|
15373
15304
|
}) })
|
|
15374
15305
|
] }),
|
|
15375
15306
|
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
15376
|
-
/* @__PURE__ */ jsx("p", { className: "text-[11px] text-text-secondary text-center", children:
|
|
15307
|
+
!emailOk ? /* @__PURE__ */ jsx("p", { className: "text-[11px] text-text-secondary text-center", children: "Confirm your email first" }) : null,
|
|
15377
15308
|
!emailOk && /* @__PURE__ */ jsxs(
|
|
15378
15309
|
"button",
|
|
15379
15310
|
{
|
|
@@ -15393,37 +15324,48 @@ function AddWalletsStep({ chrome } = {}) {
|
|
|
15393
15324
|
type: "button",
|
|
15394
15325
|
onClick: addPasskey,
|
|
15395
15326
|
disabled: busy !== null || !emailOk,
|
|
15396
|
-
className:
|
|
15397
|
-
children: [
|
|
15398
|
-
busy === "passkey" ? /* @__PURE__ */ jsx("span", { className: "text-text-secondary", children: "\u2026" }) : /* @__PURE__ */ jsx(KeyIcon, { className: "h-4 w-4 text-text-secondary", strokeWidth: 1.5 }),
|
|
15399
|
-
/* @__PURE__ */ jsx("span", { children: "Add Passkey" })
|
|
15400
|
-
]
|
|
15401
|
-
}
|
|
15402
|
-
),
|
|
15403
|
-
/* @__PURE__ */ jsxs(
|
|
15404
|
-
"button",
|
|
15405
|
-
{
|
|
15406
|
-
type: "button",
|
|
15407
|
-
onClick: addMetaMask,
|
|
15408
|
-
disabled: busy !== null || !emailOk,
|
|
15409
|
-
className: "\n w-full min-h-[44px] flex items-center justify-center gap-2 py-2.5 rounded-lg\n bg-chip hover:bg-chip-hover\n text-[12px] text-text-primary\n transition-all duration-200\n active:scale-[0.98]\n disabled:opacity-40 disabled:cursor-not-allowed\n ",
|
|
15327
|
+
className: `w-full min-h-[46px] flex items-center justify-center gap-2 py-2.5 rounded-lg text-[13px] font-medium transition-colors active:scale-[0.99] disabled:opacity-40 disabled:cursor-not-allowed ${canContinue ? "bg-chip hover:bg-chip-hover text-text-primary" : "bg-cta hover:bg-cta-hover text-on-cta"}`,
|
|
15410
15328
|
children: [
|
|
15411
|
-
busy === "
|
|
15412
|
-
/* @__PURE__ */ jsx("span", { children: "Add
|
|
15329
|
+
busy === "passkey" ? /* @__PURE__ */ jsx("span", { children: "\u2026" }) : /* @__PURE__ */ jsx(KeyIcon, { className: "h-4 w-4", strokeWidth: 1.5 }),
|
|
15330
|
+
/* @__PURE__ */ jsx("span", { children: canContinue ? "Add another passkey" : "Add a passkey" })
|
|
15413
15331
|
]
|
|
15414
15332
|
}
|
|
15415
15333
|
),
|
|
15416
|
-
|
|
15334
|
+
walletsOpen ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
15335
|
+
/* @__PURE__ */ jsxs(
|
|
15336
|
+
"button",
|
|
15337
|
+
{
|
|
15338
|
+
type: "button",
|
|
15339
|
+
onClick: addMetaMask,
|
|
15340
|
+
disabled: busy !== null || !emailOk,
|
|
15341
|
+
className: "\n w-full min-h-[44px] flex items-center justify-center gap-2 py-2.5 rounded-lg\n bg-chip hover:bg-chip-hover\n text-[12px] text-text-primary\n transition-all duration-200\n active:scale-[0.98]\n disabled:opacity-40 disabled:cursor-not-allowed\n ",
|
|
15342
|
+
children: [
|
|
15343
|
+
busy === "metamask" ? /* @__PURE__ */ jsx("span", { className: "text-text-secondary", children: "\u2026" }) : /* @__PURE__ */ jsx(KeyIcon, { className: "h-4 w-4 text-text-secondary", strokeWidth: 1.5 }),
|
|
15344
|
+
/* @__PURE__ */ jsx("span", { children: "Add MetaMask" })
|
|
15345
|
+
]
|
|
15346
|
+
}
|
|
15347
|
+
),
|
|
15348
|
+
!!config?.auth.enabled.includes("dynamic") && !!config?.auth.settings.dynamic?.environment_id && /* @__PURE__ */ jsxs(
|
|
15349
|
+
"button",
|
|
15350
|
+
{
|
|
15351
|
+
type: "button",
|
|
15352
|
+
onClick: () => setShowDynamic(true),
|
|
15353
|
+
disabled: busy !== null || !emailOk,
|
|
15354
|
+
className: "\n w-full min-h-[44px] flex items-center justify-center gap-2 py-2.5 rounded-lg\n bg-chip hover:bg-chip-hover\n text-[12px] text-text-primary\n transition-all duration-200\n active:scale-[0.98]\n disabled:opacity-40 disabled:cursor-not-allowed\n ",
|
|
15355
|
+
children: [
|
|
15356
|
+
/* @__PURE__ */ jsx(KeyIcon, { className: "h-4 w-4 text-text-secondary", strokeWidth: 1.5 }),
|
|
15357
|
+
/* @__PURE__ */ jsx("span", { children: "Add Dynamic" })
|
|
15358
|
+
]
|
|
15359
|
+
}
|
|
15360
|
+
)
|
|
15361
|
+
] }) : /* @__PURE__ */ jsx(
|
|
15417
15362
|
"button",
|
|
15418
15363
|
{
|
|
15419
15364
|
type: "button",
|
|
15420
|
-
onClick: () =>
|
|
15421
|
-
disabled: busy !== null
|
|
15422
|
-
className: "
|
|
15423
|
-
children:
|
|
15424
|
-
/* @__PURE__ */ jsx(KeyIcon, { className: "h-4 w-4 text-text-secondary", strokeWidth: 1.5 }),
|
|
15425
|
-
/* @__PURE__ */ jsx("span", { children: "Add Dynamic" })
|
|
15426
|
-
]
|
|
15365
|
+
onClick: () => setWalletsOpen(true),
|
|
15366
|
+
disabled: busy !== null,
|
|
15367
|
+
className: "w-full py-1.5 text-[11px] text-text-secondary hover:text-text-primary transition-colors disabled:opacity-40",
|
|
15368
|
+
children: "Use a crypto wallet instead"
|
|
15427
15369
|
}
|
|
15428
15370
|
)
|
|
15429
15371
|
] }),
|
|
@@ -15440,7 +15382,7 @@ function AddWalletsStep({ chrome } = {}) {
|
|
|
15440
15382
|
registerOnChain: false,
|
|
15441
15383
|
onComplete: async () => {
|
|
15442
15384
|
setShowDynamic(false);
|
|
15443
|
-
setStatus("
|
|
15385
|
+
setStatus("Saved. One moment\u2026");
|
|
15444
15386
|
await refresh({ invalidate: true });
|
|
15445
15387
|
},
|
|
15446
15388
|
onError: (m) => {
|
|
@@ -15472,15 +15414,24 @@ function AddWalletsStep({ chrome } = {}) {
|
|
|
15472
15414
|
onRetry: retryLastFailure
|
|
15473
15415
|
}
|
|
15474
15416
|
),
|
|
15475
|
-
/* @__PURE__ */ jsx(
|
|
15417
|
+
canContinue ? /* @__PURE__ */ jsx(
|
|
15476
15418
|
"button",
|
|
15477
15419
|
{
|
|
15478
15420
|
type: "button",
|
|
15479
15421
|
onClick: onContinue,
|
|
15480
|
-
disabled:
|
|
15481
|
-
className: "
|
|
15422
|
+
disabled: busy === "continue",
|
|
15423
|
+
className: "w-full min-h-[46px] py-3 rounded-lg bg-cta hover:bg-cta-hover text-on-cta text-[13px] font-medium transition-colors active:scale-[0.99] disabled:opacity-40 disabled:cursor-not-allowed",
|
|
15482
15424
|
children: continueLabel
|
|
15483
15425
|
}
|
|
15426
|
+
) : /* @__PURE__ */ jsx(
|
|
15427
|
+
"button",
|
|
15428
|
+
{
|
|
15429
|
+
type: "button",
|
|
15430
|
+
onClick: () => void onSkip(),
|
|
15431
|
+
disabled: busy !== null || !user?.id,
|
|
15432
|
+
className: "w-full py-2 text-[13px] text-text-secondary hover:text-text-primary transition-colors disabled:opacity-40",
|
|
15433
|
+
children: "Not now"
|
|
15434
|
+
}
|
|
15484
15435
|
),
|
|
15485
15436
|
keyCount === 1 && /* @__PURE__ */ jsx("p", { className: "text-[10px] text-text-secondary text-center pt-1", children: "Tip: a second key is your recovery path. If you lose your only key, the account is locked out." })
|
|
15486
15437
|
] }) });
|
|
@@ -15567,7 +15518,7 @@ var Drawer = ({
|
|
|
15567
15518
|
role: "dialog",
|
|
15568
15519
|
"aria-modal": "true",
|
|
15569
15520
|
"aria-labelledby": titleId,
|
|
15570
|
-
className: `pointer-events-auto ${panelBg} shadow-2xl h-full flex flex-col ${widthClass} ${panelClassName}`,
|
|
15521
|
+
className: `pointer-events-auto ${panelBg} shadow-2xl h-full flex flex-col pt-[env(safe-area-inset-top)] ${widthClass} ${panelClassName}`,
|
|
15571
15522
|
style: { ...widthStyle, ...panelStyle },
|
|
15572
15523
|
onClick: (e) => e.stopPropagation(),
|
|
15573
15524
|
children: [
|
|
@@ -17978,7 +17929,7 @@ var OnboardingPolicySection = ({
|
|
|
17978
17929
|
]);
|
|
17979
17930
|
if (hidden || loading || deployLoading || platformActive === null) return null;
|
|
17980
17931
|
if (platformActive === "error") {
|
|
17981
|
-
return /* @__PURE__ */ jsxs("div", { className: "rounded-lg border border-white/[0.07] bg-white/[0.02] p-4", children: [
|
|
17932
|
+
return /* @__PURE__ */ jsxs("div", { className: "rounded-lg border border-border-default dark:border-white/[0.07] bg-raised dark:bg-white/[0.02] p-4", children: [
|
|
17982
17933
|
/* @__PURE__ */ jsx("div", { className: "mb-3", children: /* @__PURE__ */ jsx("h2", { className: "text-sm font-semibold text-text-secondary", children: "Platform onboarding" }) }),
|
|
17983
17934
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center justify-between gap-2 rounded-lg border border-border-light bg-surface-alt px-3 py-2.5 text-[13px] leading-5 text-text-muted", children: [
|
|
17984
17935
|
/* @__PURE__ */ jsx("span", { children: "Couldn't confirm whether this group is used as a platform." }),
|
|
@@ -17995,12 +17946,12 @@ var OnboardingPolicySection = ({
|
|
|
17995
17946
|
] });
|
|
17996
17947
|
}
|
|
17997
17948
|
if (!platformActive) {
|
|
17998
|
-
return /* @__PURE__ */ jsxs("div", { className: "rounded-lg border border-white/[0.07] bg-white/[0.02] p-4", children: [
|
|
17949
|
+
return /* @__PURE__ */ jsxs("div", { className: "rounded-lg border border-border-default dark:border-white/[0.07] bg-raised dark:bg-white/[0.02] p-4", children: [
|
|
17999
17950
|
/* @__PURE__ */ jsx("div", { className: "mb-3", children: /* @__PURE__ */ jsx("h2", { className: "text-sm font-semibold text-text-secondary", children: "Platform onboarding" }) }),
|
|
18000
17951
|
/* @__PURE__ */ jsx("div", { className: "rounded-lg border border-border-light bg-surface-alt px-3 py-2.5 text-[13px] leading-5 text-text-muted", children: "This group isn't used as a platform, so there are no signups to configure. Enable platform sponsorship first \u2014 then choose the sign-in methods and identity checks its users go through." })
|
|
18001
17952
|
] });
|
|
18002
17953
|
}
|
|
18003
|
-
return /* @__PURE__ */ jsxs("div", { className: "rounded-lg border border-white/[0.07] bg-white/[0.02] p-4", children: [
|
|
17954
|
+
return /* @__PURE__ */ jsxs("div", { className: "rounded-lg border border-border-default dark:border-white/[0.07] bg-raised dark:bg-white/[0.02] p-4", children: [
|
|
18004
17955
|
/* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
|
|
18005
17956
|
/* @__PURE__ */ jsx("h2", { className: "text-sm font-semibold text-text-secondary", children: "Platform onboarding" }),
|
|
18006
17957
|
/* @__PURE__ */ jsx("p", { className: "text-xs text-text-muted", children: "The path people take from first visit to transacting on this platform." })
|
|
@@ -18785,7 +18736,7 @@ function DecodedCalldata({
|
|
|
18785
18736
|
}
|
|
18786
18737
|
const kindColor = {
|
|
18787
18738
|
zero: "text-text-muted",
|
|
18788
|
-
address: "text-blue-300/[0.90]",
|
|
18739
|
+
address: "text-azure dark:text-blue-300/[0.90]",
|
|
18789
18740
|
uint: "text-text-primary",
|
|
18790
18741
|
bytes32: "text-text-secondary"
|
|
18791
18742
|
};
|
|
@@ -19776,14 +19727,14 @@ function SignaturePreviewDrawer({ message, onClose, onSignatureConfirmed, userId
|
|
|
19776
19727
|
type: "button",
|
|
19777
19728
|
onClick: handleCancelMessage,
|
|
19778
19729
|
disabled: cancelling,
|
|
19779
|
-
className: "px-3 py-2 text-[13px] text-red-200 hover:text-text-primary disabled:opacity-40 disabled:cursor-not-allowed transition-colors",
|
|
19730
|
+
className: "px-3 py-2 text-[13px] text-status-error-text dark:text-red-200 hover:text-text-primary disabled:opacity-40 disabled:cursor-not-allowed transition-colors",
|
|
19780
19731
|
children: cancelling ? "Cancelling\u2026" : "Cancel message"
|
|
19781
19732
|
}
|
|
19782
19733
|
) : void 0,
|
|
19783
19734
|
children: [
|
|
19784
|
-
/* @__PURE__ */ jsx("p", { className: "text-[13px] font-medium text-red-100 mb-1", children: "Couldn't load transaction" }),
|
|
19735
|
+
/* @__PURE__ */ jsx("p", { className: "text-[13px] font-medium text-status-error-text dark:text-red-100 mb-1", children: "Couldn't load transaction" }),
|
|
19785
19736
|
/* @__PURE__ */ jsx("p", { className: "text-[12px] text-text-secondary max-w-sm", children: error }),
|
|
19786
|
-
cancelError && /* @__PURE__ */ jsx("p", { className: "text-[12px] text-red-200 mt-3", children: cancelError })
|
|
19737
|
+
cancelError && /* @__PURE__ */ jsx("p", { className: "text-[12px] text-status-error-text dark:text-red-200 mt-3", children: cancelError })
|
|
19787
19738
|
]
|
|
19788
19739
|
}
|
|
19789
19740
|
);
|
|
@@ -19798,7 +19749,7 @@ function SignaturePreviewDrawer({ message, onClose, onSignatureConfirmed, userId
|
|
|
19798
19749
|
})();
|
|
19799
19750
|
return /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col h-full text-text-primary", children: [
|
|
19800
19751
|
/* @__PURE__ */ jsx("div", { className: "flex-1 overflow-y-auto overflow-x-hidden", children: /* @__PURE__ */ jsxs("div", { className: "space-y-3 px-4 py-4", children: [
|
|
19801
|
-
reviewWarning && /* @__PURE__ */ jsx("p", { className: "rounded-lg border border-amber-300/[0.22] bg-amber-400/[0.08] px-3 py-2 text-[12px] leading-5 text-amber-100", children: reviewWarning }),
|
|
19752
|
+
reviewWarning && /* @__PURE__ */ jsx("p", { className: "rounded-lg border border-status-warning-line dark:border-amber-300/[0.22] bg-status-warning-bg dark:bg-amber-400/[0.08] px-3 py-2 text-[12px] leading-5 text-status-warning-text dark:text-amber-100", children: reviewWarning }),
|
|
19802
19753
|
/* @__PURE__ */ jsx("p", { className: "text-[12px] text-text-secondary leading-5", children: mode === "inspect" ? "Review action details and execution outcome." : "Review the action, choose a signing key, and confirm." }),
|
|
19803
19754
|
/* @__PURE__ */ jsx("div", { className: "flex w-full rounded-[22px] border border-border-light bg-raised p-1 text-[12px] shadow-[inset_0_1px_0_rgba(255,255,255,0.035)]", children: ["simple", "advanced"].map((mode2) => /* @__PURE__ */ jsx(
|
|
19804
19755
|
"button",
|
|
@@ -19987,7 +19938,7 @@ function SignaturePreviewDrawer({ message, onClose, onSignatureConfirmed, userId
|
|
|
19987
19938
|
] })
|
|
19988
19939
|
}
|
|
19989
19940
|
),
|
|
19990
|
-
selector && !methodName && /* @__PURE__ */ jsx("p", { className: "rounded-lg border border-red-300/[0.18] bg-red-400/[0.08] px-2.5 py-2 text-[10px] leading-4 text-red-200", children: "High risk: this selector is unknown. Review the raw target, value, and every calldata word before signing." }),
|
|
19941
|
+
selector && !methodName && /* @__PURE__ */ jsx("p", { className: "rounded-lg border border-status-error-line dark:border-red-300/[0.18] bg-status-error-bg dark:bg-red-400/[0.08] px-2.5 py-2 text-[10px] leading-4 text-status-error-text dark:text-red-200", children: "High risk: this selector is unknown. Review the raw target, value, and every calldata word before signing." }),
|
|
19991
19942
|
!dataEmpty && /* @__PURE__ */ jsx("div", { className: "text-[12px]", children: isExpanded ? /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
|
|
19992
19943
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
19993
19944
|
/* @__PURE__ */ jsx("span", { className: "text-text-muted", children: "Calldata" }),
|
|
@@ -20046,7 +19997,7 @@ function SignaturePreviewDrawer({ message, onClose, onSignatureConfirmed, userId
|
|
|
20046
19997
|
] })
|
|
20047
19998
|
] }) }),
|
|
20048
19999
|
mode === "sign" && /* @__PURE__ */ jsxs("div", { className: "flex-shrink-0 border-t border-border-light bg-surface-alt", children: [
|
|
20049
|
-
keysLoading ? /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center py-5", children: /* @__PURE__ */ jsx("div", { className: "animate-spin rounded-full h-4 w-4 border-2 border-border-strong border-t-transparent" }) }) : keysError ? /* @__PURE__ */ jsx("p", { className: "text-[12px] text-red-200 px-4 py-3", children: keysError }) : availableKeys.length === 0 ? /* @__PURE__ */ jsx("p", { className: "text-[12px] text-text-muted text-center py-5", children: ownedSignerState.error ?? (ownedSignerBinding ? "The personal key bound to this owned-group session is unavailable. Return to the parent group and mint a new session with an active key." : `No active keys for this ${entityType}.`) }) : /* @__PURE__ */ jsxs("div", { className: "px-4 pt-3 pb-1 space-y-2", children: [
|
|
20000
|
+
keysLoading ? /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center py-5", children: /* @__PURE__ */ jsx("div", { className: "animate-spin rounded-full h-4 w-4 border-2 border-border-strong border-t-transparent" }) }) : keysError ? /* @__PURE__ */ jsx("p", { className: "text-[12px] text-status-error-text dark:text-red-200 px-4 py-3", children: keysError }) : availableKeys.length === 0 ? /* @__PURE__ */ jsx("p", { className: "text-[12px] text-text-muted text-center py-5", children: ownedSignerState.error ?? (ownedSignerBinding ? "The personal key bound to this owned-group session is unavailable. Return to the parent group and mint a new session with an active key." : `No active keys for this ${entityType}.`) }) : /* @__PURE__ */ jsxs("div", { className: "px-4 pt-3 pb-1 space-y-2", children: [
|
|
20050
20001
|
/* @__PURE__ */ jsx(SectionLabel, { children: "Sign with" }),
|
|
20051
20002
|
/* @__PURE__ */ jsx("ul", { className: "max-h-40 overflow-y-auto divide-y divide-border-light", children: availableKeys.map((key) => {
|
|
20052
20003
|
const isSelected = selectedKey?.id === key.id;
|
|
@@ -20091,7 +20042,7 @@ function SignaturePreviewDrawer({ message, onClose, onSignatureConfirmed, userId
|
|
|
20091
20042
|
walletLabel(walletKindFromKey(selectedKey)),
|
|
20092
20043
|
" will open to sign."
|
|
20093
20044
|
] }),
|
|
20094
|
-
ownedSignerBinding && /* @__PURE__ */ jsxs("p", { className: "text-[11px] text-cyan-200", children: [
|
|
20045
|
+
ownedSignerBinding && /* @__PURE__ */ jsxs("p", { className: "text-[11px] text-azure dark:text-cyan-200", children: [
|
|
20095
20046
|
"This owned-group request is cryptographically bound to this personal key (",
|
|
20096
20047
|
ownedSignerBinding.signerCustody,
|
|
20097
20048
|
"). Choose a different key by returning to the parent group and minting a new child session."
|
|
@@ -20167,8 +20118,8 @@ function InspectFooter({
|
|
|
20167
20118
|
}
|
|
20168
20119
|
};
|
|
20169
20120
|
return /* @__PURE__ */ jsxs("div", { className: "flex-shrink-0 border-t border-border-light bg-raised px-3 py-3 space-y-2.5", children: [
|
|
20170
|
-
awaitingSignature && onSwitchToSign && /* @__PURE__ */ jsxs("div", { className: "rounded-[18px] border border-amber-300/[0.20] bg-amber-950/[0.12] px-3 py-2 flex items-center justify-between gap-3", children: [
|
|
20171
|
-
/* @__PURE__ */ jsx("p", { className: "text-[12px] text-amber-100/[0.82]", children: "This message is now awaiting your signature." }),
|
|
20121
|
+
awaitingSignature && onSwitchToSign && /* @__PURE__ */ jsxs("div", { className: "rounded-[18px] border border-status-warning-line dark:border-amber-300/[0.20] bg-status-warning-bg dark:bg-amber-950/[0.12] px-3 py-2 flex items-center justify-between gap-3", children: [
|
|
20122
|
+
/* @__PURE__ */ jsx("p", { className: "text-[12px] text-status-warning-text dark:text-amber-100/[0.82]", children: "This message is now awaiting your signature." }),
|
|
20172
20123
|
/* @__PURE__ */ jsx(
|
|
20173
20124
|
"button",
|
|
20174
20125
|
{
|
|
@@ -20197,7 +20148,7 @@ function InspectFooter({
|
|
|
20197
20148
|
href: txExplorerUrl,
|
|
20198
20149
|
target: "_blank",
|
|
20199
20150
|
rel: "noopener noreferrer",
|
|
20200
|
-
className: "text-blue-300/[0.90] hover:text-blue-200 hover:underline underline-offset-2 transition-colors",
|
|
20151
|
+
className: "text-azure dark:text-blue-300/[0.90] hover:text-azure-deep dark:hover:text-blue-200 hover:underline underline-offset-2 transition-colors",
|
|
20201
20152
|
children: [
|
|
20202
20153
|
formatTxHashShort(txHash),
|
|
20203
20154
|
/* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "ml-0.5 text-[9px] align-middle opacity-70", children: "\u2197" })
|
|
@@ -20223,7 +20174,7 @@ Opens in block explorer` : txHash
|
|
|
20223
20174
|
] }),
|
|
20224
20175
|
message.response?.error && /* @__PURE__ */ jsxs("div", { children: [
|
|
20225
20176
|
/* @__PURE__ */ jsx("p", { className: "text-[10px] font-medium uppercase tracking-[0.13em] text-text-muted mb-0.5", children: "Error" }),
|
|
20226
|
-
/* @__PURE__ */ jsx("p", { className: "text-[12px] text-red-200 break-words", children: message.response.error })
|
|
20177
|
+
/* @__PURE__ */ jsx("p", { className: "text-[12px] text-status-error-text dark:text-red-200 break-words", children: message.response.error })
|
|
20227
20178
|
] }),
|
|
20228
20179
|
reexecutions.length > 0 && /* @__PURE__ */ jsxs("details", { children: [
|
|
20229
20180
|
/* @__PURE__ */ jsxs("summary", { className: "text-[11px] uppercase tracking-[0.12em] text-text-muted cursor-pointer hover:text-text-primary transition-colors", children: [
|
|
@@ -20237,7 +20188,7 @@ Opens in block explorer` : txHash
|
|
|
20237
20188
|
className: "text-[11px] rounded-[10px] border border-border-light px-2 py-1 bg-surface-alt",
|
|
20238
20189
|
children: [
|
|
20239
20190
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
20240
|
-
/* @__PURE__ */ jsx("span", { className: r.success ? "text-emerald-300/[0.90]" : "text-red-200", children: r.success ? "Succeeded" : "Failed" }),
|
|
20191
|
+
/* @__PURE__ */ jsx("span", { className: r.success ? "text-status-success-text dark:text-emerald-300/[0.90]" : "text-status-error-text dark:text-red-200", children: r.success ? "Succeeded" : "Failed" }),
|
|
20241
20192
|
/* @__PURE__ */ jsx("span", { className: "text-text-muted", children: formatRelativeTime(r.attempted_at) })
|
|
20242
20193
|
] }),
|
|
20243
20194
|
r.error && /* @__PURE__ */ jsx("p", { className: "mt-0.5 text-text-secondary break-words", children: r.error })
|
|
@@ -20247,7 +20198,7 @@ Opens in block explorer` : txHash
|
|
|
20247
20198
|
)) })
|
|
20248
20199
|
] })
|
|
20249
20200
|
] }),
|
|
20250
|
-
actionError && /* @__PURE__ */ jsx("div", { className: "rounded-[16px] border border-red-300/[0.24] bg-red-950/[0.18] px-3 py-2 text-[11px] text-red-100", children: actionError }),
|
|
20201
|
+
actionError && /* @__PURE__ */ jsx("div", { className: "rounded-[16px] border border-status-error-line dark:border-red-300/[0.24] bg-status-error-bg dark:bg-red-950/[0.18] px-3 py-2 text-[11px] text-status-error-text dark:text-red-100", children: actionError }),
|
|
20251
20202
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-end gap-2", children: [
|
|
20252
20203
|
/* @__PURE__ */ jsx(
|
|
20253
20204
|
"button",
|
|
@@ -20630,8 +20581,10 @@ function SignatureWorkflow({
|
|
|
20630
20581
|
] });
|
|
20631
20582
|
}
|
|
20632
20583
|
var PLACEMENT_CLASSES = {
|
|
20633
|
-
|
|
20634
|
-
|
|
20584
|
+
// The top corners clear the status bar of a home-screen install (zero
|
|
20585
|
+
// in a browser tab).
|
|
20586
|
+
"top-left": "top-[calc(1rem+env(safe-area-inset-top))] left-4",
|
|
20587
|
+
"top-right": "top-[calc(1rem+env(safe-area-inset-top))] right-4",
|
|
20635
20588
|
"bottom-left": "bottom-4 left-4",
|
|
20636
20589
|
"bottom-right": "bottom-4 right-4"
|
|
20637
20590
|
};
|
|
@@ -23062,7 +23015,7 @@ function SecurityPage() {
|
|
|
23062
23015
|
rotateStep === "added" || rotateStep === "removing" || rotateStep === "remove-pending" || rotateStep === "done" ? "\u2713 " : "1. ",
|
|
23063
23016
|
"Add new key"
|
|
23064
23017
|
] }),
|
|
23065
|
-
/* @__PURE__ */ jsx(
|
|
23018
|
+
/* @__PURE__ */ jsx(ChevronRightIcon, { "aria-hidden": "true", className: "h-3 w-3" }),
|
|
23066
23019
|
/* @__PURE__ */ jsxs("span", { className: rotateStep === "added" || rotateStep === "removing" || rotateStep === "remove-pending" ? "text-text-primary font-medium" : "", children: [
|
|
23067
23020
|
rotateStep === "done" ? "\u2713 " : "2. ",
|
|
23068
23021
|
"Remove old key"
|
|
@@ -23984,18 +23937,18 @@ var GroupsView = ({
|
|
|
23984
23937
|
] }),
|
|
23985
23938
|
error && /* @__PURE__ */ jsx(ErrorBanner, { children: error }),
|
|
23986
23939
|
delegationSession?.kind === "owned" ? /* @__PURE__ */ jsxs("div", { className: "rounded-[22px] border border-cyan-300/[0.18] bg-cyan-400/[0.07] px-3.5 py-3 shadow-[inset_0_1px_0_rgba(255,255,255,0.035)]", children: [
|
|
23987
|
-
/* @__PURE__ */ jsx("p", { className: "text-[10px] font-semibold uppercase tracking-[0.12em] text-cyan-300/80", children: "Account ownership path" }),
|
|
23940
|
+
/* @__PURE__ */ jsx("p", { className: "text-[10px] font-semibold uppercase tracking-[0.12em] text-azure dark:text-cyan-300/80", children: "Account ownership path" }),
|
|
23988
23941
|
/* @__PURE__ */ jsxs(
|
|
23989
23942
|
"div",
|
|
23990
23943
|
{
|
|
23991
23944
|
className: "mt-2 flex min-w-0 items-center gap-2",
|
|
23992
23945
|
"aria-label": `${sourceGroup?.name ?? "Owning group"} is operating ${activeOwnedGroup?.name ?? "owned group"}`,
|
|
23993
23946
|
children: [
|
|
23994
|
-
/* @__PURE__ */ jsx("span", { className: "min-w-0 truncate rounded-lg border border-white/[0.08] bg-white/[0.035] px-2.5 py-1.5 text-[11px] font-semibold text-text-secondary", children: "You" }),
|
|
23995
|
-
/* @__PURE__ */ jsx(
|
|
23996
|
-
/* @__PURE__ */ jsx("span", { className: "min-w-0 truncate rounded-lg border border-white/[0.08] bg-white/[0.035] px-2.5 py-1.5 text-[11px] font-semibold text-text-secondary", children: sourceGroup?.name ?? compactGroupId(delegationSession.parentGroupId) }),
|
|
23997
|
-
/* @__PURE__ */ jsx(
|
|
23998
|
-
/* @__PURE__ */ jsx("span", { className: "min-w-0 truncate rounded-lg border border-cyan-300/[0.18] bg-cyan-300/[0.08] px-2.5 py-1.5 text-[11px] font-semibold text-cyan-200", children: activeOwnedGroup?.name ?? compactGroupId(delegationSession.currentGroupId) })
|
|
23947
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 truncate rounded-lg border border-border-default dark:border-white/[0.08] bg-chip dark:bg-white/[0.035] px-2.5 py-1.5 text-[11px] font-semibold text-text-secondary", children: "You" }),
|
|
23948
|
+
/* @__PURE__ */ jsx(ChevronRightIcon, { "aria-hidden": "true", className: "h-3.5 w-3.5 shrink-0 text-azure dark:text-cyan-300/70" }),
|
|
23949
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 truncate rounded-lg border border-border-default dark:border-white/[0.08] bg-chip dark:bg-white/[0.035] px-2.5 py-1.5 text-[11px] font-semibold text-text-secondary", children: sourceGroup?.name ?? compactGroupId(delegationSession.parentGroupId) }),
|
|
23950
|
+
/* @__PURE__ */ jsx(ChevronRightIcon, { "aria-hidden": "true", className: "h-3.5 w-3.5 shrink-0 text-azure dark:text-cyan-300/70" }),
|
|
23951
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 truncate rounded-lg border border-azure-line dark:border-cyan-300/[0.18] bg-azure-tint dark:bg-cyan-300/[0.08] px-2.5 py-1.5 text-[11px] font-semibold text-azure dark:text-cyan-200", children: activeOwnedGroup?.name ?? compactGroupId(delegationSession.currentGroupId) })
|
|
23999
23952
|
]
|
|
24000
23953
|
}
|
|
24001
23954
|
),
|
|
@@ -24007,7 +23960,7 @@ var GroupsView = ({
|
|
|
24007
23960
|
type: "button",
|
|
24008
23961
|
onClick: () => void handleReturnToParent(),
|
|
24009
23962
|
disabled: busyId === `parent:${delegationSession.parentGroupId}`,
|
|
24010
|
-
className: "rounded-full border border-cyan-300/[0.16] bg-cyan-300/[0.08] px-3 py-1.5 text-[11px] font-semibold text-cyan-200 transition-colors hover:bg-cyan-300/[0.13] disabled:opacity-45",
|
|
23963
|
+
className: "rounded-full border border-azure-line dark:border-cyan-300/[0.16] bg-azure-tint dark:bg-cyan-300/[0.08] px-3 py-1.5 text-[11px] font-semibold text-azure dark:text-cyan-200 transition-colors hover:bg-azure-muted dark:hover:bg-cyan-300/[0.13] disabled:opacity-45",
|
|
24011
23964
|
children: busyId === `parent:${delegationSession.parentGroupId}` ? "Returning..." : `Return to ${sourceGroup?.name ?? "owning group"}`
|
|
24012
23965
|
}
|
|
24013
23966
|
),
|
|
@@ -24023,7 +23976,7 @@ var GroupsView = ({
|
|
|
24023
23976
|
)
|
|
24024
23977
|
] })
|
|
24025
23978
|
] }) : actingAsAnyGroup ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 rounded-[22px] border border-amber-300/[0.18] bg-amber-400/[0.08] px-3.5 py-3 shadow-[inset_0_1px_0_rgba(255,255,255,0.035)]", children: [
|
|
24026
|
-
/* @__PURE__ */ jsxs("p", { className: "min-w-0 flex-1 text-[12px] font-semibold leading-5 text-amber-300", children: [
|
|
23979
|
+
/* @__PURE__ */ jsxs("p", { className: "min-w-0 flex-1 text-[12px] font-semibold leading-5 text-status-warning-text dark:text-amber-300", children: [
|
|
24027
23980
|
"Acting as ",
|
|
24028
23981
|
sourceGroup?.name ?? "a group",
|
|
24029
23982
|
". Operations use its direct delegation token."
|
|
@@ -24358,7 +24311,7 @@ function OwnedGroupRow({
|
|
|
24358
24311
|
return /* @__PURE__ */ jsxs("li", { className: "px-3.5 py-3", children: [
|
|
24359
24312
|
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
24360
24313
|
/* @__PURE__ */ jsx("span", { className: "min-w-0 truncate text-[11px] font-semibold text-text-secondary", children: sourceName }),
|
|
24361
|
-
/* @__PURE__ */ jsx(
|
|
24314
|
+
/* @__PURE__ */ jsx(ChevronRightIcon, { "aria-hidden": "true", className: "h-3.5 w-3.5 shrink-0 text-azure dark:text-cyan-300/70" }),
|
|
24362
24315
|
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate text-[12px] font-semibold text-text-primary", children: projection.group.name })
|
|
24363
24316
|
] }),
|
|
24364
24317
|
/* @__PURE__ */ jsxs("div", { className: "mt-2 flex items-center justify-between gap-3", children: [
|
|
@@ -24369,7 +24322,7 @@ function OwnedGroupRow({
|
|
|
24369
24322
|
type: "button",
|
|
24370
24323
|
onClick: onSwitch,
|
|
24371
24324
|
disabled: busy,
|
|
24372
|
-
className: "shrink-0 rounded-full border border-cyan-300/[0.16] bg-cyan-300/[0.08] px-3 py-1.5 text-[11px] font-semibold text-cyan-200 transition-colors hover:bg-cyan-300/[0.13] disabled:cursor-not-allowed disabled:opacity-45",
|
|
24325
|
+
className: "shrink-0 rounded-full border border-azure-line dark:border-cyan-300/[0.16] bg-azure-tint dark:bg-cyan-300/[0.08] px-3 py-1.5 text-[11px] font-semibold text-azure dark:text-cyan-200 transition-colors hover:bg-azure-muted dark:hover:bg-cyan-300/[0.13] disabled:cursor-not-allowed disabled:opacity-45",
|
|
24373
24326
|
children: busy ? "Checking ownership..." : `Operate as ${projection.group.name}`
|
|
24374
24327
|
}
|
|
24375
24328
|
)
|
|
@@ -24856,7 +24809,7 @@ function PlusIcon() {
|
|
|
24856
24809
|
}
|
|
24857
24810
|
function RoleBadge({ role }) {
|
|
24858
24811
|
const label = normalizeRole(role);
|
|
24859
|
-
const tone = label === "owner" ? "bg-orange-500/[0.16] text-orange-300" : label === "admin" ? "bg-blue-500/[0.16] text-blue-300" : "bg-chip text-text-secondary";
|
|
24812
|
+
const tone = label === "owner" ? "bg-orange-500/[0.16] text-primary dark:text-orange-300" : label === "admin" ? "bg-blue-500/[0.16] text-azure dark:text-blue-300" : "bg-chip text-text-secondary";
|
|
24860
24813
|
return /* @__PURE__ */ jsx(
|
|
24861
24814
|
"span",
|
|
24862
24815
|
{
|
|
@@ -24998,7 +24951,7 @@ function ActiveEnvironmentBadge({
|
|
|
24998
24951
|
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center justify-between gap-3 px-1", children: [
|
|
24999
24952
|
/* @__PURE__ */ jsx("span", { className: "text-[10px] font-medium text-text-muted", children: "Mode" }),
|
|
25000
24953
|
/* @__PURE__ */ jsxs("span", { className: "min-w-0 truncate text-right text-[9px] text-text-muted", children: [
|
|
25001
|
-
environment.mode === "unknown" && /* @__PURE__ */ jsx("span", { className: "mr-1.5 font-semibold text-amber-400", children: "Unconfigured" }),
|
|
24954
|
+
environment.mode === "unknown" && /* @__PURE__ */ jsx("span", { className: "mr-1.5 font-semibold text-status-warning-text dark:text-amber-400", children: "Unconfigured" }),
|
|
25002
24955
|
environment.network,
|
|
25003
24956
|
environment.chainId && /* @__PURE__ */ jsx("span", { className: "ml-1.5 font-mono text-text-secondary", children: environment.chainId })
|
|
25004
24957
|
] })
|
|
@@ -25012,7 +24965,7 @@ function ActiveEnvironmentBadge({
|
|
|
25012
24965
|
/* @__PURE__ */ jsxs(
|
|
25013
24966
|
"span",
|
|
25014
24967
|
{
|
|
25015
|
-
className: `inline-flex items-center gap-1.5 text-[11px] font-semibold ${environment.mode === "test" ? "text-amber-400" : environment.mode === "live" ? "text-emerald-400" : "text-text-secondary"}`,
|
|
24968
|
+
className: `inline-flex items-center gap-1.5 text-[11px] font-semibold ${environment.mode === "test" ? "text-status-warning-text dark:text-amber-400" : environment.mode === "live" ? "text-status-success-text dark:text-emerald-400" : "text-text-secondary"}`,
|
|
25016
24969
|
children: [
|
|
25017
24970
|
/* @__PURE__ */ jsx(
|
|
25018
24971
|
"span",
|
|
@@ -25056,7 +25009,7 @@ function ActiveEnvironmentBadge({
|
|
|
25056
25009
|
void switchTo(option);
|
|
25057
25010
|
}
|
|
25058
25011
|
},
|
|
25059
|
-
className: `flex min-h-[34px] min-w-0 items-center justify-center gap-1.5 rounded-lg border px-2 text-[11px] font-medium transition-colors focus:outline-none focus-visible:ring-2 disabled:cursor-default ${option.active ? test ? "border-amber-500/40 bg-raised text-amber-400 focus-visible:ring-amber-500/40" : "border-emerald-500/40 bg-raised text-emerald-400 focus-visible:ring-emerald-500/40" : unavailable ? "border-transparent text-text-muted opacity-50" : "border-transparent text-text-secondary hover:bg-raised-hover hover:text-text-primary focus-visible:ring-border-strong"}`,
|
|
25012
|
+
className: `flex min-h-[34px] min-w-0 items-center justify-center gap-1.5 rounded-lg border px-2 text-[11px] font-medium transition-colors focus:outline-none focus-visible:ring-2 disabled:cursor-default ${option.active ? test ? "border-amber-500/40 bg-raised text-status-warning-text dark:text-amber-400 focus-visible:ring-amber-500/40" : "border-emerald-500/40 bg-raised text-status-success-text dark:text-emerald-400 focus-visible:ring-emerald-500/40" : unavailable ? "border-transparent text-text-muted opacity-50" : "border-transparent text-text-secondary hover:bg-raised-hover hover:text-text-primary focus-visible:ring-border-strong"}`,
|
|
25060
25013
|
children: busy ? /* @__PURE__ */ jsx(Spinner, {}) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
25061
25014
|
option.active && /* @__PURE__ */ jsx(
|
|
25062
25015
|
"span",
|
|
@@ -25127,7 +25080,7 @@ function ActiveEnvironmentBadge({
|
|
|
25127
25080
|
"div",
|
|
25128
25081
|
{
|
|
25129
25082
|
role: "alert",
|
|
25130
|
-
className: "mt-2 rounded-xl border border-red-500/25 bg-red-500/[0.07] px-3 py-2 text-[10px] leading-4 text-red-400",
|
|
25083
|
+
className: "mt-2 rounded-xl border border-status-error-line dark:border-red-500/25 bg-status-error-bg dark:bg-red-500/[0.07] px-3 py-2 text-[10px] leading-4 text-status-error-text dark:text-red-400",
|
|
25131
25084
|
children: error
|
|
25132
25085
|
}
|
|
25133
25086
|
)
|
|
@@ -25822,7 +25775,7 @@ function WalletMenu({
|
|
|
25822
25775
|
onClick: onOpenActors,
|
|
25823
25776
|
className: "flex min-h-[52px] w-full items-center gap-3 px-4 py-2 text-left text-[14px] font-semibold text-text-primary transition-colors hover:bg-raised-hover focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-orange-400/70",
|
|
25824
25777
|
children: [
|
|
25825
|
-
/* @__PURE__ */ jsx("span", { className: "inline-flex h-7 w-7 items-center justify-center rounded-lg bg-
|
|
25778
|
+
/* @__PURE__ */ jsx("span", { className: "inline-flex h-7 w-7 items-center justify-center rounded-lg bg-primary/10 text-primary dark:text-orange-400", children: activeActor?.kind === "self" ? /* @__PURE__ */ jsx(IconUser, {}) : /* @__PURE__ */ jsx(IconBuilding, {}) }),
|
|
25826
25779
|
/* @__PURE__ */ jsxs("span", { className: "min-w-0 flex-1", children: [
|
|
25827
25780
|
/* @__PURE__ */ jsx("span", { className: "block truncate", children: activeActor?.label ?? userName }),
|
|
25828
25781
|
/* @__PURE__ */ jsx("span", { className: "mt-0.5 block text-[10px] font-medium capitalize text-text-muted", children: activeActor?.kind ?? "self" })
|
|
@@ -25837,7 +25790,7 @@ function WalletMenu({
|
|
|
25837
25790
|
{
|
|
25838
25791
|
type: "button",
|
|
25839
25792
|
onClick: onSignOut,
|
|
25840
|
-
className: "mt-3 flex min-h-[48px] w-full items-center justify-center gap-2 rounded-[24px] bg-red-500/10 px-4 py-3 text-[14px] font-semibold text-red-400 transition-colors hover:bg-red-500/15 focus:outline-none focus-visible:ring-2 focus-visible:ring-red-400/70",
|
|
25793
|
+
className: "mt-3 flex min-h-[48px] w-full items-center justify-center gap-2 rounded-[24px] bg-status-error-bg dark:bg-red-500/10 px-4 py-3 text-[14px] font-semibold text-status-error-text dark:text-red-400 transition-colors hover:bg-red-500/15 focus:outline-none focus-visible:ring-2 focus-visible:ring-red-400/70",
|
|
25841
25794
|
children: [
|
|
25842
25795
|
/* @__PURE__ */ jsx(IconSignOut, {}),
|
|
25843
25796
|
"Sign out"
|
|
@@ -25869,7 +25822,7 @@ function WalletMenuRow({
|
|
|
25869
25822
|
{
|
|
25870
25823
|
className: cx4(
|
|
25871
25824
|
"mr-3 inline-flex h-8 w-8 items-center justify-center rounded-lg",
|
|
25872
|
-
urgent ? "bg-violet-500/20 text-orange-400" : active ? "bg-surface-alt text-text-secondary" : "bg-surface-alt text-text-muted"
|
|
25825
|
+
urgent ? "bg-violet-500/20 text-primary dark:text-orange-400" : active ? "bg-surface-alt text-text-secondary" : "bg-surface-alt text-text-muted"
|
|
25873
25826
|
),
|
|
25874
25827
|
children: item.icon
|
|
25875
25828
|
}
|
|
@@ -26109,7 +26062,7 @@ function DirectoryPane({
|
|
|
26109
26062
|
{
|
|
26110
26063
|
type: "button",
|
|
26111
26064
|
onClick: () => setQuery(""),
|
|
26112
|
-
className: "mt-2 min-h-[44px] rounded-xl px-3 text-[12px] font-semibold text-orange-400 hover:bg-orange-400/10",
|
|
26065
|
+
className: "mt-2 min-h-[44px] rounded-xl px-3 text-[12px] font-semibold text-primary dark:text-orange-400 hover:bg-primary/10 dark:hover:bg-orange-400/10",
|
|
26113
26066
|
children: "Clear search"
|
|
26114
26067
|
}
|
|
26115
26068
|
)
|
|
@@ -28039,7 +27992,7 @@ var BillingCenter = ({ dense = false }) => {
|
|
|
28039
27992
|
if (notConfigured) {
|
|
28040
27993
|
return /* @__PURE__ */ jsxs("div", { className: outerClass, children: [
|
|
28041
27994
|
!dense && /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
|
|
28042
|
-
/* @__PURE__ */ jsxs("h1", { className: "text-lg font-semibold text-text-primary", children: [
|
|
27995
|
+
/* @__PURE__ */ jsxs("h1", { className: "text-lg font-semibold text-text-primary max-sm:sr-only", children: [
|
|
28043
27996
|
"Usage & billing",
|
|
28044
27997
|
!isLiveMode() && paymentsUrlMap() && /* @__PURE__ */ jsx("span", { className: "ml-2 align-middle inline-flex items-center px-2 py-0.5 rounded-full text-[10px] font-semibold uppercase tracking-wider bg-amber-500/15 text-amber-600 ring-1 ring-amber-500/40", children: "Test mode" })
|
|
28045
27998
|
] }),
|
|
@@ -28125,7 +28078,7 @@ var BillingCenter = ({ dense = false }) => {
|
|
|
28125
28078
|
const recoveryAction = summary ? billingRecoveryAction(summary) : null;
|
|
28126
28079
|
return /* @__PURE__ */ jsxs("div", { className: outerClass, children: [
|
|
28127
28080
|
!dense && /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
|
|
28128
|
-
/* @__PURE__ */ jsxs("h1", { className: "text-lg font-semibold text-text-primary", children: [
|
|
28081
|
+
/* @__PURE__ */ jsxs("h1", { className: "text-lg font-semibold text-text-primary max-sm:sr-only", children: [
|
|
28129
28082
|
"Usage & billing",
|
|
28130
28083
|
!isLiveMode() && paymentsUrlMap() && /* @__PURE__ */ jsx("span", { className: "ml-2 align-middle inline-flex items-center px-2 py-0.5 rounded-full text-[10px] font-semibold uppercase tracking-wider bg-amber-500/15 text-amber-600 ring-1 ring-amber-500/40", children: "Test mode" })
|
|
28131
28084
|
] }),
|
|
@@ -29702,7 +29655,7 @@ var VerificationDialog = ({
|
|
|
29702
29655
|
type: "button",
|
|
29703
29656
|
onClick: () => setActiveProvider(null),
|
|
29704
29657
|
className: "mb-3 text-[12px] text-text-secondary hover:text-text-primary",
|
|
29705
|
-
children: "\
|
|
29658
|
+
children: "\u2039 Choose a different provider"
|
|
29706
29659
|
}
|
|
29707
29660
|
),
|
|
29708
29661
|
/* @__PURE__ */ jsx(
|
|
@@ -29847,7 +29800,7 @@ function BusinessVerificationSection({
|
|
|
29847
29800
|
};
|
|
29848
29801
|
const copy = STATUS_COPY[status] ?? STATUS_COPY.unverified;
|
|
29849
29802
|
const impl = flowInstance ? resolveKycInstance(config, flowInstance) : null;
|
|
29850
|
-
return /* @__PURE__ */ jsxs("section", { className: "rounded-lg border border-white/[0.07] bg-white/[0.02] p-4 space-y-3", children: [
|
|
29803
|
+
return /* @__PURE__ */ jsxs("section", { className: "rounded-lg border border-border-default dark:border-white/[0.07] bg-raised dark:bg-white/[0.02] p-4 space-y-3", children: [
|
|
29851
29804
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-3", children: [
|
|
29852
29805
|
/* @__PURE__ */ jsx("h2", { className: "text-sm font-semibold text-text-secondary", children: "Business verification" }),
|
|
29853
29806
|
/* @__PURE__ */ jsx(
|
|
@@ -29865,7 +29818,7 @@ function BusinessVerificationSection({
|
|
|
29865
29818
|
type: "button",
|
|
29866
29819
|
onClick: () => setFlowInstance(null),
|
|
29867
29820
|
className: "mb-3 text-[12px] text-text-secondary hover:text-text-primary",
|
|
29868
|
-
children: "\
|
|
29821
|
+
children: "\u2039 Back"
|
|
29869
29822
|
}
|
|
29870
29823
|
),
|
|
29871
29824
|
/* @__PURE__ */ jsx(
|