From d3214a1dea26f69bfe7919b11cbb91c2c6a00c1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joseph-Andr=C3=A9=20Turk?= Date: Sat, 19 Oct 2024 13:48:44 +0200 Subject: [PATCH] feat: checks if userAddress is diff than contractAddress in reencrypt --- test/fhevmjsMocked.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/fhevmjsMocked.ts b/test/fhevmjsMocked.ts index 9b1932f3..8018f3b0 100644 --- a/test/fhevmjsMocked.ts +++ b/test/fhevmjsMocked.ts @@ -147,6 +147,9 @@ export const reencryptRequestMocked = async ( if (!isAllowed) { throw new Error('User is not authorized to reencrypt this handle!'); } + if (userAddress === contractAddress) { + throw new Error('userAddress should not be equal to contractAddress when requesting reencryption!'); + } await awaitCoprocessor(); return BigInt(await getClearText(handle)); };