diff --git a/app/scripts/controllers/preferences.js b/app/scripts/controllers/preferences.js index f63a883b6..4a503e7e6 100644 --- a/app/scripts/controllers/preferences.js +++ b/app/scripts/controllers/preferences.js @@ -143,13 +143,12 @@ export default class PreferencesController { /** * Setter for the `openSeaEnabled` property * - * @param {boolean} val - Whether or not the user prefers to use the OpenSea API for collectibles data. + * @param {boolean} openSeaEnabled - Whether or not the user prefers to use the OpenSea API for collectibles data. */ - setOpenSeaEnabled(val) { - this.store.updateState({ openSeaEnabled: val }); - if (!val) { - this.store.updateState({ useCollectibleDetection: false }); - } + setOpenSeaEnabled(openSeaEnabled) { + this.store.updateState({ + openSeaEnabled, + }); } /** diff --git a/ui/pages/settings/experimental-tab/experimental-tab.component.js b/ui/pages/settings/experimental-tab/experimental-tab.component.js index 1312af5cd..3d2b16fde 100644 --- a/ui/pages/settings/experimental-tab/experimental-tab.component.js +++ b/ui/pages/settings/experimental-tab/experimental-tab.component.js @@ -133,10 +133,11 @@ export default class ExperimentalTab extends PureComponent { name: 'Enabled/Disable OpenSea', }, }); - setOpenSeaEnabled(!value); - if (value && !useCollectibleDetection) { - setUseCollectibleDetection(true); + // value is positive when being toggled off + if (value && useCollectibleDetection) { + setUseCollectibleDetection(false); } + setOpenSeaEnabled(!value); }} offLabel={t('off')} onLabel={t('on')}