Skip to content

Commit b9d3197

Browse files
Leverclaude
andcommitted
Use isActive instead of re-deriving from state in purchase correction
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent b0edcae commit b9d3197

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Sources/SuperwallKit/StoreKit/Products/Receipt Manager/Receipt Manager/SK2ReceiptManager.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ actor SK2ReceiptManager: ReceiptManagerType {
169169
for purchase in purchases {
170170
let productEntitlements = entitlementsByProductId[purchase.id] ?? []
171171
let allRevokedOrExpired = !productEntitlements.isEmpty && productEntitlements.allSatisfy {
172-
$0.state == .revoked || $0.state == .expired
172+
!$0.isActive
173173
}
174174
if allRevokedOrExpired && purchase.isActive {
175175
correctedPurchases.insert(

0 commit comments

Comments
 (0)