Password verification bug fix
This commit is contained in:
@@ -3,8 +3,10 @@ import { openDb } from '../../../db'
|
|||||||
import { shared } from '../../../i18n/en/labels'
|
import { shared } from '../../../i18n/en/labels'
|
||||||
|
|
||||||
export default async function checkPassword({hash, onCancel, onTryAgain }) {
|
export default async function checkPassword({hash, onCancel, onTryAgain }) {
|
||||||
const connected = await openDb(hash)
|
try {
|
||||||
if (connected) return true
|
await openDb(hash)
|
||||||
|
return true
|
||||||
|
} catch (err) {
|
||||||
Alert.alert(
|
Alert.alert(
|
||||||
shared.incorrectPassword,
|
shared.incorrectPassword,
|
||||||
shared.incorrectPasswordMessage,
|
shared.incorrectPasswordMessage,
|
||||||
@@ -17,4 +19,5 @@ export default async function checkPassword({hash, onCancel, onTryAgain }) {
|
|||||||
}]
|
}]
|
||||||
)
|
)
|
||||||
return false
|
return false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user