@lumiapassport/ui-kit 1.16.5 → 1.16.6

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
@@ -5799,7 +5799,7 @@ var init_package = __esm({
5799
5799
  "package.json"() {
5800
5800
  package_default = {
5801
5801
  name: "@lumiapassport/ui-kit",
5802
- version: "1.16.5",
5802
+ version: "1.16.6",
5803
5803
  description: "React UI components and hooks for Lumia Passport authentication and Account Abstraction",
5804
5804
  type: "module",
5805
5805
  main: "./dist/index.cjs",
@@ -10425,6 +10425,7 @@ import { useEffect as useEffect21 } from "react";
10425
10425
  import { Fragment as Fragment15, jsx as jsx46, jsxs as jsxs39 } from "react/jsx-runtime";
10426
10426
  function KeyshareBackupMenu() {
10427
10427
  const address = useLumiaPassportSession((st) => st.address);
10428
+ const hasServerVault = useLumiaPassportSession((st) => st.hasServerVault);
10428
10429
  const setPage = useLayoutDataStore((st) => st.setPage);
10429
10430
  const setMainPageHeight = useLayoutDataStore((st) => st.setMainPageHeight);
10430
10431
  const maxScrollHeight = useLayoutStore((st) => st.maxScrollHeight);
@@ -10455,6 +10456,8 @@ function KeyshareBackupMenu() {
10455
10456
  }, []);
10456
10457
  const { data: serverRecoveryStatus, isLoading: isRecoveryLoading } = useQuery8({
10457
10458
  retry: false,
10459
+ enabled: !!address,
10460
+ // Prevent query from running with undefined address
10458
10461
  queryKey: [CHECK_BACKUP_QUERY_KEY, address],
10459
10462
  queryFn: async () => await getShareRecoveryStats()
10460
10463
  });
@@ -10479,8 +10482,8 @@ function KeyshareBackupMenu() {
10479
10482
  style: { "--l-pass-scrollbar-mah": `${maxScrollHeight}px` },
10480
10483
  className: "list-scrollbar-y w-full",
10481
10484
  children: /* @__PURE__ */ jsxs39(Expandable, { isExpanded: true, contentClassName: "w-full flex flex-col gap-[var(--l-pass-gap)] p-[var(--l-pass-pd)]", children: [
10482
- !!isRecoveryLoading && /* @__PURE__ */ jsx46("div", { className: "w-full flex items-center justify-center p-[var(--l-pass-pd)]", children: /* @__PURE__ */ jsx46(Loader11, { className: "h-5 w-5 animate-spin" }) }),
10483
- !isRecoveryLoading && !hasRecoveryData && /* @__PURE__ */ jsxs39("div", { className: "flex items-center justify-center gap-2 px-5 py-[var(--l-pass-pd)]", children: [
10485
+ !!isRecoveryLoading && (hasServerVault || !currentBackupMethod) && /* @__PURE__ */ jsx46("div", { className: "w-full flex items-center justify-center p-[var(--l-pass-pd)]", children: /* @__PURE__ */ jsx46(Loader11, { className: "h-5 w-5 animate-spin" }) }),
10486
+ (!isRecoveryLoading || !hasServerVault) && !hasRecoveryData && /* @__PURE__ */ jsxs39("div", { className: "flex items-center justify-center gap-2 px-5 py-[var(--l-pass-pd)]", children: [
10484
10487
  /* @__PURE__ */ jsx46(LockIcon, { className: "w-6 h-6" }),
10485
10488
  /* @__PURE__ */ jsx46("span", { className: "font-bold text-xl leading-6", children: "Secure Account" })
10486
10489
  ] }),
@@ -10528,7 +10531,7 @@ function KeyshareBackupMenu() {
10528
10531
  )
10529
10532
  ] }),
10530
10533
  !isRecoveryLoading && !!hasRecoveryData && /* @__PURE__ */ jsx46(MethodSelector, { mode: "backup", serverRecoveryStatus }),
10531
- !isRecoveryLoading && !!currentBackupMethod && /* @__PURE__ */ jsx46(Fragment15, { children: /* @__PURE__ */ jsx46(
10534
+ (!isRecoveryLoading || !hasServerVault) && !!currentBackupMethod && /* @__PURE__ */ jsx46(Fragment15, { children: /* @__PURE__ */ jsx46(
10532
10535
  BackupComponent,
10533
10536
  {
10534
10537
  mode: "backup",