Skip to content

Commit 23a89c3

Browse files
committed
update controller
1 parent 6635a06 commit 23a89c3

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

app/scripts/controllers/app-state-controller.test.ts

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ describe('AppStateController', () => {
353353

354354
describe('setFirstTimeUsedNetwork', () => {
355355
it('updates the array of the first time used networks', () => {
356-
const chainId: string = '0x1';
356+
const chainId = '0x1';
357357

358358
appStateController.setFirstTimeUsedNetwork(chainId);
359359
expect(appStateController.store.getState().usedNetworks[chainId]).toBe(
@@ -364,11 +364,7 @@ describe('AppStateController', () => {
364364

365365
describe('setLastInteractedConfirmationInfo', () => {
366366
it('sets information about last confirmation user has interacted with', () => {
367-
const lastInteractedConfirmationInfo: {
368-
id: string;
369-
chainId: string;
370-
timestamp: number;
371-
} = {
367+
const lastInteractedConfirmationInfo = {
372368
id: '123',
373369
chainId: '0x1',
374370
timestamp: new Date().getTime(),
@@ -414,7 +410,7 @@ describe('AppStateController', () => {
414410
'updateState',
415411
);
416412

417-
const mockParams: { url: string; oldRefreshToken: string } = {
413+
const mockParams = {
418414
url: 'https://example.com',
419415
oldRefreshToken: 'old',
420416
};
@@ -436,7 +432,7 @@ describe('AppStateController', () => {
436432
'updateState',
437433
);
438434

439-
const mockParams: { fromAddress: string; custodyId: string } = {
435+
const mockParams = {
440436
fromAddress: '0x',
441437
custodyId: 'custodyId',
442438
};
@@ -458,7 +454,7 @@ describe('AppStateController', () => {
458454
'updateState',
459455
);
460456

461-
const mockParams: string = 'some message';
457+
const mockParams = 'some message';
462458

463459
appStateController.setNoteToTraderMessage(mockParams);
464460

app/scripts/controllers/app-state-controller.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,8 @@ import {
2525
import { DEFAULT_AUTO_LOCK_TIME_LIMIT } from '../../../shared/constants/preferences';
2626
import { LastInteractedConfirmationInfo } from '../../../shared/types/confirm';
2727
import { SecurityAlertSource } from '../../../shared/constants/security-provider';
28-
import PreferencesController, {
28+
import type {
2929
Preferences,
30-
PreferencesControllerState,
3130
PreferencesControllerStateChangeEvent,
3231
} from './preferences-controller';
3332

@@ -143,7 +142,9 @@ type AppStateControllerOptions = {
143142
isUnlocked: () => boolean;
144143
initState?: Partial<AppStateControllerState>;
145144
onInactiveTimeout?: () => void;
146-
preferencesStore: ObservableStore<PreferencesControllerState>;
145+
// TODO: Remove this as soon as PreferencesController upgrade to BaseControllerV2 merges with develop
146+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
147+
preferencesStore: any;
147148
messenger: AppStateControllerMessenger;
148149
// TODO: Replace `any` with type
149150
// eslint-disable-next-line @typescript-eslint/no-explicit-any

0 commit comments

Comments
 (0)