1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 08:13:42 +00:00

move getDomain to jslib Utils

This commit is contained in:
Kyle Spearrin
2018-10-13 22:21:54 -04:00
parent c35576deb8
commit ad97afc590
9 changed files with 94 additions and 29 deletions

View File

@@ -37,7 +37,6 @@ import { ApiService } from '../abstractions/api.service';
import { CipherService as CipherServiceAbstraction } from '../abstractions/cipher.service';
import { CryptoService } from '../abstractions/crypto.service';
import { I18nService } from '../abstractions/i18n.service';
import { PlatformUtilsService } from '../abstractions/platformUtils.service';
import { SearchService } from '../abstractions/search.service';
import { SettingsService } from '../abstractions/settings.service';
import { StorageService } from '../abstractions/storage.service';
@@ -59,7 +58,7 @@ export class CipherService implements CipherServiceAbstraction {
constructor(private cryptoService: CryptoService, private userService: UserService,
private settingsService: SettingsService, private apiService: ApiService,
private storageService: StorageService, private i18nService: I18nService,
private platformUtilsService: PlatformUtilsService, private searchService: () => SearchService) {
private searchService: () => SearchService) {
}
get decryptedCipherCache() {
@@ -311,7 +310,7 @@ export class CipherService implements CipherServiceAbstraction {
return Promise.resolve([]);
}
const domain = this.platformUtilsService.getDomain(url);
const domain = Utils.getDomain(url);
const eqDomainsPromise = domain == null ? Promise.resolve([]) :
this.settingsService.getEquivalentDomains().then((eqDomains: any[][]) => {
let matches: any[] = [];