Selaa lähdekoodia

Merge pull request #188 from bizz84/feature/dont-log-purchasing-unhandled-transactions

Only log unhandled transactions that are not in purchasing state (#179)
Andrea Bizzotto 8 vuotta sitten
vanhempi
commit
0afa280bde
1 muutettua tiedostoa jossa 1 lisäystä ja 0 poistoa
  1. 1 0
      SwiftyStoreKit/PaymentQueueController.swift

+ 1 - 0
SwiftyStoreKit/PaymentQueueController.swift

@@ -172,6 +172,7 @@ class PaymentQueueController: NSObject, SKPaymentTransactionObserver {
 
 
         unhandledTransactions = completeTransactionsController.processTransactions(unhandledTransactions, on: paymentQueue)
         unhandledTransactions = completeTransactionsController.processTransactions(unhandledTransactions, on: paymentQueue)
 
 
+        unhandledTransactions = unhandledTransactions.filter { $0.transactionState != .purchasing }
         if unhandledTransactions.count > 0 {
         if unhandledTransactions.count > 0 {
             let strings = unhandledTransactions.map { $0.debugDescription }.joined(separator: "\n")
             let strings = unhandledTransactions.map { $0.debugDescription }.joined(separator: "\n")
             print("unhandledTransactions:\n\(strings)")
             print("unhandledTransactions:\n\(strings)")