-
Notifications
You must be signed in to change notification settings - Fork 5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update
ControllerMessenger
to Messenger
- Loading branch information
Showing
26 changed files
with
117 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 2 additions & 5 deletions
7
app/scripts/controller-init/snaps/cronjob-controller-messenger.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 8 additions & 9 deletions
17
app/scripts/controller-init/snaps/rate-limit-controller-messenger.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,27 @@ | ||
import { | ||
ControllerMessenger, | ||
RestrictedMessenger, | ||
} from '@metamask/base-controller'; | ||
import { Messenger, RestrictedMessenger } from '@metamask/base-controller'; | ||
import { | ||
getRateLimitControllerInitMessenger, | ||
getRateLimitControllerMessenger, | ||
} from './rate-limit-controller-messenger'; | ||
|
||
describe('getRateLimitControllerMessenger', () => { | ||
it('returns a restricted controller messenger', () => { | ||
const controllerMessenger = new ControllerMessenger<never, never>(); | ||
const messenger = new Messenger<never, never>(); | ||
const rateLimitControllerMessenger = | ||
getRateLimitControllerMessenger(controllerMessenger); | ||
getRateLimitControllerMessenger(messenger); | ||
|
||
expect(rateLimitControllerMessenger).toBeInstanceOf(RestrictedMessenger); | ||
}); | ||
}); | ||
|
||
describe('getRateLimitControllerInitMessenger', () => { | ||
it('returns a restricted controller messenger', () => { | ||
const controllerMessenger = new ControllerMessenger<never, never>(); | ||
const messenger = new Messenger<never, never>(); | ||
const rateLimitControllerInitMessenger = | ||
getRateLimitControllerInitMessenger(controllerMessenger); | ||
getRateLimitControllerInitMessenger(messenger); | ||
|
||
expect(rateLimitControllerInitMessenger).toBeInstanceOf(RestrictedMessenger); | ||
expect(rateLimitControllerInitMessenger).toBeInstanceOf( | ||
RestrictedMessenger, | ||
); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 4 additions & 7 deletions
11
app/scripts/controller-init/snaps/snap-insights-controller-messenger.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.