Skip to content

Commit

Permalink
Code cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
varjolintu committed Nov 28, 2022
1 parent 4f41255 commit d160c51
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions keepassxc-browser/background/keepass.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ keepass.retrieveCredentials = async function(tab, args = []) {
action: kpAction,
id: dbid,
url: url,
keys: keepass.getAllKeys()
keys: keepass.getCryptoKeys()
};

if (submiturl) {
Expand Down Expand Up @@ -608,7 +608,6 @@ keepass.requestAutotype = async function(tab, args = []) {

try {
const response = await keepassClient.sendMessage(kpAction, tab, messageData, nonce);
// TODO: Parse the response here?
return response;
} catch (err) {
logError(`requestAutotype failed: ${err}`);
Expand All @@ -635,7 +634,7 @@ keepass.webauthnRegister = async function(tab, args = []) {
action: kpAction,
publicKey: JSON.parse(JSON.stringify(publicKey)),
origin: origin,
keys: keepass.getAllKeys()
keys: keepass.getCryptoKeys()
};

const response = await keepassClient.sendMessage(kpAction, tab, messageData, nonce);
Expand Down Expand Up @@ -668,7 +667,7 @@ keepass.webauthnGet = async function(tab, args = []) {
action: kpAction,
publicKey: JSON.parse(JSON.stringify(publicKey)),
origin: origin,
keys: keepass.getAllKeys()
keys: keepass.getCryptoKeys()
};

const response = await keepassClient.sendMessage(kpAction, tab, messageData, nonce);
Expand Down Expand Up @@ -782,7 +781,7 @@ keepass.setCryptoKey = function(id, key) {
keepass.saveKey(keepass.databaseHash, id, key);
};

keepass.getAllKeys = function() {
keepass.getCryptoKeys = function() {
const keys = [];

for (const keyHash in keepass.keyRing) {
Expand Down
2 changes: 1 addition & 1 deletion keepassxc-browser/background/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const defaultSettings = {
usePredefinedSites: true,
usePasswordGeneratorIcons: false,
webAuthn: false,
webAuthnFallback: false,
webAuthnFallback: true,
};

const AUTO_SUBMIT_TIMEOUT = 5000;
Expand Down

0 comments on commit d160c51

Please sign in to comment.