mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Document displayWarning
as deprecated (#17465)
The `displayWarning` action creator will show the error in various different places in the UI. This is confusing for users, we should stop doing this. Instead we can consider each error case separately. If there is a scenario where it's appropriate to tell a user about an error, we should build that case into the relevant UI and use localized error messages.
This commit is contained in:
parent
e58800952c
commit
55d8ec0572
@ -2358,6 +2358,16 @@ export function hideLoadingIndication() {
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* An action creator for display a warning to the user in various places in the
|
||||
* UI. It will not be cleared until a new warning replaces it or `hideWarning`
|
||||
* is called.
|
||||
*
|
||||
* @deprecated This way of displaying a warning is confusing for users and
|
||||
* should no longer be used.
|
||||
* @param {string} text - The warning text to show.
|
||||
* @returns The action to display the warning.
|
||||
*/
|
||||
export function displayWarning(text) {
|
||||
return {
|
||||
type: actionConstants.DISPLAY_WARNING,
|
||||
|
Loading…
Reference in New Issue
Block a user