Skip to content

Commit f0f1ac5

Browse files
authored
Do not signout user on API failure (duckduckgo#2698)
Task/Issue URL: https://app.asana.com/0/414235014887631/1207023339673018/f Description: Do not signOut user on Backend Failure
1 parent 913d725 commit f0f1ac5

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

DuckDuckGo/SettingsViewModel.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -430,9 +430,6 @@ extension SettingsViewModel {
430430
// Account is active but there's not a valid subscription / entitlements
431431
if await PurchaseManager.hasActiveSubscription() {
432432
state.subscription.isSubscriptionPendingActivation = true
433-
} else {
434-
// Sign out in case access token is present but no subscription and there is no active transaction on Apple ID
435-
signOutUser()
436433
}
437434
}
438435

DuckDuckGo/Subscription/ViewModel/SubscriptionSettingsViewModel.swift

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,9 @@ final class SubscriptionSettingsViewModel: ObservableObject {
8484
date: subscription.expiresOrRenewsAt,
8585
product: subscription.productId,
8686
billingPeriod: subscription.billingPeriod)
87-
case .failure:
88-
AccountManager().signOut()
89-
DispatchQueue.main.async {
90-
self.state.shouldDismissView = true
91-
}
87+
default:
88+
return
89+
9290
}
9391
}
9492
}

0 commit comments

Comments
 (0)