Meatamask eth_decrypt decrypt multiple message once

Viewed 940

My application is using Metamask to encrypt and decrypt user messages using sigUtil.encrypt / eth_decrypt

Whenever the application requires the user to decrypt a message it will present the user with a Metamask dialog asking them to allow the message to be decrypted.

Let's say the application needs to decrypt 200 messages all at once. The user will be required to confirm the dialog 200 times. Is there a way for the application to ask the user to decrypt all the messages with only one dialog?

If not, then is it possible to combine all the encrypted messages and then ask Metamask to decrypt that message?

Example showing the issue. Encrypt multiple messages and then try to decrypt them all. It will show multiple dialogs.

Thank you

1 Answers

Is there a way for the application to ask the user to decrypt all the messages with only one dialog?

There is not.

If not, then is it possible to combine all the encrypted messages and then ask Metamask to decrypt that message?

I do not believe this is possible. Encrypted messages should be packed together before encryption.

Related