mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 09:57:02 +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:
parent
7dac6f2517
commit
c17fa40114
@ -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';
|
||||
|
@ -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.
|
||||
*/
|
||||
|
@ -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;
|
||||
|
@ -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';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user