Skip to content

Commit

Permalink
Fix omitted allowed{Actions,Events} not being inferred as never[]
Browse files Browse the repository at this point in the history
… when used with `unrestrictedMessenger` pattern

- TODO: open ticket for more fundamental fix for this in `getRestricted` and `RestrictedControllerMessenger`
  • Loading branch information
MajorLift committed Mar 7, 2024
1 parent a4aea11 commit 38d5e88
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/transaction-controller/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ module.exports = merge(baseConfig, {
// An object that configures minimum threshold enforcement for coverage results
coverageThreshold: {
global: {
branches: 94.06,
branches: 94.2,
functions: 98.48,
lines: 98.87,
statements: 98.88,
lines: 98.91,
statements: 98.93,
},
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ const setupController = async (
const networkController = new NetworkController({
messenger: unrestrictedMessenger.getRestricted({
name: 'NetworkController',
allowedActions: [],
allowedEvents: [],
}),
trackMetaMetricsEvent: () => {
// noop
Expand All @@ -131,6 +133,8 @@ const setupController = async (
const approvalController = new ApprovalController({
messenger: unrestrictedMessenger.getRestricted({
name: 'ApprovalController',
allowedActions: [],
allowedEvents: [],
}),
showApprovalRequest: jest.fn(),
typesExcludedFromRateLimiting: [ApprovalType.Transaction],
Expand Down

0 comments on commit 38d5e88

Please sign in to comment.