1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 19:26:13 +02:00

Changing Use Token detection to OFF by default (#12129)

This commit is contained in:
Niranjana Binoy 2021-09-16 13:07:23 -04:00 committed by GitHub
parent 792f9efa56
commit 66c3414433
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -35,7 +35,7 @@ export default class PreferencesController {
// set to true means the dynamic list from the API is being used
// set to false will be using the static list from contract-metadata
useTokenDetection: true,
useTokenDetection: false,
// WARNING: Do not use feature flags for security-sensitive things.
// Feature flag toggling is available in the global namespace

View File

@ -249,20 +249,20 @@ describe('preferences controller', function () {
});
});
describe('setUseTokenDetection', function () {
it('should default to true', function () {
it('should default to false', function () {
const state = preferencesController.store.getState();
assert.equal(state.useTokenDetection, true);
assert.equal(state.useTokenDetection, false);
});
it('should set the useTokenDetection property in state', function () {
assert.equal(
preferencesController.store.getState().useTokenDetection,
true,
false,
);
preferencesController.setUseTokenDetection(false);
preferencesController.setUseTokenDetection(true);
assert.equal(
preferencesController.store.getState().useTokenDetection,
false,
true,
);
});
});