Skip to content

Commit

Permalink
Merge pull request #146 from zama-ai/fix/checksum
Browse files Browse the repository at this point in the history
Fix/checksum
  • Loading branch information
immortal-tofu authored Dec 5, 2024
2 parents d92a19f + fcfddbb commit f515707
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fhevmjs",
"version": "0.6.0-18",
"version": "0.6.0-19",
"description": "fhEVM SDK for blockchain using TFHE",
"main": "lib/node.js",
"types": "lib/node/node.d.ts",
Expand Down
6 changes: 3 additions & 3 deletions src/sdk/reencrypt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
process_reencryption_resp_from_js,
u8vec_to_cryptobox_sk,
} from 'node-tkms';
import { ethers } from 'ethers';
import { ethers, getAddress } from 'ethers';

const aclABI = [
'function persistAllowed(uint256 handle, address account) view returns (bool)',
Expand Down Expand Up @@ -42,10 +42,10 @@ export const reencryptRequest =
}
const payloadForRequest = {
signature: signature.replace(/^(0x)/, ''),
client_address: userAddress,
client_address: getAddress(userAddress),
enc_key: publicKey.replace(/^(0x)/, ''),
ciphertext_handle: handle.toString(16).padStart(64, '0'),
eip712_verifying_contract: contractAddress,
eip712_verifying_contract: getAddress(contractAddress),
};
const options = {
method: 'POST',
Expand Down

0 comments on commit f515707

Please sign in to comment.