From 4b49b1fcc00f1de2af3c992832f6ba7a81699d5c Mon Sep 17 00:00:00 2001 From: Daniel James Smith Date: Mon, 18 Oct 2021 15:32:38 +0200 Subject: [PATCH] Add type CipherView for AutoFill functionality --- src/background/contextMenus.background.ts | 3 ++- src/background/main.background.ts | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/background/contextMenus.background.ts b/src/background/contextMenus.background.ts index b0fa7097d2..e46fe8e369 100644 --- a/src/background/contextMenus.background.ts +++ b/src/background/contextMenus.background.ts @@ -10,6 +10,7 @@ import { TotpService } from 'jslib-common/abstractions/totp.service'; import { VaultTimeoutService } from 'jslib-common/abstractions/vaultTimeout.service'; import { EventType } from 'jslib-common/enums/eventType'; +import { CipherView } from 'jslib-common/models/view/cipherView'; export default class ContextMenusBackground { private contextMenus: any; @@ -88,7 +89,7 @@ export default class ContextMenusBackground { } } - private async startAutofillPage(cipher: any) { + private async startAutofillPage(cipher: CipherView) { this.main.loginToAutoFill = cipher; const tab = await BrowserApi.getTabFromCurrentWindow(); if (tab == null) { diff --git a/src/background/main.background.ts b/src/background/main.background.ts index 840142d3ee..880ab22862 100644 --- a/src/background/main.background.ts +++ b/src/background/main.background.ts @@ -1,6 +1,8 @@ import { CipherRepromptType } from 'jslib-common/enums/cipherRepromptType'; import { CipherType } from 'jslib-common/enums/cipherType'; +import { CipherView } from 'jslib-common/models/view/cipherView'; + import { ApiService } from 'jslib-common/services/api.service'; import { AppIdService } from 'jslib-common/services/appId.service'; import { AuditService } from 'jslib-common/services/audit.service'; @@ -126,7 +128,7 @@ export default class MainBackground { onUpdatedRan: boolean; onReplacedRan: boolean; - loginToAutoFill: any = null; + loginToAutoFill: CipherView = null; lockedVaultPendingNotifications: { commandToRetry: any, from: string }[] = []; private commandsBackground: CommandsBackground;