Cleanup unneccessary print
This commit is contained in:
parent
653ce515ab
commit
b152d7e1e9
3 changed files with 10 additions and 27 deletions
|
|
@ -43,8 +43,6 @@ class CredentialProviderViewController: ASCredentialProviderViewController, UITa
|
|||
prioritize the most relevant credentials in the list.
|
||||
*/
|
||||
override func prepareCredentialList(for serviceIdentifiers: [ASCredentialServiceIdentifier]) {
|
||||
print("prepareCredentialList")
|
||||
|
||||
// clean up the search bar
|
||||
guard serviceIdentifiers.count > 0 else {
|
||||
searchBar.text = ""
|
||||
|
|
|
|||
|
|
@ -159,14 +159,14 @@ public class Password {
|
|||
guard let secretString = getAdditionValue(withKey: "otp_secret"),
|
||||
let secretData = MF_Base32Codec.data(fromBase32String: secretString),
|
||||
!secretData.isEmpty else {
|
||||
// print("Missing / Invalid otp secret")
|
||||
// Missing / Invalid otp secret
|
||||
return
|
||||
}
|
||||
|
||||
// get type
|
||||
guard let type = getAdditionValue(withKey: "otp_type")?.lowercased(),
|
||||
(type == "totp" || type == "hotp") else {
|
||||
// print("Missing / Invalid otp type")
|
||||
// Missing / Invalid otp type
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -189,8 +189,7 @@ public class Password {
|
|||
// default: 6 digits, 30 seconds
|
||||
guard let digits = Int(getAdditionValue(withKey: "otp_digits") ?? "6"),
|
||||
let period = Double(getAdditionValue(withKey: "otp_period") ?? "30.0") else {
|
||||
let alertMessage = "Invalid otp_digits or otp_period."
|
||||
print(alertMessage)
|
||||
// Invalid otp_digits or otp_period.
|
||||
return
|
||||
}
|
||||
guard let generator = Generator(
|
||||
|
|
@ -198,8 +197,7 @@ public class Password {
|
|||
secret: secretData,
|
||||
algorithm: algorithm,
|
||||
digits: digits) else {
|
||||
let alertMessage = "Invalid OTP generator parameters."
|
||||
print(alertMessage)
|
||||
// Invalid OTP generator parameters.
|
||||
return
|
||||
}
|
||||
self.otpToken = Token(name: self.name, issuer: "", generator: generator)
|
||||
|
|
@ -208,8 +206,7 @@ public class Password {
|
|||
// default: 6 digits
|
||||
guard let digits = Int(getAdditionValue(withKey: "otp_digits") ?? "6"),
|
||||
let counter = UInt64(getAdditionValue(withKey: "otp_counter") ?? "") else {
|
||||
let alertMessage = "Invalid otp_digits or otp_counter."
|
||||
print(alertMessage)
|
||||
// Invalid otp_digits or otp_counter.
|
||||
return
|
||||
}
|
||||
guard let generator = Generator(
|
||||
|
|
@ -217,8 +214,7 @@ public class Password {
|
|||
secret: secretData,
|
||||
algorithm: algorithm,
|
||||
digits: digits) else {
|
||||
let alertMessage = "Invalid OTP generator parameters."
|
||||
print(alertMessage)
|
||||
// Invalid OTP generator parameters.
|
||||
return
|
||||
}
|
||||
self.otpToken = Token(name: self.name, issuer: "", generator: generator)
|
||||
|
|
|
|||
|
|
@ -115,10 +115,6 @@ public class PasswordStore {
|
|||
|
||||
private init() {
|
||||
// File migration to group
|
||||
print(Globals.documentPath)
|
||||
print(Globals.libraryPath)
|
||||
print(Globals.documentPathLegacy)
|
||||
print(Globals.libraryPathLegacy)
|
||||
migrateIfNeeded()
|
||||
backwardCompatibility()
|
||||
|
||||
|
|
@ -332,14 +328,10 @@ public class PasswordStore {
|
|||
guard let storeRepository = storeRepository else {
|
||||
throw AppError.RepositoryNotSetError
|
||||
}
|
||||
do {
|
||||
let credentialProvider = try credential.credentialProvider(requestGitPassword: requestGitPassword)
|
||||
let options = [GTRepositoryRemoteOptionsCredentialProvider: credentialProvider]
|
||||
let remote = try GTRemote(name: "origin", in: storeRepository)
|
||||
try storeRepository.pull(storeRepository.currentBranch(), from: remote, withOptions: options, progress: transferProgressBlock)
|
||||
} catch {
|
||||
throw(error)
|
||||
}
|
||||
let credentialProvider = try credential.credentialProvider(requestGitPassword: requestGitPassword)
|
||||
let options = [GTRepositoryRemoteOptionsCredentialProvider: credentialProvider]
|
||||
let remote = try GTRemote(name: "origin", in: storeRepository)
|
||||
try storeRepository.pull(storeRepository.currentBranch(), from: remote, withOptions: options, progress: transferProgressBlock)
|
||||
DispatchQueue.main.async {
|
||||
SharedDefaults[.lastSyncedTime] = Date()
|
||||
self.setAllSynced()
|
||||
|
|
@ -602,7 +594,6 @@ public class PasswordStore {
|
|||
previousPathLength = passwordURL.path.count
|
||||
}
|
||||
paths.reverse()
|
||||
print(paths)
|
||||
var parentPasswordEntity: PasswordEntity? = nil
|
||||
for path in paths {
|
||||
let isDir = !path.hasSuffix(".gpg")
|
||||
|
|
@ -662,7 +653,6 @@ public class PasswordStore {
|
|||
var newPasswordEntity: PasswordEntity? = passwordEntity
|
||||
|
||||
if password.changed&PasswordChange.content.rawValue != 0 {
|
||||
print("chagne content")
|
||||
let saveURL = storeURL.appendingPathComponent(passwordEntity.getURL()!.path)
|
||||
try self.encrypt(password: password).write(to: saveURL)
|
||||
try gitAdd(path: passwordEntity.getURL()!.path)
|
||||
|
|
@ -672,7 +662,6 @@ public class PasswordStore {
|
|||
}
|
||||
|
||||
if password.changed&PasswordChange.path.rawValue != 0 {
|
||||
print("change path")
|
||||
let deletedFileURL = passwordEntity.getURL()!
|
||||
// add
|
||||
try createDirectoryTree(at: password.url)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue