Skip to content
This repository was archived by the owner on Oct 16, 2025. It is now read-only.

Commit 08b1894

Browse files
authored
fix(hot): skip revoked transactions on subs upgrade (#19)
Related hyochan/react-native-iap#3054
1 parent f510abe commit 08b1894

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Sources/OpenIapModule.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -838,7 +838,15 @@ public final class OpenIapModule: NSObject, OpenIapModuleProtocol {
838838
let transaction = try self.checkVerified(verification)
839839
let transactionId = String(transaction.id)
840840

841+
// Skip revoked transactions (happens during subscription upgrades)
842+
if transaction.revocationDate != nil {
843+
OpenIapLog.debug("⏭️ Skipping revoked transaction: \(transactionId)")
844+
continue
845+
}
846+
841847
if await self.state.isProcessed(transactionId) {
848+
OpenIapLog.debug("⏭️ Skipping already processed transaction: \(transactionId)")
849+
// Remove from processed set for future updates (e.g., subscription renewals)
842850
await self.state.unmarkProcessed(transactionId)
843851
continue
844852
}

0 commit comments

Comments
 (0)