         alert.addAction(
             UIAlertAction(title: "ErasePasswordStoreData".localize(), style: UIAlertAction.Style.destructive) { [unowned self] _ -> Void in
                 let myContext = LAContext()
-                var error: NSError?
                 // If the device passcode is not set, reset the app.
-                guard myContext.canEvaluatePolicy(.deviceOwnerAuthentication, error: &error) else {
+                guard myContext.canEvaluatePolicy(.deviceOwnerAuthentication, error: nil)else {
                     self.passwordStore.erase()
                     self.passcodeLockDidSucceed()
                     return

                        }
                    } else {
                        DispatchQueue.main.async {
                            Utils.alert(title: "Error".localize(), message: error?.localizedDescription ?? "", controller: self, completion: nil)
                        }
                    }
                }

        view.addGestureRecognizer(tap)
    }

    override open func viewDidAppear(_ animated: Bool) {
        super.viewDidAppear(animated)
        if let biometryAuthButton = biometryAuthButton {
