mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 09:57:02 +01:00
Return state when calling EncryptionPublicKeyController.cancelEncryptionPublicKey (#18845)
* returns state * adds unit test
This commit is contained in:
parent
e6455e92ae
commit
1253c768c7
@ -352,6 +352,15 @@ describe('EncryptionPublicKeyController', () => {
|
||||
'Cancel',
|
||||
);
|
||||
});
|
||||
|
||||
it('returns current state', async () => {
|
||||
getStateMock.mockReturnValueOnce(stateMock);
|
||||
expect(
|
||||
await encryptionPublicKeyController.cancelEncryptionPublicKey(
|
||||
messageIdMock,
|
||||
),
|
||||
).toEqual(stateMock);
|
||||
});
|
||||
});
|
||||
|
||||
describe('message manager events', () => {
|
||||
|
@ -275,7 +275,7 @@ export default class EncryptionPublicKeyController extends BaseControllerV2<
|
||||
* @param msgId - The id of the message to cancel.
|
||||
*/
|
||||
cancelEncryptionPublicKey(msgId: string) {
|
||||
this._cancelAbstractMessage(this._encryptionPublicKeyManager, msgId);
|
||||
return this._cancelAbstractMessage(this._encryptionPublicKeyManager, msgId);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user