mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Use NETWORK_EVENTS.NETWORK_DID_CHANGE to trigger network change callback in assetsContractController (#16760)
This commit is contained in:
parent
91b635b195
commit
e52fd71b1b
@ -299,7 +299,8 @@ export default class MetamaskController extends EventEmitter {
|
|||||||
onPreferencesStateChange: (listener) =>
|
onPreferencesStateChange: (listener) =>
|
||||||
this.preferencesController.store.subscribe(listener),
|
this.preferencesController.store.subscribe(listener),
|
||||||
onNetworkStateChange: (cb) =>
|
onNetworkStateChange: (cb) =>
|
||||||
this.networkController.store.subscribe((networkState) => {
|
this.networkController.on(NETWORK_EVENTS.NETWORK_DID_CHANGE, () => {
|
||||||
|
const networkState = this.networkController.store.getState();
|
||||||
const modifiedNetworkState = {
|
const modifiedNetworkState = {
|
||||||
...networkState,
|
...networkState,
|
||||||
provider: {
|
provider: {
|
||||||
|
Loading…
Reference in New Issue
Block a user