1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 07:43:35 +00:00

Remove dead code (#930)

* Remove last remnants of old analytics code
This commit is contained in:
Oscar Hinton
2021-04-14 23:43:40 +02:00
committed by GitHub
parent 53bd9a3b14
commit a9ef011cf3
60 changed files with 107 additions and 299 deletions

View File

@@ -5,7 +5,6 @@ import {
} from '@angular/core';
import { ToasterService } from 'angular2-toaster';
import { Angulartics2 } from 'angulartics2';
import { ApiService } from 'jslib/abstractions/api.service';
import { I18nService } from 'jslib/abstractions/i18n.service';
@@ -27,8 +26,7 @@ export abstract class TwoFactorBaseComponent {
protected masterPasswordHash: string;
constructor(protected apiService: ApiService, protected i18nService: I18nService,
protected analytics: Angulartics2, protected toasterService: ToasterService,
protected platformUtilsService: PlatformUtilsService) { }
protected toasterService: ToasterService, protected platformUtilsService: PlatformUtilsService) { }
protected auth(authResponse: any) {
this.masterPasswordHash = authResponse.masterPasswordHash;
@@ -38,9 +36,6 @@ export abstract class TwoFactorBaseComponent {
protected async enable(enableFunction: () => Promise<void>) {
try {
await enableFunction();
this.analytics.eventTrack.next({
action: 'Enabled Two-step ' + TwoFactorProviderType[this.type].toString(),
});
this.onUpdated.emit(true);
} catch { }
}
@@ -63,9 +58,6 @@ export abstract class TwoFactorBaseComponent {
}
await promise;
this.enabled = false;
this.analytics.eventTrack.next({
action: 'Disabled Two-step ' + TwoFactorProviderType[this.type].toString(),
});
this.toasterService.popAsync('success', null, this.i18nService.t('twoStepDisabled'));
this.onUpdated.emit(false);
} catch { }