greenart7c3 / Amber

MIT License
92 stars 4 forks source link

Review "Could not decrypt the message" #65

Closed vitorpamplona closed 3 days ago

vitorpamplona commented 3 days ago

The error message is returned when Amber fails to decrypt. It happens when two accounts are logged in: an Amber-signing one and a pubkey-only one. Amethyst will try to decrypt the wrong account and Amber replies with a String "Could not decrypt the message", which could happen to be the encrypted message.

I think this IF is the culprit. It's not a NIP04 encryption call: https://github.com/greenart7c3/Amber/blob/2117f8557e6212dc1f6ea7b3af7f1ba59188b561/app/src/main/java/com/greenart7c3/nostrsigner/SignerProvider.kt#L300

greenart7c3 commented 3 days ago

fixed in https://github.com/greenart7c3/Amber/commit/698831772b613522ccc43734e39c14f09c3e00d1