mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
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.
This commit is contained in:
parent
42279c474b
commit
66187333b1
@ -26,10 +26,14 @@ class EnsController {
|
||||
this.store = new ObservableStore(initState)
|
||||
networkStore.subscribe((network) => {
|
||||
this.store.putState(initState)
|
||||
this._ens = new Ens({
|
||||
network,
|
||||
provider,
|
||||
})
|
||||
if (Ens.getNetworkEnsSupport(network)) {
|
||||
this._ens = new Ens({
|
||||
network,
|
||||
provider,
|
||||
})
|
||||
} else {
|
||||
delete this._ens
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user