From 254b5a8288a038fcb02f2eb97cd42a162547e01a Mon Sep 17 00:00:00 2001 From: Valerie Pomerleau Date: Fri, 28 Jul 2023 13:11:55 -0700 Subject: [PATCH] fix(fxa-settings): Resolve recovery key confirm pwd button disabled Because: * In the new account recovery key creation flow, the confirm password CTA would remain disabled after an incorrect password was entered and the user retypes in the input, making it impossible to correct the password and retry This commit: * Enable the button when the password confirmation fails and an error message is displayed Closes #FXA-8092 --- .../Settings/FlowRecoveryKeyConfirmPwd/index.tsx | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/packages/fxa-settings/src/components/Settings/FlowRecoveryKeyConfirmPwd/index.tsx b/packages/fxa-settings/src/components/Settings/FlowRecoveryKeyConfirmPwd/index.tsx index de5ab13b73f..fcfb9ee4569 100644 --- a/packages/fxa-settings/src/components/Settings/FlowRecoveryKeyConfirmPwd/index.tsx +++ b/packages/fxa-settings/src/components/Settings/FlowRecoveryKeyConfirmPwd/index.tsx @@ -50,13 +50,6 @@ export const FlowRecoveryKeyConfirmPwd = ({ const [bannerText, setBannerText] = useState(); const [isLoading, setIsLoading] = useState(false); const [actionType, setActionType] = useState(); - const mounted = useRef(true); - - useEffect(() => { - return () => { - mounted.current = false; - }; - }); useEffect(() => { if (account.recoveryKey === true) { @@ -115,10 +108,7 @@ export const FlowRecoveryKeyConfirmPwd = ({ setBannerText(localizedError); } logViewEvent(`flow.${viewName}`, 'confirm-password.fail'); - } finally { - if (mounted.current) { - setIsLoading(false); - } + setIsLoading(false); } }, [ account,