|
|
@ -119,15 +119,21 @@ class ResendExchangeViewController: UIViewController { |
|
|
|
override func viewDidLoad() { |
|
|
|
super.viewDidLoad() |
|
|
|
self.setup() |
|
|
|
fetchInfo() |
|
|
|
} |
|
|
|
|
|
|
|
override func viewWillAppear(_ animated: Bool) { |
|
|
|
super.viewWillAppear(animated) |
|
|
|
self.navigationItem.title = "resend_text".localized() |
|
|
|
configureViews() |
|
|
|
fetchInfo() |
|
|
|
self.action = ActionBehaviour.calculate |
|
|
|
} |
|
|
|
|
|
|
|
override func viewWillDisappear(_ animated: Bool) { |
|
|
|
super.viewWillDisappear(animated) |
|
|
|
self.navigationItem.title = "" |
|
|
|
} |
|
|
|
|
|
|
|
// MARK: IBActions |
|
|
|
@IBAction func continueButton(_ sender: UIButton) { |
|
|
|
self.view.endEditing(true) |
|
|
@ -209,10 +215,13 @@ class ResendExchangeViewController: UIViewController { |
|
|
|
|
|
|
|
private func fetchInfo() { |
|
|
|
guard let transactionId = self.transactionId else {return} |
|
|
|
self.showLoading() |
|
|
|
self.fetch(transactionId: transactionId, success: { (model) in |
|
|
|
self.hideLoading() |
|
|
|
self.resendInfoModel = model |
|
|
|
self.calculateExchangeRate(senderAmount: self.senderTextField.text!, reciepientAmount: self.reciepientTextField.text!, calcBy: self.calcBy) |
|
|
|
}) { (error) in |
|
|
|
self.hideLoading() |
|
|
|
self.alert(message: error.localizedDescription) |
|
|
|
} |
|
|
|
} |
|
|
|