Merge pull request #2017 from MyCryptoHQ/fix-metamask-poll-again
Check for `web3` before polling network status for MetaMask
This commit is contained in:
commit
012a89bd62
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue