diff --git a/src/components/App.tsx b/src/components/App.tsx index 6a4ffbe7..351867eb 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -140,6 +140,9 @@ function _App() { } const handlePinForeground = async () => { + // check if app has pw + const pw = await secureStore.get(SECURESTORE_KEY) + if (isNull(pw)) { return } // check if app is locked const now = Math.ceil(Date.now() / 1000) const lockData = await store.getObj(STORE_KEYS.lock) diff --git a/src/screens/Dashboard.tsx b/src/screens/Dashboard.tsx index 95da99b7..119313cf 100644 --- a/src/screens/Dashboard.tsx +++ b/src/screens/Dashboard.tsx @@ -29,7 +29,7 @@ import { claimToken, getMintsForPayment } from '@wallet' import { getTokenInfo } from '@wallet/proofs' import { useEffect, useState } from 'react' import { useTranslation } from 'react-i18next' -import { BackHandler, StyleSheet, TouchableOpacity, View } from 'react-native' +import { StyleSheet, TouchableOpacity, View } from 'react-native' export default function Dashboard({ navigation, route }: TDashboardPageProps) { const { t } = useTranslation([NS.common]) @@ -284,13 +284,6 @@ export default function Dashboard({ navigation, route }: TDashboardPageProps) { return focusHandler }, [navigation]) - // prevent back navigation - https://reactnavigation.org/docs/preventing-going-back/ - useEffect(() => { - const backHandler = () => BackHandler.exitApp() - navigation.addListener('beforeRemove', backHandler) - return () => navigation.removeListener('beforeRemove', backHandler) - }, [navigation]) - return ( {/* Balance, Disclaimer & History */}