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