Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions app/containers/Passcode/PasscodeEnter.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,13 @@ const PasscodeEnter = ({ theme, hasBiometry, finishProcess }) => {

const biometry = async() => {
if (hasBiometry && status === TYPE.ENTER) {
const result = await biometryAuth();
if (result?.success) {
finishProcess();
try {
const result = await biometryAuth();
if (result?.success) {
finishProcess();
}
} catch {
// Do nothing
}
}
};
Expand Down
14 changes: 7 additions & 7 deletions app/utils/localAuthentication.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,16 @@ export const biometryAuth = force => LocalAuthentication.authenticateAsync({
const checkBiometry = async(serverRecord) => {
const serversDB = database.servers;

const result = await biometryAuth(true);
await serversDB.action(async() => {
try {
try {
const result = await biometryAuth(true);
await serversDB.action(async() => {
await serverRecord.update((record) => {
record.biometry = !!result?.success;
});
} catch {
// Do nothing
}
});
});
} catch {
// Do nothing
}
};

export const checkHasPasscode = async({ force = true, serverRecord }) => {
Expand Down