feat: backup and security settings pages, nostr restore onboarding, passkey unlock entry

This commit is contained in:
2026-08-19 23:55:59 +02:00
parent 7db34083e6
commit 1920a00cd6
11 changed files with 990 additions and 7 deletions
+12 -1
View File
@@ -4,6 +4,10 @@
export type WalletSettings = {
defaultMint?: string
// nostr backup (see nostrBackup.ts): off unless the holder turns it on;
// relays are only persisted once edited - absent means the UI's defaults
nostrBackupEnabled?: boolean
nostrBackupRelays?: string[]
}
const SETTINGS_STORAGE_KEY = 'sattle_settings'
@@ -17,7 +21,14 @@ export const loadSettings = (): WalletSettings => {
const s = parsed as Record<string, unknown>
return {
defaultMint:
typeof s.defaultMint === 'string' ? s.defaultMint : undefined
typeof s.defaultMint === 'string' ? s.defaultMint : undefined,
nostrBackupEnabled:
typeof s.nostrBackupEnabled === 'boolean'
? s.nostrBackupEnabled
: undefined,
nostrBackupRelays: Array.isArray(s.nostrBackupRelays)
? s.nostrBackupRelays.filter((r): r is string => typeof r === 'string')
: undefined
}
} catch {
return {}