diff --git a/guardian-service/src/api/profile.service.ts b/guardian-service/src/api/profile.service.ts index 9ae1a7b97..c3d1f055e 100644 --- a/guardian-service/src/api/profile.service.ts +++ b/guardian-service/src/api/profile.service.ts @@ -424,7 +424,7 @@ async function createUserProfile( if (vcDocument) { logger.info('Create VC Document', ['GUARDIAN_SERVICE']); - let credentialSubject: any = { ...vcDocument } || {}; + let credentialSubject: any = { ...vcDocument }; credentialSubject.id = userDID; if (schemaObject) { credentialSubject = SchemaHelper.updateObjectContext(schemaObject, credentialSubject); diff --git a/queue-service/src/app.ts b/queue-service/src/app.ts index 7c14828ec..b2b3a0407 100644 --- a/queue-service/src/app.ts +++ b/queue-service/src/app.ts @@ -1,4 +1,4 @@ -import { ApplicationState, COMMON_CONNECTION_CONFIG, DatabaseServer, GenerateTLSOptionsNats, MessageBrokerChannel, mongoForLoggingInitialization, NotificationService, PinoLogger, pinoLoggerInitialization } from '@guardian/common'; +import { ApplicationState, COMMON_CONNECTION_CONFIG, DatabaseServer, GenerateTLSOptionsNats, LargePayloadContainer, MessageBrokerChannel, mongoForLoggingInitialization, NotificationService, PinoLogger, pinoLoggerInitialization } from '@guardian/common'; import { ApplicationStates, GenerateUUIDv4 } from '@guardian/interfaces'; import { MikroORM } from '@mikro-orm/core'; import { MongoDriver } from '@mikro-orm/mongodb'; @@ -6,14 +6,14 @@ import * as process from 'process'; import { Module } from '@nestjs/common'; import { NestFactory } from '@nestjs/core'; import { MicroserviceOptions, Transport } from '@nestjs/microservices'; -import { QueueService } from './queue-service/queue-service'; +import { QueueService } from './queue-service/queue-service.js'; @Module({ providers: [ NotificationService, ] }) -class AppModule{ +class AppModule { } const channelName = (process.env.SERVICE_CHANNEL || `queue.${GenerateUUIDv4().substring(26)}`).toUpperCase(); @@ -51,6 +51,11 @@ Promise.all([ await new QueueService().setConnection(cn).init(); + const maxPayload = parseInt(process.env.MQ_MAX_PAYLOAD, 10); + if (Number.isInteger(maxPayload)) { + new LargePayloadContainer().runServer(); + } + await state.updateState(ApplicationStates.READY); await logger.info('Queue service started', ['QUEUE_SERVICE']) diff --git a/worker-service/src/api/helpers/hedera-sdk-helper.ts b/worker-service/src/api/helpers/hedera-sdk-helper.ts index 535b959d9..b4da2bd46 100644 --- a/worker-service/src/api/helpers/hedera-sdk-helper.ts +++ b/worker-service/src/api/helpers/hedera-sdk-helper.ts @@ -50,7 +50,7 @@ import { ContractParamType, FireblocksCreds, GenerateUUIDv4, HederaResponseCode, import Long from 'long'; import { TransactionLogger } from './transaction-logger.js'; import process from 'process'; -import { FireblocksHelper } from './fireblocks-helper'; +import { FireblocksHelper } from './fireblocks-helper.js'; export const MAX_FEE = Math.abs(+process.env.MAX_TRANSACTION_FEE) || 30; export const INITIAL_BALANCE = 30;