diff --git a/app/scripts/controllers/detect-tokens.js b/app/scripts/controllers/detect-tokens.js index 34dc58aaf715..203541df338f 100644 --- a/app/scripts/controllers/detect-tokens.js +++ b/app/scripts/controllers/detect-tokens.js @@ -65,12 +65,7 @@ export default class DetectTokensController extends StaticIntervalPollingControl this.useTokenDetection = this.preferences?.store.getState().useTokenDetection; this.selectedAddress = getCurrentSelectedAccount().address; - this.tokenAddresses = this.tokensController?.state.tokens.map((token) => { - return token.address; - }); this.setIntervalLength(interval); - this.hiddenTokens = this.tokensController?.state.ignoredTokens; - this.detectedTokens = this.tokensController?.state.detectedTokens; this.chainId = this.getChainIdFromNetworkStore(); this._trackMetaMetricsEvent = trackMetaMetricsEvent; @@ -101,15 +96,6 @@ export default class DetectTokensController extends StaticIntervalPollingControl } }); - tokensController?.subscribe( - ({ tokens = [], ignoredTokens = [], detectedTokens = [] }) => { - this.tokenAddresses = tokens.map((token) => { - return token.address; - }); - this.hiddenTokens = ignoredTokens; - this.detectedTokens = detectedTokens; - }, - ); messenger.subscribe('NetworkController:stateChange', () => { if (this.chainId !== this.getChainIdFromNetworkStore()) { const chainId = this.getChainIdFromNetworkStore();