@ethereansos/interfaces-core 0.4.113 → 0.4.116

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.esm.js CHANGED
@@ -48911,12 +48911,13 @@ var Web3ContextInitializer = function Web3ContextInitializer(_ref) {
48911
48911
  intervalId && clearInterval(intervalId);
48912
48912
  tryUpdateBlock(wallet === null || wallet === void 0 ? void 0 : wallet.ethereum, block, setBlock, true);
48913
48913
  tryUpdateBlock(dualProvider, dualBlock, setDualBlock, true);
48914
- wallet && wallet.ethereum && setIntervalId(setInterval(function () {
48915
- return tryUpdateBlock(wallet.ethereum, block, setBlock);
48916
- }, realBlockIntervalTimeout));
48917
- dualProvider && setIntervalId(setInterval(function () {
48918
- return tryUpdateBlock(dualProvider, dualBlock, setDualBlock);
48919
- }, realBlockIntervalTimeout));
48914
+
48915
+ if (wallet && wallet.ethereum || dualProvider) {
48916
+ setIntervalId(setInterval(function () {
48917
+ wallet && wallet.ethereum && tryUpdateBlock(wallet.ethereum, block, setBlock);
48918
+ dualProvider && tryUpdateBlock(dualProvider, dualBlock, setDualBlock);
48919
+ }, realBlockIntervalTimeout));
48920
+ }
48920
48921
  }, [wallet, dualProvider, realBlockIntervalTimeout, intervalId]);
48921
48922
  useEffect(resetBlockInterval, [realBlockInterval, realBlockIntervalTimeout, wallet && wallet.ethereum, dualProvider]);
48922
48923
  useEffect(function () {