Skip to content

Commit

Permalink
Subscription refactoring 4 (#2871)
Browse files Browse the repository at this point in the history
Task/Issue URL:
https://app.asana.com/0/1205842942115003/1206805455884775/f

**Description**:

- Subscription API services and flows abstracted using protocols
- Mocks created for all protocols
- Some APIs improved by changing params' names
  • Loading branch information
federicocappelli authored Jun 24, 2024
1 parent 7d2c59b commit 39396cc
Show file tree
Hide file tree
Showing 46 changed files with 407 additions and 313 deletions.
28 changes: 24 additions & 4 deletions DuckDuckGo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2601,6 +2601,10 @@
F1B33DF32BAD929D001128B3 /* SubscriptionAppStoreRestorer.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1B33DF12BAD929D001128B3 /* SubscriptionAppStoreRestorer.swift */; };
F1B33DF62BAD970E001128B3 /* SubscriptionErrorReporter.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1B33DF52BAD970E001128B3 /* SubscriptionErrorReporter.swift */; };
F1B33DF72BAD970E001128B3 /* SubscriptionErrorReporter.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1B33DF52BAD970E001128B3 /* SubscriptionErrorReporter.swift */; };
F1B8EC7A2C29957A00D395F5 /* SubscriptionFeatureAvailabilityMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1B8EC792C29957A00D395F5 /* SubscriptionFeatureAvailabilityMock.swift */; };
F1B8EC7B2C29957A00D395F5 /* SubscriptionFeatureAvailabilityMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1B8EC792C29957A00D395F5 /* SubscriptionFeatureAvailabilityMock.swift */; };
F1B8EC7C2C29958900D395F5 /* SubscriptionFeatureAvailabilityMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1B8EC792C29957A00D395F5 /* SubscriptionFeatureAvailabilityMock.swift */; };
F1B8EC7D2C29958A00D395F5 /* SubscriptionFeatureAvailabilityMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1B8EC792C29957A00D395F5 /* SubscriptionFeatureAvailabilityMock.swift */; };
F1C5763E2BFF972900C78647 /* SubscriptionUIHandling.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1C5763D2BFF972900C78647 /* SubscriptionUIHandling.swift */; };
F1C5763F2BFF972900C78647 /* SubscriptionUIHandling.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1C5763D2BFF972900C78647 /* SubscriptionUIHandling.swift */; };
F1C70D792BFF50A400599292 /* DataBrokerProtectionLoginItemInterface.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1C70D782BFF50A400599292 /* DataBrokerProtectionLoginItemInterface.swift */; };
Expand Down Expand Up @@ -2655,6 +2659,10 @@
F1DF95E42BD1807C0045E591 /* Crashes in Frameworks */ = {isa = PBXBuildFile; productRef = 537FC71EA5115A983FAF3170 /* Crashes */; };
F1DF95E52BD1807C0045E591 /* Subscription in Frameworks */ = {isa = PBXBuildFile; productRef = DC3F73D49B2D44464AFEFCD8 /* Subscription */; };
F1DF95E72BD188B60045E591 /* LoginItems in Frameworks */ = {isa = PBXBuildFile; productRef = F1DF95E62BD188B60045E591 /* LoginItems */; };
F1F861152C1B25D4005DB446 /* SubscriptionUIHandlerMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1F861142C1B25D4005DB446 /* SubscriptionUIHandlerMock.swift */; };
F1F861162C1B25D4005DB446 /* SubscriptionUIHandlerMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1F861142C1B25D4005DB446 /* SubscriptionUIHandlerMock.swift */; };
F1F861172C1B25D4005DB446 /* SubscriptionUIHandlerMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1F861142C1B25D4005DB446 /* SubscriptionUIHandlerMock.swift */; };
F1F861182C1B25D4005DB446 /* SubscriptionUIHandlerMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1F861142C1B25D4005DB446 /* SubscriptionUIHandlerMock.swift */; };
F1FDC9382BF51F41006B1435 /* VPNSettings+Environment.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1FDC9372BF51F41006B1435 /* VPNSettings+Environment.swift */; };
F1FDC9392BF51F41006B1435 /* VPNSettings+Environment.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1FDC9372BF51F41006B1435 /* VPNSettings+Environment.swift */; };
F1FDC93A2BF51F41006B1435 /* VPNSettings+Environment.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1FDC9372BF51F41006B1435 /* VPNSettings+Environment.swift */; };
Expand Down Expand Up @@ -4129,6 +4137,7 @@
F18826832BBEE31700D9AC4F /* PixelKit+Assertion.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "PixelKit+Assertion.swift"; sourceTree = "<group>"; };
F1B33DF12BAD929D001128B3 /* SubscriptionAppStoreRestorer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SubscriptionAppStoreRestorer.swift; sourceTree = "<group>"; };
F1B33DF52BAD970E001128B3 /* SubscriptionErrorReporter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SubscriptionErrorReporter.swift; sourceTree = "<group>"; };
F1B8EC792C29957A00D395F5 /* SubscriptionFeatureAvailabilityMock.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SubscriptionFeatureAvailabilityMock.swift; sourceTree = "<group>"; };
F1C5763D2BFF972900C78647 /* SubscriptionUIHandling.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SubscriptionUIHandling.swift; sourceTree = "<group>"; };
F1C70D782BFF50A400599292 /* DataBrokerProtectionLoginItemInterface.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DataBrokerProtectionLoginItemInterface.swift; sourceTree = "<group>"; };
F1C70D7B2BFF510000599292 /* SubscriptionEnvironment+Default.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "SubscriptionEnvironment+Default.swift"; sourceTree = "<group>"; };
Expand All @@ -4137,6 +4146,7 @@
F1D43AED2B98D8DF00BAB743 /* MainMenuActions+VanillaBrowser.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "MainMenuActions+VanillaBrowser.swift"; sourceTree = "<group>"; };
F1DA51842BF607D200CF29FA /* SubscriptionAttributionPixelHandler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SubscriptionAttributionPixelHandler.swift; sourceTree = "<group>"; };
F1DA51852BF607D200CF29FA /* SubscriptionRedirectManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SubscriptionRedirectManager.swift; sourceTree = "<group>"; };
F1F861142C1B25D4005DB446 /* SubscriptionUIHandlerMock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SubscriptionUIHandlerMock.swift; sourceTree = "<group>"; };
F1FDC9372BF51F41006B1435 /* VPNSettings+Environment.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "VPNSettings+Environment.swift"; sourceTree = "<group>"; };
F41D174025CB131900472416 /* NSColorExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NSColorExtension.swift; sourceTree = "<group>"; };
F44C130125C2DA0400426E3E /* NSAppearanceExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NSAppearanceExtension.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -6382,13 +6392,15 @@
path = Attribution;
sourceTree = "<group>";
};
9F64346E2BECB9FB00D2D8A0 /* Subscriptions */ = {
9F64346E2BECB9FB00D2D8A0 /* Subscription */ = {
isa = PBXGroup;
children = (
F1B8EC792C29957A00D395F5 /* SubscriptionFeatureAvailabilityMock.swift */,
9F64346F2BECBA2800D2D8A0 /* SubscriptionRedirectManagerTests.swift */,
9F0660722BECC71200B8EEF1 /* SubscriptionAttributionPixelHandlerTests.swift */,
F1F861142C1B25D4005DB446 /* SubscriptionUIHandlerMock.swift */,
);
path = Subscriptions;
path = Subscription;
sourceTree = "<group>";
};
9F872D9B2B9058B000138637 /* Extensions */ = {
Expand Down Expand Up @@ -6715,7 +6727,7 @@
858A798626A99D9000A75A42 /* SecureVault */,
B6DA440F2616C0F200DD1EC2 /* Statistics */,
AA63744E24C9BB4A00AB2AC4 /* Suggestions */,
9F64346E2BECB9FB00D2D8A0 /* Subscriptions */,
9F64346E2BECB9FB00D2D8A0 /* Subscription */,
AA92ACAE24EFE1F5005F41C9 /* Tab */,
AAC9C01224CAFBB700AD1325 /* TabBar */,
B6CA4822298CDC0B0067ECCE /* TabExtensionsTests */,
Expand Down Expand Up @@ -10362,6 +10374,7 @@
3706FDDF293F661700E42796 /* BookmarkSidebarTreeControllerTests.swift in Sources */,
3706FDE0293F661700E42796 /* TabIndexTests.swift in Sources */,
9F26060F2B85E17D00819292 /* AddEditBookmarkDialogCoordinatorViewModelTests.swift in Sources */,
F1B8EC7B2C29957A00D395F5 /* SubscriptionFeatureAvailabilityMock.swift in Sources */,
3706FDE1293F661700E42796 /* AdjacentItemEnumeratorTests.swift in Sources */,
4B9DB0572A983B55000927DB /* MockNotificationService.swift in Sources */,
3706FDE4293F661700E42796 /* TabLazyLoaderTests.swift in Sources */,
Expand Down Expand Up @@ -10524,6 +10537,7 @@
3706FE47293F661700E42796 /* URLExtensionTests.swift in Sources */,
9F8D57332BCCCB9A00AEA660 /* UserDefaultsBookmarkFoldersStoreTests.swift in Sources */,
1DB9617B29F1D06D00CF5568 /* InternalUserDeciderMock.swift in Sources */,
F1F861172C1B25D4005DB446 /* SubscriptionUIHandlerMock.swift in Sources */,
317295D52AF058D3002C3206 /* MockWaitlistFeatureSetupHandler.swift in Sources */,
3706FE49293F661700E42796 /* BookmarkNodePathTests.swift in Sources */,
1DE03425298BC7F000CAB3D7 /* InternalUserDeciderStoreMock.swift in Sources */,
Expand Down Expand Up @@ -10651,6 +10665,7 @@
B603973529BEF86200902A34 /* HTTPSUpgradeIntegrationTests.swift in Sources */,
B644B44029D57299003FA9AB /* SuggestionLoadingMock.swift in Sources */,
1D8B7D6B2A38BF060045C6F6 /* FireproofDomainsStoreMock.swift in Sources */,
F1F861182C1B25D4005DB446 /* SubscriptionUIHandlerMock.swift in Sources */,
B630E80229C887ED00363609 /* NSErrorAdditionalInfo.swift in Sources */,
3706FEA3293F662100E42796 /* CoreDataEncryptionTests.swift in Sources */,
B60C6F8929B1CAB7007BFAA8 /* TestRunHelperInitializer.m in Sources */,
Expand All @@ -10667,6 +10682,7 @@
B603972D29BEDF2100902A34 /* ExpectedNavigationExtension.swift in Sources */,
3706FEA6293F662100E42796 /* EncryptionKeyStoreTests.swift in Sources */,
B6F5656A299A414300A04298 /* WKWebViewMockingExtension.swift in Sources */,
F1B8EC7D2C29958A00D395F5 /* SubscriptionFeatureAvailabilityMock.swift in Sources */,
B693766F2B6B5F27005BD9D4 /* ErrorPageTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand All @@ -10693,6 +10709,7 @@
B603973429BEF86200902A34 /* HTTPSUpgradeIntegrationTests.swift in Sources */,
4B1AD91725FC46FB00261379 /* CoreDataEncryptionTests.swift in Sources */,
B644B43F29D57298003FA9AB /* SuggestionLoadingMock.swift in Sources */,
F1F861162C1B25D4005DB446 /* SubscriptionUIHandlerMock.swift in Sources */,
1D8B7D6A2A38BF050045C6F6 /* FireproofDomainsStoreMock.swift in Sources */,
B630E7FF29C887ED00363609 /* NSErrorAdditionalInfo.swift in Sources */,
7BA4727D26F01BC400EAA165 /* CoreDataTestUtilities.swift in Sources */,
Expand All @@ -10709,6 +10726,7 @@
B603972C29BEDF2100902A34 /* ExpectedNavigationExtension.swift in Sources */,
4B1AD8D525FC38DD00261379 /* EncryptionKeyStoreTests.swift in Sources */,
B6F56568299A414300A04298 /* WKWebViewMockingExtension.swift in Sources */,
F1B8EC7C2C29958900D395F5 /* SubscriptionFeatureAvailabilityMock.swift in Sources */,
B693766E2B6B5F27005BD9D4 /* ErrorPageTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -11826,6 +11844,7 @@
1D7693FF2BE3A1AA0016A22B /* DockCustomizerMock.swift in Sources */,
4B8AD0B127A86D9200AE44D6 /* WKWebsiteDataStoreExtensionTests.swift in Sources */,
9FA5A0B02BC9039200153786 /* BookmarkFolderStoreMock.swift in Sources */,
F1F861152C1B25D4005DB446 /* SubscriptionUIHandlerMock.swift in Sources */,
B69B50472726C5C200758A2B /* VariantManagerTests.swift in Sources */,
8546DE6225C03056000CA5E1 /* UserAgentTests.swift in Sources */,
9F26060B2B85C20A00819292 /* AddEditBookmarkDialogViewModelTests.swift in Sources */,
Expand Down Expand Up @@ -11867,6 +11886,7 @@
AA0F3DB7261A566C0077F2D9 /* SuggestionLoadingMock.swift in Sources */,
B6E6BA162BA2CF5F008AA7E1 /* SandboxTestToolNotifications.swift in Sources */,
B60C6F8129B1B4AD007BFAA8 /* TestRunHelper.swift in Sources */,
F1B8EC7A2C29957A00D395F5 /* SubscriptionFeatureAvailabilityMock.swift in Sources */,
9F872DA02B90644800138637 /* ContextualMenuTests.swift in Sources */,
4B9292BE2667103100AD2C21 /* PasteboardFolderTests.swift in Sources */,
4B9292C52667104B00AD2C21 /* CoreDataTestUtilities.swift in Sources */,
Expand Down Expand Up @@ -13022,7 +13042,7 @@
repositoryURL = "https://github.com/duckduckgo/BrowserServicesKit";
requirement = {
kind = exactVersion;
version = 159.0.2;
version = 160.0.0;
};
};
9FF521422BAA8FF300B9819B /* XCRemoteSwiftPackageReference "lottie-spm" */ = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/duckduckgo/BrowserServicesKit",
"state" : {
"revision" : "28687a848cff47267e64e3bfcdf5c92effbee5ce",
"version" : "159.0.2"
"revision" : "70ea98c091350a5dde9d6e5d6b05f064e5a36ec0",
"version" : "160.0.0"
}
},
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1530"
version = "1.7">
version = "1.8">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"
Expand Down
4 changes: 2 additions & 2 deletions DuckDuckGo/Application/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ final class AppDelegate: NSObject, NSApplicationDelegate {
let bookmarksManager = LocalBookmarkManager.shared
var privacyDashboardWindow: NSWindow?

public let subscriptionManager: SubscriptionManaging
public let subscriptionManager: SubscriptionManager
public let subscriptionUIHandler: SubscriptionUIHandling

public let vpnSettings = VPNSettings(defaults: .netP)
Expand Down Expand Up @@ -218,7 +218,7 @@ final class AppDelegate: NSObject, NSApplicationDelegate {
)

// Configure Subscription
subscriptionManager = SubscriptionManager()
subscriptionManager = DefaultSubscriptionManager()
subscriptionUIHandler = SubscriptionUIHandler(windowControllersManagerProvider: {
return WindowControllersManager.shared
})
Expand Down
20 changes: 10 additions & 10 deletions DuckDuckGo/Common/Surveys/SurveyRemoteMessaging.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ protocol SurveyRemoteMessaging {

protocol SurveyRemoteMessageSubscriptionFetching {

func getSubscription(accessToken: String) async -> Result<Subscription, SubscriptionService.SubscriptionServiceError>

func getSubscription(accessToken: String) async -> Result<Subscription, SubscriptionServiceError>
}

final class DefaultSurveyRemoteMessaging: SurveyRemoteMessaging {
Expand All @@ -43,24 +42,25 @@ final class DefaultSurveyRemoteMessaging: SurveyRemoteMessaging {

private let messageRequest: HomePageRemoteMessagingRequest
private let messageStorage: SurveyRemoteMessagingStorage
private let accountManager: AccountManaging
private let accountManager: AccountManager
private let subscriptionFetcher: SurveyRemoteMessageSubscriptionFetching
private let vpnActivationDateStore: WaitlistActivationDateStore
private let pirActivationDateStore: WaitlistActivationDateStore
private let minimumRefreshInterval: TimeInterval
private let userDefaults: UserDefaults

convenience init(subscriptionManager: SubscriptionManaging) {
convenience init(subscriptionManager: SubscriptionManager) {
let subscriptionFetcher = SurveyRemoteMessageSubscriptionFetcher(subscriptionEndpointService: subscriptionManager.subscriptionEndpointService)
#if DEBUG || REVIEW
self.init(
accountManager: subscriptionManager.accountManager,
subscriptionFetcher: subscriptionManager.subscriptionService,
subscriptionFetcher: subscriptionFetcher,
minimumRefreshInterval: .seconds(30)
)
#else
self.init(
accountManager: subscriptionManager.accountManager,
subscriptionFetcher: subscriptionManager.subscriptionService,
subscriptionFetcher: subscriptionFetcher,
minimumRefreshInterval: .hours(1)
)
#endif
Expand All @@ -69,7 +69,7 @@ final class DefaultSurveyRemoteMessaging: SurveyRemoteMessaging {
init(
messageRequest: HomePageRemoteMessagingRequest = DefaultHomePageRemoteMessagingRequest.surveysRequest(),
messageStorage: SurveyRemoteMessagingStorage = DefaultSurveyRemoteMessagingStorage.surveys(),
accountManager: AccountManaging,
accountManager: AccountManager,
subscriptionFetcher: SurveyRemoteMessageSubscriptionFetching,
vpnActivationDateStore: WaitlistActivationDateStore = DefaultWaitlistActivationDateStore(source: .netP),
pirActivationDateStore: WaitlistActivationDateStore = DefaultWaitlistActivationDateStore(source: .dbp),
Expand Down Expand Up @@ -280,10 +280,10 @@ final class DefaultSurveyRemoteMessaging: SurveyRemoteMessaging {

}

extension SubscriptionService: SurveyRemoteMessageSubscriptionFetching {
struct SurveyRemoteMessageSubscriptionFetcher: SurveyRemoteMessageSubscriptionFetching {
let subscriptionEndpointService: SubscriptionEndpointService

func getSubscription(accessToken: String) async -> Result<Subscription, SubscriptionServiceError> {
return await self.getSubscription(accessToken: accessToken, cachePolicy: .returnCacheDataElseLoad)
return await subscriptionEndpointService.getSubscription(accessToken: accessToken, cachePolicy: .returnCacheDataElseLoad)
}

}
6 changes: 3 additions & 3 deletions DuckDuckGo/DBP/DataBrokerProtectionFeatureGatekeeper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ struct DefaultDataBrokerProtectionFeatureGatekeeper: DataBrokerProtectionFeature
private let userDefaults: UserDefaults
private let waitlistStorage: WaitlistStorage
private let subscriptionAvailability: SubscriptionFeatureAvailability
private let accountManager: AccountManaging
private let accountManager: AccountManager

private let dataBrokerProtectionKey = "data-broker-protection.cleaned-up-from-waitlist-to-privacy-pro"

Expand All @@ -55,7 +55,7 @@ struct DefaultDataBrokerProtectionFeatureGatekeeper: DataBrokerProtectionFeature
userDefaults: UserDefaults = .standard,
waitlistStorage: WaitlistStorage = DataBrokerProtectionWaitlist().waitlistStorage,
subscriptionAvailability: SubscriptionFeatureAvailability = DefaultSubscriptionFeatureAvailability(),
accountManager: AccountManaging) {
accountManager: AccountManager) {
self.privacyConfigurationManager = privacyConfigurationManager
self.featureDisabler = featureDisabler
self.pixelHandler = pixelHandler
Expand Down Expand Up @@ -139,7 +139,7 @@ struct DefaultDataBrokerProtectionFeatureGatekeeper: DataBrokerProtectionFeature
}

func arePrerequisitesSatisfied() async -> Bool {
let entitlements = await accountManager.hasEntitlement(for: .dataBrokerProtection,
let entitlements = await accountManager.hasEntitlement(forProductName: .dataBrokerProtection,
cachePolicy: .reloadIgnoringLocalCacheData)
var hasEntitlements: Bool
switch entitlements {
Expand Down
6 changes: 3 additions & 3 deletions DuckDuckGo/HomePage/Model/HomePageContinueSetUpModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ extension HomePage.Models {
private let tabCollectionViewModel: TabCollectionViewModel
private let emailManager: EmailManager
private let duckPlayerPreferences: DuckPlayerPreferencesPersistor
private let subscriptionManager: SubscriptionManaging
private let subscriptionManager: SubscriptionManager

@UserDefaultsWrapper(key: .homePageShowAllFeatures, defaultValue: false)
var shouldShowAllFeatures: Bool {
Expand Down Expand Up @@ -111,7 +111,7 @@ extension HomePage.Models {
surveyRemoteMessaging: SurveyRemoteMessaging,
privacyConfigurationManager: PrivacyConfigurationManaging = AppPrivacyFeatures.shared.contentBlocking.privacyConfigurationManager,
permanentSurveyManager: SurveyManager = PermanentSurveyManager(),
subscriptionManager: SubscriptionManaging = Application.appDelegate.subscriptionManager) {
subscriptionManager: SubscriptionManager = Application.appDelegate.subscriptionManager) {
self.defaultBrowserProvider = defaultBrowserProvider
self.dockCustomizer = dockCustomizer
self.dataImportProvider = dataImportProvider
Expand Down Expand Up @@ -338,7 +338,7 @@ extension HomePage.Models {
var subscription: Subscription?

if let token = subscriptionManager.accountManager.accessToken {
switch await subscriptionManager.subscriptionService.getSubscription(
switch await subscriptionManager.subscriptionEndpointService.getSubscription(
accessToken: token,
cachePolicy: .returnCacheDataElseLoad
) {
Expand Down
Loading

0 comments on commit 39396cc

Please sign in to comment.