From 4989f292ca63f032edade5ae70ff30d306912a7e Mon Sep 17 00:00:00 2001 From: Baptiste Grob <60621355+baptiste-grob@users.noreply.github.com> Date: Tue, 16 Feb 2021 19:02:42 +0100 Subject: [PATCH] fix: check return value of application.disableBiometrics() --- src/screens/Settings/Sections/PasscodeSection.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/screens/Settings/Sections/PasscodeSection.tsx b/src/screens/Settings/Sections/PasscodeSection.tsx index facf6fba..e17891db 100644 --- a/src/screens/Settings/Sections/PasscodeSection.tsx +++ b/src/screens/Settings/Sections/PasscodeSection.tsx @@ -174,8 +174,9 @@ export const PasscodeSection = (props: Props) => { }; const disableBiometrics = useCallback(async () => { - setHasBiometrics(false); - await application?.disableBiometrics(); + if (await application?.disableBiometrics()) { + setHasBiometrics(false); + } }, [application]); const disablePasscode = useCallback(async () => {