Skip to content

Commit

Permalink
fix type error on some versions of xcode (#2152)
Browse files Browse the repository at this point in the history
Co-authored-by: Andres Aguilar <[email protected]>
  • Loading branch information
andresesfm and Andres Aguilar authored Dec 5, 2022
1 parent c3a96a3 commit 266b4b0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ios/RNIapIos.swift
Original file line number Diff line number Diff line change
Expand Up @@ -790,12 +790,12 @@ class RNIapIos: RCTEventEmitter, SKRequestDelegate, SKPaymentTransactionObserver
return nil
}

func getPurchaseData(_ transaction: SKPaymentTransaction, withBlock block: @escaping (_ transactionDict: [String: Any]?) -> Void) {
func getPurchaseData(_ transaction: SKPaymentTransaction, withBlock block: @escaping (_ transactionDict: [String: Any?]?) -> Void) {
requestReceiptData(withBlock: false) { receiptData, _ in
if receiptData == nil {
block(nil)
} else {
var purchase = [
var purchase: [String: Any?] = [
"transactionDate": transaction.transactionDate?.millisecondsSince1970,
"transactionId": transaction.transactionIdentifier,
"productId": transaction.payment.productIdentifier,
Expand All @@ -808,7 +808,7 @@ class RNIapIos: RCTEventEmitter, SKRequestDelegate, SKPaymentTransactionObserver
purchase["originalTransactionIdentifierIOS"] = originalTransaction.transactionIdentifier
}

block(purchase as [String: Any])
block(purchase)
}
}
}
Expand Down

0 comments on commit 266b4b0

Please sign in to comment.