diff --git a/src/services/autofill.service.ts b/src/services/autofill.service.ts index 7498248bbe..82d5224a6e 100644 --- a/src/services/autofill.service.ts +++ b/src/services/autofill.service.ts @@ -254,7 +254,7 @@ export default class AutofillService implements AutofillServiceInterface { } } - const autoFillResponse = await this.doAutoFill({ + const totpCode = await this.doAutoFill({ cipher: cipher, pageDetails: pageDetails, skipTotp: !fromCommand, @@ -265,12 +265,12 @@ export default class AutofillService implements AutofillServiceInterface { fillNewPassword: fromCommand, }); - // Only update last used index if doAutoFill didn't throw an exception + // Update last used index as autofill has succeed if (fromCommand) { this.cipherService.updateLastUsedIndexForUrl(tab.url); } - return autoFillResponse; + return totpCode; } // Helpers