From 6eacced1d7ad43e9b988a22cf13f7fa5ab0ccc8f Mon Sep 17 00:00:00 2001 From: Michal Smaga Date: Thu, 12 Dec 2024 16:51:55 +0100 Subject: [PATCH] Properly set state when user cancelled the purchase --- .../Subscription/ViewModel/SubscriptionFlowViewModel.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DuckDuckGo/Subscription/ViewModel/SubscriptionFlowViewModel.swift b/DuckDuckGo/Subscription/ViewModel/SubscriptionFlowViewModel.swift index 5dc11256ab..fd9ae97268 100644 --- a/DuckDuckGo/Subscription/ViewModel/SubscriptionFlowViewModel.swift +++ b/DuckDuckGo/Subscription/ViewModel/SubscriptionFlowViewModel.swift @@ -183,7 +183,7 @@ final class SubscriptionFlowViewModel: ObservableObject { isBackendError = true state.transactionError = .hasActiveSubscription case .cancelledByUser: - state.transactionError = nil + state.transactionError = .cancelledByUser case .accountCreationFailed: DailyPixel.fireDailyAndCount(pixel: .privacyProPurchaseFailureAccountNotCreated, pixelNameSuffixes: DailyPixel.Constant.legacyDailyPixelSuffixes)