MetaMask / MetaMask/metamask-extension
[Bug]: Wallet API - `wallet_revokeSession` doesn't clear pending transactions from that origin
- Dominant language
- TypeScript
- Stars
- 13.2k
- Forks
- 5.6k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 451
Description
### Describe the bug
Whenever we have a session created, if we have a pending transaction coming from that dapp origin, if we trigger the `wallet_revokeSession` it clears the wallet permissions but it does not clear pending transactions coming from that dapp
### Expected behavior
We should clear pending transactions from the given dapp, if session is revoked
### Screenshots/Recordings
https://github.com/user-attachments/assets/76241e2a-ce02-4d70-be2d-3451607e6a94
### Steps to reproduce
1. Go to https://metamask.github.io/test-dapp-multichain/latest/
2. Connect
3. Select Mainnet and click wallet_createSession
4. Trigger a transaction or signature method
5. See MM pending request
6. Now click wallet_revokeSession
7. See session is revoked, but pending tx/signature is still open and you are able to proceed
### Error messages or log output
```shell
```
### Where was this bug found?
Live version (from official store)
### Version
13.32.0
### Build type
None
### Browser
Chrome
### Operating system
MacOS
### Hardware wallet
_No response_
### Additional context
_No response_
### Severity
_No response_
Contributor guide
Research direction
Reproduce the flow with the MetaMask multichain test dapp, focusing on the wallet_revokeSession entry point and the pending transaction or signature request involved. Trace how revocation handles the dapp origin, then verify that its pending requests are cleared and can no longer proceed after the session is revoked.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100