Skip to content

Commit

Permalink
Fix downstream breakage
Browse files Browse the repository at this point in the history
  • Loading branch information
MajorLift committed Nov 16, 2023
1 parent 2db90ce commit 1ab6529
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 61 deletions.
6 changes: 0 additions & 6 deletions packages/accounts-controller/src/AccountsController.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,12 +194,6 @@ function buildAccountsControllerMessenger(messenger = buildMessenger()) {
'KeyringController:getAccounts',
'KeyringController:getKeyringForAccount',
'KeyringController:getKeyringsByType',
'AccountsController:listAccounts',
'AccountsController:setAccountName',
'AccountsController:setSelectedAccount',
'AccountsController:updateAccounts',
'AccountsController:getSelectedAccount',
'AccountsController:getAccountByAddress',
],
});
}
Expand Down
11 changes: 2 additions & 9 deletions packages/gas-fee-controller/src/GasFeeController.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,8 @@ const setupNetworkController = async ({
}) => {
const restrictedMessenger = unrestrictedMessenger.getRestricted({
name: 'NetworkController',
allowedActions: [
'NetworkController:getState',
'NetworkController:getNetworkClientById',
'NetworkController:getEIP1559Compatibility',
],
allowedEvents: [
'NetworkController:stateChange',
'NetworkController:networkDidChange',
],
allowedActions: [],
allowedEvents: [],
});

const networkController = new NetworkController({
Expand Down
19 changes: 0 additions & 19 deletions packages/keyring-controller/src/KeyringController.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2306,25 +2306,6 @@ function buildMessenger() {
function buildKeyringControllerMessenger(messenger = buildMessenger()) {
return messenger.getRestricted({
name: 'KeyringController',
allowedActions: [
'KeyringController:getState',
'KeyringController:signMessage',
'KeyringController:signPersonalMessage',
'KeyringController:signTypedMessage',
'KeyringController:decryptMessage',
'KeyringController:getEncryptionPublicKey',
'KeyringController:getKeyringsByType',
'KeyringController:getKeyringForAccount',
'KeyringController:getAccounts',
'KeyringController:persistAllKeyrings',
],
allowedEvents: [
'KeyringController:stateChange',
'KeyringController:lock',
'KeyringController:unlock',
'KeyringController:accountRemoved',
'KeyringController:qrKeyringStateChange',
],
});
}

Expand Down
11 changes: 0 additions & 11 deletions packages/network-controller/tests/NetworkController.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7069,17 +7069,6 @@ function buildMessenger() {
function buildNetworkControllerMessenger(messenger = buildMessenger()) {
return messenger.getRestricted({
name: 'NetworkController',
allowedActions: [
'NetworkController:getProviderConfig',
'NetworkController:getEthQuery',
],
allowedEvents: [
'NetworkController:stateChange',
'NetworkController:infuraIsBlocked',
'NetworkController:infuraIsUnblocked',
'NetworkController:networkDidChange',
'NetworkController:networkWillChange',
],
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,7 @@ function getSubjectMetadataControllerMessenger() {
SubjectMetadataControllerEvents['type']
>({
name: controllerName,
allowedActions: [
'PermissionController:hasPermissions',
'SubjectMetadataController:getState',
],
allowedActions: ['PermissionController:hasPermissions'],
}) as SubjectMetadataControllerMessenger,
hasPermissionsSpy,
] as const;
Expand Down
8 changes: 2 additions & 6 deletions packages/queued-request-controller/tests/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ import type {
QueuedRequestControllerActions,
QueuedRequestControllerEvents,
} from '../src/QueuedRequestController';
import {
QueuedRequestControllerActionTypes,
QueuedRequestControllerEventTypes,
} from '../src/QueuedRequestController';

/**
* Build a controller messenger that includes all events used by the selected network
Expand All @@ -32,7 +28,7 @@ export function buildQueuedRequestControllerMessenger(
) {
return messenger.getRestricted({
name: 'QueuedRequestController',
allowedActions: [...Object.values(QueuedRequestControllerActionTypes)],
allowedEvents: [...Object.values(QueuedRequestControllerEventTypes)],
allowedActions: [],
allowedEvents: [],
});
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function getRestrictedMessenger(
never
>({
name,
allowedActions: ['RateLimitController:call'],
allowedActions: [],
}) as RateLimitMessenger<RateLimitedApis>;
}

Expand Down
6 changes: 1 addition & 5 deletions packages/selected-network-controller/tests/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import type {
SelectedNetworkControllerAction,
SelectedNetworkControllerEvent,
} from '../src/SelectedNetworkController';
import { SelectedNetworkControllerActionTypes } from '../src/SelectedNetworkController';

/**
* Build a controller messenger that includes all events used by the selected network
Expand Down Expand Up @@ -37,10 +36,7 @@ export function buildSelectedNetworkControllerMessenger(
);
return messenger.getRestricted({
name: 'SelectedNetworkController',
allowedActions: [
...Object.values(SelectedNetworkControllerActionTypes),
'NetworkController:getNetworkClientById',
],
allowedActions: ['NetworkController:getNetworkClientById'],
allowedEvents: ['NetworkController:stateChange'],
});
}

0 comments on commit 1ab6529

Please sign in to comment.