Skip to content

Commit

Permalink
Assign correct service environment (#2635)
Browse files Browse the repository at this point in the history
  • Loading branch information
quanganhdo authored Mar 25, 2024
1 parent db22f86 commit 36df625
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions DuckDuckGo/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -428,12 +428,18 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
#if SUBSCRIPTION
private func setupSubscriptionsEnvironment() {
Task {
#if DEBUG && ALPHA
SubscriptionPurchaseEnvironment.currentServiceEnvironment = .staging
#else
SubscriptionPurchaseEnvironment.currentServiceEnvironment = .production
#endif

#if NETWORK_PROTECTION
if VPNSettings(defaults: .networkProtectionGroupDefaults).selectedEnvironment == .staging {
SubscriptionPurchaseEnvironment.currentServiceEnvironment = .staging
}
#endif

SubscriptionPurchaseEnvironment.current = .appStore
}
}
Expand Down

0 comments on commit 36df625

Please sign in to comment.