Skip to content

Commit

Permalink
Remove Request Queueing Setting
Browse files Browse the repository at this point in the history
  • Loading branch information
darkwing committed Oct 16, 2024
1 parent 42e5eab commit 5ebd336
Show file tree
Hide file tree
Showing 62 changed files with 50 additions and 395 deletions.
12 changes: 0 additions & 12 deletions app/_locales/de/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions app/_locales/el/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions app/_locales/en/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions app/_locales/es/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions app/_locales/fr/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions app/_locales/hi/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions app/_locales/id/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions app/_locales/ja/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions app/_locales/ko/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions app/_locales/pt/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions app/_locales/ru/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions app/_locales/tl/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions app/_locales/tr/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions app/_locales/vi/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions app/_locales/zh_CN/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 3 additions & 7 deletions app/scripts/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -1057,14 +1057,10 @@ export function setupController(

function getPendingApprovalCount() {
try {
let pendingApprovalCount =
const pendingApprovalCount =
controller.appStateController.waitingForUnlock.length +
controller.approvalController.getTotalApprovalCount();

if (controller.preferencesController.getUseRequestQueue()) {
pendingApprovalCount +=
controller.queuedRequestController.state.queuedRequestCount;
}
controller.approvalController.getTotalApprovalCount() +
controller.queuedRequestController.state.queuedRequestCount;
return pendingApprovalCount;
} catch (error) {
console.error('Failed to get pending approval count:', error);
Expand Down
1 change: 0 additions & 1 deletion app/scripts/constants/sentry-state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@ export const SENTRY_BACKGROUND_STATE = {
useNonceField: true,
usePhishDetect: true,
useTokenDetection: true,
useRequestQueue: true,
useTransactionSimulations: true,
enableMV3TimestampSave: true,
},
Expand Down
13 changes: 0 additions & 13 deletions app/scripts/controllers/preferences-controller.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -640,19 +640,6 @@ describe('preferences controller', () => {
});
});

describe('useRequestQueue', () => {
it('defaults useRequestQueue to true', () => {
const { controller } = setupController({});
expect(controller.state.useRequestQueue).toStrictEqual(true);
});

it('setUseRequestQueue to false', () => {
const { controller } = setupController({});
controller.setUseRequestQueue(false);
expect(controller.state.useRequestQueue).toStrictEqual(false);
});
});

describe('addSnapAccountEnabled', () => {
it('defaults addSnapAccountEnabled to false', () => {
const { controller } = setupController({});
Expand Down
26 changes: 0 additions & 26 deletions app/scripts/controllers/preferences-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ export type PreferencesControllerState = Omit<
useSafeChainsListValidation: boolean;
use4ByteResolution: boolean;
useCurrencyRateCheck: boolean;
useRequestQueue: boolean;
///: BEGIN:ONLY_INCLUDE_IF(build-flask)
watchEthereumAccountEnabled: boolean;
///: END:ONLY_INCLUDE_IF
Expand Down Expand Up @@ -179,7 +178,6 @@ export const getDefaultPreferencesControllerState =
useNftDetection: true,
use4ByteResolution: true,
useCurrencyRateCheck: true,
useRequestQueue: true,
openSeaEnabled: true,
securityAlertsEnabled: true,
watchEthereumAccountEnabled: false,
Expand Down Expand Up @@ -321,10 +319,6 @@ const controllerMetadata = {
persist: true,
anonymous: true,
},
useRequestQueue: {
persist: true,
anonymous: true,
},
openSeaEnabled: {
persist: true,
anonymous: true,
Expand Down Expand Up @@ -607,17 +601,6 @@ export class PreferencesController extends BaseController<
});
}

/**
* Setter for the `useRequestQueue` property
*
* @param val - Whether or not the user wants to have requests queued if network change is required.
*/
setUseRequestQueue(val: boolean): void {
this.update((state) => {
state.useRequestQueue = val;
});
}

/**
* Setter for the `openSeaEnabled` property
*
Expand Down Expand Up @@ -816,15 +799,6 @@ export class PreferencesController extends BaseController<
return selectedAccount.address;
}

/**
* Getter for the `useRequestQueue` property
*
* @returns whether this option is on or off.
*/
getUseRequestQueue(): boolean {
return this.state.useRequestQueue;
}

/**
* Sets a custom label for an account
*
Expand Down
1 change: 0 additions & 1 deletion app/scripts/fixtures/with-preferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ export const FIXTURES_PREFERENCES = {
useTokenDetection: true,
useCurrencyRateCheck: true,
useMultiAccountBalanceChecker: true,
useRequestQueue: true,
theme: 'light',
useExternalNameSources: true,
useTransactionSimulations: true,
Expand Down
Loading

0 comments on commit 5ebd336

Please sign in to comment.