now accepts purchase without appAccountToken

sync2
Laurent 1 year ago
parent e950669132
commit be89a1bda0
  1. 8
      PadelClub/Views/Navigation/Umpire/UmpireView.swift
  2. 2
      PadelClub/Views/Tournament/Subscription/Guard.swift

@ -271,11 +271,15 @@ struct ProductIdsView: View {
List {
LabeledContent("count", value: String(self.transactions.count))
ForEach(self.transactions) { transaction in
if let offerType = transaction.offerType?.rawValue {
LabeledContent(transaction.productID, value: "\(offerType)")
if #available(iOS 17.2, *) {
if let offer = transaction.offer {
LabeledContent(transaction.productID, value: "\(offer.type)")
} else {
LabeledContent(transaction.productID, value: "no offer")
}
} else {
Text("need ios 17.2")
}
}
}.onAppear {
Task {

@ -195,7 +195,7 @@ import LeStorage
return []
}
let userTransactions = self.purchasedTransactions.filter { currentUserUUID == $0.appAccountToken || $0.offerType == .code }
let userTransactions = self.purchasedTransactions.filter { currentUserUUID == $0.appAccountToken || $0.appAccountToken == nil }
let now: Date = Date()
// print("now = \(now)")

Loading…
Cancel
Save