diff --git a/ComApp/src/App/Controllers/LoginController.js b/ComApp/src/App/Controllers/LoginController.js index 5f3b248..c42c228 100644 --- a/ComApp/src/App/Controllers/LoginController.js +++ b/ComApp/src/App/Controllers/LoginController.js @@ -4,8 +4,8 @@ import { Setting } from '../../Database'; import { verify } from 'react-native-b-crypt-bridge'; class LoginController { - verify(user, password) { - return verify(password, user.password); + async verify(user, password) { + return await verify(password, user.password); } login(user) { diff --git a/ComApp/src/App/Views/LoginScreen.js b/ComApp/src/App/Views/LoginScreen.js index 49fec96..6d8b18f 100644 --- a/ComApp/src/App/Views/LoginScreen.js +++ b/ComApp/src/App/Views/LoginScreen.js @@ -122,9 +122,7 @@ class LoginScreen extends React.Component { Alert.alert(i18n.t('error.error'), i18n.t('error.incorrect_credentials')); return; } - const verified = LoginController.verify(user, password).then( - verified => verified, - ); + const verified = await LoginController.verify(user, password); if (!verified) { Alert.alert(i18n.t('error.error'), i18n.t('error.incorrect_credentials')); return;