diff --git a/GMERemittance/AppDelegate.swift b/GMERemittance/AppDelegate.swift index f7fb7949..2a342482 100644 --- a/GMERemittance/AppDelegate.swift +++ b/GMERemittance/AppDelegate.swift @@ -46,7 +46,7 @@ import IQKeyboardManagerSwift import LGSideMenuController import Localize_Swift -let server: Server = .stagging +let server: Server = .uat var overlayView: UIView? @UIApplicationMain @@ -133,11 +133,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD } else { // go to splashscreen - KeyChain.shared.remove(key: .password) - - let splashWireframe = SplashScreenWireframe() - let nav = UINavigationController.init(rootViewController: splashWireframe.getMainView()) - self.window?.rootViewController = nav + self.goSplashScreen() } } @@ -275,13 +271,20 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD }) { (error) in if error.localizedDescription == "The username/password do not match." { - KeyChain.shared.remove(key: .password) - UserDefaults.standard.set(false, forKey: UserKeys.isUseBiometricAuth) + self.goSplashScreen() } self.window?.rootViewController?.alert(message: error.localizedDescription) } } + + private func goSplashScreen() { + KeyChain.shared.remove(key: .password) + + let splashWireframe = SplashScreenWireframe() + let nav = UINavigationController.init(rootViewController: splashWireframe.getMainView()) + self.window?.rootViewController = nav + } }