8000 PermissionController should emit more granular events · Issue #5617 · MetaMask/core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

PermissionController should emit more granular events #5617

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
FrederikBolding opened this issue Apr 9, 2025 · 2 comments
Open

PermissionController should emit more granular events #5617

FrederikBolding opened this issue Apr 9, 2025 · 2 comments
Assignees

Comments

@FrederikBolding
Copy link
Member

The PermissionController currently only emits stateChange which makes listening for permission updates more complicated than it needs to be.

@Gudahtt
Copy link
Member
Gudahtt commented Apr 10, 2025

We intended the event selector system to be flexible enough to make it easy to listen to sub-state/derived state changes as well.

Are there use-cases where this is inadequate today? Or are selectors too difficult to use in general? (e.g. even just lack of adequate docs)

@FrederikBolding
Copy link
Member Author

@Gudahtt I will admit, I keep forgetting we have a selector system for events 😄 It seems that it generally doesn't get much use yet.

That being said, even with a selector, it might not provide the granularity/context that a dedicated event would. I created this ticket based on a comment from @jiexi that suggested firing an event for a specific origin: MetaMask/metamask-extension#29887 (comment), but I think we could take it a bit further than that too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
0