Only throw unexpected errors from openDb
This commit is contained in:
@@ -3,10 +3,8 @@ import { openDb } from '../../../db'
|
||||
import { shared } from '../../labels'
|
||||
|
||||
export default async function checkPassword({hash, onCancel, onTryAgain }) {
|
||||
try {
|
||||
await openDb({ hash, persistConnection: false })
|
||||
return true
|
||||
} catch (err) {
|
||||
const connected = await openDb({ hash, persistConnection: false })
|
||||
if (!connected) {
|
||||
Alert.alert(
|
||||
shared.incorrectPassword,
|
||||
shared.incorrectPasswordMessage,
|
||||
|
||||
Reference in New Issue
Block a user