diff --git a/WooCommerce/Classes/ViewRelated/CardPresentPayments/BuiltInCardReaderMerchantEducationPresenter.swift b/WooCommerce/Classes/ViewRelated/CardPresentPayments/BuiltInCardReaderMerchantEducationPresenter.swift index 246b0fba8e5..2072c4d9811 100644 --- a/WooCommerce/Classes/ViewRelated/CardPresentPayments/BuiltInCardReaderMerchantEducationPresenter.swift +++ b/WooCommerce/Classes/ViewRelated/CardPresentPayments/BuiltInCardReaderMerchantEducationPresenter.swift @@ -6,14 +6,14 @@ protocol BuiltInCardReaderMerchantEducationPresenting { func presentMerchantEducation(completion: @escaping () -> Void) } -final class BuiltInCardReaderMerchantEducationPresenter: BuiltInCardReaderMerchantEducationPresenting { +final class BuiltInCardReaderMerchantEducationPresenter: @preconcurrency BuiltInCardReaderMerchantEducationPresenting { private weak var rootViewController: ViewControllerPresenting? init(rootViewController: UIViewController) { self.rootViewController = rootViewController } - func presentMerchantEducation(completion: @escaping () -> Void) { + @MainActor func presentMerchantEducation(completion: @escaping () -> Void) { let viewController = UIHostingController(rootView: TapToPayEducationView(viewModel: .init(completion: { _ in completion() }))) diff --git a/WooCommerce/Classes/ViewRelated/Dashboard/Settings/CardReadersV2/Tap to Pay Education/TapToPayEducationViewModel.swift b/WooCommerce/Classes/ViewRelated/Dashboard/Settings/CardReadersV2/Tap to Pay Education/TapToPayEducationViewModel.swift index 6ba4e30c455..1ca205c2a2b 100644 --- a/WooCommerce/Classes/ViewRelated/Dashboard/Settings/CardReadersV2/Tap to Pay Education/TapToPayEducationViewModel.swift +++ b/WooCommerce/Classes/ViewRelated/Dashboard/Settings/CardReadersV2/Tap to Pay Education/TapToPayEducationViewModel.swift @@ -7,6 +7,7 @@ enum TapToPayEducationResult { case setUpTapToPay } +@MainActor final class TapToPayEducationViewModel: ObservableObject { struct Action { let title: String diff --git a/WooCommerce/WooCommerceTests/ViewRelated/Dashboard/Settings/In-Person Payments/TapToPayEducationViewModelTests.swift b/WooCommerce/WooCommerceTests/ViewRelated/Dashboard/Settings/In-Person Payments/TapToPayEducationViewModelTests.swift index 46b41bdf87f..9bbc39ec3c3 100644 --- a/WooCommerce/WooCommerceTests/ViewRelated/Dashboard/Settings/In-Person Payments/TapToPayEducationViewModelTests.swift +++ b/WooCommerce/WooCommerceTests/ViewRelated/Dashboard/Settings/In-Person Payments/TapToPayEducationViewModelTests.swift @@ -2,6 +2,7 @@ import Testing import Combine @testable import WooCommerce +@MainActor struct TapToPayEducationViewModelTests { private let cardReaderSupportDeterminer: MockCardReaderSupportDeterminer