diff --git a/CHANGELOG.md b/CHANGELOG.md index 72ce2f9765..05ab35aaab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - [#3464](https://github.com/poanetwork/blockscout/pull/3464) - Fix display of token transfers list at token page (fix unique identifier of a tile) ### Chore +- [#3468](https://github.com/poanetwork/blockscout/pull/3468) - Do not check supported networks on application loading page - [#3467](https://github.com/poanetwork/blockscout/pull/3467) - NodeJS engine upgrade up to 14 - [#3460](https://github.com/poanetwork/blockscout/pull/3460) - Update Staking DApp scripts due to MetaMask breaking changes diff --git a/apps/block_scout_web/assets/js/pages/stakes.js b/apps/block_scout_web/assets/js/pages/stakes.js index 83d504287a..1f231f8562 100644 --- a/apps/block_scout_web/assets/js/pages/stakes.js +++ b/apps/block_scout_web/assets/js/pages/stakes.js @@ -341,7 +341,7 @@ function initialize (store) { window.ethereum.on('chainChanged', async (chainId) => { const newNetId = web3.utils.isHex(chainId) ? web3.utils.hexToNumber(chainId) : chainId - setNetwork(newNetId, store) + setNetwork(newNetId, store, true) }) window.ethereum.on('accountsChanged', async (accs) => { @@ -363,7 +363,7 @@ async function initNetworkAndAccount (store, web3) { const networkId = await getNetId(web3) if (!state.network || (networkId !== state.network.id)) { - setNetwork(networkId, store) + setNetwork(networkId, store, false) } const accounts = await getAccounts() @@ -462,7 +462,7 @@ function setAccount (account, store) { }) } -function setNetwork (networkId, store) { +function setNetwork (networkId, store, checkSupportedNetwork) { hideCurrentModal() const network = { @@ -476,7 +476,9 @@ function setNetwork (networkId, store) { store.dispatch({ type: 'NETWORK_UPDATED', network }) - isSupportedNetwork(store) + if (checkSupportedNetwork) { + isSupportedNetwork(store) + } } function updateFilters (store, filterType) {