diff --git a/DuckDuckGo/NavigationBar/View/NavigationBarViewController.swift b/DuckDuckGo/NavigationBar/View/NavigationBarViewController.swift index 933ff3df51..fb8f9bff1f 100644 --- a/DuckDuckGo/NavigationBar/View/NavigationBarViewController.swift +++ b/DuckDuckGo/NavigationBar/View/NavigationBarViewController.swift @@ -336,7 +336,7 @@ final class NavigationBarViewController: NSViewController { let accountManager = AccountManager() let networkProtectionTokenStorage = NetworkProtectionKeychainTokenStore() - if accountManager.authToken != nil && (try? networkProtectionTokenStorage.fetchToken()) == nil { + if accountManager.accessToken != nil && (try? networkProtectionTokenStorage.fetchToken()) == nil { print("[NetP Subscription] Got access token but not auth token, meaning token exchange failed") return } diff --git a/DuckDuckGo/NetworkProtection/AppTargets/DeveloperIDTarget/NetworkProtectionSubscriptionEventHandler.swift b/DuckDuckGo/NetworkProtection/AppTargets/DeveloperIDTarget/NetworkProtectionSubscriptionEventHandler.swift index 0f0782dfee..7ad69d346b 100644 --- a/DuckDuckGo/NetworkProtection/AppTargets/DeveloperIDTarget/NetworkProtectionSubscriptionEventHandler.swift +++ b/DuckDuckGo/NetworkProtection/AppTargets/DeveloperIDTarget/NetworkProtectionSubscriptionEventHandler.swift @@ -19,17 +19,17 @@ #if NETWORK_PROTECTION && SUBSCRIPTION import Foundation -import Account +import Subscription import NetworkProtection final class NetworkProtectionSubscriptionEventHandler { - private let accountManager: Account.AccountManaging + private let accountManager: AccountManaging private let networkProtectionRedemptionCoordinator: NetworkProtectionCodeRedeeming private let networkProtectionTokenStorage: NetworkProtectionTokenStore private let networkProtectionFeatureDisabler: NetworkProtectionFeatureDisabling - init(accountManager: Account.AccountManaging = Account.AccountManager(), + init(accountManager: AccountManaging = AccountManager(), networkProtectionRedemptionCoordinator: NetworkProtectionCodeRedeeming = NetworkProtectionCodeRedemptionCoordinator(), networkProtectionTokenStorage: NetworkProtectionTokenStore = NetworkProtectionKeychainTokenStore(), networkProtectionFeatureDisabler: NetworkProtectionFeatureDisabling = NetworkProtectionFeatureDisabler()) { @@ -45,7 +45,7 @@ final class NetworkProtectionSubscriptionEventHandler { } @objc private func handleAccountDidSignIn() { - guard let token = accountManager.token else { + guard let token = accountManager.accessToken else { assertionFailure("[NetP Subscription] AccountManager signed in but token could not be retrieved") return }