Skip to content

Commit

Permalink
Fix view PGP key button
Browse files Browse the repository at this point in the history
  • Loading branch information
the-djmaze committed Feb 27, 2024
1 parent 7cacc9b commit 28d8bec
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions dev/Stores/User/GnuPG.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export const GnuPGUserStore = new class {
key.password = async (btnTxt = 'SIGN') => {
const pass = await Passphrases.ask(key,
'GnuPG key<br>' + key.id + ' ' + key.emails[0],
'CRYPTO/'+btnTxt
'OPENPGP/'+btnTxt
);
pass && pass.remember && Passphrases.set(key, pass.password);
return pass?.password;
Expand All @@ -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,
Expand All @@ -95,6 +95,8 @@ export const GnuPGUserStore = new class {
} else {
Passphrases.delete(key);
}
} catch (e) {
Passphrases.delete(key);
}
}
return key.armor;
Expand Down

0 comments on commit 28d8bec

Please sign in to comment.