Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Bitkit/Models/SettingsBackupConfig.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ enum SettingsBackupConfig {
"warnWhenSendingOver100": "enableSendAmountWarning",
"bitcoinDisplayUnit": "displayUnit",
"enableQuickpay": "isQuickPayEnabled",
"useBiometrics": "isBiometricEnabled",
"requirePinForPayments": "isPinForPaymentsEnabled",
"enableNotifications": "notificationsGranted",
// Note: PIN settings are intentionally NOT backed up for security
// PIN itself cannot be backed up, so PIN settings shouldn't be either
]

static let algorithmMapping: [String: String] = [
Expand Down
3 changes: 3 additions & 0 deletions Bitkit/Services/BackupService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,9 @@ class BackupService {
}

Logger.info("Full restore success", context: "BackupService")

// Always reset PIN settings after restore (PIN is never backed up for security)
await SettingsViewModel.shared.resetPinSettings()
} catch {
Logger.warn("Full restore error: \(error)", context: "BackupService")
}
Expand Down
1 change: 1 addition & 0 deletions Bitkit/ViewModels/Extensions/SettingsViewModel+PIN.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ extension SettingsViewModel {
pinFailedAttempts = 0
}

@MainActor
func resetPinSettings() {
pinEnabled = false
pinFailedAttempts = 0
Expand Down
Loading