mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
fix opensea/autodetect setting dependency relation (#13575)
This commit is contained in:
parent
7148607906
commit
7223d4cd2c
@ -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,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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')}
|
||||
|
Loading…
Reference in New Issue
Block a user