Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Paywalls] Fix PaywallTester build #4636

Merged
merged 1 commit into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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