MetaMask / MetaMask/metamask-extension
Add log points to the encryption-public-key.ts file
- Dominant language
- TypeScript
- Stars
- 13.2k
- Forks
- 5.6k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 451
Description
### Description
We need to add four logging events to the encryption-public-key file.
1. Message proposed - [async newRequestEncryptionPublicKey(](https://github.com/MetaMask/metamask-extension/blob/2a227c46461c8b767f6b2cad89ce347a6483cb13/app/scripts/controllers/encryption-public-key.ts#L185-L186)
2. Message signed - [async encryptionPublicKey(msgParams: EncryptionPublicKeyParamsMetamask) {](https://github.com/MetaMask/metamask-extension/blob/2a227c46461c8b767f6b2cad89ce347a6483cb13/app/scripts/controllers/encryption-public-key.ts#L237-L238)
3. Message rejected - [cancelEncryptionPublicKey(msgId: string) {](https://github.com/MetaMask/metamask-extension/blob/2a227c46461c8b767f6b2cad89ce347a6483cb13/app/scripts/controllers/encryption-public-key.ts#L277)
4. Message rejected - [private _cancelAbstractMessage(](https://github.com/MetaMask/metamask-extension/blob/2a227c46461c8b767f6b2cad89ce347a6483cb13/app/scripts/controllers/encryption-public-key.ts#L308)
We need to record the data as well as the origin of the request. We should use the controllerMessenger the same way we did in the SignatureController as part of #19396, which will transfer well to the Core repo if this gets lifted there eventually.
Contributor guide
Research direction
Start in app/scripts/controllers/encryption-public-key.ts at newRequestEncryptionPublicKey, encryptionPublicKey, cancelEncryptionPublicKey, and _cancelAbstractMessage. Compare the controllerMessenger usage in SignatureController from #19396. Done means four logging events record the request data and its origin at the specified message lifecycle points.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- security
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100