MetaMask / snaps-cli

A CLI for developing MetaMask plugins.
ISC License
37 stars 26 forks source link

Custom identity example with custom prompt #34

Closed danjm closed 3 years ago

danjm commented 4 years ago

This PR adds to https://github.com/MetaMask/mm-plugin/pull/31 to take advantage of the support for custom html in prompts added with https://github.com/MetaMask/metamask-plugin-beta/pull/86

Code such as <div style="width: 100%;overflow-wrap: break-word;"> The site from <span style="font-weight: 900;color: #037DD6;"><a href="${origin}">${origin}</a></span> requests you sign this with your offline strategy:\n${JSON.stringify(req)} </div>

can be passed to the prompt method to generate a prompt in metamask that looks like:

Screenshot from 2019-10-31 16-44-34