Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
scottkicks committed Mar 26, 2024
1 parent 703594e commit da13cfc
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Library/ViewModels/PostCampaignCheckoutViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -242,13 +242,14 @@ public class PostCampaignCheckoutViewModel: PostCampaignCheckoutViewModelType,
self.configureWithDataProperty.value = data
}

private let (creditCardSelectedSignal, creditCardSelectedObserver) = Signal<(String, String), Never>
.pipe()
private let creditCardSelectedProperty =
MutableProperty<(source: PaymentSourceSelected, paymentMethodId: String, isNewPaymentMethod: Bool)?>(nil)
public func creditCardSelected(
with stripeCardIdAndPaymentIntent: (String, String?),
isExistingPaymentMethod: Bool
source: PaymentSourceSelected,
paymentMethodId: String,
isNewPaymentMethod: Bool
) {
self.creditCardSelectedObserver.send(value: (stripeCardIdAndPaymentIntent, isExistingPaymentMethod))
self.creditCardSelectedProperty.value = (source, paymentMethodId, isNewPaymentMethod)
}

private let (goToLoginSignupSignal, goToLoginSignupObserver) = Signal<Void, Never>.pipe()
Expand Down Expand Up @@ -297,6 +298,7 @@ public class PostCampaignCheckoutViewModel: PostCampaignCheckoutViewModelType,
public let showErrorBannerWithMessage: Signal<String, Never>
public let showWebHelp: Signal<HelpType, Never>
public let validateCheckoutSuccess: Signal<String, Never>
public let validateCheckoutExistingCardSuccess: Signal<String, Never>

public var inputs: PostCampaignCheckoutViewModelInputs { return self }
public var outputs: PostCampaignCheckoutViewModelOutputs { return self }
Expand Down

0 comments on commit da13cfc

Please sign in to comment.