Skip to content

Commit

Permalink
move token detection enable to post onboarding
Browse files Browse the repository at this point in the history
  • Loading branch information
bergeron committed Apr 1, 2024
1 parent a9fd10e commit f402e0f
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions app/scripts/metamask-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -2223,6 +2223,7 @@ export default class MetamaskController extends EventEmitter {
}
if (this.preferencesController.store.getState().useTokenDetection) {
this.tokenListController.start();
this.tokenDetectionController.enable();
}
}

Expand All @@ -2235,6 +2236,7 @@ export default class MetamaskController extends EventEmitter {
if (this.preferencesController.store.getState().useTokenDetection) {
this.tokenListController.stop();
this.tokenRatesController.stop();
this.tokenDetectionController.disable();
}
}

Expand Down Expand Up @@ -5637,11 +5639,6 @@ export default class MetamaskController extends EventEmitter {
*/
set isClientOpen(open) {
this._isClientOpen = open;
if (open) {
this.tokenDetectionController.enable();
} else {
this.tokenDetectionController.disable();
}
}
/* eslint-enable accessor-pairs */

Expand Down

0 comments on commit f402e0f

Please sign in to comment.