From 07bcf1ca0a77bdc154b59bbaa643162467c228ec Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Thu, 24 Mar 2022 13:56:38 -0230 Subject: [PATCH] Ensure state updates after accepting or rejecting a watched asset, to prevent navigation errors. (#14043) --- ui/store/actions.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ui/store/actions.js b/ui/store/actions.js index 6461f29da..a0e104c7e 100644 --- a/ui/store/actions.js +++ b/ui/store/actions.js @@ -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));