Skip to content

Commit

Permalink
[Paywalls] Fix PaywallTester build (#4636)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkVillacampa authored Jan 7, 2025
1 parent 816f4ca commit 7f22a15
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ final class SamplePaywallLoader {
identifier: Self.offeringIdentifier,
serverDescription: Self.offeringIdentifier,
metadata: [:],
paywallComponentsData: components,
availablePackages: self.packages
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ struct APIKeyDashboardList: View {

private func templateGroupName(offering: Offering) -> String? {
#if PAYWALL_COMPONENTS
offering.paywall?.templateName ?? offering.paywallComponentsData?.templateName
offering.paywall?.templateName ?? offering.paywallComponents?.data.templateName
#else
offering.paywall?.templateName
#endif
Expand All @@ -129,7 +129,7 @@ struct APIKeyDashboardList: View {

private func offeringHasComponents(_ offering: Offering) -> Bool {
#if PAYWALL_COMPONENTS
offering.paywallComponentsData != nil
offering.paywallComponents != nil
#else
false
#endif
Expand Down Expand Up @@ -183,7 +183,7 @@ struct APIKeyDashboardList: View {
}
#if PAYWALL_COMPONENTS
.onAppear {
if let errorInfo = paywall.offering.paywallComponentsData?.errorInfo {
if let errorInfo = paywall.offering.paywallComponents?.data.errorInfo {
print("Paywall V2 Error:", errorInfo.debugDescription)
}
}
Expand Down Expand Up @@ -220,7 +220,7 @@ struct APIKeyDashboardList: View {
Text(self.offering.serverDescription)
Spacer()
#if PAYWALL_COMPONENTS
if let errorInfo = self.offering.paywallComponentsData?.errorInfo, !errorInfo.isEmpty {
if let errorInfo = self.offering.paywallComponents?.data.errorInfo, !errorInfo.isEmpty {
Image(systemName: "exclamationmark.circle.fill")
.foregroundStyle(Color.red)
}
Expand Down

0 comments on commit 7f22a15

Please sign in to comment.