|
|
@ -11,6 +11,7 @@ import UIKit |
|
|
|
class SendMoneyCodeWireframe { |
|
|
|
weak var view: UIViewController! |
|
|
|
var completion: ((String) -> ())? |
|
|
|
var request: SendMoneyRequestModel? |
|
|
|
} |
|
|
|
|
|
|
|
extension SendMoneyCodeWireframe: SendMoneyCodeWireframeInput { |
|
|
@ -19,7 +20,7 @@ extension SendMoneyCodeWireframe: SendMoneyCodeWireframeInput { |
|
|
|
|
|
|
|
func getMainView() -> UIViewController { |
|
|
|
let service = SendMoneyCodeService() |
|
|
|
let interactor = SendMoneyCodeInteractor(service: service) |
|
|
|
let interactor = SendMoneyCodeInteractor(service: service, request: self.request) |
|
|
|
let presenter = SendMoneyCodePresenter() |
|
|
|
let viewController = viewControllerFromStoryboard(of: SendMoneyCodeViewController.self) |
|
|
|
viewController.completion = self.completion |
|
|
@ -33,8 +34,9 @@ extension SendMoneyCodeWireframe: SendMoneyCodeWireframeInput { |
|
|
|
return viewController |
|
|
|
} |
|
|
|
|
|
|
|
func open(completion: @escaping (String) -> (), source: UIViewController) { |
|
|
|
func open(requestmodel: SendMoneyRequestModel?, completion: @escaping (String) -> (), source: UIViewController) { |
|
|
|
self.completion = completion |
|
|
|
self.request = requestmodel |
|
|
|
self.openMainView(source: source) |
|
|
|
} |
|
|
|
} |