Skip to content

Commit b239cef

Browse files
committed
fix(settings): ensure change-password success/error toasts auto-hide via hasNoTimeout=false
1 parent aba1b70 commit b239cef

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

ui/components/app/change-password/change-password.tsx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ import {
1818
FontWeight,
1919
toast,
2020
} from '@metamask/design-system-react';
21+
import React, {
22+
useCallback,
23+
useContext,
24+
useEffect,
25+
useRef,
26+
useState,
27+
} from 'react';
2128
import {
2229
FormTextField,
2330
FormTextFieldSize,
@@ -74,13 +81,6 @@ import { useBoolean } from '../../../hooks/useBoolean';
7481
import { SECOND } from '../../../../shared/constants/time';
7582
import PasskeyTroubleshootModal from '../passkey-troubleshoot-modal';
7683
import ChangePasswordWarning from './change-password-warning';
77-
import React, {
78-
useCallback,
79-
useContext,
80-
useEffect,
81-
useRef,
82-
useState,
83-
} from 'react';
8484

8585
const ChangePasswordSteps = {
8686
VerifyCurrentPassword: 1,
@@ -304,13 +304,15 @@ const ChangePassword = ({
304304
toast({
305305
severity: 'success',
306306
title: toastTitle,
307+
hasNoTimeout: false,
307308
});
308309
} catch (error) {
309310
console.error(error);
310311
setStep(ChangePasswordSteps.ChangePassword);
311312
toast({
312313
severity: 'danger',
313314
title: t('securityChangePasswordToastError'),
315+
hasNoTimeout: false,
314316
});
315317
}
316318
};

0 commit comments

Comments
 (0)