From 04151af0d02f0ac2def0c6e032efacc375f3d75a Mon Sep 17 00:00:00 2001
From: Zdravko Iliev <zdravko.iliev@vereign.com>
Date: Mon, 19 Feb 2024 16:45:30 +0200
Subject: [PATCH] fix: typo

---
 apps/agent/README.md                         |  2 +-
 libs/askar/src/askar-rest/rest.controller.ts |  2 +-
 libs/askar/src/askar/agent.service.ts        | 19 ++++++++++++-------
 3 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/apps/agent/README.md b/apps/agent/README.md
index 63a0c611..4ac3348f 100644
--- a/apps/agent/README.md
+++ b/apps/agent/README.md
@@ -1,4 +1,4 @@
-# OCM ENGINE - AGENT 
+# OCM ENGINE - AGENT
 
 Agent service is a wrapper around @ocm-engine/askar library. 
 
diff --git a/libs/askar/src/askar-rest/rest.controller.ts b/libs/askar/src/askar-rest/rest.controller.ts
index adbc7697..72b31957 100644
--- a/libs/askar/src/askar-rest/rest.controller.ts
+++ b/libs/askar/src/askar-rest/rest.controller.ts
@@ -36,7 +36,7 @@ import { AuthGuard } from "./auth/auth.guard";
 @Controller("v1")
 @UseGuards(AuthGuard)
 export class RestController {
-  constructor(private readonly agentService: AgentService) {}
+  constructor(private readonly agentService: AgentService) { }
 
   @Get("/invitations")
   async fetchInvitations(@Query() filter: InvitationFilterDto) {
diff --git a/libs/askar/src/askar/agent.service.ts b/libs/askar/src/askar/agent.service.ts
index b5476ac3..32adca7f 100644
--- a/libs/askar/src/askar/agent.service.ts
+++ b/libs/askar/src/askar/agent.service.ts
@@ -418,8 +418,8 @@ export class AgentService {
       await this.askar.agent.credentials.update(credentialRecord);
 
       const outOfBandRecord = await this.askar.agent.oob.createInvitation({
-        e],
-        dshake: false,
+        messages: [message],
+        handshake: false,
       });
 
       const credentialUrl = outOfBandRecord.outOfBandInvitation.toUrl({
@@ -1003,12 +1003,17 @@ export class AgentService {
   sendMessage = async (
     dto: MakeBasicMessageRequestDto,
   ): Promise<MessageRecordDto> => {
-
-    console.log('incoming data size is ', Buffer.from(dto.message).length/ (1024 * 1024));
+    console.log(
+      "incoming data size is ",
+      Buffer.from(dto.message).length / (1024 * 1024),
+    );
     const compressedData = fflate.compressSync(Buffer.from(dto.message));
-    console.log('compressed data is', Buffer.from(compressedData).length/ (1024 * 1024));
-    const compressedMessage = Buffer.from(compressedData).toString('hex')
-    console.log('compressed as hex is ',Buffer.from(compressedMessage))
+    console.log(
+      "compressed data is",
+      Buffer.from(compressedData).length / (1024 * 1024),
+    );
+    const compressedMessage = Buffer.from(compressedData).toString("hex");
+    console.log("compressed as hex is ", Buffer.from(compressedMessage));
 
     const messageRecord = await this.askar.agent.basicMessages.sendMessage(
       dto.connectionId,
-- 
GitLab