From 7f22a15c2d274dd4b7ddcf801821646d6dd7389c Mon Sep 17 00:00:00 2001 From: Mark Villacampa Date: Tue, 7 Jan 2025 17:46:19 +0100 Subject: [PATCH] [Paywalls] Fix PaywallTester build (#4636) --- .../PaywallsTester/Config/SamplePaywalls.swift | 1 - .../UI/Views/OfferingList/APIKeyDashboardList.swift | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Tests/TestingApps/PaywallsTester/PaywallsTester/Config/SamplePaywalls.swift b/Tests/TestingApps/PaywallsTester/PaywallsTester/Config/SamplePaywalls.swift index 3818fa06fd..2fc38022f1 100644 --- a/Tests/TestingApps/PaywallsTester/PaywallsTester/Config/SamplePaywalls.swift +++ b/Tests/TestingApps/PaywallsTester/PaywallsTester/Config/SamplePaywalls.swift @@ -44,7 +44,6 @@ final class SamplePaywallLoader { identifier: Self.offeringIdentifier, serverDescription: Self.offeringIdentifier, metadata: [:], - paywallComponentsData: components, availablePackages: self.packages ) } diff --git a/Tests/TestingApps/PaywallsTester/PaywallsTester/UI/Views/OfferingList/APIKeyDashboardList.swift b/Tests/TestingApps/PaywallsTester/PaywallsTester/UI/Views/OfferingList/APIKeyDashboardList.swift index 35cd4dfc1a..a01fea46cb 100644 --- a/Tests/TestingApps/PaywallsTester/PaywallsTester/UI/Views/OfferingList/APIKeyDashboardList.swift +++ b/Tests/TestingApps/PaywallsTester/PaywallsTester/UI/Views/OfferingList/APIKeyDashboardList.swift @@ -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 @@ -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 @@ -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) } } @@ -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) }