You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.2 KiB

  1. //
  2. // SendMoneyVerificationPresenter.swift
  3. // GMERemittance
  4. //
  5. // Created by gme_2 on 28/08/2018.
  6. //Copyright © 2018 Gobal Money Express Co. Ltd. All rights reserved.
  7. //
  8. import Foundation
  9. class SendMoneyVerificationPresenter {
  10. // MARK: Properties
  11. weak var view: SendMoneyVerificationViewInterface?
  12. var interactor: SendMoneyVerificationInteractorInput?
  13. var wireframe: SendMoneyVerificationWireframeInput?
  14. // MARK: Converting entities
  15. }
  16. // MARK: SendMoneyVerification module interface
  17. extension SendMoneyVerificationPresenter: SendMoneyVerificationModuleInterface {
  18. func submit(model: SendMoneyRequestModel, reciepient: Recipient) {
  19. self.view?.showLoading()
  20. self.interactor?.submit(model: model, reciepient: reciepient)
  21. }
  22. func openReciept(transactionId: String) {
  23. self.wireframe?.openReciept(transactionId: transactionId)
  24. }
  25. }
  26. // MARK: SendMoneyVerification interactor output interface
  27. extension SendMoneyVerificationPresenter: SendMoneyVerificationInteractorOutput {
  28. func show(error: Error) {
  29. self.view?.hideLoading()
  30. self.view?.show(error: error.localizedDescription)
  31. }
  32. func show(model: SendMoneySubmitModelContainer?) {
  33. self.view?.hideLoading()
  34. self.view?.show(model: model)
  35. }
  36. }