From b3678b7f4f96d0810644eb2b97b81d0be74e7af0 Mon Sep 17 00:00:00 2001
From: Mircea Nistor <mirceanis@gmail.com>
Date: Fri, 13 Dec 2024 12:26:00 +0100
Subject: [PATCH] style: update error messages for unsupported versions

---
 .gitignore           | 1 +
 src/utils/ERC1024.ts | 6 ++++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/.gitignore b/.gitignore
index 49c174c..e8312ef 100644
--- a/.gitignore
+++ b/.gitignore
@@ -76,4 +76,5 @@ node_modules/
 !.yarn/sdks
 !.yarn/versions
 
+# ignore intellij local files
 .idea/
diff --git a/src/utils/ERC1024.ts b/src/utils/ERC1024.ts
index 82632cd..e847e3a 100644
--- a/src/utils/ERC1024.ts
+++ b/src/utils/ERC1024.ts
@@ -47,7 +47,7 @@ const encrypt = (
       } as Eip1024EncryptedData;
     }
     default:
-      throw new Error('Encryption type/version not supported');
+      throw new Error(`Encryption type/version not supported ${version}`);
   }
 };
 
@@ -88,7 +88,9 @@ const decrypt = (
       return bytesToUtf8(decryptedMessage);
     }
     default:
-      throw new Error('Encryption type/version not supported.');
+      throw new Error(
+        `Encryption type/version not supported (${encryptedData.version}).`,
+      );
   }
 };