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

Data from TokenListController gets cleared when the service worker restarts (#16109)

This commit is contained in:
Niranjana Binoy 2022-10-11 10:21:31 -04:00 committed by GitHub
parent b34d24937d
commit d4c39006a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -250,7 +250,9 @@ export default class MetamaskController extends EventEmitter {
this.tokenListController = new TokenListController({
chainId: hexToDecimal(this.networkController.getCurrentChainId()),
preventPollingOnNetworkRestart: true,
preventPollingOnNetworkRestart: initState.TokenListController
? initState.TokenListController.preventPollingOnNetworkRestart
: true,
onNetworkStateChange: (cb) => {
this.networkController.store.subscribe((networkState) => {
const modifiedNetworkState = {