Skip to content

Commit

Permalink
fix(fxa-settings): Resolve recovery key confirm pwd button disabled
Browse files Browse the repository at this point in the history
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
  • Loading branch information
vpomerleau authored and julianpoy committed Jul 31, 2023
1 parent aee571a commit 254b5a8
Showing 1 changed file with 1 addition and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,6 @@ export const FlowRecoveryKeyConfirmPwd = ({
const [bannerText, setBannerText] = useState<string>();
const [isLoading, setIsLoading] = useState(false);
const [actionType, setActionType] = useState<RecoveryKeyAction>();
const mounted = useRef(true);

useEffect(() => {
return () => {
mounted.current = false;
};
});

useEffect(() => {
if (account.recoveryKey === true) {
Expand Down Expand Up @@ -115,10 +108,7 @@ export const FlowRecoveryKeyConfirmPwd = ({
setBannerText(localizedError);
}
logViewEvent(`flow.${viewName}`, 'confirm-password.fail');
} finally {
if (mounted.current) {
setIsLoading(false);
}
setIsLoading(false);
}
}, [
account,
Expand Down

0 comments on commit 254b5a8

Please sign in to comment.