1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 09:57:02 +01:00

Ensure state updates after accepting or rejecting a watched asset, to prevent navigation errors. (#14043)

This commit is contained in:
Dan J Miller 2022-03-24 13:56:38 -02:30 committed by Dan Miller
parent b0a9b83f6f
commit 07bcf1ca0a

View File

@ -1566,6 +1566,7 @@ export function rejectWatchAsset(suggestedAssetID) {
dispatch(showLoadingIndication());
try {
await promisifiedBackground.rejectWatchAsset(suggestedAssetID);
await forceUpdateMetamaskState(dispatch);
} catch (error) {
log.error(error);
dispatch(displayWarning(error.message));
@ -1582,6 +1583,7 @@ export function acceptWatchAsset(suggestedAssetID) {
dispatch(showLoadingIndication());
try {
await promisifiedBackground.acceptWatchAsset(suggestedAssetID);
await forceUpdateMetamaskState(dispatch);
} catch (error) {
log.error(error);
dispatch(displayWarning(error.message));