Merge pull request #3468 from poanetwork/vb-staking-check-supported-chain

Do not check supported networks on application loading page
pull/3469/head
Victor Baranov 4 years ago committed by GitHub
commit 7cca74472e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      CHANGELOG.md
  2. 10
      apps/block_scout_web/assets/js/pages/stakes.js

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

@ -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) {

Loading…
Cancel
Save