@lumiapassport/ui-kit 1.15.12 → 1.15.13
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/iframe/index.html +1 -1
- package/dist/iframe/main.js +1 -1
- package/dist/index.cjs +7 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +60 -55
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4494,7 +4494,7 @@ import {
|
|
|
4494
4494
|
createContext,
|
|
4495
4495
|
useCallback as useCallback23,
|
|
4496
4496
|
useContext,
|
|
4497
|
-
useEffect as
|
|
4497
|
+
useEffect as useEffect36,
|
|
4498
4498
|
useMemo as useMemo8,
|
|
4499
4499
|
useRef as useRef15
|
|
4500
4500
|
} from "react";
|
|
@@ -4679,7 +4679,7 @@ function BalanceFeedProvider() {
|
|
|
4679
4679
|
|
|
4680
4680
|
// src/internal/components/Dialog/LumiaPassportDialog.tsx
|
|
4681
4681
|
import { AnimatePresence as AnimatePresence3, motion as motion3 } from "framer-motion";
|
|
4682
|
-
import { useEffect as
|
|
4682
|
+
import { useEffect as useEffect34 } from "react";
|
|
4683
4683
|
|
|
4684
4684
|
// src/internal/components/Footer/Footer.tsx
|
|
4685
4685
|
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
|
@@ -5518,7 +5518,7 @@ function Header() {
|
|
|
5518
5518
|
// package.json
|
|
5519
5519
|
var package_default = {
|
|
5520
5520
|
name: "@lumiapassport/ui-kit",
|
|
5521
|
-
version: "1.15.
|
|
5521
|
+
version: "1.15.13",
|
|
5522
5522
|
description: "React UI components and hooks for Lumia Passport authentication and Account Abstraction",
|
|
5523
5523
|
type: "module",
|
|
5524
5524
|
main: "./dist/index.cjs",
|
|
@@ -6021,7 +6021,7 @@ function useDetectMaxScrollHeight() {
|
|
|
6021
6021
|
}
|
|
6022
6022
|
|
|
6023
6023
|
// src/internal/hooks/usePageMapper.tsx
|
|
6024
|
-
import { useCallback as useCallback20, useEffect as
|
|
6024
|
+
import { useCallback as useCallback20, useEffect as useEffect31 } from "react";
|
|
6025
6025
|
|
|
6026
6026
|
// src/internal/components/AuthMenu/AuthMenu.tsx
|
|
6027
6027
|
import { AnimatePresence, motion } from "framer-motion";
|
|
@@ -8342,7 +8342,7 @@ function BuyMenu() {
|
|
|
8342
8342
|
// src/internal/components/KeyshareRestoreMenu/KeyshareRestoreMenu.tsx
|
|
8343
8343
|
import { useMutation as useMutation9, useQuery as useQuery7, useQueryClient as useQueryClient7 } from "@tanstack/react-query";
|
|
8344
8344
|
import { AlertCircle as AlertCircle2, CheckCircle2, CloudDownload as CloudDownload2, Loader as Loader10, UserCircle as UserCircle2 } from "lucide-react";
|
|
8345
|
-
import { useEffect as
|
|
8345
|
+
import { useEffect as useEffect20 } from "react";
|
|
8346
8346
|
init_vaultClient();
|
|
8347
8347
|
|
|
8348
8348
|
// src/internal/components/ui/switch.tsx
|
|
@@ -8943,7 +8943,7 @@ import { AlertCircle, FileUp as FileUp2, Upload, User } from "lucide-react";
|
|
|
8943
8943
|
|
|
8944
8944
|
// src/internal/components/KeyshareRestoreMenu/components/PasswordPasskey.tsx
|
|
8945
8945
|
import { ChevronRight as ChevronRight2, Eye, EyeOff, Info as Info2, Key as Key4, Loader as Loader8, Plus } from "lucide-react";
|
|
8946
|
-
import { useRef as useRef12 } from "react";
|
|
8946
|
+
import { useEffect as useEffect17, useRef as useRef12 } from "react";
|
|
8947
8947
|
import { Fragment as Fragment9, jsx as jsx39, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
8948
8948
|
function PasswordPasskey(props) {
|
|
8949
8949
|
const {
|
|
@@ -8969,8 +8969,13 @@ function PasswordPasskey(props) {
|
|
|
8969
8969
|
setUsePasskey,
|
|
8970
8970
|
setRestoreFile
|
|
8971
8971
|
} = useRestoreStore();
|
|
8972
|
+
const { config } = useLumiaPassportConfig();
|
|
8973
|
+
const isPasskeyEnabled = config.current.passkey.enabled;
|
|
8974
|
+
useEffect17(() => {
|
|
8975
|
+
if (!isPasskeyEnabled && usePasskey) setUsePasskey(false);
|
|
8976
|
+
}, [isPasskeyEnabled, usePasskey]);
|
|
8972
8977
|
return /* @__PURE__ */ jsxs32(Fragment9, { children: [
|
|
8973
|
-
mode === "backup" && /* @__PURE__ */ jsxs32("div", { className: "flex items-center justify-center px-[var(--l-pass-pd)]", children: [
|
|
8978
|
+
mode === "backup" && isPasskeyEnabled && /* @__PURE__ */ jsxs32("div", { className: "flex items-center justify-center px-[var(--l-pass-pd)]", children: [
|
|
8974
8979
|
/* @__PURE__ */ jsxs32(
|
|
8975
8980
|
Button,
|
|
8976
8981
|
{
|
|
@@ -9245,7 +9250,7 @@ function File2(props) {
|
|
|
9245
9250
|
import { useQueryClient as useQueryClient6 } from "@tanstack/react-query";
|
|
9246
9251
|
import dayjs from "dayjs";
|
|
9247
9252
|
import { Download, Key as Key5, Upload as Upload2 } from "lucide-react";
|
|
9248
|
-
import { useEffect as
|
|
9253
|
+
import { useEffect as useEffect18 } from "react";
|
|
9249
9254
|
import { Fragment as Fragment12, jsx as jsx42, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
9250
9255
|
function Server(props) {
|
|
9251
9256
|
const { isLoading, mode = "restore", serverHandler, createPasskeyHandler } = props;
|
|
@@ -9253,7 +9258,7 @@ function Server(props) {
|
|
|
9253
9258
|
const address = useLumiaPassportSession((st) => st.address);
|
|
9254
9259
|
const setUsePasskey = useRestoreStore((st) => st.setUsePasskey);
|
|
9255
9260
|
const serverRecoveryStatus = qc.getQueryData([CHECK_BACKUP_QUERY_KEY, address]);
|
|
9256
|
-
|
|
9261
|
+
useEffect18(() => {
|
|
9257
9262
|
if (mode === "backup" || !serverRecoveryStatus?.created?.encryptionMethod) return;
|
|
9258
9263
|
setUsePasskey(serverRecoveryStatus.created.encryptionMethod === "passkey");
|
|
9259
9264
|
}, [mode, serverRecoveryStatus, setUsePasskey]);
|
|
@@ -9287,7 +9292,7 @@ function Server(props) {
|
|
|
9287
9292
|
// src/internal/components/KeyshareRestoreMenu/methods/Cloud.tsx
|
|
9288
9293
|
import { useQuery as useQuery6 } from "@tanstack/react-query";
|
|
9289
9294
|
import { ArrowLeft as ArrowLeft6, CloudDownload, CloudUpload, Loader as Loader9 } from "lucide-react";
|
|
9290
|
-
import { useEffect as
|
|
9295
|
+
import { useEffect as useEffect19 } from "react";
|
|
9291
9296
|
|
|
9292
9297
|
// src/internal/components/ui/select.tsx
|
|
9293
9298
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
@@ -9435,7 +9440,7 @@ function Cloud2(props) {
|
|
|
9435
9440
|
return availableProviders.map((p) => ({ id: p.id, name: p.name, available: p.isAvailable() }));
|
|
9436
9441
|
}
|
|
9437
9442
|
});
|
|
9438
|
-
|
|
9443
|
+
useEffect19(() => {
|
|
9439
9444
|
if (isCloudProvidersLoading) return;
|
|
9440
9445
|
if (!!cloudProvidersError) {
|
|
9441
9446
|
console.error("[KeyshareBackup] Failed to load cloud providers:", cloudProvidersError);
|
|
@@ -9526,7 +9531,7 @@ var KeyshareRestoreMenu = () => {
|
|
|
9526
9531
|
setSuccess,
|
|
9527
9532
|
setMethod
|
|
9528
9533
|
} = useRestoreStore();
|
|
9529
|
-
|
|
9534
|
+
useEffect20(() => {
|
|
9530
9535
|
setIsDialogForced(true);
|
|
9531
9536
|
return () => {
|
|
9532
9537
|
setRestorePassword("");
|
|
@@ -9551,7 +9556,7 @@ var KeyshareRestoreMenu = () => {
|
|
|
9551
9556
|
queryFn: async () => await getShareRecoveryStats()
|
|
9552
9557
|
});
|
|
9553
9558
|
const hasServerBackup = serverRecoveryStatus?.created || serverRecoveryStatus?.devices?.length > 0;
|
|
9554
|
-
|
|
9559
|
+
useEffect20(() => {
|
|
9555
9560
|
if (!!hasServerBackup) setMethod("server");
|
|
9556
9561
|
}, [hasServerBackup]);
|
|
9557
9562
|
const { mutate: disconnect, isPending: isDisconnecting } = useMutation9({
|
|
@@ -9677,7 +9682,7 @@ var KeyshareRestoreMenu = () => {
|
|
|
9677
9682
|
// src/internal/components/KeyshareRestoreMenu/KeyshareBackupMenu.tsx
|
|
9678
9683
|
import { useQuery as useQuery8 } from "@tanstack/react-query";
|
|
9679
9684
|
import { AlertCircle as AlertCircle3, ArrowLeft as ArrowLeft7, CheckCircle2 as CheckCircle22, Loader as Loader11, LockIcon } from "lucide-react";
|
|
9680
|
-
import { useEffect as
|
|
9685
|
+
import { useEffect as useEffect21 } from "react";
|
|
9681
9686
|
init_vaultClient();
|
|
9682
9687
|
import { Fragment as Fragment15, jsx as jsx46, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
9683
9688
|
var COMPONENTS = {
|
|
@@ -9703,7 +9708,7 @@ function KeyshareBackupMenu() {
|
|
|
9703
9708
|
setUsePasskey,
|
|
9704
9709
|
setMethod
|
|
9705
9710
|
} = useRestoreStore();
|
|
9706
|
-
|
|
9711
|
+
useEffect21(() => {
|
|
9707
9712
|
setMainPageHeight(DEFAULT_SETTINGS_MENU_HEIGHT);
|
|
9708
9713
|
return () => {
|
|
9709
9714
|
setSuccess(null);
|
|
@@ -9721,7 +9726,7 @@ function KeyshareBackupMenu() {
|
|
|
9721
9726
|
queryFn: async () => await getShareRecoveryStats()
|
|
9722
9727
|
});
|
|
9723
9728
|
const hasRecoveryData = serverRecoveryStatus?.created || serverRecoveryStatus?.devices?.length > 0;
|
|
9724
|
-
|
|
9729
|
+
useEffect21(() => {
|
|
9725
9730
|
if (!!hasRecoveryData) setMethod("server");
|
|
9726
9731
|
}, [hasRecoveryData]);
|
|
9727
9732
|
const {
|
|
@@ -9820,7 +9825,7 @@ function KeyshareBackupMenu() {
|
|
|
9820
9825
|
|
|
9821
9826
|
// src/internal/components/MainMenu/MainMenu.tsx
|
|
9822
9827
|
import { ChevronLeft, ChevronRight as ChevronRight3, DollarSign as DollarSign3, Wallet2 as Wallet23 } from "lucide-react";
|
|
9823
|
-
import { useEffect as
|
|
9828
|
+
import { useEffect as useEffect22 } from "react";
|
|
9824
9829
|
|
|
9825
9830
|
// src/internal/components/ManageWalletMenu/hooks/useProvidersList.ts
|
|
9826
9831
|
init_common();
|
|
@@ -9850,7 +9855,7 @@ function MainMenu() {
|
|
|
9850
9855
|
const address = useLumiaPassportSession((st) => st.address);
|
|
9851
9856
|
const setPage = useLayoutDataStore((st) => st.setPage);
|
|
9852
9857
|
const setMainPageHeight = useLayoutDataStore((st) => st.setMainPageHeight);
|
|
9853
|
-
|
|
9858
|
+
useEffect22(() => setMainPageHeight(DEFAULT_MAIN_MENU_HEIGHT), [setMainPageHeight]);
|
|
9854
9859
|
useProvidersList();
|
|
9855
9860
|
return /* @__PURE__ */ jsx47("div", { className: "w-full p-[var(--l-pass-pd)] flex flex-col gap-[var(--l-pass-gap)]", children: /* @__PURE__ */ jsx47("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(
|
|
9856
9861
|
Button,
|
|
@@ -10289,7 +10294,7 @@ function EmailNotConnectedWarning() {
|
|
|
10289
10294
|
|
|
10290
10295
|
// src/internal/components/ManageWalletMenu/hooks/useLinkSocial.ts
|
|
10291
10296
|
import { useQueryClient as useQueryClient11 } from "@tanstack/react-query";
|
|
10292
|
-
import React5, { useEffect as
|
|
10297
|
+
import React5, { useEffect as useEffect23 } from "react";
|
|
10293
10298
|
init_auth();
|
|
10294
10299
|
function useLinkSocial() {
|
|
10295
10300
|
const qc = useQueryClient11();
|
|
@@ -10354,7 +10359,7 @@ function useLinkSocial() {
|
|
|
10354
10359
|
[config.social?.providers, callbacks]
|
|
10355
10360
|
);
|
|
10356
10361
|
const [socialLinkStarted, setSocialLinkStarted] = React5.useState(false);
|
|
10357
|
-
|
|
10362
|
+
useEffect23(() => {
|
|
10358
10363
|
const key = providerType?.toLowerCase();
|
|
10359
10364
|
console.log("[useLinkSocial] Effect triggered:", { key, linkIsLoading, socialLinkStarted, isWalletLinking });
|
|
10360
10365
|
if (isWalletLinking) {
|
|
@@ -10376,7 +10381,7 @@ function useLinkSocial() {
|
|
|
10376
10381
|
// src/internal/components/ManageWalletMenu/hooks/useLinkTelegram.ts
|
|
10377
10382
|
init_telegram2();
|
|
10378
10383
|
import { useQueryClient as useQueryClient12 } from "@tanstack/react-query";
|
|
10379
|
-
import { useCallback as useCallback12, useEffect as
|
|
10384
|
+
import { useCallback as useCallback12, useEffect as useEffect24, useState as useState10 } from "react";
|
|
10380
10385
|
function useLinkTelegram() {
|
|
10381
10386
|
const {
|
|
10382
10387
|
config: { current: config },
|
|
@@ -10430,7 +10435,7 @@ function useLinkTelegram() {
|
|
|
10430
10435
|
}
|
|
10431
10436
|
}, [config.social?.providers, callbacks]);
|
|
10432
10437
|
const [telegramLinkStarted, setTelegramLinkStarted] = useState10(false);
|
|
10433
|
-
|
|
10438
|
+
useEffect24(() => {
|
|
10434
10439
|
console.log("[useLinkTelegram] Effect triggered:", {
|
|
10435
10440
|
providerType,
|
|
10436
10441
|
linkIsLoading,
|
|
@@ -10447,7 +10452,7 @@ function useLinkTelegram() {
|
|
|
10447
10452
|
handleLinkTelegram();
|
|
10448
10453
|
}
|
|
10449
10454
|
}, [providerType, handleLinkTelegram, linkIsLoading, telegramLinkStarted, isWalletLinking]);
|
|
10450
|
-
|
|
10455
|
+
useEffect24(() => {
|
|
10451
10456
|
if (providerType !== "telegram") {
|
|
10452
10457
|
setTelegramLinkStarted(false);
|
|
10453
10458
|
}
|
|
@@ -10831,7 +10836,7 @@ function useChangeNickname(options) {
|
|
|
10831
10836
|
init_nickname();
|
|
10832
10837
|
init_profile();
|
|
10833
10838
|
import { useQuery as useQuery12 } from "@tanstack/react-query";
|
|
10834
|
-
import { useState as useState12, useEffect as
|
|
10839
|
+
import { useState as useState12, useEffect as useEffect25 } from "react";
|
|
10835
10840
|
|
|
10836
10841
|
// src/internal/lib/nickname-validation.ts
|
|
10837
10842
|
var NICKNAME_MIN_LENGTH = 3;
|
|
@@ -10865,7 +10870,7 @@ function useNicknameAvailability(handle, enabled = true) {
|
|
|
10865
10870
|
const normalized = normalizeNickname(handle);
|
|
10866
10871
|
const validation = validateNickname(handle);
|
|
10867
10872
|
const isValidForCheck = validation.valid && normalized.length > 0;
|
|
10868
|
-
|
|
10873
|
+
useEffect25(() => {
|
|
10869
10874
|
if (!isValidForCheck || !enabled) {
|
|
10870
10875
|
setDebouncedHandle("");
|
|
10871
10876
|
setIsDebouncing(false);
|
|
@@ -12047,7 +12052,7 @@ import {
|
|
|
12047
12052
|
Sparkles as Sparkles3,
|
|
12048
12053
|
Wallet as Wallet3
|
|
12049
12054
|
} from "lucide-react";
|
|
12050
|
-
import { useEffect as
|
|
12055
|
+
import { useEffect as useEffect28, useMemo as useMemo6, useState as useState19 } from "react";
|
|
12051
12056
|
import { formatUnits as formatUnits5, isAddress as isAddress2, parseUnits as parseUnits2 } from "viem";
|
|
12052
12057
|
|
|
12053
12058
|
// src/hooks/useErc3643Compliance.ts
|
|
@@ -12114,7 +12119,7 @@ function useErc3643Compliance(options) {
|
|
|
12114
12119
|
init_nickname();
|
|
12115
12120
|
init_profile();
|
|
12116
12121
|
import { useQuery as useQuery16 } from "@tanstack/react-query";
|
|
12117
|
-
import { useState as useState16, useEffect as
|
|
12122
|
+
import { useState as useState16, useEffect as useEffect26, useMemo as useMemo5 } from "react";
|
|
12118
12123
|
|
|
12119
12124
|
// src/internal/lib/nickname-fingerprint.ts
|
|
12120
12125
|
import { keccak256 as keccak2562, getAddress as getAddress2 } from "viem";
|
|
@@ -12206,7 +12211,7 @@ function useNicknameResolve(input, options) {
|
|
|
12206
12211
|
const [isDebouncing, setIsDebouncing] = useState16(false);
|
|
12207
12212
|
const normalized = normalizeNickname(input);
|
|
12208
12213
|
const isNicknameInput = looksLikeNickname(input) && normalized.length >= 3;
|
|
12209
|
-
|
|
12214
|
+
useEffect26(() => {
|
|
12210
12215
|
if (!isNicknameInput || !enabled) {
|
|
12211
12216
|
setDebouncedInput("");
|
|
12212
12217
|
setIsDebouncing(false);
|
|
@@ -12420,7 +12425,7 @@ init_base();
|
|
|
12420
12425
|
|
|
12421
12426
|
// src/internal/components/SendRecieveMenu/AssetSelector.tsx
|
|
12422
12427
|
import { ChevronDown, Image as ImageIcon2, Shield as Shield2, Sparkles as Sparkles2, X as X4 } from "lucide-react";
|
|
12423
|
-
import { useState as useState18, useRef as useRef14, useEffect as
|
|
12428
|
+
import { useState as useState18, useRef as useRef14, useEffect as useEffect27 } from "react";
|
|
12424
12429
|
import { formatUnits as formatUnits4 } from "viem";
|
|
12425
12430
|
import { Fragment as Fragment24, jsx as jsx65, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
12426
12431
|
function isNftAsset2(asset) {
|
|
@@ -12529,7 +12534,7 @@ function AssetSelector({ assets, selectedAsset, onSelect, disabled }) {
|
|
|
12529
12534
|
const [isOpen, setIsOpen] = useState18(false);
|
|
12530
12535
|
const dropdownRef = useRef14(null);
|
|
12531
12536
|
const buttonRef = useRef14(null);
|
|
12532
|
-
|
|
12537
|
+
useEffect27(() => {
|
|
12533
12538
|
function handleClickOutside(event) {
|
|
12534
12539
|
if (dropdownRef.current && !dropdownRef.current.contains(event.target) && buttonRef.current && !buttonRef.current.contains(event.target)) {
|
|
12535
12540
|
setIsOpen(false);
|
|
@@ -12732,7 +12737,7 @@ function SendLumiaMenu() {
|
|
|
12732
12737
|
const [selectedAsset, setSelectedAsset] = useState19(null);
|
|
12733
12738
|
const [txStep, setTxStep] = useState19("input");
|
|
12734
12739
|
const [validationError, setValidationError] = useState19(null);
|
|
12735
|
-
|
|
12740
|
+
useEffect28(() => {
|
|
12736
12741
|
if (assets.length > 0 && !selectedAsset) {
|
|
12737
12742
|
const nativeAsset = assets.find((a) => a.type === "native");
|
|
12738
12743
|
if (nativeAsset) {
|
|
@@ -12775,7 +12780,7 @@ function SendLumiaMenu() {
|
|
|
12775
12780
|
amount: complianceAmount,
|
|
12776
12781
|
enabled: isSecurity && !!effectiveAddress && !!complianceAmount
|
|
12777
12782
|
});
|
|
12778
|
-
|
|
12783
|
+
useEffect28(() => {
|
|
12779
12784
|
if (open) {
|
|
12780
12785
|
setTxStep("input");
|
|
12781
12786
|
setValidationError(null);
|
|
@@ -13159,7 +13164,7 @@ function SendLumiaMenu() {
|
|
|
13159
13164
|
// src/internal/components/SendRecieveMenu/ReceiveLumiaMenu.tsx
|
|
13160
13165
|
import { ArrowLeft as ArrowLeft13, CheckCircle2 as CheckCircle24, Copy as Copy2, Info as Info3, Loader as Loader24, Shield as Shield4 } from "lucide-react";
|
|
13161
13166
|
import QRCode from "qrcode";
|
|
13162
|
-
import { useCallback as useCallback18, useEffect as
|
|
13167
|
+
import { useCallback as useCallback18, useEffect as useEffect29, useMemo as useMemo7, useState as useState20 } from "react";
|
|
13163
13168
|
init_clients();
|
|
13164
13169
|
import { Fragment as Fragment26, jsx as jsx67, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
13165
13170
|
function ReceiveLumiaMenu() {
|
|
@@ -13180,7 +13185,7 @@ function ReceiveLumiaMenu() {
|
|
|
13180
13185
|
return null;
|
|
13181
13186
|
}
|
|
13182
13187
|
}, [session?.ownerAddress]);
|
|
13183
|
-
|
|
13188
|
+
useEffect29(() => {
|
|
13184
13189
|
if (open && address) {
|
|
13185
13190
|
QRCode.toDataURL(address, {
|
|
13186
13191
|
width: 200,
|
|
@@ -13267,7 +13272,7 @@ function ReceiveLumiaMenu() {
|
|
|
13267
13272
|
|
|
13268
13273
|
// src/internal/components/SettingsMenu/SettingsMenu.tsx
|
|
13269
13274
|
import { ArrowLeft as ArrowLeft14 } from "lucide-react";
|
|
13270
|
-
import { useEffect as
|
|
13275
|
+
import { useEffect as useEffect30 } from "react";
|
|
13271
13276
|
|
|
13272
13277
|
// src/internal/components/SettingsMenu/constants.ts
|
|
13273
13278
|
import { ArrowLeftRight, AtSign as AtSign2, DatabaseBackup, LockKeyhole, UsersRound } from "lucide-react";
|
|
@@ -13303,7 +13308,7 @@ function SettingsMenu() {
|
|
|
13303
13308
|
const settingsNotifications = useLayoutDataStore((st) => st.settingsNotifications);
|
|
13304
13309
|
const setMainPageHeight = useLayoutDataStore((st) => st.setMainPageHeight);
|
|
13305
13310
|
const maxScrollHeight = useLayoutStore((st) => st.maxScrollHeight);
|
|
13306
|
-
|
|
13311
|
+
useEffect30(() => setMainPageHeight(DEFAULT_SETTINGS_MENU_HEIGHT), [setMainPageHeight]);
|
|
13307
13312
|
useProvidersList();
|
|
13308
13313
|
const navItems = NAV_BUTTONS.map((el) => ({ ...el, onClick: () => setPage(el.id) }));
|
|
13309
13314
|
const highlightedKeys = settingsNotifications.map((n) => n.target);
|
|
@@ -14085,7 +14090,7 @@ function usePageMapper() {
|
|
|
14085
14090
|
},
|
|
14086
14091
|
[setDialogContent, setDialogDescription, setDialogTitle, setIsDialogOpen]
|
|
14087
14092
|
);
|
|
14088
|
-
|
|
14093
|
+
useEffect31(() => {
|
|
14089
14094
|
if (page === null) return closeDialog();
|
|
14090
14095
|
const pageItem = PAGE_MAP[page];
|
|
14091
14096
|
if (!pageItem) {
|
|
@@ -14101,7 +14106,7 @@ function usePageMapper() {
|
|
|
14101
14106
|
init_auth();
|
|
14102
14107
|
init_profile();
|
|
14103
14108
|
import { useQuery as useQuery18 } from "@tanstack/react-query";
|
|
14104
|
-
import { useEffect as
|
|
14109
|
+
import { useEffect as useEffect32 } from "react";
|
|
14105
14110
|
var EMAIL_NOT_CONNECTED_NOTIFICATION = {
|
|
14106
14111
|
id: "email-not-connected",
|
|
14107
14112
|
target: "manage-wallet" /* MANAGE_WALLET */,
|
|
@@ -14123,14 +14128,14 @@ function useSettingsNotifications() {
|
|
|
14123
14128
|
queryKey: [QUERY_KEYS.userProfile, address],
|
|
14124
14129
|
queryFn: getUserProfile
|
|
14125
14130
|
});
|
|
14126
|
-
|
|
14131
|
+
useEffect32(() => {
|
|
14127
14132
|
const isKYCVerified = userProfile?.kycDetails?.kycStatus === "verified";
|
|
14128
14133
|
setSettingsNotifications({
|
|
14129
14134
|
...COMPLETE_KYC_PROGRESS,
|
|
14130
14135
|
status: isKYCVerified ? "resolved" : "active"
|
|
14131
14136
|
});
|
|
14132
14137
|
}, [userProfile, setSettingsNotifications]);
|
|
14133
|
-
|
|
14138
|
+
useEffect32(() => {
|
|
14134
14139
|
setSettingsNotifications({
|
|
14135
14140
|
...EMAIL_NOT_CONNECTED_NOTIFICATION,
|
|
14136
14141
|
status: hasEmail ? "resolved" : "active"
|
|
@@ -14139,7 +14144,7 @@ function useSettingsNotifications() {
|
|
|
14139
14144
|
}
|
|
14140
14145
|
|
|
14141
14146
|
// src/internal/hooks/useWalletStatus.ts
|
|
14142
|
-
import { useEffect as
|
|
14147
|
+
import { useEffect as useEffect33 } from "react";
|
|
14143
14148
|
init_auth();
|
|
14144
14149
|
function useWalletStatus() {
|
|
14145
14150
|
const isIframeReady = useLumiaPassportSession((st) => st.isIframeReady);
|
|
@@ -14149,7 +14154,7 @@ function useWalletStatus() {
|
|
|
14149
14154
|
config: { current: config },
|
|
14150
14155
|
callbacks
|
|
14151
14156
|
} = useLumiaPassportConfig();
|
|
14152
|
-
|
|
14157
|
+
useEffect33(() => {
|
|
14153
14158
|
if (!isIframeReady || !config.projectId || !callbacks?.onWalletReady) return;
|
|
14154
14159
|
const userId = jwtTokenManager2.getUserId();
|
|
14155
14160
|
const hasKeyshare = jwtTokenManager2.getHasKeyshare();
|
|
@@ -14179,7 +14184,7 @@ function LumiaPassportDialog() {
|
|
|
14179
14184
|
const mainPageHeight = useLayoutDataStore((st) => st.mainPageHeight);
|
|
14180
14185
|
const setPage = useLayoutDataStore((st) => st.setPage);
|
|
14181
14186
|
const { colorMode, isDialogOpen, dialogTitle, dialogDescription, dialogContent, isDialogForced, setIsSettings } = useLayoutStore();
|
|
14182
|
-
|
|
14187
|
+
useEffect34(() => setIsSettings(!!session), [session, setIsSettings]);
|
|
14183
14188
|
usePageMapper();
|
|
14184
14189
|
useAutoConnect();
|
|
14185
14190
|
useBackupStatusChanges();
|
|
@@ -14264,7 +14269,7 @@ var TssManagerWithRef = React7.forwardRef((props, ref) => {
|
|
|
14264
14269
|
init_wallet();
|
|
14265
14270
|
import { useConnectModal } from "@rainbow-me/rainbowkit";
|
|
14266
14271
|
import { useMutation as useMutation15, useQueryClient as useQueryClient19 } from "@tanstack/react-query";
|
|
14267
|
-
import React8, { useCallback as useCallback22, useEffect as
|
|
14272
|
+
import React8, { useCallback as useCallback22, useEffect as useEffect35 } from "react";
|
|
14268
14273
|
import { useAccount, useDisconnect, useSignMessage } from "wagmi";
|
|
14269
14274
|
function WalletConnectHandler() {
|
|
14270
14275
|
const qc = useQueryClient19();
|
|
@@ -14309,7 +14314,7 @@ function WalletConnectHandler() {
|
|
|
14309
14314
|
[qc, passportWalletAddress, callbacks, setProviderType, setPage, setIsWalletLinking]
|
|
14310
14315
|
);
|
|
14311
14316
|
const [hasStartedLinking, setHasStartedLinking] = React8.useState(false);
|
|
14312
|
-
|
|
14317
|
+
useEffect35(() => {
|
|
14313
14318
|
if (isWalletLinking && !hasStartedLinking) {
|
|
14314
14319
|
setHasStartedLinking(true);
|
|
14315
14320
|
setProviderType(null);
|
|
@@ -14329,7 +14334,7 @@ function WalletConnectHandler() {
|
|
|
14329
14334
|
if (isConnected) disconnect();
|
|
14330
14335
|
}
|
|
14331
14336
|
}, [isWalletLinking, hasStartedLinking, isConnected, openConnectModal, disconnect, setPage, setProviderType]);
|
|
14332
|
-
|
|
14337
|
+
useEffect35(() => {
|
|
14333
14338
|
if (hasStartedLinking && !connectModalOpen && !isConnected && isWalletLinking) {
|
|
14334
14339
|
console.log("[WalletConnectHandler] Modal closed without connecting");
|
|
14335
14340
|
onLinkingComplete(false);
|
|
@@ -14405,7 +14410,7 @@ function WalletConnectHandler() {
|
|
|
14405
14410
|
setPage(passportWalletAddress ? "manage-wallet" /* MANAGE_WALLET */ : "auth" /* AUTH */);
|
|
14406
14411
|
}
|
|
14407
14412
|
});
|
|
14408
|
-
|
|
14413
|
+
useEffect35(() => {
|
|
14409
14414
|
if (!!chain?.id && isConnected && walletAddress && isWalletLinking && hasStartedLinking) {
|
|
14410
14415
|
console.log("[WalletConnectHandler] handleWalletSign triggered");
|
|
14411
14416
|
handleWalletSign({ chainId: chain.id, signingWalletAddress: walletAddress });
|
|
@@ -14498,7 +14503,7 @@ function LumiaPassportProvider(props) {
|
|
|
14498
14503
|
const { children, projectId, initialConfig = {}, callbacks } = props;
|
|
14499
14504
|
const setIsIframeReady = useLumiaPassportSession((st) => st.setIsIframeReady);
|
|
14500
14505
|
const setWalletReadyStatus = useLumiaPassportSession((st) => st.setWalletReadyStatus);
|
|
14501
|
-
|
|
14506
|
+
useEffect36(() => notifyNoProjetctId(projectId), [projectId]);
|
|
14502
14507
|
const config = useRef15({ projectId, ...DEFAULT_LUMIA_PASSPORT_CONFIG });
|
|
14503
14508
|
const updateConfig = useCallback23((updates) => {
|
|
14504
14509
|
const prev = config.current;
|
|
@@ -14535,7 +14540,7 @@ function LumiaPassportProvider(props) {
|
|
|
14535
14540
|
}
|
|
14536
14541
|
config.current = next;
|
|
14537
14542
|
}, []);
|
|
14538
|
-
|
|
14543
|
+
useEffect36(() => {
|
|
14539
14544
|
if (typeof window === "undefined" || !projectId) return;
|
|
14540
14545
|
const mergedConfig = merge2(DEFAULT_LUMIA_PASSPORT_CONFIG, initialConfig);
|
|
14541
14546
|
updateConfig(mergedConfig);
|
|
@@ -14592,7 +14597,7 @@ var useLumiaPassportConfig = () => {
|
|
|
14592
14597
|
// src/components/ConnectWalletButton.tsx
|
|
14593
14598
|
import { useQuery as useQuery19 } from "@tanstack/react-query";
|
|
14594
14599
|
import { Cloud as Cloud5, Laptop as Laptop2, Loader as Loader26, Shield as Shield5 } from "lucide-react";
|
|
14595
|
-
import { useEffect as
|
|
14600
|
+
import { useEffect as useEffect37, useMemo as useMemo9 } from "react";
|
|
14596
14601
|
init_auth();
|
|
14597
14602
|
init_profile();
|
|
14598
14603
|
import { Fragment as Fragment29, jsx as jsx78, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
@@ -14614,7 +14619,7 @@ function ConnectWalletButton(props) {
|
|
|
14614
14619
|
const colorMode = useLayoutStore((st) => st.colorMode);
|
|
14615
14620
|
const { session, address, hasServerVault, isLoading, isIframeReady, status, setUsePaymaster } = useLumiaPassportSession();
|
|
14616
14621
|
const connectButtonLabel = getFormattedStatus(label || "Connect", status, isIframeReady);
|
|
14617
|
-
|
|
14622
|
+
useEffect37(() => setUsePaymaster(usePaymaster), [setUsePaymaster, usePaymaster]);
|
|
14618
14623
|
const { data: profile, isLoading: isProfileLoading } = useQuery19({
|
|
14619
14624
|
retry: false,
|
|
14620
14625
|
enabled: !!address,
|
|
@@ -14816,7 +14821,7 @@ function useLumiaPassportOpen() {
|
|
|
14816
14821
|
}
|
|
14817
14822
|
|
|
14818
14823
|
// src/hooks/useLumiaPassportColorMode.ts
|
|
14819
|
-
import { useCallback as useCallback25, useEffect as
|
|
14824
|
+
import { useCallback as useCallback25, useEffect as useEffect38 } from "react";
|
|
14820
14825
|
function useLumiaPassportColorMode() {
|
|
14821
14826
|
const {
|
|
14822
14827
|
config: { current: config }
|
|
@@ -14831,7 +14836,7 @@ function useLumiaPassportColorMode() {
|
|
|
14831
14836
|
},
|
|
14832
14837
|
[handleStoreColorMode]
|
|
14833
14838
|
);
|
|
14834
|
-
|
|
14839
|
+
useEffect38(() => {
|
|
14835
14840
|
let targetColorMode = localStorage.getItem(LOCAL_COLOR_MODE_KEY);
|
|
14836
14841
|
if (!targetColorMode && !preferedColorMode) {
|
|
14837
14842
|
const systemMode = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
@@ -15560,13 +15565,13 @@ var Hash = ({
|
|
|
15560
15565
|
|
|
15561
15566
|
// src/internal/components/TransactionsMenu/TransactionsList.tsx
|
|
15562
15567
|
init_base();
|
|
15563
|
-
import { useEffect as
|
|
15568
|
+
import { useEffect as useEffect40, useState as useState25 } from "react";
|
|
15564
15569
|
import { jsx as jsx85, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
15565
15570
|
var TransactionsList = ({ address, itemsCount = 10 }) => {
|
|
15566
15571
|
const [transactions, setTransactions] = useState25([]);
|
|
15567
15572
|
const [loading, setLoading] = useState25(true);
|
|
15568
15573
|
const [error, setError] = useState25(null);
|
|
15569
|
-
|
|
15574
|
+
useEffect40(() => {
|
|
15570
15575
|
const fetchTransactions = async () => {
|
|
15571
15576
|
try {
|
|
15572
15577
|
setLoading(true);
|