1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

fix issue with network state shape expected in NftDetectionController (#17283)

This commit is contained in:
Brad Decker 2023-01-19 08:17:47 -06:00 committed by GitHub
parent 9a8bb81358
commit e830176fc8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -395,9 +395,17 @@ export default class MetamaskController extends EventEmitter {
this.preferencesController.store.subscribe.bind(
this.preferencesController.store,
),
onNetworkStateChange: this.networkController.store.subscribe.bind(
this.networkController.store,
),
onNetworkStateChange: (cb) =>
this.networkController.store.subscribe((networkState) => {
const modifiedNetworkState = {
...networkState,
providerConfig: {
...networkState.provider,
chainId: hexToDecimal(networkState.provider.chainId),
},
};
return cb(modifiedNetworkState);
}),
getOpenSeaApiKey: () => this.nftController.openSeaApiKey,
getBalancesInSingleCall:
this.assetsContractController.getBalancesInSingleCall.bind(