hmm, do you have some code example? awaiting the promise does not work for you?

We are defensive there to prevent too many prompts for the user.

but I see that this can make it a bit harder for the developer.

Reply to this note

Please Login to reply.

Discussion

Awaiting doesn't work, it throws the error if another request is already executing. For example, when you open the dms view and it's simultaneously trying to encrypt lots of messages in different components.

I mean like this:

await window.nostr.nip04.decrypt(...);

await window.nostr.nip04.decrypt(...);

this should work, doesn't it? but I guess you do this in a component that don't know of the other calls?

I am wondering what's the best practice here. because the user might be prompted.