Commit ad7b647d authored by Noah Zinsmeister's avatar Noah Zinsmeister

clear stale network error

parent 70e9257c
......@@ -173,7 +173,11 @@ export default function Web3Status() {
// if calling enable won't pop an approve modal, then try to activate injected...
library.listAccounts().then(accounts => {
if (accounts.length >= 1) {
setConnector('Injected', { suppressAndThrowErrors: true }).catch(error => {
setConnector('Injected', { suppressAndThrowErrors: true })
.then(() => {
setError()
})
.catch(error => {
// ...and if the error is that they're on the wrong network, display it, otherwise eat it
if (error.code === Connector.errorCodes.UNSUPPORTED_NETWORK) {
setError(error)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment