From af2a49c38421fe1f90695ab51529c7d87f7a3b8a Mon Sep 17 00:00:00 2001 From: gme_2 Date: Wed, 27 Mar 2019 09:50:10 +0900 Subject: [PATCH] added function to login auto after password view dismiss --- .../Login/User Interface/View/LoginViewController.swift | 5 ++++- .../Service/ResendExchangeServiceType.swift | 2 +- .../User Interface/View/ResendExchangeViewController.swift | 4 +++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/GMERemittance/Module/Login/User Interface/View/LoginViewController.swift b/GMERemittance/Module/Login/User Interface/View/LoginViewController.swift index d99b028b..a6fab388 100644 --- a/GMERemittance/Module/Login/User Interface/View/LoginViewController.swift +++ b/GMERemittance/Module/Login/User Interface/View/LoginViewController.swift @@ -290,13 +290,16 @@ extension LoginViewController: TransKeyViewDelegate { }else { self.encryptedPassword = qwertyCipherString self.passwordTextField.text = "password" + } } isShowQwerty = false isShowNumber = false isTranskeyShowing = false - targetView?.dismiss(animated: true, completion: nil) + targetView?.dismiss(animated: true, completion: { + self.login(UIButton()) + }) } func showQwertyTranskeyAction(){ diff --git a/GMERemittance/Module/ResendExchange/Application Logic/Service/ResendExchangeServiceType.swift b/GMERemittance/Module/ResendExchange/Application Logic/Service/ResendExchangeServiceType.swift index a7b8c12c..0f568893 100644 --- a/GMERemittance/Module/ResendExchange/Application Logic/Service/ResendExchangeServiceType.swift +++ b/GMERemittance/Module/ResendExchange/Application Logic/Service/ResendExchangeServiceType.swift @@ -23,7 +23,7 @@ extension FetchResendDetailService { let url = baseUrl + "/resend/detail" let params = ["tranId": transactionId] self.auth.request(method: .post, url: url, params: params, success: { (response: ResendDetailModelContainer) in - if (response.errorCode ?? "") == "1" { + if (response.errorCode ?? "") != "0" { let error = NSError.init(domain: "Network", code: 0, userInfo: [NSLocalizedDescriptionKey : response.message ?? ""]) failure(error) }else { diff --git a/GMERemittance/Module/ResendExchange/User Interface/View/ResendExchangeViewController.swift b/GMERemittance/Module/ResendExchange/User Interface/View/ResendExchangeViewController.swift index 166f65a3..fabdd95a 100644 --- a/GMERemittance/Module/ResendExchange/User Interface/View/ResendExchangeViewController.swift +++ b/GMERemittance/Module/ResendExchange/User Interface/View/ResendExchangeViewController.swift @@ -302,7 +302,9 @@ extension ResendExchangeViewController: ResendExchangeViewInterface { } func show(error: String) { - self.alert(message: error) + self.alert(message: error, title: nil) { + self.navigationController?.popViewController(animated: true) + } } func showLoading() {