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

[NO TICKET] Create Checkout Fails When Pledging With No Reward #1988

Merged
merged 1 commit into from
Mar 20, 2024
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ final class PostCampaignPledgeRewardsSummaryViewController: UIViewController {

self.configureSubviews()
self.setupConstraints()
setEntireViewToIsHidden(true)
self.setEntireViewToIsHidden(true)

self.viewModel.inputs.viewDidLoad()
}
Expand Down Expand Up @@ -165,8 +165,9 @@ final class PostCampaignPledgeRewardsSummaryViewController: UIViewController {
|> \.backgroundColor .~ .ksr_support_200
|> \.translatesAutoresizingMaskIntoConstraints .~ false
}

// MARK: - Helpers

private func setEntireViewToIsHidden(_ isHidden: Bool) {
self.view.isHidden = isHidden
self.pledgeTotalViewController.view.isHidden = isHidden
Expand Down
2 changes: 1 addition & 1 deletion Library/ViewModels/ConfirmDetailsViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ public class ConfirmDetailsViewModel: ConfirmDetailsViewModelType, ConfirmDetail
let createCheckoutEvents = pledgeDetailsData
.takeWhen(self.continueCTATappedProperty.signal)
.map { project, rewards, pledgeTotal, refTag in
let rewardsIDs = rewards.map { $0.graphID }
let rewardsIDs = rewards.first?.isNoReward == true ? [] : rewards.map { $0.graphID }

return CreateCheckoutInput(
projectId: project.graphID,
Expand Down