From a4a6d0e97925ecd8e0dd52a0513e80335c4f51a3 Mon Sep 17 00:00:00 2001 From: Sam Symons Date: Sun, 24 Dec 2023 16:00:47 -0800 Subject: [PATCH] Rename token to accessToken. --- .../NavigationBar/View/NavigationBarViewController.swift | 2 +- .../NetworkProtectionSubscriptionEventHandler.swift | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) 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 }