Skip to content

Commit

Permalink
fix basic functionality toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
joaoloureirop committed Nov 27, 2024
1 parent ebc940e commit 8014b45
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app/core/Engine/Engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,8 @@ export class Engine {
this.controllerMessenger = new ExtendedControllerMessenger();

// Basic Functionality toggle defaults to true
const isBasicFunctionalityEnabled = store.getState().settings?.basicFunctionalityEnabled ?? true;
const getBasicFunctionalityToggleState = () =>
store.getState().settings?.basicFunctionalityEnabled ?? true;

const approvalController = new ApprovalController({
messenger: this.controllerMessenger.getRestricted({
Expand Down Expand Up @@ -487,7 +488,7 @@ export class Engine {
initialState,
controllerMessenger: this.controllerMessenger,
fetchFunction,
disabled: !isBasicFunctionalityEnabled
disabled: getBasicFunctionalityToggleState() === false
});

const phishingController = new PhishingController({
Expand Down Expand Up @@ -945,7 +946,7 @@ export class Engine {
encryptor,
getMnemonic: getPrimaryKeyringMnemonic.bind(this),
getFeatureFlags: () => ({
disableSnaps: !isBasicFunctionalityEnabled,
disableSnaps: getBasicFunctionalityToggleState() === false,
}),
});

Expand Down

0 comments on commit 8014b45

Please sign in to comment.