From c9c78369a801345fd17ca96b73b4822a3d1978b2 Mon Sep 17 00:00:00 2001 From: Isla Koenigsknecht Date: Fri, 17 May 2024 16:52:39 -0400 Subject: [PATCH] Use CryptoJS import for MD5 --- packages/backend/src/nest/libp2p/process-in-chunks.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/nest/libp2p/process-in-chunks.service.ts b/packages/backend/src/nest/libp2p/process-in-chunks.service.ts index 62cbd47d12..c55b131818 100644 --- a/packages/backend/src/nest/libp2p/process-in-chunks.service.ts +++ b/packages/backend/src/nest/libp2p/process-in-chunks.service.ts @@ -2,7 +2,7 @@ import { EventEmitter } from 'events' import fastq, { queueAsPromised } from 'fastq' import Logger from '../common/logger' -import CryptoJS, { MD5 } from 'crypto-js' +import CryptoJS from 'crypto-js' const DEFAULT_CHUNK_SIZE = 10 export const DEFAULT_NUM_TRIES = 2 @@ -146,7 +146,7 @@ export class ProcessInChunksService extends EventEmitter { } private generateTaskId(data: T): string { - return MD5(JSON.stringify(data)).toString(CryptoJS.enc.Hex) + return CryptoJS.MD5(JSON.stringify(data)).toString(CryptoJS.enc.Hex) } public resume() {