MetaMask / metamask-extension

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

Snaps Custom Confirmation #11686

Closed Gudahtt closed 2 years ago

Gudahtt commented 3 years ago

We want to allow snaps to show custom confirmations to the user. This will allow snap devs to ask for user consent before taking certain actions, such as signing.

This custom confirmation can be very limited to start with, with just a custom title, maybe a custom subtitle, a custom text area, and "Confirm" / "Reject" buttons (or something similar). All custom text areas should be specified by the snap.

We should make it clear that the confirmation is coming from the snap, not from MetaMask. We don't know what it happens if the user confirms, whether the text is accurate, or how high or low risk the action being confirmed might be. All we know is that it's internal to the snap.

Gudahtt commented 3 years ago

This is blocked by #11626

holantonela commented 3 years ago

I've worked on a first iteration for this task. Happy to learn what we want to allow devs to do here!

https://www.figma.com/file/nBKUQx0btfQiqVf30UA6KD/?node-id=336%3A6342

holantonela commented 3 years ago

Final UI here

https://www.figma.com/file/nBKUQx0btfQiqVf30UA6KD/Flask-MVP?node-id=336%3A7846

rekmarks commented 2 years ago

We will still need to tweak some parameter / requestData parsing when we bump the skunkworks packages, but this is in essence completed.