diff --git a/common/features/store.ts b/common/features/store.ts index 359378fa..b41f0784 100644 --- a/common/features/store.ts +++ b/common/features/store.ts @@ -91,6 +91,9 @@ window.addEventListener('load', () => { }); }); -setInterval(handleMetaMaskPolling.bind(null, store), METAMASK_POLLING_INTERVAL); +/** @desc When MetaMask is loaded as an extension, watch for network changes. */ +if ((window as any).web3) { + setInterval(handleMetaMaskPolling.bind(null, store), METAMASK_POLLING_INTERVAL); +} export default store; diff --git a/common/index.html b/common/index.html index cac71d94..816d698f 100644 --- a/common/index.html +++ b/common/index.html @@ -4,6 +4,7 @@