commit 4c1a4b9779e25eafa039086e079a8fe4f8ed51b5
parent 3e9cb696756f54b8774b6ed825c504306f6c03ff
Author: Marc Stibane <marc@taler.net>
Date: Mon, 3 Aug 2026 16:00:36 +0200
reduce compiler warnings
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/TalerWallet1/Controllers/BiometricService.swift b/TalerWallet1/Controllers/BiometricService.swift
@@ -9,6 +9,7 @@
import SwiftUI
import LocalAuthentication
+@MainActor
class BiometricService: ObservableObject {
static let shared = BiometricService()
@Published var canAuthenticate: Bool = true
@@ -42,7 +43,7 @@ class BiometricService: ObservableObject {
}
canAuthenticate = true
context.evaluatePolicy(.deviceOwnerAuthentication, localizedReason: reason) { [weak self] success, authenticationError in
- DispatchQueue.main.async {
+ Task { @MainActor in
if success {
self?.isAuthenticated = true
self?.authenticationError = nil
@@ -56,6 +57,7 @@ class BiometricService: ObservableObject {
}
}
+ @discardableResult
private func resetContext() -> String {
let reason = String(localized: "Authenticate to access your money", comment: "FaceID")
context = LAContext()