MetaMask / MetaMask/metamask-extension
Provide method for UI console to issue its actions
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 13.2k
- Forks
- 5.6k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 451
Description
Maybe just putting the background (dnode) object on the global, so that the UI's own behaviors can be triggered by the console.
This would allow console-based invocation of any UI feature that is having problems.
The idea came from how the SNX token recently broke all other tokens loading. A simple command to tell users to run in the console would be a much cleaner workaround than asking them to reinstall.
Downsides:
- Hard to imagine the future benefits, it's a general purpose bug workaround feature.
- Adding an object to global scope violates all kinds of POLA, so I would only even consider doing this in the UI. We once did something like this in the background then realized it meant every dep had easy access to the whole operation, so that should be off the table.
Benefits:
- Pretty easy to do, easy workarounds in the future.
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 by tracing how the UI accesses the background (dnode) object and how the console is attached; the issue names no files or tests. Define the UI-only exposure boundary and verify that a console command can invoke a UI action without exposing the background object globally.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100