Skip to content

Commit

Permalink
Do not signout user on API failure
Browse files Browse the repository at this point in the history
  • Loading branch information
afterxleep committed Apr 8, 2024
1 parent 913d725 commit 9a630a1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
3 changes: 0 additions & 3 deletions DuckDuckGo/SettingsViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -430,9 +430,6 @@ extension SettingsViewModel {
// Account is active but there's not a valid subscription / entitlements
if await PurchaseManager.hasActiveSubscription() {
state.subscription.isSubscriptionPendingActivation = true
} else {
// Sign out in case access token is present but no subscription and there is no active transaction on Apple ID
signOutUser()
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,9 @@ final class SubscriptionSettingsViewModel: ObservableObject {
date: subscription.expiresOrRenewsAt,
product: subscription.productId,
billingPeriod: subscription.billingPeriod)
case .failure:
AccountManager().signOut()
DispatchQueue.main.async {
self.state.shouldDismissView = true
}
default:
return

}
}
}
Expand Down

0 comments on commit 9a630a1

Please sign in to comment.