diff --git a/vault/static/src/backend/vault.esm.js b/vault/static/src/backend/vault.esm.js index b16a4e0584..7c28e3b838 100644 --- a/vault/static/src/backend/vault.esm.js +++ b/vault/static/src/backend/vault.esm.js @@ -44,24 +44,6 @@ const vaultService = { } class Vault { - /** - * Check if the user actually has keys otherwise generate them on init - * - * @override - */ - constructor() { - const self = this; - - function waitAndCheck() { - if (!vault_utils.supported()) return null; - - if (odoo.isReady) self._initialize_keys(); - else setTimeout(waitAndCheck, 500); - } - - setTimeout(waitAndCheck, 500); - } - /** * Generate a new key pair and export to database and object store */ diff --git a/vault/static/src/common/vault_utils_service.esm.js b/vault/static/src/common/vault_utils_service.esm.js index 1ffafd3912..acc39cbf97 100644 --- a/vault/static/src/common/vault_utils_service.esm.js +++ b/vault/static/src/common/vault_utils_service.esm.js @@ -43,7 +43,6 @@ export class AskPassDialog extends Component { } onCancel() { - this.props.onReject(_t("Cancelled")); this.props.close(); } } @@ -88,7 +87,6 @@ export class GeneratePassDialog extends Component { } onCancel() { - this.props.onReject(_t("Cancelled")); this.props.close(); } @@ -111,22 +109,20 @@ export const vaultUtilsService = { title, confirm: Boolean(options.confirm), }; - return new Promise((resolve, reject) => { + return new Promise((resolve) => { dialog.add(AskPassDialog, { ...props, onResolve: resolve, - onReject: reject, }); }); } function generate_pass(title, options = {}) { const props = {title, ...options}; - return new Promise((resolve, reject) => { + return new Promise((resolve) => { dialog.add(GeneratePassDialog, { ...props, onResolve: resolve, - onReject: reject, }); }); }