diff --git a/dev/Stores/User/OpenPGP.js b/dev/Stores/User/OpenPGP.js index ee7d150c4..fd649b3b3 100644 --- a/dev/Stores/User/OpenPGP.js +++ b/dev/Stores/User/OpenPGP.js @@ -31,12 +31,13 @@ const 'OPENPGP/'+btnTxt ); if (pass) { - pass.remember && passphrases.set(key, pass.password); - let passphrase = pass.password; - return await openpgp.decryptKey({ - privateKey: privateKey.key, - passphrase - }); + const passphrase = pass.password, + result = await openpgp.decryptKey({ + privateKey: privateKey.key, + passphrase + }); + result && pass.remember && passphrases.set(key, passphrase); + return result; } },