now accepts purchase without appAccountToken

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

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

@ -195,7 +195,7 @@ import LeStorage
return [] 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() let now: Date = Date()
// print("now = \(now)") // print("now = \(now)")

Loading…
Cancel
Save