Skip to content

Commit

Permalink
feat: checks if userAddress is diff than contractAddress in reencrypt
Browse files Browse the repository at this point in the history
  • Loading branch information
jatZama committed Oct 19, 2024
1 parent dbc0ae9 commit d3214a1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/fhevmjsMocked.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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));
};
Expand Down

0 comments on commit d3214a1

Please sign in to comment.