MetaMask / MetaMask/metamask-extension
Add Log points to the decrypt-message.ts file
Nobody has claimed this yet.
- 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 decrypt-message file.
1. Message proposed - [async newRequestDecryptMessage(](https://github.com/MetaMask/metamask-extension/blob/2a227c46461c8b767f6b2cad89ce347a6483cb13/app/scripts/controllers/decrypt-message.ts#L192)
2. Message signed - [async decryptMessage(messageParams: DecryptMessageParamsMetamask) {](https://github.com/MetaMask/metamask-extension/blob/2a227c46461c8b767f6b2cad89ce347a6483cb13/app/scripts/controllers/decrypt-message.ts#L209-L210)
3. Message rejected - [cancelDecryptMessage(messageId: string) {](https://github.com/MetaMask/metamask-extension/blob/2a227c46461c8b767f6b2cad89ce347a6483cb13/app/scripts/controllers/decrypt-message.ts#L258-L259)
4. Message rejected - [private _cancelAbstractMessage(](https://github.com/MetaMask/metamask-extension/blob/2a227c46461c8b767f6b2cad89ce347a6483cb13/app/scripts/controllers/decrypt-message.ts#L285-L286)
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 is this gets lifted there eventually.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in app/scripts/controllers/decrypt-message.ts at the four linked methods: newRequestDecryptMessage, decryptMessage, cancelDecryptMessage, and _cancelAbstractMessage. Compare the controllerMessenger usage from SignatureController in #19396, then verify that each event records the requested data and request origin at the proposed, signed, and rejected points.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- observability
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100