Skip to content

Commit

Permalink
remove storefront from paymentwrapperqueue
Browse files Browse the repository at this point in the history
  • Loading branch information
fire-at-will authored Oct 18, 2024
1 parent 74447a2 commit 62d0035
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
2 changes: 1 addition & 1 deletion Sources/Purchasing/Purchases/PurchasesOrchestrator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1371,7 +1371,7 @@ private extension PurchasesOrchestrator {
) {
self.productsManager.products(withIdentifiers: [productIdentifier]) { products in
let result = products.value?.first.map {
ProductRequestData(with: $0, storefront: self.paymentQueueWrapper.currentStorefront)
ProductRequestData(with: $0, storefront: self.systemInfo.storefront)
}

completion(result)
Expand Down
10 changes: 0 additions & 10 deletions Sources/Purchasing/StoreKit1/PaymentQueueWrapper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ protocol PaymentQueueWrapperType: AnyObject {
@available(macCatalyst, unavailable)
func presentCodeRedemptionSheet()

var currentStorefront: Storefront? { get }

}

/// The choice between SK1's `StoreKit1Wrapper` or `PaymentQueueWrapper` when SK2 is enabled.
Expand Down Expand Up @@ -101,12 +99,6 @@ class PaymentQueueWrapper: NSObject, PaymentQueueWrapperType {
}
#endif

var currentStorefront: Storefront? {
return self.paymentQueue.storefront
.map(SK1Storefront.init)
.map(Storefront.from(storefront:))
}

}

extension PaymentQueueWrapper: SKPaymentQueueDelegate {
Expand Down Expand Up @@ -154,8 +146,6 @@ extension EitherPaymentQueueWrapper {
}
}

var currentStorefront: StorefrontType? { self.paymentQueueWrapperType.currentStorefront }

var sk1Wrapper: StoreKit1Wrapper? { return self.left }
var sk2Wrapper: PaymentQueueWrapper? { return self.right }

Expand Down

0 comments on commit 62d0035

Please sign in to comment.