From 36df62572e2f4f4e7c346d4547c4b32e493a8dd2 Mon Sep 17 00:00:00 2001 From: Anh Do <18567+quanganhdo@users.noreply.github.com> Date: Mon, 25 Mar 2024 13:22:24 -0400 Subject: [PATCH] Assign correct service environment (#2635) --- DuckDuckGo/AppDelegate.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/DuckDuckGo/AppDelegate.swift b/DuckDuckGo/AppDelegate.swift index 320ecc1636..4c3f946a0b 100644 --- a/DuckDuckGo/AppDelegate.swift +++ b/DuckDuckGo/AppDelegate.swift @@ -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 } }