Added a preliminary check before polling

This commit is contained in:
Connor Bryan 2018-07-05 15:04:28 -05:00
parent e68e3ccc2f
commit eb9f651465

View File

@ -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;