1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 01:47:00 +01:00

Consolidate permission exports (#13012)

The permission-related modules are now all exported together in the
index of the `app/scripts/controllers/permissions` directory.
This commit is contained in:
Mark Stacey 2021-12-08 07:07:35 -03:30 committed by GitHub
parent 7dac6f2517
commit c17fa40114
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 4 deletions

View File

@ -1,4 +1,6 @@
export * from './caveat-mutators';
export * from './background-api';
export * from './enums';
export * from './permission-log';
export * from './specifications';
export * from './selectors';

View File

@ -12,7 +12,7 @@ import {
* Controller with middleware for logging requests and responses to restricted
* and permissions-related methods.
*/
export default class PermissionLogController {
export class PermissionLogController {
/**
* @param {{ restrictedMethods: Set<string>, initState: Record<string, unknown> }} options - Options bag.
*/

View File

@ -2,7 +2,7 @@ import nanoid from 'nanoid';
import { useFakeTimers } from 'sinon';
import stringify from 'fast-safe-stringify';
import { constants, getters, noop } from '../../../../test/mocks/permissions';
import PermissionLogController from './permission-log';
import { PermissionLogController } from './permission-log';
import { LOG_LIMIT, LOG_METHOD_TYPES } from './enums';
const { PERMS, RPC_REQUESTS } = getters;

View File

@ -85,9 +85,7 @@ import PersonalMessageManager from './lib/personal-message-manager';
import TypedMessageManager from './lib/typed-message-manager';
import TransactionController from './controllers/transactions';
import DetectTokensController from './controllers/detect-tokens';
import PermissionLogController from './controllers/permissions/permission-log';
import SwapsController from './controllers/swaps';
import { NOTIFICATION_NAMES } from './controllers/permissions/enums';
import { nodeify, nodeifyObject } from './lib/nodeify';
import accountImporter from './account-import-strategies';
import seedPhraseVerifier from './lib/seed-phrase-verifier';
@ -101,6 +99,8 @@ import {
getPermissionBackgroundApiMethods,
getPermissionSpecifications,
getPermittedAccountsByOrigin,
PermissionLogController,
NOTIFICATION_NAMES,
unrestrictedMethods,
} from './controllers/permissions';