From 7e348ac8a9101b398571b90f21ecd38595db7cc3 Mon Sep 17 00:00:00 2001
From: Alfredo Gallardo <agallardol@outlook.com>
Date: Thu, 2 Nov 2023 19:22:50 -0300
Subject: [PATCH] - fix: encrypt param error

---
 libs/shinkai-message-ts/src/cryptography/shinkai-encryption.ts | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libs/shinkai-message-ts/src/cryptography/shinkai-encryption.ts b/libs/shinkai-message-ts/src/cryptography/shinkai-encryption.ts
index 97e203d9b..3eedbac88 100644
--- a/libs/shinkai-message-ts/src/cryptography/shinkai-encryption.ts
+++ b/libs/shinkai-message-ts/src/cryptography/shinkai-encryption.ts
@@ -19,9 +19,8 @@ export async function encryptMessageWithPassphrase(
   const nonce = sodium.randombytes_buf(
     sodium.crypto_aead_chacha20poly1305_IETF_NPUBBYTES
   );
-  const plaintext_bytes = sodium.from_string(message);
   const ciphertext = sodium.crypto_aead_chacha20poly1305_ietf_encrypt(
-    plaintext_bytes,
+    message,
     null,
     null,
     nonce,