fix: audit
This commit is contained in:
parent
9f8aad114c
commit
b91b81f5c9
21 changed files with 140 additions and 53 deletions
|
@ -39,6 +39,12 @@ const providerMiddleware = async ({ store }) => {
|
|||
const chainId = hexToNumber(await provider.request({ method: 'eth_chainId' }))
|
||||
|
||||
await checkProvider({ store, accounts, chainId, providerName })
|
||||
} else {
|
||||
const storedNetId = window.localStorage.getItem('netId')
|
||||
|
||||
if (networkConfig[`netId${storedNetId}`]) {
|
||||
await store.dispatch('metamask/onNetworkChanged', { netId: Number(storedNetId) })
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
console.error(`Provider container has error: ${err.message}`)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue