From b89f3775f5bbc3f556bcf163f14d4150661f9f13 Mon Sep 17 00:00:00 2001 From: Thomas Wallner Date: Tue, 8 Nov 2022 11:48:40 +0100 Subject: [PATCH] refactor(interaction): adding check if app is locked to interaction navigation --- src/screens/Modals/Interaction/index.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/screens/Modals/Interaction/index.tsx b/src/screens/Modals/Interaction/index.tsx index c509de32e..4021e3b77 100644 --- a/src/screens/Modals/Interaction/index.tsx +++ b/src/screens/Modals/Interaction/index.tsx @@ -13,6 +13,7 @@ import { } from '~/utils/screenSettings' import ServiceRedirect from './ServiceRedirect' import eID from './eID' +import { getIsAppLocked } from '~/modules/account/selectors' export type InteractionStackParamList = { [ScreenNames.Scanner]: undefined @@ -35,12 +36,13 @@ const InteractionStack = createStackNavigator() const Interaction: React.FC = () => { const isInteracting = useSelector(getInteractionType) const navigation = useNavigation() + const isAppLocked = useSelector(getIsAppLocked) useEffect(() => { - if (isInteracting) { + if (isInteracting && !isAppLocked) { navigation.navigate(ScreenNames.InteractionFlow) } - }, [isInteracting]) + }, [isInteracting, isAppLocked]) return (