Prevent attempting ENS resolution on unsupported networks (#7378)

The check for whether the network is supported was performed in the
constructor, but it was accidentally omitted from the network change
handler.
feature/default_network_editable
Mark Stacey 5 years ago committed by GitHub
parent 42279c474b
commit 66187333b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      app/scripts/controllers/ens/index.js

@ -26,10 +26,14 @@ class EnsController {
this.store = new ObservableStore(initState)
networkStore.subscribe((network) => {
this.store.putState(initState)
if (Ens.getNetworkEnsSupport(network)) {
this._ens = new Ens({
network,
provider,
})
} else {
delete this._ens
}
})
}

Loading…
Cancel
Save