diff --git a/AutofillCredentialProvider/CredentialProvider/CredentialProviderViewController.swift b/AutofillCredentialProvider/CredentialProvider/CredentialProviderViewController.swift index 557b7292e7..8a609d164b 100644 --- a/AutofillCredentialProvider/CredentialProvider/CredentialProviderViewController.swift +++ b/AutofillCredentialProvider/CredentialProvider/CredentialProviderViewController.swift @@ -33,9 +33,11 @@ class CredentialProviderViewController: ASCredentialProviderViewController { private lazy var authenticator = UserAuthenticator(reason: UserText.credentialProviderListAuthenticationReason, cancelTitle: UserText.credentialProviderListAuthenticationCancelButton) - private lazy var credentialIdentityStoreManager: AutofillCredentialIdentityStoreManaging = AutofillCredentialIdentityStoreManager(credentialStore: ASCredentialIdentityStore.shared, - vault: secureVault, - tld: tld) + private lazy var credentialIdentityStoreManager: AutofillCredentialIdentityStoreManaging = AutofillCredentialIdentityStoreManager( + credentialStore: ASCredentialIdentityStore.shared, + vault: secureVault, + reporter: SecureVaultReporter(), + tld: tld) private lazy var secureVault: (any AutofillSecureVault)? = { if findKeychainItemsWithV4() { diff --git a/Core/SyncCredentialsAdapter.swift b/Core/SyncCredentialsAdapter.swift index 888341cc87..132dcd0505 100644 --- a/Core/SyncCredentialsAdapter.swift +++ b/Core/SyncCredentialsAdapter.swift @@ -47,8 +47,7 @@ public final class SyncCredentialsAdapter { secureVaultErrorReporter: secureVaultErrorReporter, errorEvents: CredentialsCleanupErrorHandling() ) - credentialIdentityStoreManager = AutofillCredentialIdentityStoreManager( - vault: try? secureVaultFactory.makeVault(reporter: secureVaultErrorReporter), tld: tld) + credentialIdentityStoreManager = AutofillCredentialIdentityStoreManager(reporter: secureVaultErrorReporter, tld: tld) } public func cleanUpDatabaseAndUpdateSchedule(shouldEnable: Bool) { diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index dfa700dc62..8fa7c1d4ab 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -11865,7 +11865,7 @@ repositoryURL = "https://github.com/DuckDuckGo/BrowserServicesKit"; requirement = { kind = exactVersion; - version = 224.0.0; + version = 224.1.0; }; }; 9F8FE9472BAE50E50071E372 /* XCRemoteSwiftPackageReference "lottie-spm" */ = { diff --git a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 556334abe5..b0bbd57449 100644 --- a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -32,8 +32,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/DuckDuckGo/BrowserServicesKit", "state" : { - "revision" : "bb43f0c2a489d7eed4b33baf2201f9b2b6512588", - "version" : "224.0.0" + "revision" : "14384f05a6e43842c4626e06736e2c4f5d758057", + "version" : "224.1.0" } }, { @@ -59,8 +59,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/duckduckgo/duckduckgo-autofill.git", "state" : { - "revision" : "88982a3802ac504e2f1a118a73bfdf2d8f4a7735", - "version" : "16.0.0" + "revision" : "47c26dc32b94cdbcef3e6157497147917678c25c", + "version" : "16.1.0" } }, { diff --git a/DuckDuckGo/AutofillLoginListViewModel.swift b/DuckDuckGo/AutofillLoginListViewModel.swift index 3c267fda0d..f393e16166 100644 --- a/DuckDuckGo/AutofillLoginListViewModel.swift +++ b/DuckDuckGo/AutofillLoginListViewModel.swift @@ -88,7 +88,9 @@ final class AutofillLoginListViewModel: ObservableObject { return settings["monitorIntervalDays"] as? Int ?? 42 }() - private lazy var credentialIdentityStoreManager: AutofillCredentialIdentityStoreManaging = AutofillCredentialIdentityStoreManager(vault: secureVault, tld: tld) + private lazy var credentialIdentityStoreManager: AutofillCredentialIdentityStoreManaging = AutofillCredentialIdentityStoreManager(vault: secureVault, + reporter: SecureVaultReporter(), + tld: tld) private lazy var syncPromoManager: SyncPromoManaging = SyncPromoManager(syncService: syncService) diff --git a/DuckDuckGo/AutofillUsageMonitor.swift b/DuckDuckGo/AutofillUsageMonitor.swift index cd4c04d71c..898f7d8c41 100644 --- a/DuckDuckGo/AutofillUsageMonitor.swift +++ b/DuckDuckGo/AutofillUsageMonitor.swift @@ -23,12 +23,8 @@ import BrowserServicesKit final class AutofillUsageMonitor { - private lazy var credentialIdentityStoreManager: AutofillCredentialIdentityStoreManager? = { - guard let vault = try? AutofillSecureVaultFactory.makeVault(reporter: SecureVaultReporter()) else { - return nil - } - - return AutofillCredentialIdentityStoreManager(vault: vault, + private lazy var credentialIdentityStoreManager: AutofillCredentialIdentityStoreManager = { + return AutofillCredentialIdentityStoreManager(reporter: SecureVaultReporter(), tld: AppDependencyProvider.shared.storageCache.tld) }() @@ -43,7 +39,7 @@ final class AutofillUsageMonitor { if state.isEnabled { if self?.autofillExtensionEnabled == nil { Task { - await self?.credentialIdentityStoreManager?.populateCredentialStore() + await self?.credentialIdentityStoreManager.populateCredentialStore() } } self?.autofillExtensionEnabled = true diff --git a/DuckDuckGo/TabViewController.swift b/DuckDuckGo/TabViewController.swift index 031dd5ea55..9b1d34cdc8 100644 --- a/DuckDuckGo/TabViewController.swift +++ b/DuckDuckGo/TabViewController.swift @@ -276,12 +276,8 @@ class TabViewController: UIViewController { return manager }() - private lazy var credentialIdentityStoreManager: AutofillCredentialIdentityStoreManager? = { - guard let vault = try? AutofillSecureVaultFactory.makeVault(reporter: SecureVaultReporter()) else { - return nil - } - - return AutofillCredentialIdentityStoreManager(vault: vault, + private lazy var credentialIdentityStoreManager: AutofillCredentialIdentityStoreManager = { + return AutofillCredentialIdentityStoreManager(reporter: SecureVaultReporter(), tld: AppDependencyProvider.shared.storageCache.tld) }() @@ -2851,7 +2847,7 @@ extension TabViewController: SecureVaultManagerDelegate { guard let domain = account?.domain else { return } Task { - await self?.credentialIdentityStoreManager?.updateCredentialStore(for: domain) + await self?.credentialIdentityStoreManager.updateCredentialStore(for: domain) } } completionHandler: { account in if account != nil { @@ -3049,7 +3045,7 @@ extension TabViewController: SaveLoginViewControllerDelegate { guard let domain = newCredential.account.domain else { return } Task { - await credentialIdentityStoreManager?.updateCredentialStore(for: domain) + await credentialIdentityStoreManager.updateCredentialStore(for: domain) } } } catch {