From 28d8bec93587070c36ca22fa547a7f89721517de Mon Sep 17 00:00:00 2001 From: the-djmaze <> Date: Tue, 27 Feb 2024 11:04:35 +0100 Subject: [PATCH] Fix view PGP key button --- dev/Stores/User/GnuPG.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dev/Stores/User/GnuPG.js b/dev/Stores/User/GnuPG.js index f4351cb61c..a3bdfba566 100644 --- a/dev/Stores/User/GnuPG.js +++ b/dev/Stores/User/GnuPG.js @@ -72,7 +72,7 @@ export const GnuPGUserStore = new class { key.password = async (btnTxt = 'SIGN') => { const pass = await Passphrases.ask(key, 'GnuPG key
' + key.id + ' ' + key.emails[0], - 'CRYPTO/'+btnTxt + 'OPENPGP/'+btnTxt ); pass && pass.remember && Passphrases.set(key, pass.password); return pass?.password; @@ -83,7 +83,7 @@ export const GnuPGUserStore = new class { callback && callback(); } else { let pass = isPrivate ? await key.password('POPUP_VIEW_TITLE') : ''; - if (null != pass) { + if (null != pass) try { const result = await Remote.post('GnupgExportKey', null, { keyId: key.id, isPrivate: isPrivate, @@ -95,6 +95,8 @@ export const GnuPGUserStore = new class { } else { Passphrases.delete(key); } + } catch (e) { + Passphrases.delete(key); } } return key.armor;