@lumiapassport/ui-kit 1.14.22 → 1.14.23

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.js CHANGED
@@ -3834,28 +3834,32 @@ async function sendUserOperation(session, callTarget, amountWei, innerData = "0x
3834
3834
  try {
3835
3835
  const envCaps = typeof import.meta !== "undefined" && import.meta.env || {};
3836
3836
  const maxBundlerVerifGas = envCaps.VITE_MAX_VERIFICATION_GAS ? BigInt(envCaps.VITE_MAX_VERIFICATION_GAS) : MAX_BUNDLER_VERIFICATION_GAS;
3837
- const maxCallGas = envCaps.VITE_MAX_CALL_GAS_LIMIT ? BigInt(envCaps.VITE_MAX_CALL_GAS_LIMIT) : 0x7a120n;
3837
+ const maxCallGas = envCaps.VITE_MAX_CALL_GAS_LIMIT ? BigInt(envCaps.VITE_MAX_CALL_GAS_LIMIT) : null;
3838
3838
  const toHex2 = (v) => `0x${v.toString(16)}`;
3839
3839
  const maxAccountVerifGas = usePaymaster ? maxBundlerVerifGas - PAYMASTER_VERIFICATION_GAS : maxBundlerVerifGas;
3840
3840
  const verGas = BigInt(userOp.verificationGasLimit || "0x0");
3841
3841
  if (verGas > maxAccountVerifGas) userOp.verificationGasLimit = toHex2(maxAccountVerifGas);
3842
3842
  const callGas = BigInt(userOp.callGasLimit || "0x0");
3843
- if (callGas > maxCallGas) userOp.callGasLimit = toHex2(maxCallGas);
3843
+ if (maxCallGas && callGas > maxCallGas) userOp.callGasLimit = toHex2(maxCallGas);
3844
3844
  } catch {
3845
3845
  }
3846
3846
  };
3847
3847
  let estimated = false;
3848
3848
  try {
3849
3849
  const gasEst = await estimateUserOperationGas({ ...userOp, signature: `0x${"00".repeat(65)}` });
3850
+ console.log("[Account] Gas estimation from bundler:", { callGasLimit: gasEst.callGasLimit, verificationGasLimit: gasEst.verificationGasLimit, preVerificationGas: gasEst.preVerificationGas });
3850
3851
  userOp.callGasLimit = gasEst.callGasLimit;
3851
3852
  userOp.verificationGasLimit = gasEst.verificationGasLimit;
3852
3853
  userOp.preVerificationGas = gasEst.preVerificationGas;
3853
3854
  ensureGenerousDefaults();
3854
3855
  enforceCaps(session.usePaymaster);
3855
3856
  estimated = true;
3856
- } catch {
3857
+ console.log("[Account] Gas after caps:", { callGasLimit: userOp.callGasLimit, verificationGasLimit: userOp.verificationGasLimit, preVerificationGas: userOp.preVerificationGas });
3858
+ } catch (e) {
3859
+ console.log("[Account] Gas estimation failed, using defaults:", e);
3857
3860
  ensureGenerousDefaults();
3858
3861
  enforceCaps(session.usePaymaster);
3862
+ console.log("[Account] Gas after defaults:", { callGasLimit: userOp.callGasLimit, verificationGasLimit: userOp.verificationGasLimit, preVerificationGas: userOp.preVerificationGas });
3859
3863
  }
3860
3864
  try {
3861
3865
  const toHex2 = (v) => `0x${v.toString(16)}`;
@@ -4019,28 +4023,32 @@ async function prepareUserOperation(session, callTarget, amountWei, innerData =
4019
4023
  try {
4020
4024
  const envCaps = typeof import.meta !== "undefined" && import.meta.env || {};
4021
4025
  const maxBundlerVerifGas = envCaps.VITE_MAX_VERIFICATION_GAS ? BigInt(envCaps.VITE_MAX_VERIFICATION_GAS) : MAX_BUNDLER_VERIFICATION_GAS;
4022
- const maxCallGas = envCaps.VITE_MAX_CALL_GAS_LIMIT ? BigInt(envCaps.VITE_MAX_CALL_GAS_LIMIT) : 0x7a120n;
4026
+ const maxCallGas = envCaps.VITE_MAX_CALL_GAS_LIMIT ? BigInt(envCaps.VITE_MAX_CALL_GAS_LIMIT) : null;
4023
4027
  const toHex2 = (v) => `0x${v.toString(16)}`;
4024
4028
  const maxAccountVerifGas = usePaymaster ? maxBundlerVerifGas - PAYMASTER_VERIFICATION_GAS : maxBundlerVerifGas;
4025
4029
  const verGas = BigInt(userOp.verificationGasLimit || "0x0");
4026
4030
  if (verGas > maxAccountVerifGas) userOp.verificationGasLimit = toHex2(maxAccountVerifGas);
4027
4031
  const callGas = BigInt(userOp.callGasLimit || "0x0");
4028
- if (callGas > maxCallGas) userOp.callGasLimit = toHex2(maxCallGas);
4032
+ if (maxCallGas && callGas > maxCallGas) userOp.callGasLimit = toHex2(maxCallGas);
4029
4033
  } catch {
4030
4034
  }
4031
4035
  };
4032
4036
  let estimated = false;
4033
4037
  try {
4034
4038
  const gasEst = await estimateUserOperationGas({ ...userOp, signature: `0x${"00".repeat(65)}` });
4039
+ console.log("[Account] Gas estimation from bundler:", { callGasLimit: gasEst.callGasLimit, verificationGasLimit: gasEst.verificationGasLimit, preVerificationGas: gasEst.preVerificationGas });
4035
4040
  userOp.callGasLimit = gasEst.callGasLimit;
4036
4041
  userOp.verificationGasLimit = gasEst.verificationGasLimit;
4037
4042
  userOp.preVerificationGas = gasEst.preVerificationGas;
4038
4043
  ensureGenerousDefaults();
4039
4044
  enforceCaps(session.usePaymaster);
4040
4045
  estimated = true;
4041
- } catch {
4046
+ console.log("[Account] Gas after caps:", { callGasLimit: userOp.callGasLimit, verificationGasLimit: userOp.verificationGasLimit, preVerificationGas: userOp.preVerificationGas });
4047
+ } catch (e) {
4048
+ console.log("[Account] Gas estimation failed, using defaults:", e);
4042
4049
  ensureGenerousDefaults();
4043
4050
  enforceCaps(session.usePaymaster);
4051
+ console.log("[Account] Gas after defaults:", { callGasLimit: userOp.callGasLimit, verificationGasLimit: userOp.verificationGasLimit, preVerificationGas: userOp.preVerificationGas });
4044
4052
  }
4045
4053
  try {
4046
4054
  const toHex2 = (v) => `0x${v.toString(16)}`;
@@ -4397,9 +4405,9 @@ import {
4397
4405
  createContext,
4398
4406
  useCallback as useCallback20,
4399
4407
  useContext,
4400
- useEffect as useEffect33,
4408
+ useEffect as useEffect34,
4401
4409
  useMemo as useMemo5,
4402
- useRef as useRef13
4410
+ useRef as useRef14
4403
4411
  } from "react";
4404
4412
 
4405
4413
  // src/context/LumiaPassportSessionContext.tsx
@@ -4581,7 +4589,7 @@ function BalanceFeedProvider() {
4581
4589
 
4582
4590
  // src/internal/components/Dialog/LumiaPassportDialog.tsx
4583
4591
  import { AnimatePresence as AnimatePresence3, motion as motion3 } from "framer-motion";
4584
- import { useEffect as useEffect31 } from "react";
4592
+ import { useEffect as useEffect32 } from "react";
4585
4593
 
4586
4594
  // src/internal/components/Footer/Footer.tsx
4587
4595
  import { useMutation, useQueryClient } from "@tanstack/react-query";
@@ -4642,6 +4650,35 @@ var LumiaLogo = forwardRef(({ size = 24, className = "" }, ref) => /* @__PURE__
4642
4650
  init_auth();
4643
4651
  init_base();
4644
4652
 
4653
+ // src/internal/hooks/useLayoutStore.ts
4654
+ import { create as create2 } from "zustand";
4655
+ var useLayoutStore = create2((set) => ({
4656
+ colorMode: "light",
4657
+ // layoutView: 'desktop',
4658
+ // deviceType: 'non-touch',
4659
+ isMobileView: false,
4660
+ maxScrollHeight: MAX_CONTENT_HEIGHT,
4661
+ isDialogClosing: false,
4662
+ isDialogOpen: false,
4663
+ isDialogForced: false,
4664
+ dialogTitle: null,
4665
+ dialogDescription: null,
4666
+ dialogContent: null,
4667
+ isSettings: false,
4668
+ setColorMode: (colorMode) => set({ colorMode }),
4669
+ // setLayoutView: (layoutView) => set(() => ({ layoutView })),
4670
+ // setDeviceType: (deviceType) => set(() => ({ deviceType })),
4671
+ setIsMobileView: (isMobileView) => set({ isMobileView }),
4672
+ setMaxScrollHeight: (maxScrollHeight) => set({ maxScrollHeight }),
4673
+ setIsDialogClosing: (isDialogClosing) => set({ isDialogClosing }),
4674
+ setIsDialogOpen: (isDialogOpen) => set({ isDialogOpen }),
4675
+ setIsDialogForced: (isDialogForced) => set({ isDialogForced }),
4676
+ setDialogTitle: (dialogTitle) => set({ dialogTitle }),
4677
+ setDialogDescription: (dialogDescription) => set({ dialogDescription }),
4678
+ setDialogContent: (dialogContent) => set({ dialogContent }),
4679
+ setIsSettings: (isSettings) => set({ isSettings })
4680
+ }));
4681
+
4645
4682
  // src/internal/lib/utils.ts
4646
4683
  import { clsx } from "clsx";
4647
4684
  import { twMerge } from "tailwind-merge";
@@ -4734,9 +4771,11 @@ function Footer() {
4734
4771
  const { callbacks } = useLumiaPassportConfig();
4735
4772
  const { address, setSession, setAddress, setStatus, setError, setIsLoading } = useLumiaPassportSession();
4736
4773
  const setPage = useLayoutDataStore((st) => st.setPage);
4774
+ const setIsDialogForced = useLayoutStore((st) => st.setIsDialogForced);
4737
4775
  const { mutate: disconnect, isPending: isDisconnecting } = useMutation({
4738
4776
  mutationFn: async (disconnectAddress) => {
4739
4777
  if (!disconnectAddress) throw new Error("No address to disconnect");
4778
+ setIsDialogForced(true);
4740
4779
  setError(null);
4741
4780
  setStatus("disconnecting");
4742
4781
  setIsLoading(true);
@@ -4753,12 +4792,16 @@ function Footer() {
4753
4792
  setStatus("idle");
4754
4793
  setIsLoading(false);
4755
4794
  callbacks?.onLumiaPassportDisconnect?.({ address: disconnectAddress, userId: disconnectedUserId });
4756
- setTimeout(() => setPage("auth" /* AUTH */), 200);
4795
+ setTimeout(() => {
4796
+ setPage("auth" /* AUTH */);
4797
+ setIsDialogForced(false);
4798
+ }, 200);
4757
4799
  },
4758
4800
  onError: (err) => {
4759
4801
  setError(err.message || "An unknown error occurred during sign out");
4760
4802
  setStatus("idle");
4761
4803
  setIsLoading(false);
4804
+ setIsDialogForced(false);
4762
4805
  }
4763
4806
  });
4764
4807
  const { name, logo, logoDataUri } = lumiaBeam;
@@ -4944,35 +4987,6 @@ function BalanceView(props) {
4944
4987
  // src/internal/components/KYC/KycMenu.tsx
4945
4988
  import { ArrowLeft } from "lucide-react";
4946
4989
 
4947
- // src/internal/hooks/useLayoutStore.ts
4948
- import { create as create2 } from "zustand";
4949
- var useLayoutStore = create2((set) => ({
4950
- colorMode: "light",
4951
- // layoutView: 'desktop',
4952
- // deviceType: 'non-touch',
4953
- isMobileView: false,
4954
- maxScrollHeight: MAX_CONTENT_HEIGHT,
4955
- isDialogClosing: false,
4956
- isDialogOpen: false,
4957
- isDialogForced: false,
4958
- dialogTitle: null,
4959
- dialogDescription: null,
4960
- dialogContent: null,
4961
- isSettings: false,
4962
- setColorMode: (colorMode) => set({ colorMode }),
4963
- // setLayoutView: (layoutView) => set(() => ({ layoutView })),
4964
- // setDeviceType: (deviceType) => set(() => ({ deviceType })),
4965
- setIsMobileView: (isMobileView) => set({ isMobileView }),
4966
- setMaxScrollHeight: (maxScrollHeight) => set({ maxScrollHeight }),
4967
- setIsDialogClosing: (isDialogClosing) => set({ isDialogClosing }),
4968
- setIsDialogOpen: (isDialogOpen) => set({ isDialogOpen }),
4969
- setIsDialogForced: (isDialogForced) => set({ isDialogForced }),
4970
- setDialogTitle: (dialogTitle) => set({ dialogTitle }),
4971
- setDialogDescription: (dialogDescription) => set({ dialogDescription }),
4972
- setDialogContent: (dialogContent) => set({ dialogContent }),
4973
- setIsSettings: (isSettings) => set({ isSettings })
4974
- }));
4975
-
4976
4990
  // src/internal/components/KYC/SumsubIframe.tsx
4977
4991
  import { LoaderIcon } from "lucide-react";
4978
4992
 
@@ -5355,7 +5369,7 @@ function Header() {
5355
5369
  // package.json
5356
5370
  var package_default = {
5357
5371
  name: "@lumiapassport/ui-kit",
5358
- version: "1.14.22",
5372
+ version: "1.14.23",
5359
5373
  description: "React UI components and hooks for Lumia Passport authentication and Account Abstraction",
5360
5374
  type: "module",
5361
5375
  main: "./dist/index.cjs",
@@ -5484,8 +5498,9 @@ var CONTENT_BG_SETUP = {
5484
5498
  boxShadow: "0px 4px 10px var(--l-pass-shadow-c)"
5485
5499
  };
5486
5500
  var DialogContent = forwardRef3(
5487
- ({ className, children, hideClose, colorMode, ...props }, ref) => {
5501
+ ({ className, children, colorMode, ...props }, ref) => {
5488
5502
  const isSettings = useLayoutStore((st) => st.isSettings);
5503
+ const isDialogForced = useLayoutStore((st) => st.isDialogForced);
5489
5504
  const setPage = useLayoutDataStore((st) => st.setPage);
5490
5505
  const settingsNotifications = useLayoutDataStore((st) => st.settingsNotifications);
5491
5506
  const { isMobileView, isClosing, style } = useDecideContentStyles();
@@ -5516,7 +5531,7 @@ var DialogContent = forwardRef3(
5516
5531
  ...props,
5517
5532
  children: [
5518
5533
  children,
5519
- /* @__PURE__ */ jsxs12(
5534
+ !isDialogForced && /* @__PURE__ */ jsxs12(
5520
5535
  "div",
5521
5536
  {
5522
5537
  className: cn(
@@ -5549,7 +5564,7 @@ var DialogContent = forwardRef3(
5549
5564
  ]
5550
5565
  }
5551
5566
  ),
5552
- !hideClose && /* @__PURE__ */ jsx13(DialogPrimitive.Close, { asChild: true, children: /* @__PURE__ */ jsxs12(Button, { variant: "ghost", size: "icon", className: "w-4 h-4", children: [
5567
+ /* @__PURE__ */ jsx13(DialogPrimitive.Close, { asChild: true, children: /* @__PURE__ */ jsxs12(Button, { variant: "ghost", size: "icon", className: "w-4 h-4", children: [
5553
5568
  /* @__PURE__ */ jsx13(X, { className: "h-4 w-4" }),
5554
5569
  /* @__PURE__ */ jsx13("span", { className: "sr-only", children: "Close" })
5555
5570
  ] }) })
@@ -5822,23 +5837,25 @@ function useBackupStatusChanges() {
5822
5837
 
5823
5838
  // src/internal/hooks/useBackupWarning.ts
5824
5839
  import { useEffect as useEffect6, useRef as useRef3 } from "react";
5825
- var WARNING_TIMEOUT_MS = 24e3;
5840
+ var WARNING_TIMEOUT_MS = 4500;
5826
5841
  function useBackupWarning() {
5827
- const config = useLumiaPassportConfig().config;
5828
5842
  const address = useLumiaPassportSession((st) => st.address);
5829
5843
  const hasServerVault = useLumiaPassportSession((st) => st.hasServerVault);
5830
5844
  const page = useLayoutDataStore((st) => st.page);
5831
5845
  const setPage = useLayoutDataStore((st) => st.setPage);
5832
5846
  const timeoutRef = useRef3(null);
5847
+ const touchedRef = useRef3(false);
5833
5848
  useEffect6(() => {
5849
+ if (touchedRef.current) return;
5834
5850
  if (timeoutRef.current) {
5835
5851
  clearTimeout(timeoutRef.current);
5836
5852
  timeoutRef.current = null;
5837
5853
  }
5838
- const isShown = config.current?.warnings?.backupWarning && !hasServerVault;
5839
- if (!address || !isShown || page === "keysare-backup" /* KEYSARE_BACKUP */) return;
5854
+ if (!address || !!hasServerVault || page === "keysare-backup" /* KEYSARE_BACKUP */) return;
5840
5855
  timeoutRef.current = setTimeout(() => {
5841
5856
  setPage("keysare-backup" /* KEYSARE_BACKUP */);
5857
+ touchedRef.current = true;
5858
+ timeoutRef.current = null;
5842
5859
  }, WARNING_TIMEOUT_MS);
5843
5860
  return () => {
5844
5861
  if (timeoutRef.current) {
@@ -5903,12 +5920,12 @@ function useDetectMaxScrollHeight() {
5903
5920
  }
5904
5921
 
5905
5922
  // src/internal/hooks/usePageMapper.tsx
5906
- import { useCallback as useCallback17, useEffect as useEffect28 } from "react";
5923
+ import { useCallback as useCallback17, useEffect as useEffect29 } from "react";
5907
5924
 
5908
5925
  // src/internal/components/AuthMenu/AuthMenu.tsx
5909
5926
  import { AnimatePresence, motion } from "framer-motion";
5910
5927
  import { AlertTriangle as AlertTriangle2, Loader as Loader5 } from "lucide-react";
5911
- import { useEffect as useEffect11, useMemo, useState as useState7 } from "react";
5928
+ import { useEffect as useEffect11, useMemo, useRef as useRef9, useState as useState7 } from "react";
5912
5929
 
5913
5930
  // src/internal/components/Expandable/hooks/useExpandable.ts
5914
5931
  import { useCallback as useCallback4, useEffect as useEffect9, useRef as useRef4 } from "react";
@@ -7140,8 +7157,18 @@ function useAuthMenuHandlers() {
7140
7157
  const qc = useQueryClient2();
7141
7158
  const pendingLoginResponseRef = useRef7(null);
7142
7159
  const setPage = useLayoutDataStore((st) => st.setPage);
7160
+ const setIsDialogForced = useLayoutStore((st) => st.setIsDialogForced);
7143
7161
  const [telegramCleanup, setTelegramCleanup] = useState5(null);
7144
- const { usePaymaster, setError, setStatus, setSession, setAddress, setRecoveryUserId, setHasServerVault } = useLumiaPassportSession();
7162
+ const {
7163
+ usePaymaster,
7164
+ setError,
7165
+ setStatus,
7166
+ setSession,
7167
+ setAddress,
7168
+ setRecoveryUserId,
7169
+ setHasServerVault,
7170
+ setIsLoading
7171
+ } = useLumiaPassportSession();
7145
7172
  const setStep = useAuthStore((st) => st.setStep);
7146
7173
  const setAlert = useAuthStore((st) => st.setAlert);
7147
7174
  const createSessionWithKeyshare = useCallback7(
@@ -7179,6 +7206,7 @@ function useAuthMenuHandlers() {
7179
7206
  [setStatus, callbacks, usePaymaster]
7180
7207
  );
7181
7208
  const onAuthSuccess = useCallback7(async () => {
7209
+ setIsLoading(true);
7182
7210
  const loginResponse = pendingLoginResponseRef.current;
7183
7211
  if (!loginResponse || !loginResponse.userId) {
7184
7212
  setError("Authentication failed - no login data available");
@@ -7207,10 +7235,6 @@ function useAuthMenuHandlers() {
7207
7235
  );
7208
7236
  setError(null);
7209
7237
  setAlert(null);
7210
- setSession(sess);
7211
- setAddress(addr);
7212
- setStatus("ready");
7213
- setPage(null);
7214
7238
  try {
7215
7239
  callbacks?.onLumiaPassportConnect?.({ address: addr, session: sess });
7216
7240
  callbacks?.onLumiaPassportAccount?.({ userId, address: addr, session: sess, hasKeyshare: hasServerKeyshare });
@@ -7231,6 +7255,16 @@ function useAuthMenuHandlers() {
7231
7255
  } catch (e) {
7232
7256
  console.warn("[UI-KIT] Vault status check failed:", e);
7233
7257
  }
7258
+ setSession(sess);
7259
+ setAddress(addr);
7260
+ setStatus("ready");
7261
+ if (jwt?.isNewUser) {
7262
+ console.log("[AuthMenu] New user detected - forcing backup flow");
7263
+ setIsDialogForced(true);
7264
+ setPage("keysare-backup" /* KEYSARE_BACKUP */);
7265
+ } else {
7266
+ setPage(null);
7267
+ }
7234
7268
  } catch (error) {
7235
7269
  if (error?.code === "KEYSHARE_RECOVERY_NEEDED") {
7236
7270
  console.warn("[AuthMenu] Keyshare recovery needed for user:", userId);
@@ -7250,6 +7284,8 @@ function useAuthMenuHandlers() {
7250
7284
  });
7251
7285
  setStep("failed");
7252
7286
  }
7287
+ } finally {
7288
+ setIsLoading(false);
7253
7289
  }
7254
7290
  }, [
7255
7291
  // config.projectId,
@@ -7263,6 +7299,7 @@ function useAuthMenuHandlers() {
7263
7299
  setAddress,
7264
7300
  setRecoveryUserId,
7265
7301
  setHasServerVault,
7302
+ setIsDialogForced,
7266
7303
  createSessionWithKeyshare
7267
7304
  ]);
7268
7305
  const checkDisplayNameRequired = useCallback7(async (loginResponse) => {
@@ -7636,20 +7673,28 @@ function VerifyStep(props) {
7636
7673
  import { jsx as jsx30, jsxs as jsxs24 } from "react/jsx-runtime";
7637
7674
  var AuthMenu = () => {
7638
7675
  const isIframeReady = useLumiaPassportSession((st) => st.isIframeReady);
7639
- const [isMenuReady, setIsMenuReady] = useState7(false);
7640
7676
  const mainPageHeight = useLayoutDataStore((st) => st.mainPageHeight);
7641
7677
  const setMainPageHeight = useLayoutDataStore((st) => st.setMainPageHeight);
7642
7678
  const { step, alert: alert2, setStep, setPasskeyStatus, setEmail, setAlert } = useAuthStore();
7643
7679
  const { pendingLoginResponseRef, onAuthSuccess, goBackToSignIn, checkDisplayNameRequired } = useAuthMenuHandlers();
7680
+ const [isAlertShowReady, setIsAlertShowReady] = useState7(false);
7681
+ const readyTimeout = useRef9(null);
7682
+ useEffect11(() => {
7683
+ if (readyTimeout.current) {
7684
+ clearTimeout(readyTimeout.current);
7685
+ readyTimeout.current = null;
7686
+ }
7687
+ setIsAlertShowReady(false);
7688
+ readyTimeout.current = setTimeout(() => setIsAlertShowReady(true), 750);
7689
+ }, [step]);
7644
7690
  useEffect11(() => {
7645
7691
  setMainPageHeight(DEFAULT_AUTH_MENU_HEIGHT);
7646
- setTimeout(() => setIsMenuReady(true), 500);
7647
7692
  return () => {
7648
7693
  setStep("signin");
7649
7694
  setEmail("");
7650
7695
  setPasskeyStatus("idle");
7651
7696
  setAlert(null);
7652
- setIsMenuReady(false);
7697
+ setIsAlertShowReady(false);
7653
7698
  };
7654
7699
  }, []);
7655
7700
  if (!isIframeReady) {
@@ -7703,12 +7748,12 @@ var AuthMenu = () => {
7703
7748
  },
7704
7749
  step
7705
7750
  ) }),
7706
- isMenuReady && /* --------------------------------------------------------------------------------------------------------------- */
7751
+ isAlertShowReady && /* --------------------------------------------------------------------------------------------------------------- */
7707
7752
  /* -------- EXPANDABLE is designed to adjust its height automatically whenever ANY 1ST LEVEL CHILD changes! ------ */
7708
7753
  /* In order to ensure smooth expand animation consistency do not use 2nd (or 3rd etc) nested conditional rendering */
7709
7754
  /* elements, cause it might outcome Expandable not reacting to deeply nested elements' height changes ------------ */
7710
7755
  /* --------------------------------------------------------------------------------------------------------------- */
7711
- /* @__PURE__ */ jsx30(Expandable, { isExpanded: !!alert2 && isMenuReady, contentClassName: "px-[var(--l-pass-pd)]", children: /* @__PURE__ */ jsxs24(Highlight, { type: "error", className: "w-full flex gap-[var(--l-pass-gap)] ", children: [
7756
+ /* @__PURE__ */ jsx30(Expandable, { isExpanded: !!alert2 && isAlertShowReady, contentClassName: "px-[var(--l-pass-pd)]", children: /* @__PURE__ */ jsxs24(Highlight, { type: "error", className: "w-full flex gap-[var(--l-pass-gap)] ", children: [
7712
7757
  /* @__PURE__ */ jsx30(AlertTriangle2, { className: "w-5 h-5 text-[var(--l-pass-error)]" }),
7713
7758
  /* @__PURE__ */ jsxs24("span", { className: "block w-full flex flex-col gap-1 flex-1", children: [
7714
7759
  alert2?.title && /* @__PURE__ */ jsx30("span", { className: "block font-bold leading-5", children: alert2.title }),
@@ -7817,7 +7862,7 @@ function RampnowIcon() {
7817
7862
  // src/internal/components/BuyMenu/binance/Binance.tsx
7818
7863
  import { useMutation as useMutation6, useQuery as useQuery3, useQueryClient as useQueryClient3 } from "@tanstack/react-query";
7819
7864
  import { DollarSign, LoaderIcon as LoaderIcon2 } from "lucide-react";
7820
- import { useEffect as useEffect13, useRef as useRef9 } from "react";
7865
+ import { useEffect as useEffect13, useRef as useRef10 } from "react";
7821
7866
 
7822
7867
  // src/internal/components/BuyMenu/components/PaymentSelector.tsx
7823
7868
  import { jsx as jsx33, jsxs as jsxs26 } from "react/jsx-runtime";
@@ -7982,7 +8027,7 @@ function Binance(props) {
7982
8027
  queryKey: [QUERY_KEYS3.binancePaymentModes, walletAddress, isLumiaAvailable, srcQueryAmount],
7983
8028
  queryFn: async () => getPaymentMethodsQuery({ totalAmount: String(srcQueryAmount || 1) })
7984
8029
  });
7985
- const lastLoadedPaymentModes = useRef9([]);
8030
+ const lastLoadedPaymentModes = useRef10([]);
7986
8031
  useEffect13(() => {
7987
8032
  if (!paymentModes?.length) return;
7988
8033
  setPaymentMode(getPayMethodID(paymentModes[0]));
@@ -8303,7 +8348,7 @@ var RAMP_PROVIDERS = {
8303
8348
  var REDIRECT_TIMEOUT_MS = 1500;
8304
8349
 
8305
8350
  // src/internal/components/BuyMenu/useSelectables.ts
8306
- import { useCallback as useCallback8, useEffect as useEffect15, useRef as useRef10, useState as useState8 } from "react";
8351
+ import { useCallback as useCallback8, useEffect as useEffect15, useRef as useRef11, useState as useState8 } from "react";
8307
8352
 
8308
8353
  // src/internal/utils/debounce.ts
8309
8354
  function debounce2(func, waitFor) {
@@ -8320,7 +8365,7 @@ var useSelectables = () => {
8320
8365
  const [redirecting, setRedirecting] = useState8(false);
8321
8366
  const [rampProvider, setrRampProvider] = useState8("binance");
8322
8367
  const [minAmount, setMinAmount] = useState8(0);
8323
- const inputRef = useRef10(null);
8368
+ const inputRef = useRef11(null);
8324
8369
  const [srcQueryAmount, setSrcQueryAmount] = useState8(0);
8325
8370
  const [srcInputAmount, setSrcInputAmount] = useState8(0);
8326
8371
  const [paymentMode, setPaymentMode] = useState8(null);
@@ -8396,7 +8441,7 @@ function BuyMenu() {
8396
8441
  // src/internal/components/KeyshareRestoreMenu/KeyshareRestoreMenu.tsx
8397
8442
  import { useMutation as useMutation10, useQuery as useQuery7, useQueryClient as useQueryClient8 } from "@tanstack/react-query";
8398
8443
  import { AlertCircle as AlertCircle2, CheckCircle2, CloudDownload as CloudDownload2, Loader as Loader8, UserCircle as UserCircle2 } from "lucide-react";
8399
- import { useEffect as useEffect20 } from "react";
8444
+ import { useEffect as useEffect21 } from "react";
8400
8445
  init_vaultClient();
8401
8446
 
8402
8447
  // src/internal/components/KeyshareRestoreMenu/components/MethodSelector.tsx
@@ -8584,13 +8629,22 @@ function useOnRestoreSuccess() {
8584
8629
  }
8585
8630
 
8586
8631
  // src/internal/components/KeyshareRestoreMenu/hooks/useCreateBackup.ts
8587
- init_iframe_manager();
8588
8632
  import { useMutation as useMutation8, useQueryClient as useQueryClient6 } from "@tanstack/react-query";
8633
+ import { useEffect as useEffect17 } from "react";
8634
+ init_iframe_manager();
8589
8635
  function useCreateBackup() {
8590
8636
  const qc = useQueryClient6();
8591
8637
  const session = useLumiaPassportSession((st) => st.session);
8592
8638
  const address = useLumiaPassportSession((st) => st.address);
8593
- const { usePasskey, restorePassword, selectedCloudProvider, setSuccess, setError } = useRestoreStore();
8639
+ const hasServerVault = useLumiaPassportSession((st) => st.hasServerVault);
8640
+ const setIsDialogForced = useLayoutStore((st) => st.setIsDialogForced);
8641
+ const { usePasskey, restorePassword, selectedCloudProvider, setSuccess, setError, setMethod } = useRestoreStore();
8642
+ useEffect17(() => {
8643
+ if (!hasServerVault) {
8644
+ setMethod("server");
8645
+ setIsDialogForced(true);
8646
+ }
8647
+ }, [hasServerVault, setIsDialogForced, setMethod]);
8594
8648
  const passportUserId = session?.mpcUserId || "";
8595
8649
  const onBackupSuccess = () => console.log("[ConnectWalletButton] Backup created successfully");
8596
8650
  const { mutate: createPasswordBackup, isPending: isPasswordBackupCreating } = useMutation8({
@@ -8620,7 +8674,7 @@ function useCreateBackup() {
8620
8674
  })
8621
8675
  );
8622
8676
  }
8623
- onBackupSuccess?.();
8677
+ onBackupSuccess();
8624
8678
  } else {
8625
8679
  setError(response.error || "Server backup failed");
8626
8680
  }
@@ -8657,7 +8711,7 @@ function useCreateBackup() {
8657
8711
  })
8658
8712
  );
8659
8713
  }
8660
- onBackupSuccess?.();
8714
+ onBackupSuccess();
8661
8715
  },
8662
8716
  onError: async (error) => {
8663
8717
  setError(error?.message || "Backup creation failed");
@@ -8697,7 +8751,7 @@ function useCreateBackup() {
8697
8751
  })
8698
8752
  );
8699
8753
  }
8700
- onBackupSuccess?.();
8754
+ onBackupSuccess();
8701
8755
  },
8702
8756
  onError: async (error) => {
8703
8757
  setError(error?.message || "Backup creation failed");
@@ -8827,7 +8881,7 @@ function useRestoreAccount() {
8827
8881
  }
8828
8882
 
8829
8883
  // src/internal/components/KeyshareRestoreMenu/hooks/useValidateFileBackup.ts
8830
- import { useEffect as useEffect17 } from "react";
8884
+ import { useEffect as useEffect18 } from "react";
8831
8885
  function validateRestoreFileFormat(parsedData) {
8832
8886
  if (typeof parsedData !== "object" || parsedData === null) return false;
8833
8887
  const data = parsedData;
@@ -8837,7 +8891,7 @@ function useValidateFileBackup() {
8837
8891
  const restoreFile = useRestoreStore((st) => st.restoreFile);
8838
8892
  const setError = useRestoreStore((st) => st.setError);
8839
8893
  const setUsePasskey = useRestoreStore((st) => st.setUsePasskey);
8840
- useEffect17(() => {
8894
+ useEffect18(() => {
8841
8895
  if (!restoreFile) {
8842
8896
  return;
8843
8897
  }
@@ -8919,7 +8973,7 @@ function MethodSelector(props) {
8919
8973
  },
8920
8974
  children: [
8921
8975
  /* @__PURE__ */ jsx38(Icon2, { className: "w-5 h-5 md:w-8 md:h-8" }),
8922
- !!data?.lastBackup && /* @__PURE__ */ jsx38("div", { className: "w-6 h-6 absolute -top-2 -right-2 flex items-center justify-center bg-[var(--l-pass-bg)]", children: /* @__PURE__ */ jsx38(PositiveIcon, { className: "w-4 h-4" }) })
8976
+ !!data?.lastBackup && /* @__PURE__ */ jsx38("div", { className: "w-6 h-6 absolute -top-2 -right-2 flex items-center justify-center bg-transparent", children: /* @__PURE__ */ jsx38(PositiveIcon, { className: "w-4 h-4" }) })
8923
8977
  ]
8924
8978
  }
8925
8979
  ),
@@ -8934,8 +8988,8 @@ function MethodSelector(props) {
8934
8988
  import { AlertCircle, FileUp as FileUp2, Upload, User as User2 } from "lucide-react";
8935
8989
 
8936
8990
  // src/internal/components/KeyshareRestoreMenu/components/PasswordPasskey.tsx
8937
- import { Eye, EyeOff, Info, Loader as Loader6 } from "lucide-react";
8938
- import { useRef as useRef11 } from "react";
8991
+ import { ChevronRight as ChevronRight2, Eye, EyeOff, Info, Loader as Loader6 } from "lucide-react";
8992
+ import { useRef as useRef12 } from "react";
8939
8993
  import { Fragment as Fragment8, jsx as jsx39, jsxs as jsxs31 } from "react/jsx-runtime";
8940
8994
  function PasswordPasskey(props) {
8941
8995
  const {
@@ -8947,9 +9001,15 @@ function PasswordPasskey(props) {
8947
9001
  isEncryptionMethod,
8948
9002
  actionHandler
8949
9003
  } = props;
8950
- const actionRef = useRef11(null);
9004
+ const hasServerVault = useLumiaPassportSession((st) => st.hasServerVault);
9005
+ const actionRef = useRef12(null);
8951
9006
  const { showPassword, restorePassword, usePasskey, error, setRestorePassword, setShowPassword } = useRestoreStore();
8952
9007
  return /* @__PURE__ */ jsxs31(Fragment8, { children: [
9008
+ !hasServerVault && /* @__PURE__ */ jsxs31("span", { className: "block w-full text-[10px] leading-4 px-[var(--l-pass-pd)] truncate", children: [
9009
+ "Use your ",
9010
+ /* @__PURE__ */ jsx39("strong", { children: usePasskey ? "Passkey" : "Password" }),
9011
+ " to complete account security setup."
9012
+ ] }),
8953
9013
  !usePasskey ? /* @__PURE__ */ jsxs31("div", { className: "w-full flex gap-[var(--l-pass-gap)]", children: [
8954
9014
  /* @__PURE__ */ jsx39(
8955
9015
  Input,
@@ -8991,7 +9051,7 @@ function PasswordPasskey(props) {
8991
9051
  title: actionCaption,
8992
9052
  disabled: isLoading || disabled || error?.includes("Invalid backup file") || !usePasskey && !restorePassword,
8993
9053
  className: "w-full w-12 h-12 flex-shrink-0 rounded-[var(--l-pass-el-bdrs)]",
8994
- children: isLoading ? /* @__PURE__ */ jsx39(Loader6, { className: "animate-spin h-4 w-4" }) : /* @__PURE__ */ jsx39(ActionIcon, { className: "h-4 w-4" })
9054
+ children: isLoading ? /* @__PURE__ */ jsx39(Loader6, { className: "animate-spin h-4 w-4" }) : /* @__PURE__ */ jsx39(ChevronRight2, { className: "h-4 w-4" })
8995
9055
  }
8996
9056
  )
8997
9057
  ] }) : /* @__PURE__ */ jsxs31(
@@ -9010,12 +9070,12 @@ function PasswordPasskey(props) {
9010
9070
  ]
9011
9071
  }
9012
9072
  ),
9013
- !isEncryptionMethod && /* @__PURE__ */ jsx39(Highlight, { type: "info", className: "w-full flex flex-col gap-[var(--l-pass-gap)] text-[10px]", children: mode === "backup" && /* @__PURE__ */ jsxs31("div", { className: "flex gap-[var(--l-pass-gap)]", children: [
9073
+ !isEncryptionMethod && !!usePasskey && /* @__PURE__ */ jsx39(Highlight, { type: "info", className: "w-full flex flex-col gap-[var(--l-pass-gap)] text-[10px]", children: mode === "backup" && /* @__PURE__ */ jsxs31("div", { className: "flex gap-[var(--l-pass-gap)]", children: [
9014
9074
  /* @__PURE__ */ jsx39(Info, { className: "h-4 w-4 flex-shrink-0" }),
9015
9075
  /* @__PURE__ */ jsxs31("span", { className: "text-[var(--l-pass-fg-muted)] block flex-1", children: [
9016
9076
  /* @__PURE__ */ jsx39("span", { className: "block mb-1", children: "Your Backup must be encrypted with a password or a passkey, so only you can decrypt it no matter where backup is stored." }),
9017
- /* @__PURE__ */ jsxs31("span", { children: [
9018
- " Strong passwords are recommended. Passkeys are a password-free alternative. ",
9077
+ /* @__PURE__ */ jsxs31("span", { className: "block", children: [
9078
+ " Passkeys are a password-free alternative. ",
9019
9079
  /* @__PURE__ */ jsx39(
9020
9080
  "a",
9021
9081
  {
@@ -9050,7 +9110,7 @@ function NoBackupFound(props) {
9050
9110
  !restoreFile && /* @__PURE__ */ jsxs32(Highlight, { type: "warning", className: "animate-glow-warning flex gap-[var(--l-pass-gap)]", children: [
9051
9111
  /* @__PURE__ */ jsx40(AlertCircle, { className: "h-4 w-4 flex-0" }),
9052
9112
  /* @__PURE__ */ jsxs32("div", { className: "w-full flex-1 flex flex-col gap-2", children: [
9053
- /* @__PURE__ */ jsx40("span", { className: "block w-full text-xl leading-5 font-bold", children: "No Backup Found" }),
9113
+ /* @__PURE__ */ jsx40("span", { className: "block w-full text-sm leading-4 font-bold", children: "No Backup Found" }),
9054
9114
  /* @__PURE__ */ jsxs32("span", { className: "block w-full text-xs", children: [
9055
9115
  /* @__PURE__ */ jsx40("span", { className: "block mb-1", children: "This device doesn't have access to your wallet keyshare, and no backup was found." }),
9056
9116
  /* @__PURE__ */ jsx40("span", { className: "block w-full", children: "If you're using a different device, please return to the one where you created your account to create a backup, then restore access on this device." })
@@ -9120,7 +9180,7 @@ var Switch = forwardRef4((props, ref) => {
9120
9180
  "aria-checked": inputProps.checked,
9121
9181
  className: cn(
9122
9182
  "block rounded-full w-fit h-7 p-1 outline-none flex-none",
9123
- inputProps.checked ? "bg-[var(--l-pass-bg-success)]" : "bg-[var(--l-pass-primary)]",
9183
+ inputProps.checked ? "bg-[var(--l-pass-bg-success)]" : "bg-[var(--l-pass-bg-info)]",
9124
9184
  className
9125
9185
  ),
9126
9186
  children: /* @__PURE__ */ jsxs33(
@@ -9142,7 +9202,7 @@ var Switch = forwardRef4((props, ref) => {
9142
9202
  },
9143
9203
  style: {
9144
9204
  left: inputProps.checked ? "0px" : "20px",
9145
- color: inputProps.checked ? colorMode === "dark" ? "var(--l-pass-fg-inverted)" : "var(--l-pass-fg)" : "var(--l-pass-fg-inverted)",
9205
+ color: inputProps.checked ? colorMode === "dark" ? "var(--l-pass-fg-inverted)" : "var(--l-pass-fg)" : "var(--l-pass-fg)",
9146
9206
  transition: "left 200ms ease"
9147
9207
  },
9148
9208
  className: "absolute top-0 px-2 text-xs leading-5 font-semibold min-w-5 select-none",
@@ -9156,7 +9216,10 @@ var Switch = forwardRef4((props, ref) => {
9156
9216
  left: inputProps.checked ? `${labelW}px` : "0px",
9157
9217
  transition: "left 200ms ease"
9158
9218
  },
9159
- className: "absolute top-0 w-5 h-5 bg-[var(--l-pass-fg-inverted)] rounded-full"
9219
+ className: cn("absolute top-0 w-5 h-5 rounded-full bg-[var(--l-pass-fg)]", {
9220
+ // 'bg-[var(--l-pass-fg-inverted)]': inputProps.checked,
9221
+ // 'bg-[var(--l-pass-fg)]': !inputProps.checked
9222
+ })
9160
9223
  }
9161
9224
  )
9162
9225
  ]
@@ -9266,23 +9329,24 @@ function File2(props) {
9266
9329
  import { useQueryClient as useQueryClient7 } from "@tanstack/react-query";
9267
9330
  import dayjs from "dayjs";
9268
9331
  import { ArrowLeft as ArrowLeft7, Download, Key as Key4, Upload as Upload2 } from "lucide-react";
9269
- import { useEffect as useEffect18 } from "react";
9332
+ import { useEffect as useEffect19 } from "react";
9270
9333
  import { Fragment as Fragment11, jsx as jsx43, jsxs as jsxs35 } from "react/jsx-runtime";
9271
9334
  function Server(props) {
9272
9335
  const { isLoading, mode = "restore", serverHandler } = props;
9273
9336
  const qc = useQueryClient7();
9274
9337
  const address = useLumiaPassportSession((st) => st.address);
9338
+ const hasServerVault = useLumiaPassportSession((st) => st.hasServerVault);
9275
9339
  const { usePasskey, error, setUsePasskey, setRestorePassword, setShowPassword, setMethod, setError, setSuccess } = useRestoreStore();
9276
9340
  const serverRecoveryStatus = qc.getQueryData([CHECK_BACKUP_QUERY_KEY, address]);
9277
- useEffect18(() => {
9341
+ useEffect19(() => {
9278
9342
  if (mode === "backup" || !serverRecoveryStatus?.created?.encryptionMethod) return;
9279
9343
  setUsePasskey(serverRecoveryStatus.created.encryptionMethod === "passkey");
9280
9344
  }, [mode, serverRecoveryStatus, setUsePasskey]);
9281
9345
  const isEncryptionMethod = mode === "restore" && !!serverRecoveryStatus?.created?.encryptionMethod;
9282
9346
  return /* @__PURE__ */ jsxs35(Fragment11, { children: [
9283
- /* @__PURE__ */ jsxs35("div", { className: "flex items-center justify-between", children: [
9347
+ /* @__PURE__ */ jsxs35("div", { className: cn("flex items-center justify-between", { "px-[var(--l-pass-pd)]": !hasServerVault }), children: [
9284
9348
  /* @__PURE__ */ jsxs35("div", { className: "flex items-center gap-[var(--l-pass-gap)]", children: [
9285
- /* @__PURE__ */ jsx43(
9349
+ !!hasServerVault && /* @__PURE__ */ jsx43(
9286
9350
  Button,
9287
9351
  {
9288
9352
  variant: "ghost",
@@ -9307,9 +9371,10 @@ function Server(props) {
9307
9371
  {
9308
9372
  name: "password-passkey-toggle",
9309
9373
  labels: { checked: "Password", unchecked: "Passkey" },
9310
- disabled: isLoading || !!error,
9374
+ disabled: isLoading,
9311
9375
  checked: !usePasskey,
9312
9376
  onChange: (e) => {
9377
+ if (!!error) setError(null);
9313
9378
  if (!!e.target.checked) setRestorePassword("");
9314
9379
  setUsePasskey(!e.target.checked);
9315
9380
  }
@@ -9344,7 +9409,7 @@ function Server(props) {
9344
9409
  // src/internal/components/KeyshareRestoreMenu/methods/Cloud.tsx
9345
9410
  import { useQuery as useQuery6 } from "@tanstack/react-query";
9346
9411
  import { ArrowLeft as ArrowLeft8, CloudDownload, CloudUpload, Loader as Loader7 } from "lucide-react";
9347
- import { useEffect as useEffect19 } from "react";
9412
+ import { useEffect as useEffect20 } from "react";
9348
9413
 
9349
9414
  // src/internal/components/ui/select.tsx
9350
9415
  import * as SelectPrimitive from "@radix-ui/react-select";
@@ -9492,7 +9557,7 @@ function Cloud2(props) {
9492
9557
  return availableProviders.map((p) => ({ id: p.id, name: p.name, available: p.isAvailable() }));
9493
9558
  }
9494
9559
  });
9495
- useEffect19(() => {
9560
+ useEffect20(() => {
9496
9561
  if (isCloudProvidersLoading) return;
9497
9562
  if (!!cloudProvidersError) {
9498
9563
  console.error("[KeyshareBackup] Failed to load cloud providers:", cloudProvidersError);
@@ -9576,7 +9641,7 @@ var KeyshareRestoreMenu = () => {
9576
9641
  const maxScrollHeight = useLayoutStore((st) => st.maxScrollHeight);
9577
9642
  const setIsDialogForced = useLayoutStore((st) => st.setIsDialogForced);
9578
9643
  const setPage = useLayoutDataStore((st) => st.setPage);
9579
- useEffect20(() => setIsDialogForced(true), []);
9644
+ useEffect21(() => setIsDialogForced(true), []);
9580
9645
  useCheckBackupAvailability();
9581
9646
  const {
9582
9647
  method: currentRestoreMethod,
@@ -9707,8 +9772,8 @@ var KeyshareRestoreMenu = () => {
9707
9772
 
9708
9773
  // src/internal/components/KeyshareRestoreMenu/KeyshareBackupMenu.tsx
9709
9774
  import { useQuery as useQuery8 } from "@tanstack/react-query";
9710
- import { AlertCircle as AlertCircle3, ArrowLeft as ArrowLeft9, CheckCircle2 as CheckCircle22 } from "lucide-react";
9711
- import { useEffect as useEffect21 } from "react";
9775
+ import { AlertCircle as AlertCircle3, ArrowLeft as ArrowLeft9, CheckCircle2 as CheckCircle22, LockIcon } from "lucide-react";
9776
+ import { useEffect as useEffect22 } from "react";
9712
9777
  init_vaultClient();
9713
9778
  import { Fragment as Fragment14, jsx as jsx47, jsxs as jsxs39 } from "react/jsx-runtime";
9714
9779
  var COMPONENTS = {
@@ -9718,10 +9783,10 @@ var COMPONENTS = {
9718
9783
  };
9719
9784
  function KeyshareBackupMenu() {
9720
9785
  const address = useLumiaPassportSession((st) => st.address);
9786
+ const hasServerVault = useLumiaPassportSession((st) => st.hasServerVault);
9721
9787
  const setPage = useLayoutDataStore((st) => st.setPage);
9722
9788
  const setMainPageHeight = useLayoutDataStore((st) => st.setMainPageHeight);
9723
9789
  const maxScrollHeight = useLayoutStore((st) => st.maxScrollHeight);
9724
- useEffect21(() => setMainPageHeight(DEFAULT_SETTINGS_MENU_HEIGHT), [setMainPageHeight]);
9725
9790
  const {
9726
9791
  method: currentBackupMethod,
9727
9792
  error,
@@ -9732,8 +9797,15 @@ function KeyshareBackupMenu() {
9732
9797
  setRestorePassword,
9733
9798
  setRestoreFile,
9734
9799
  setShowPassword,
9735
- setUsePasskey
9800
+ setUsePasskey,
9801
+ setMethod
9736
9802
  } = useRestoreStore();
9803
+ useEffect22(() => {
9804
+ setMainPageHeight(DEFAULT_SETTINGS_MENU_HEIGHT);
9805
+ return () => {
9806
+ setMethod(null);
9807
+ };
9808
+ }, []);
9737
9809
  const { data: serverRecoveryStatus } = useQuery8({
9738
9810
  retry: false,
9739
9811
  queryKey: [CHECK_BACKUP_QUERY_KEY, address],
@@ -9755,7 +9827,11 @@ function KeyshareBackupMenu() {
9755
9827
  style: { "--l-pass-scrollbar-mah": `${maxScrollHeight}px` },
9756
9828
  className: "list-scrollbar-y w-full",
9757
9829
  children: /* @__PURE__ */ jsxs39(Expandable, { isExpanded: true, contentClassName: "w-full flex flex-col gap-[var(--l-pass-gap)] p-[var(--l-pass-pd)]", children: [
9758
- !currentBackupMethod && /* @__PURE__ */ jsxs39("div", { className: "flex items-center gap-[var(--l-pass-gap)]", children: [
9830
+ !hasServerVault && /* @__PURE__ */ jsxs39("div", { className: "flex items-center justify-center gap-2 px-5 pt-3 pb-6", children: [
9831
+ /* @__PURE__ */ jsx47(LockIcon, { className: "w-6 h-6" }),
9832
+ /* @__PURE__ */ jsx47("span", { className: "font-bold text-xl leading-6", children: "Secure Account" })
9833
+ ] }),
9834
+ !!hasServerVault && !currentBackupMethod && /* @__PURE__ */ jsxs39("div", { className: "flex items-center gap-[var(--l-pass-gap)]", children: [
9759
9835
  /* @__PURE__ */ jsx47(
9760
9836
  Button,
9761
9837
  {
@@ -9770,14 +9846,15 @@ function KeyshareBackupMenu() {
9770
9846
  setUsePasskey(false);
9771
9847
  setError(null);
9772
9848
  setSuccess(null);
9849
+ setMethod(null);
9773
9850
  setPage("settings" /* SETTINGS */);
9774
9851
  },
9775
9852
  children: /* @__PURE__ */ jsx47(ArrowLeft9, { className: "h-4 w-4" })
9776
9853
  }
9777
9854
  ),
9778
- /* @__PURE__ */ jsx47("span", { className: "text-xl font-semibold", children: "Create Backup" })
9855
+ /* @__PURE__ */ jsx47("span", { className: "text-xl font-semibold leading-8", children: "Create Backup" })
9779
9856
  ] }),
9780
- !currentBackupMethod && /* @__PURE__ */ jsx47(MethodSelector, { mode: "backup", serverRecoveryStatus }),
9857
+ !!hasServerVault && !currentBackupMethod && /* @__PURE__ */ jsx47(MethodSelector, { mode: "backup", serverRecoveryStatus }),
9781
9858
  !!currentBackupMethod && /* @__PURE__ */ jsx47(Fragment14, { children: /* @__PURE__ */ jsx47(
9782
9859
  BackupComponent,
9783
9860
  {
@@ -9812,8 +9889,8 @@ function KeyshareBackupMenu() {
9812
9889
  }
9813
9890
 
9814
9891
  // src/internal/components/MainMenu/MainMenu.tsx
9815
- import { ChevronLeft, ChevronRight as ChevronRight2, DollarSign as DollarSign3, Wallet2 as Wallet23 } from "lucide-react";
9816
- import { useEffect as useEffect22 } from "react";
9892
+ import { ChevronLeft, ChevronRight as ChevronRight3, DollarSign as DollarSign3, Wallet2 as Wallet23 } from "lucide-react";
9893
+ import { useEffect as useEffect23 } from "react";
9817
9894
 
9818
9895
  // src/internal/components/ManageWalletMenu/hooks/useProvidersList.ts
9819
9896
  init_common();
@@ -9834,7 +9911,7 @@ function useProvidersList() {
9834
9911
  // src/internal/components/MainMenu/MainMenu.tsx
9835
9912
  import { jsx as jsx48, jsxs as jsxs40 } from "react/jsx-runtime";
9836
9913
  var MAIN_MENU_BUTTONS = [
9837
- { id: "send" /* SEND */, label: "Send", icon: ChevronRight2 },
9914
+ { id: "send" /* SEND */, label: "Send", icon: ChevronRight3 },
9838
9915
  { id: "receive" /* RECEIVE */, label: "Receive", icon: ChevronLeft },
9839
9916
  { id: "buy" /* BUY */, label: "Buy", icon: DollarSign3 },
9840
9917
  { id: "assets" /* ASSETS */, label: "Portfolio", icon: Wallet23 }
@@ -9843,7 +9920,7 @@ function MainMenu() {
9843
9920
  const address = useLumiaPassportSession((st) => st.address);
9844
9921
  const setPage = useLayoutDataStore((st) => st.setPage);
9845
9922
  const setMainPageHeight = useLayoutDataStore((st) => st.setMainPageHeight);
9846
- useEffect22(() => setMainPageHeight(DEFAULT_MAIN_MENU_HEIGHT), [setMainPageHeight]);
9923
+ useEffect23(() => setMainPageHeight(DEFAULT_MAIN_MENU_HEIGHT), [setMainPageHeight]);
9847
9924
  useProvidersList();
9848
9925
  return /* @__PURE__ */ jsx48("div", { className: "w-full p-[var(--l-pass-pd)] flex flex-col gap-[var(--l-pass-gap)]", children: /* @__PURE__ */ jsx48("div", { className: "w-full grid grid-cols-4 gap-0 md:gap-[var(--l-pass-gap)] py-[10px] md:py-1", children: MAIN_MENU_BUTTONS.map(({ id, label, icon: Icon2 }) => /* @__PURE__ */ jsxs40(
9849
9926
  Button,
@@ -9916,7 +9993,7 @@ init_passkey2();
9916
9993
  init_lumiaPassport();
9917
9994
  init_projectId();
9918
9995
  import { useMutation as useMutation11 } from "@tanstack/react-query";
9919
- import { ChevronRight as ChevronRight3, Loader as Loader9, Mail as Mail4 } from "lucide-react";
9996
+ import { ChevronRight as ChevronRight4, Loader as Loader9, Mail as Mail4 } from "lucide-react";
9920
9997
 
9921
9998
  // src/internal/components/ManageWalletMenu/hooks/useStore.ts
9922
9999
  import { create as create5 } from "zustand";
@@ -10029,7 +10106,7 @@ function EmailForm() {
10029
10106
  size: "large",
10030
10107
  disabled: !email || isLoading,
10031
10108
  onClick: () => onSendVerificationCode(),
10032
- children: isLoading ? /* @__PURE__ */ jsx49(Loader9, { className: "w-4 h-4 animate-spin" }) : /* @__PURE__ */ jsx49(ChevronRight3, { className: "w-4 h-4" })
10109
+ children: isLoading ? /* @__PURE__ */ jsx49(Loader9, { className: "w-4 h-4 animate-spin" }) : /* @__PURE__ */ jsx49(ChevronRight4, { className: "w-4 h-4" })
10033
10110
  }
10034
10111
  )
10035
10112
  ] });
@@ -10282,7 +10359,7 @@ function EmailNotConnectedWarning() {
10282
10359
 
10283
10360
  // src/internal/components/ManageWalletMenu/hooks/useLinkSocial.ts
10284
10361
  import { useQueryClient as useQueryClient12 } from "@tanstack/react-query";
10285
- import React6, { useEffect as useEffect23 } from "react";
10362
+ import React6, { useEffect as useEffect24 } from "react";
10286
10363
  init_auth();
10287
10364
  function useLinkSocial() {
10288
10365
  const qc = useQueryClient12();
@@ -10347,7 +10424,7 @@ function useLinkSocial() {
10347
10424
  [config.social?.providers, callbacks]
10348
10425
  );
10349
10426
  const [socialLinkStarted, setSocialLinkStarted] = React6.useState(false);
10350
- useEffect23(() => {
10427
+ useEffect24(() => {
10351
10428
  const key = providerType?.toLowerCase();
10352
10429
  console.log("[useLinkSocial] Effect triggered:", { key, linkIsLoading, socialLinkStarted, isWalletLinking });
10353
10430
  if (isWalletLinking) {
@@ -10369,7 +10446,7 @@ function useLinkSocial() {
10369
10446
  // src/internal/components/ManageWalletMenu/hooks/useLinkTelegram.ts
10370
10447
  init_telegram2();
10371
10448
  import { useQueryClient as useQueryClient13 } from "@tanstack/react-query";
10372
- import { useCallback as useCallback11, useEffect as useEffect24, useState as useState11 } from "react";
10449
+ import { useCallback as useCallback11, useEffect as useEffect25, useState as useState11 } from "react";
10373
10450
  function useLinkTelegram() {
10374
10451
  const {
10375
10452
  config: { current: config },
@@ -10423,7 +10500,7 @@ function useLinkTelegram() {
10423
10500
  }
10424
10501
  }, [config.social?.providers, callbacks]);
10425
10502
  const [telegramLinkStarted, setTelegramLinkStarted] = useState11(false);
10426
- useEffect24(() => {
10503
+ useEffect25(() => {
10427
10504
  console.log("[useLinkTelegram] Effect triggered:", {
10428
10505
  providerType,
10429
10506
  linkIsLoading,
@@ -10440,7 +10517,7 @@ function useLinkTelegram() {
10440
10517
  handleLinkTelegram();
10441
10518
  }
10442
10519
  }, [providerType, handleLinkTelegram, linkIsLoading, telegramLinkStarted, isWalletLinking]);
10443
- useEffect24(() => {
10520
+ useEffect25(() => {
10444
10521
  if (providerType !== "telegram") {
10445
10522
  setTelegramLinkStarted(false);
10446
10523
  }
@@ -10759,7 +10836,7 @@ import { useCallback as useCallback13 } from "react";
10759
10836
  // src/internal/hooks/useBlockscoutAssets.ts
10760
10837
  init_lumiaPassport();
10761
10838
  init_base();
10762
- import { useCallback as useCallback12, useMemo as useMemo4, useRef as useRef12 } from "react";
10839
+ import { useCallback as useCallback12, useMemo as useMemo4, useRef as useRef13 } from "react";
10763
10840
  import { useQuery as useQuery11 } from "@tanstack/react-query";
10764
10841
  import { useBalance as useBalance2, usePublicClient } from "wagmi";
10765
10842
  import { formatUnits as formatUnits2 } from "viem";
@@ -10907,7 +10984,7 @@ function useBlockscoutAssets(options) {
10907
10984
  [blockscoutApiUrl]
10908
10985
  );
10909
10986
  const publicClient2 = usePublicClient({ chainId: lumiaBeam.id });
10910
- const lastRefreshRef = useRef12(0);
10987
+ const lastRefreshRef = useRef13(0);
10911
10988
  const {
10912
10989
  data: nativeBalanceData,
10913
10990
  isLoading: nativeLoading,
@@ -11289,6 +11366,7 @@ function PortfolioMenu() {
11289
11366
  init_auth();
11290
11367
  init_keyshare();
11291
11368
  import { useQuery as useQuery13, useQueryClient as useQueryClient17 } from "@tanstack/react-query";
11369
+ import dayjs3 from "dayjs";
11292
11370
  import { ArrowLeft as ArrowLeft12, Loader as Loader16, Trash2 as Trash22 } from "lucide-react";
11293
11371
  import { useState as useState14 } from "react";
11294
11372
  init_iframe_manager();
@@ -11565,15 +11643,22 @@ function SecurityMenu() {
11565
11643
  /* @__PURE__ */ jsx61("div", { className: "w-full space-y-1", children: trustedApps.map((app, index) => /* @__PURE__ */ jsxs53(
11566
11644
  "div",
11567
11645
  {
11568
- className: "text-[10px] leading-tight p-2 rounded flex items-center gap-2 bg-[var(--l-pass-secondary)]",
11646
+ className: "text-[10px] leading-tight p-2 rounded-[var(--l-pass-el-bdrs)] flex items-center gap-[var(--l-pass-gap)] bg-[var(--l-pass-bg-info)]",
11569
11647
  children: [
11570
- app.appLogo ? /* @__PURE__ */ jsx61("img", { src: app.appLogo, alt: "", className: "w-8 h-8 rounded-md object-cover flex-shrink-0" }) : /* @__PURE__ */ jsx61("div", { className: "w-8 h-8 rounded-md bg-[var(--l-pass-bg-muted)] flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ jsx61("span", { className: "text-sm", children: "\u{1F517}" }) }),
11648
+ app.appLogo ? /* @__PURE__ */ jsx61(
11649
+ "img",
11650
+ {
11651
+ src: app.appLogo,
11652
+ alt: app.appName,
11653
+ className: "w-8 h-8 rounded-[var(--l-pass-el-bdrs)] object-cover flex-shrink-0"
11654
+ }
11655
+ ) : /* @__PURE__ */ jsx61("div", { className: "w-8 h-8 rounded-[var(--l-pass-el-bdrs)] bg-[var(--l-pass-bg-muted)] flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ jsx61("span", { className: "text-sm", children: "\u{1F517}" }) }),
11571
11656
  /* @__PURE__ */ jsxs53("div", { className: "flex-1 min-w-0", children: [
11572
- /* @__PURE__ */ jsx61("div", { className: "font-medium truncate", children: app.appName || new URL(app.origin).hostname }),
11657
+ /* @__PURE__ */ jsx61("div", { className: "font-semibold truncate", children: app.appName || new URL(app.origin).hostname }),
11573
11658
  /* @__PURE__ */ jsx61("div", { className: "text-[var(--l-pass-fg-muted)] truncate", children: new URL(app.origin).hostname }),
11574
- /* @__PURE__ */ jsxs53("div", { className: "text-[var(--l-pass-fg-muted)]", children: [
11659
+ /* @__PURE__ */ jsxs53("div", { className: "text-[var(--l-pass-fg-muted)] truncate", children: [
11575
11660
  "Trusted: ",
11576
- new Date(app.trustedAt).toLocaleDateString()
11661
+ dayjs3(app.trustedAt).format("MMM D, YYYY HH:mm")
11577
11662
  ] })
11578
11663
  ] }),
11579
11664
  /* @__PURE__ */ jsx61(
@@ -11582,7 +11667,7 @@ function SecurityMenu() {
11582
11667
  variant: "ghost",
11583
11668
  size: "icon",
11584
11669
  title: "Remove from trusted",
11585
- className: "text-[var(--l-pass-error)] flex-shrink-0",
11670
+ className: "text-[var(--l-pass-bg-error)] flex-shrink-0",
11586
11671
  onClick: () => setAppToRemove({
11587
11672
  projectId: app.projectId,
11588
11673
  origin: app.origin,
@@ -11590,7 +11675,7 @@ function SecurityMenu() {
11590
11675
  appName: app.appName,
11591
11676
  appLogo: app.appLogo
11592
11677
  }),
11593
- children: /* @__PURE__ */ jsx61(Trash22, { className: "h-3 w-3" })
11678
+ children: /* @__PURE__ */ jsx61(Trash22, { className: "h-4 w-4" })
11594
11679
  }
11595
11680
  )
11596
11681
  ]
@@ -11640,7 +11725,7 @@ function SecurityMenu() {
11640
11725
 
11641
11726
  // src/internal/components/SendRecieveMenu/SendLumiaMenu.tsx
11642
11727
  import { AlertCircle as AlertCircle5, ArrowLeft as ArrowLeft13, CheckCircle2 as CheckCircle23, Loader as Loader17, Wallet as Wallet3 } from "lucide-react";
11643
- import { useEffect as useEffect25, useState as useState16 } from "react";
11728
+ import { useEffect as useEffect26, useState as useState16 } from "react";
11644
11729
  import { isAddress as isAddress2 } from "viem";
11645
11730
  import { useBalance as useBalance4 } from "wagmi";
11646
11731
 
@@ -11889,7 +11974,7 @@ function SendLumiaMenu() {
11889
11974
  const [validationError, setValidationError] = useState16(null);
11890
11975
  const nativeAsset = assets.find((a) => a.type === "native");
11891
11976
  const balance = nativeAsset ? parseFloat(nativeAsset.formattedBalance) : 0;
11892
- useEffect25(() => {
11977
+ useEffect26(() => {
11893
11978
  if (open) {
11894
11979
  setTxStep("input");
11895
11980
  setValidationError(null);
@@ -12054,7 +12139,7 @@ function SendLumiaMenu() {
12054
12139
  init_clients();
12055
12140
  import { ArrowLeft as ArrowLeft14, CheckCircle2 as CheckCircle24, Copy as Copy2, Loader as Loader18 } from "lucide-react";
12056
12141
  import QRCode from "qrcode";
12057
- import { useCallback as useCallback15, useEffect as useEffect26, useState as useState17 } from "react";
12142
+ import { useCallback as useCallback15, useEffect as useEffect27, useState as useState17 } from "react";
12058
12143
  import { Fragment as Fragment22, jsx as jsx63, jsxs as jsxs55 } from "react/jsx-runtime";
12059
12144
  function ReceiveLumiaMenu() {
12060
12145
  const address = useLumiaPassportSession((st) => st.address);
@@ -12064,7 +12149,7 @@ function ReceiveLumiaMenu() {
12064
12149
  const open = page === "receive";
12065
12150
  const [qrCodeUrl, setQrCodeUrl] = useState17("");
12066
12151
  const [copied, setCopied] = useState17(false);
12067
- useEffect26(() => {
12152
+ useEffect27(() => {
12068
12153
  if (open && address) {
12069
12154
  QRCode.toDataURL(address, {
12070
12155
  width: 200,
@@ -12107,7 +12192,7 @@ function ReceiveLumiaMenu() {
12107
12192
  /* @__PURE__ */ jsx63("div", { className: "flex items-center justify-center p-[var(--l-pass-pd)]", style: { minHeight: "216px" }, children: qrCodeUrl ? /* @__PURE__ */ jsx63("img", { src: qrCodeUrl, alt: "Wallet QR Code", className: "w-48 h-48" }) : /* @__PURE__ */ jsx63(Loader18, { className: "w-5 h-5 animate-spin text-[var(--l-pass-fg-muted)]" }) }),
12108
12193
  /* @__PURE__ */ jsxs55(Highlight, { type: "info", children: [
12109
12194
  /* @__PURE__ */ jsx63("span", { className: "block w-full text-center font-mono text-[10px] break-all mb-2", children: address }),
12110
- /* @__PURE__ */ jsx63(Button, { onClick: handleCopy, className: "w-full", size: "medium", children: copied ? /* @__PURE__ */ jsxs55(Fragment22, { children: [
12195
+ /* @__PURE__ */ jsx63(Button, { onClick: handleCopy, className: "w-full", size: "large", children: copied ? /* @__PURE__ */ jsxs55(Fragment22, { children: [
12111
12196
  /* @__PURE__ */ jsx63(CheckCircle24, { className: "h-4 w-4" }),
12112
12197
  /* @__PURE__ */ jsx63("span", { children: "Copied!" })
12113
12198
  ] }) : /* @__PURE__ */ jsxs55(Fragment22, { children: [
@@ -12123,7 +12208,7 @@ function ReceiveLumiaMenu() {
12123
12208
 
12124
12209
  // src/internal/components/SettingsMenu/SettingsMenu.tsx
12125
12210
  import { ArrowLeft as ArrowLeft15 } from "lucide-react";
12126
- import { useEffect as useEffect27 } from "react";
12211
+ import { useEffect as useEffect28 } from "react";
12127
12212
 
12128
12213
  // src/internal/components/SettingsMenu/constants.ts
12129
12214
  import { ArrowLeftRight, DatabaseBackup, LockKeyhole, UsersRound } from "lucide-react";
@@ -12157,7 +12242,7 @@ function SettingsMenu() {
12157
12242
  const setPage = useLayoutDataStore((st) => st.setPage);
12158
12243
  const settingsNotifications = useLayoutDataStore((st) => st.settingsNotifications);
12159
12244
  const setMainPageHeight = useLayoutDataStore((st) => st.setMainPageHeight);
12160
- useEffect27(() => setMainPageHeight(DEFAULT_SETTINGS_MENU_HEIGHT), [setMainPageHeight]);
12245
+ useEffect28(() => setMainPageHeight(DEFAULT_SETTINGS_MENU_HEIGHT), [setMainPageHeight]);
12161
12246
  useProvidersList();
12162
12247
  const navItems = NAV_BUTTONS.map((el) => ({ ...el, onClick: () => setPage(el.id) }));
12163
12248
  const highlightedKeys = settingsNotifications.map((n) => n.target);
@@ -12509,7 +12594,7 @@ async function getTransactionsListQuery(address) {
12509
12594
  }
12510
12595
 
12511
12596
  // src/internal/components/TransactionsMenu/TransactionsGroup.tsx
12512
- import { ChevronLeft as ChevronLeft2, ChevronRight as ChevronRight4, Copy as Copy3 } from "lucide-react";
12597
+ import { ChevronLeft as ChevronLeft2, ChevronRight as ChevronRight5, Copy as Copy3 } from "lucide-react";
12513
12598
 
12514
12599
  // src/internal/components/TransactionsMenu/utils.ts
12515
12600
  init_base();
@@ -12594,7 +12679,7 @@ function TransactionsGroup(props) {
12594
12679
  children: [
12595
12680
  /* @__PURE__ */ jsxs58("div", { className: "flex items-center justify-between gap-[var(--l-pass-gap)]", children: [
12596
12681
  /* @__PURE__ */ jsxs58("div", { className: "flex items-center gap-1 flex-0 w-fit", children: [
12597
- parent.direction === "in" ? /* @__PURE__ */ jsx67(ChevronLeft2, { className: "w-4 h-4" }) : /* @__PURE__ */ jsx67(ChevronRight4, { className: "w-4 h-4" }),
12682
+ parent.direction === "in" ? /* @__PURE__ */ jsx67(ChevronLeft2, { className: "w-4 h-4" }) : /* @__PURE__ */ jsx67(ChevronRight5, { className: "w-4 h-4" }),
12598
12683
  /* @__PURE__ */ jsx67("span", { className: "text-[10px]", children: isIncoming ? "RECEIVED" : "SENT" }),
12599
12684
  parent.status === "ok" ? /* @__PURE__ */ jsx67(PositiveIcon, {}) : /* @__PURE__ */ jsx67(NegativeIcon, {})
12600
12685
  ] }),
@@ -12734,7 +12819,7 @@ function TransactionsMenu() {
12734
12819
  /* @__PURE__ */ jsx68(XCircle2, { className: "w-4 h-4 flex-none" }),
12735
12820
  /* @__PURE__ */ jsx68("span", { className: "block w-full flex-1 text-center text-xs", children: txHistoryResolvedError })
12736
12821
  ] }),
12737
- !isTxHistoryLoading && !txHistoryResolvedError && txHistoryGroups.length === 0 && /* @__PURE__ */ jsx68(Highlight, { type: "warning", children: /* @__PURE__ */ jsx68("span", { children: "No transactions found. Smart account transactions will appear here" }) }),
12822
+ !isTxHistoryLoading && !txHistoryResolvedError && txHistoryGroups.length === 0 && /* @__PURE__ */ jsx68(Highlight, { type: "warning", children: /* @__PURE__ */ jsx68("span", { children: "No transactions found." }) }),
12738
12823
  !isTxHistoryLoading && !txHistoryResolvedError && txHistoryGroups.length > 0 && /* @__PURE__ */ jsx68("div", { className: "w-full flex flex-col gap-[var(--l-pass-gap)]", children: txHistoryGroups.map((group) => /* @__PURE__ */ jsx68(
12739
12824
  TransactionsGroup,
12740
12825
  {
@@ -12879,7 +12964,7 @@ function usePageMapper() {
12879
12964
  },
12880
12965
  [setDialogContent, setDialogDescription, setDialogTitle, setIsDialogOpen]
12881
12966
  );
12882
- useEffect28(() => {
12967
+ useEffect29(() => {
12883
12968
  if (page === null) return closeDialog();
12884
12969
  const pageItem = protectedRoutes[page];
12885
12970
  if (!pageItem) {
@@ -12893,29 +12978,17 @@ function usePageMapper() {
12893
12978
 
12894
12979
  // src/internal/hooks/useSettingsNotifications.ts
12895
12980
  init_auth();
12896
- import { useEffect as useEffect29 } from "react";
12981
+ import { useEffect as useEffect30 } from "react";
12897
12982
  var EMAIL_NOT_CONNECTED_NOTIFICATION = {
12898
12983
  id: "email-not-connected",
12899
12984
  target: "manage-wallet" /* MANAGE_WALLET */,
12900
12985
  message: "Email is not connected"
12901
12986
  };
12902
- var BACKUP_IS_NOT_CREATED_NOTIFICATION = {
12903
- id: "backup-is-not-created",
12904
- target: "keysare-backup" /* KEYSARE_BACKUP */,
12905
- message: "Backup is not created"
12906
- };
12907
12987
  function useSettingsNotifications() {
12908
- const hasServerVault = useLumiaPassportSession((st) => st.hasServerVault);
12909
12988
  const setSettingsNotifications = useLayoutDataStore((st) => st.setSettingsNotifications);
12910
12989
  const providers = jwtTokenManager2.getProviders();
12911
12990
  const hasEmail = providers.includes("email");
12912
- useEffect29(() => {
12913
- setSettingsNotifications({
12914
- ...BACKUP_IS_NOT_CREATED_NOTIFICATION,
12915
- status: hasServerVault ? "resolved" : "active"
12916
- });
12917
- }, [hasServerVault, setSettingsNotifications]);
12918
- useEffect29(() => {
12991
+ useEffect30(() => {
12919
12992
  setSettingsNotifications({
12920
12993
  ...EMAIL_NOT_CONNECTED_NOTIFICATION,
12921
12994
  status: hasEmail ? "resolved" : "active"
@@ -12924,7 +12997,7 @@ function useSettingsNotifications() {
12924
12997
  }
12925
12998
 
12926
12999
  // src/internal/hooks/useWalletStatus.ts
12927
- import { useEffect as useEffect30 } from "react";
13000
+ import { useEffect as useEffect31 } from "react";
12928
13001
  init_auth();
12929
13002
  function useWalletStatus() {
12930
13003
  const isIframeReady = useLumiaPassportSession((st) => st.isIframeReady);
@@ -12934,7 +13007,7 @@ function useWalletStatus() {
12934
13007
  config: { current: config },
12935
13008
  callbacks
12936
13009
  } = useLumiaPassportConfig();
12937
- useEffect30(() => {
13010
+ useEffect31(() => {
12938
13011
  if (!isIframeReady || !config.projectId || !callbacks?.onWalletReady) return;
12939
13012
  const userId = jwtTokenManager2.getUserId();
12940
13013
  const hasKeyshare = jwtTokenManager2.getHasKeyshare();
@@ -12959,11 +13032,12 @@ function LumiaPassportDialog() {
12959
13032
  const config = useLumiaPassportConfig().config;
12960
13033
  const className = config.current?.ui?.dialogClassName;
12961
13034
  const session = useLumiaPassportSession((st) => st.session);
13035
+ const hasServerVault = useLumiaPassportSession((st) => st.hasServerVault);
12962
13036
  const page = useLayoutDataStore((st) => st.page);
12963
13037
  const mainPageHeight = useLayoutDataStore((st) => st.mainPageHeight);
12964
13038
  const setPage = useLayoutDataStore((st) => st.setPage);
12965
13039
  const { colorMode, isDialogOpen, dialogTitle, dialogDescription, dialogContent, isDialogForced, setIsSettings } = useLayoutStore();
12966
- useEffect31(() => setIsSettings(!!session), [session, setIsSettings]);
13040
+ useEffect32(() => setIsSettings(!!session), [session, setIsSettings]);
12967
13041
  usePageMapper();
12968
13042
  useAutoConnect();
12969
13043
  useCheckVaultStatus();
@@ -12973,6 +13047,7 @@ function LumiaPassportDialog() {
12973
13047
  useListenIframeAuthEvents();
12974
13048
  useBackupWarning();
12975
13049
  useWalletStatus();
13050
+ const isHeaderHidden = !session || page === "keysare-backup" /* KEYSARE_BACKUP */ && !hasServerVault;
12976
13051
  return /* @__PURE__ */ jsx70(
12977
13052
  Dialog,
12978
13053
  {
@@ -12981,10 +13056,10 @@ function LumiaPassportDialog() {
12981
13056
  if (isDialogForced) return;
12982
13057
  if (!open) setPage(null);
12983
13058
  },
12984
- children: /* @__PURE__ */ jsxs60(DialogContent, { colorMode, hideClose: isDialogForced, className, children: [
13059
+ children: /* @__PURE__ */ jsxs60(DialogContent, { colorMode, className, children: [
12985
13060
  /* @__PURE__ */ jsx70(VisuallyHidden, { children: /* @__PURE__ */ jsx70(DialogTitle, { children: dialogTitle }) }),
12986
13061
  /* @__PURE__ */ jsx70(DialogDescription, { className: "sr-only", children: dialogDescription }),
12987
- !!session && /* @__PURE__ */ jsx70(Header, {}),
13062
+ !isHeaderHidden && /* @__PURE__ */ jsx70(Header, {}),
12988
13063
  /* @__PURE__ */ jsx70(AnimatePresence3, { mode: "wait", initial: false, children: /* @__PURE__ */ jsx70(
12989
13064
  motion3.div,
12990
13065
  {
@@ -13049,7 +13124,7 @@ var TssManagerWithRef = React9.forwardRef((props, ref) => {
13049
13124
  init_wallet();
13050
13125
  import { useConnectModal } from "@rainbow-me/rainbowkit";
13051
13126
  import { useMutation as useMutation15, useQueryClient as useQueryClient19 } from "@tanstack/react-query";
13052
- import React10, { useCallback as useCallback19, useEffect as useEffect32 } from "react";
13127
+ import React10, { useCallback as useCallback19, useEffect as useEffect33 } from "react";
13053
13128
  import { useAccount, useDisconnect, useSignMessage } from "wagmi";
13054
13129
  function WalletConnectHandler() {
13055
13130
  const qc = useQueryClient19();
@@ -13094,7 +13169,7 @@ function WalletConnectHandler() {
13094
13169
  [qc, passportWalletAddress, callbacks, setProviderType, setPage, setIsWalletLinking]
13095
13170
  );
13096
13171
  const [hasStartedLinking, setHasStartedLinking] = React10.useState(false);
13097
- useEffect32(() => {
13172
+ useEffect33(() => {
13098
13173
  if (isWalletLinking && !hasStartedLinking) {
13099
13174
  setHasStartedLinking(true);
13100
13175
  setProviderType(null);
@@ -13114,7 +13189,7 @@ function WalletConnectHandler() {
13114
13189
  if (isConnected) disconnect();
13115
13190
  }
13116
13191
  }, [isWalletLinking, hasStartedLinking, isConnected, openConnectModal, disconnect, setPage, setProviderType]);
13117
- useEffect32(() => {
13192
+ useEffect33(() => {
13118
13193
  if (hasStartedLinking && !connectModalOpen && !isConnected && isWalletLinking) {
13119
13194
  console.log("[WalletConnectHandler] Modal closed without connecting");
13120
13195
  onLinkingComplete(false);
@@ -13190,7 +13265,7 @@ function WalletConnectHandler() {
13190
13265
  setPage(passportWalletAddress ? "manage-wallet" /* MANAGE_WALLET */ : "auth" /* AUTH */);
13191
13266
  }
13192
13267
  });
13193
- useEffect32(() => {
13268
+ useEffect33(() => {
13194
13269
  if (!!chain?.id && isConnected && walletAddress && isWalletLinking && hasStartedLinking) {
13195
13270
  console.log("[WalletConnectHandler] handleWalletSign triggered");
13196
13271
  handleWalletSign({ chainId: chain.id, signingWalletAddress: walletAddress });
@@ -13283,8 +13358,8 @@ function LumiaPassportProvider(props) {
13283
13358
  const { children, projectId, initialConfig = {}, callbacks } = props;
13284
13359
  const setIsIframeReady = useLumiaPassportSession((st) => st.setIsIframeReady);
13285
13360
  const setWalletReadyStatus = useLumiaPassportSession((st) => st.setWalletReadyStatus);
13286
- useEffect33(() => notifyNoProjetctId(projectId), [projectId]);
13287
- const config = useRef13({ projectId, ...DEFAULT_LUMIA_PASSPORT_CONFIG });
13361
+ useEffect34(() => notifyNoProjetctId(projectId), [projectId]);
13362
+ const config = useRef14({ projectId, ...DEFAULT_LUMIA_PASSPORT_CONFIG });
13288
13363
  const updateConfig = useCallback20((updates) => {
13289
13364
  const prev = config.current;
13290
13365
  const next = { ...prev };
@@ -13320,7 +13395,7 @@ function LumiaPassportProvider(props) {
13320
13395
  }
13321
13396
  config.current = next;
13322
13397
  }, []);
13323
- useEffect33(() => {
13398
+ useEffect34(() => {
13324
13399
  if (typeof window === "undefined" || !projectId) return;
13325
13400
  const mergedConfig = merge2(DEFAULT_LUMIA_PASSPORT_CONFIG, initialConfig);
13326
13401
  updateConfig(mergedConfig);
@@ -13376,7 +13451,7 @@ var useLumiaPassportConfig = () => {
13376
13451
 
13377
13452
  // src/components/ConnectWalletButton.tsx
13378
13453
  import { Cloud as Cloud5, Laptop as Laptop2, Loader as Loader20, Shield as Shield2 } from "lucide-react";
13379
- import { useEffect as useEffect34, useMemo as useMemo6 } from "react";
13454
+ import { useEffect as useEffect35, useMemo as useMemo6 } from "react";
13380
13455
  init_auth();
13381
13456
  import { Fragment as Fragment25, jsx as jsx74, jsxs as jsxs62 } from "react/jsx-runtime";
13382
13457
  function getFormattedStatus(label, status, showStatus) {
@@ -13397,7 +13472,7 @@ function ConnectWalletButton(props) {
13397
13472
  const colorMode = useLayoutStore((st) => st.colorMode);
13398
13473
  const { session, address, hasServerVault, isLoading, isIframeReady, status, setUsePaymaster } = useLumiaPassportSession();
13399
13474
  const connectButtonLabel = getFormattedStatus(label || "Connect", status, isIframeReady);
13400
- useEffect34(() => setUsePaymaster(usePaymaster), [setUsePaymaster, usePaymaster]);
13475
+ useEffect35(() => setUsePaymaster(usePaymaster), [setUsePaymaster, usePaymaster]);
13401
13476
  const avatar = jwtTokenManager2.getAvatar();
13402
13477
  const displayName = jwtTokenManager2.getDisplayName();
13403
13478
  const indicators = useMemo6(() => {
@@ -13593,7 +13668,7 @@ function useLumiaPassportOpen() {
13593
13668
  }
13594
13669
 
13595
13670
  // src/hooks/useLumiaPassportColorMode.ts
13596
- import { useCallback as useCallback22, useEffect as useEffect35 } from "react";
13671
+ import { useCallback as useCallback22, useEffect as useEffect36 } from "react";
13597
13672
  function useLumiaPassportColorMode() {
13598
13673
  const {
13599
13674
  config: { current: config }
@@ -13608,7 +13683,7 @@ function useLumiaPassportColorMode() {
13608
13683
  },
13609
13684
  [handleStoreColorMode]
13610
13685
  );
13611
- useEffect35(() => {
13686
+ useEffect36(() => {
13612
13687
  let targetColorMode = localStorage.getItem(LOCAL_COLOR_MODE_KEY);
13613
13688
  if (!targetColorMode && !preferedColorMode) {
13614
13689
  const systemMode = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
@@ -14337,13 +14412,13 @@ var Hash = ({
14337
14412
 
14338
14413
  // src/internal/components/TransactionsMenu/TransactionsList.tsx
14339
14414
  init_base();
14340
- import { useEffect as useEffect37, useState as useState22 } from "react";
14415
+ import { useEffect as useEffect38, useState as useState22 } from "react";
14341
14416
  import { jsx as jsx81, jsxs as jsxs66 } from "react/jsx-runtime";
14342
14417
  var TransactionsList = ({ address, itemsCount = 10 }) => {
14343
14418
  const [transactions, setTransactions] = useState22([]);
14344
14419
  const [loading, setLoading] = useState22(true);
14345
14420
  const [error, setError] = useState22(null);
14346
- useEffect37(() => {
14421
+ useEffect38(() => {
14347
14422
  const fetchTransactions = async () => {
14348
14423
  try {
14349
14424
  setLoading(true);