chore: fix dep

This commit is contained in:
Mo
2023-08-12 06:24:58 -05:00
parent c2110b7c12
commit 40f355d0ea
2 changed files with 4 additions and 15 deletions

View File

@@ -6,18 +6,14 @@ import {
PayloadEmitSource,
SureFindPayload,
} from '@standardnotes/models'
import { isErrorDecryptingParameters } from '@standardnotes/encryption'
import { PayloadManagerInterface } from '../../../Payloads/PayloadManagerInterface'
import { isErrorDecryptingParameters, EncryptionOperatorsInterface } from '@standardnotes/encryption'
import { DecryptTypeAPayloadWithKeyLookup } from './DecryptPayloadWithKeyLookup'
import { RootKeyManager } from '../../../RootKeyManager/RootKeyManager'
import { KeySystemKeyManagerInterface } from '../../../KeySystem/KeySystemKeyManagerInterface'
export class DecryptErroredTypeAPayloads {
constructor(
private payloads: PayloadManagerInterface,
private operatorManager: EncryptionOperatorsInterface,
private keySystemKeyManager: KeySystemKeyManagerInterface,
private rootKeyManager: RootKeyManager,
private _decryptTypeAPayloadWithKeyLookup: DecryptTypeAPayloadWithKeyLookup,
) {}
async execute(): Promise<void> {
@@ -29,12 +25,7 @@ export class DecryptErroredTypeAPayloads {
return
}
const usecase = new DecryptTypeAPayloadWithKeyLookup(
this.operatorManager,
this.keySystemKeyManager,
this.rootKeyManager,
)
const resultParams = await usecase.executeMany(erroredRootPayloads)
const resultParams = await this._decryptTypeAPayloadWithKeyLookup.executeMany(erroredRootPayloads)
const decryptedPayloads = resultParams.map((params) => {
const original = SureFindPayload(erroredRootPayloads, params.uuid)

View File

@@ -755,9 +755,7 @@ export class Dependencies {
this.factory.set(TYPES.DecryptErroredTypeAPayloads, () => {
return new DecryptErroredTypeAPayloads(
this.get<PayloadManager>(TYPES.PayloadManager),
this.get<EncryptionOperators>(TYPES.EncryptionOperators),
this.get<KeySystemKeyManager>(TYPES.KeySystemKeyManager),
this.get<RootKeyManager>(TYPES.RootKeyManager),
this.get<DecryptTypeAPayloadWithKeyLookup>(TYPES.DecryptTypeAPayloadWithKeyLookup),
)
})