mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Ensure state updates after accepting or rejecting a watched asset, to prevent navigation errors. (#14043)
This commit is contained in:
parent
b0a9b83f6f
commit
07bcf1ca0a
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user