MetaMask / metamask-extension

:globe_with_meridians: :electric_plug: The MetaMask browser extension enables browsing Ethereum blockchain enabled websites
https://metamask.io
Other
11.87k stars 4.85k forks source link

Provide method for UI console to issue its actions #9879

Open danfinlay opened 3 years ago

danfinlay commented 3 years ago

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:

Benefits:

Gudahtt commented 3 years ago

This could also end up allowing phishers to convince users to run console commands and exfiltrate keys or other sensitive data.. This sounds too dangerous for us to consider, and I don't think we generally need it. We can make a button in the UI for anything an action can do.