chore: vault tests refactors and lint (#2374)

This commit is contained in:
Karol Sójko
2023-08-02 00:23:56 +02:00
committed by GitHub
parent a0bc1d2488
commit 247daddf5a
96 changed files with 1463 additions and 751 deletions

View File

@@ -36,12 +36,15 @@ import {
RootKeyParamsInterface,
} from '@standardnotes/models'
import { ClientDisplayableError } from '@standardnotes/responses'
import { extendArray } from '@standardnotes/utils'
import { extendArray, LoggerInterface } from '@standardnotes/utils'
import { EncryptionService } from '../EncryptionService'
import { ContentType } from '@standardnotes/domain-core'
export class DecryptBackupFile {
constructor(private encryption: EncryptionService) {}
constructor(
private encryption: EncryptionService,
private logger: LoggerInterface,
) {}
async execute(
file: BackupFile,
@@ -273,7 +276,7 @@ export class DecryptBackupFile {
errorDecrypting: true,
}),
)
console.error('Error decrypting payload', encryptedPayload, e)
this.logger.error('Error decrypting payload', encryptedPayload, e)
}
}