chore: fix dep
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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),
|
||||
)
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user