From c051e94b6e3e7a551f8757ff4c4895896ef0c5b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Espino=20Garc=C3=ADa?= Date: Thu, 25 Aug 2022 15:46:02 +0200 Subject: [PATCH] Fix MFA when introducing wrong token or having no teams (#6599) --- app/screens/mfa/index.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/screens/mfa/index.tsx b/app/screens/mfa/index.tsx index 512ac91e6..21f32d42e 100644 --- a/app/screens/mfa/index.tsx +++ b/app/screens/mfa/index.tsx @@ -19,8 +19,8 @@ import {Screens} from '@constants'; import {useIsTablet} from '@hooks/device'; import {t} from '@i18n'; import Background from '@screens/background'; +import {resetToTeams} from '@screens/navigation'; import {buttonBackgroundStyle, buttonTextStyle} from '@utils/buttonStyles'; -import {logInfo} from '@utils/log'; import {preventDoubleTap} from '@utils/tap'; import {changeOpacity, makeStyleSheetFromTheme} from '@utils/theme'; import {typography} from '@utils/typography'; @@ -151,9 +151,10 @@ const MFA = ({config, goToHome, license, loginId, password, serverDisplayName, s } setError(result.error.message); + return; } if (!result.hasTeams && !result.error) { - logInfo('GO TO NO TEAMS'); + resetToTeams(); return; } goToHome(result.time || 0, result.error as never);