         }
     }
     
+    var biometricsEnabled: Bool? {
+        get {
+            do {
+                return try store.object(forKey: StoreKeys.biometricsEnabled) as? Bool
+            } catch let error {
+                NSLog("[PinCodePreferences] Error when reading biometrics enabled from store: \(error)")
+                return nil
+            }
+        } set {
+            do {
+                try store.set(newValue, forKey: StoreKeys.biometricsEnabled)
+            } catch let error {
+                NSLog("[PinCodePreferences] Error when storing biometrics enabled to the store: \(error)")
+            }
+        }
+    }
+    
+    var isBiometricsSet: Bool {
+        return biometricsEnabled == true
+    }
+    
+    func localizedBiometricsName() -> String? {
+        if isBiometricsAvailable {
+            let context = LAContext()
+            switch context.biometryType {
+            case .touchID:
+                return VectorL10n.biometricsModeTouchId
+            case .faceID:
+                return VectorL10n.biometricsModeFaceId
+            default:
+                return nil
+            }
+        }
+        return nil
+    }
+    
+    func biometricsIcon() -> UIImage? {
+        if isBiometricsAvailable {
+            let context = LAContext()
+            switch context.biometryType {
+            case .touchID:
+                return Asset.Images.touchidIcon.image
+            case .faceID:
+                return Asset.Images.faceidIcon.image
+            default:
+                return nil
+            }
+        }
+        return nil
+    }
+    
     /// Resets user PIN
     func reset() {
         pin = nil
+        biometricsEnabled = nil
     }
 }

    
    private struct StoreKeys {
        static let pin: String = "pin"
    }
    
    static let shared = PinCodePreferences()


import Foundation
import KeychainAccess
import LocalAuthentication

/// Pin code preferences.
@objcMembers
