chore: fix dep
This commit is contained in:
@@ -6,18 +6,14 @@ import {
|
|||||||
PayloadEmitSource,
|
PayloadEmitSource,
|
||||||
SureFindPayload,
|
SureFindPayload,
|
||||||
} from '@standardnotes/models'
|
} from '@standardnotes/models'
|
||||||
|
import { isErrorDecryptingParameters } from '@standardnotes/encryption'
|
||||||
import { PayloadManagerInterface } from '../../../Payloads/PayloadManagerInterface'
|
import { PayloadManagerInterface } from '../../../Payloads/PayloadManagerInterface'
|
||||||
import { isErrorDecryptingParameters, EncryptionOperatorsInterface } from '@standardnotes/encryption'
|
|
||||||
import { DecryptTypeAPayloadWithKeyLookup } from './DecryptPayloadWithKeyLookup'
|
import { DecryptTypeAPayloadWithKeyLookup } from './DecryptPayloadWithKeyLookup'
|
||||||
import { RootKeyManager } from '../../../RootKeyManager/RootKeyManager'
|
|
||||||
import { KeySystemKeyManagerInterface } from '../../../KeySystem/KeySystemKeyManagerInterface'
|
|
||||||
|
|
||||||
export class DecryptErroredTypeAPayloads {
|
export class DecryptErroredTypeAPayloads {
|
||||||
constructor(
|
constructor(
|
||||||
private payloads: PayloadManagerInterface,
|
private payloads: PayloadManagerInterface,
|
||||||
private operatorManager: EncryptionOperatorsInterface,
|
private _decryptTypeAPayloadWithKeyLookup: DecryptTypeAPayloadWithKeyLookup,
|
||||||
private keySystemKeyManager: KeySystemKeyManagerInterface,
|
|
||||||
private rootKeyManager: RootKeyManager,
|
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
async execute(): Promise<void> {
|
async execute(): Promise<void> {
|
||||||
@@ -29,12 +25,7 @@ export class DecryptErroredTypeAPayloads {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
const usecase = new DecryptTypeAPayloadWithKeyLookup(
|
const resultParams = await this._decryptTypeAPayloadWithKeyLookup.executeMany(erroredRootPayloads)
|
||||||
this.operatorManager,
|
|
||||||
this.keySystemKeyManager,
|
|
||||||
this.rootKeyManager,
|
|
||||||
)
|
|
||||||
const resultParams = await usecase.executeMany(erroredRootPayloads)
|
|
||||||
|
|
||||||
const decryptedPayloads = resultParams.map((params) => {
|
const decryptedPayloads = resultParams.map((params) => {
|
||||||
const original = SureFindPayload(erroredRootPayloads, params.uuid)
|
const original = SureFindPayload(erroredRootPayloads, params.uuid)
|
||||||
|
|||||||
@@ -755,9 +755,7 @@ export class Dependencies {
|
|||||||
this.factory.set(TYPES.DecryptErroredTypeAPayloads, () => {
|
this.factory.set(TYPES.DecryptErroredTypeAPayloads, () => {
|
||||||
return new DecryptErroredTypeAPayloads(
|
return new DecryptErroredTypeAPayloads(
|
||||||
this.get<PayloadManager>(TYPES.PayloadManager),
|
this.get<PayloadManager>(TYPES.PayloadManager),
|
||||||
this.get<EncryptionOperators>(TYPES.EncryptionOperators),
|
this.get<DecryptTypeAPayloadWithKeyLookup>(TYPES.DecryptTypeAPayloadWithKeyLookup),
|
||||||
this.get<KeySystemKeyManager>(TYPES.KeySystemKeyManager),
|
|
||||||
this.get<RootKeyManager>(TYPES.RootKeyManager),
|
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user