mirror of
https://github.com/bitwarden/browser
synced 2026-02-14 23:45:37 +00:00
Update function signature
This commit is contained in:
@@ -76,16 +76,17 @@ export default class Domain {
|
||||
viewModel: ViewEncryptableKeys<V>,
|
||||
props: EncryptableKeys<D, V>[],
|
||||
orgId: null,
|
||||
key: SymmetricCryptoKey | null,
|
||||
key: SymmetricCryptoKey,
|
||||
objectContext: string = "No Domain Context",
|
||||
): Promise<V> {
|
||||
const encryptService = Utils.getContainerService().getEncryptService();
|
||||
for (const prop of props) {
|
||||
if (domain[prop] == null) {
|
||||
viewModel[prop] = null;
|
||||
continue;
|
||||
}
|
||||
try {
|
||||
viewModel[prop] = await encryptService.decryptString(domain[prop]!, key!);
|
||||
viewModel[prop] = await encryptService.decryptString(domain[prop]!, key);
|
||||
} catch (e) {
|
||||
throw new Error(
|
||||
`Failed to decrypt property '${String(
|
||||
|
||||
Reference in New Issue
Block a user