import { nip19 } from 'nostr-tools'; import { useEffect, useState } from 'react'; import { useStorage } from '@libs/storage/provider'; import { EyeOffIcon } from '@shared/icons'; export function BackupSettingScreen() { const { db } = useStorage(); const [privkey, setPrivkey] = useState(null); const [showPassword, setShowPassword] = useState(false); const removePrivkey = async () => { await db.secureRemove(db.account.pubkey); }; useEffect(() => { async function loadPrivkey() { const key = await db.secureLoad(db.account.pubkey); if (key) setPrivkey(key); } loadPrivkey(); }, []); return (
Private key
{!privkey ? (
You've stored private key on Lume
) : ( <>
)}
); }