Skip to content

Commit

Permalink
fix(GIniHealthSDK): Remove PaymentInfoViewProtocol after remove of cl…
Browse files Browse the repository at this point in the history
…ose icon

IPC-102
  • Loading branch information
razvancapra committed Mar 6, 2024
1 parent 602ed4f commit 36d24ce
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ public final class PaymentComponentsController: NSObject {
public weak var viewDelegate: PaymentComponentViewProtocol?
/// handling the Payment Bottom view delegate
public weak var bottomViewDelegate: PaymentProvidersBottomViewProtocol?
/// handling the Payment Info view delegate
public weak var infoViewDelegate: PaymentInfoViewProtocol?

private var giniHealth: GiniHealth
private var paymentProviders: PaymentProviders = []
Expand Down Expand Up @@ -224,7 +222,6 @@ public final class PaymentComponentsController: NSObject {
public func paymentInfoViewController() -> UIViewController {
let paymentInfoViewController = PaymentInfoViewController()
let paymentInfoViewModel = PaymentInfoViewModel(paymentProviders: paymentProviders)
paymentInfoViewModel.viewDelegate = self
paymentInfoViewController.viewModel = paymentInfoViewModel
return paymentInfoViewController
}
Expand Down Expand Up @@ -256,12 +253,6 @@ extension PaymentComponentsController: PaymentProvidersBottomViewProtocol {
}
}

extension PaymentComponentsController: PaymentInfoViewProtocol {
public func didTapOnCloseOnInfoView() {
infoViewDelegate?.didTapOnCloseOnInfoView()
}
}

extension PaymentComponentsController {
private enum Constants {
static let kDefaultPaymentProvider = "defaultPaymentProvider"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
import UIKit
import GiniHealthAPILibrary

public protocol PaymentInfoViewProtocol: AnyObject {
func didTapOnCloseOnInfoView()
}

struct QuestionSection {
let title: String
var description: NSAttributedString
Expand All @@ -20,7 +16,6 @@ struct QuestionSection {

final class PaymentInfoViewModel {

weak var viewDelegate: PaymentInfoViewProtocol?
var paymentProviders: PaymentProviders

let backgroundColor: UIColor = GiniColor(lightModeColor: UIColor.GiniHealthColors.dark7,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ final class InvoicesListViewModel {
self.paymentComponentsController = paymentComponentsController
self.paymentComponentsController.delegate = self
self.paymentComponentsController.bottomViewDelegate = self
self.paymentComponentsController.infoViewDelegate = self
}

func viewDidLoad() {
Expand Down Expand Up @@ -238,11 +237,3 @@ extension InvoicesListViewModel: GiniHealthTrackingDelegate {
}
}
}

extension InvoicesListViewModel: PaymentInfoViewProtocol {
func didTapOnCloseOnInfoView() {
DispatchQueue.main.async {
self.coordinator.invoicesListViewController.presentedViewController?.dismiss(animated: true)
}
}
}

0 comments on commit 36d24ce

Please sign in to comment.