[iOS] ignore pending transactions in .purchasing state on enter to catalog

https://jira.mail.ru/browse/MAPSME-9921
This commit is contained in:
Aleksey Belouosv 2019-03-06 15:19:43 +03:00 committed by Aleksandr Zatsepin
parent 1ef1474b4c
commit 717cab7e7d

View file

@ -12,8 +12,14 @@ final class BillingPendingTransaction: NSObject, IBillingPendingTransaction {
var status: TransactionStatus {
let routeTransactions = SKPaymentQueue.default().transactions.filter {
!Subscription.legacyProductIds.contains($0.payment.productIdentifier) &&
var isOk = !Subscription.legacyProductIds.contains($0.payment.productIdentifier) &&
!Subscription.productIds.contains($0.payment.productIdentifier)
if isOk && $0.transactionState == .purchasing {
isOk = false
Statistics.logEvent("Pending_purchasing_transaction",
withParameters: ["productId" : $0.payment.productIdentifier])
}
return isOk
}
if routeTransactions.count > 1 {