Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/iphone
diff options
context:
space:
mode:
authorAleksey Belouosv <aleksey@maps.me>2019-03-06 15:19:43 +0300
committerAleksandr Zatsepin <alexzatsepin@users.noreply.github.com>2019-03-13 12:57:30 +0300
commit717cab7e7d81c0f99add829f8d23accbdfae9297 (patch)
treefee0abfa8c8207d708594104f5ace4ad8cc7f488 /iphone
parent1ef1474b4c49899c7ad0eea47354d18c14777173 (diff)
[iOS] ignore pending transactions in .purchasing state on enter to catalog
https://jira.mail.ru/browse/MAPSME-9921
Diffstat (limited to 'iphone')
-rw-r--r--iphone/Maps/Core/InappPurchase/Impl/BillingPendingTransaction.swift8
1 files changed, 7 insertions, 1 deletions
diff --git a/iphone/Maps/Core/InappPurchase/Impl/BillingPendingTransaction.swift b/iphone/Maps/Core/InappPurchase/Impl/BillingPendingTransaction.swift
index e006862376..b509f5e91e 100644
--- a/iphone/Maps/Core/InappPurchase/Impl/BillingPendingTransaction.swift
+++ b/iphone/Maps/Core/InappPurchase/Impl/BillingPendingTransaction.swift
@@ -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 {