Skip to content

Commit

Permalink
Merge pull request #80 from zama-ai/fix-types
Browse files Browse the repository at this point in the history
Fix types
  • Loading branch information
immortal-tofu authored Jun 26, 2024
2 parents e16fc2d + dcae177 commit 8187baf
Show file tree
Hide file tree
Showing 4 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.5.0-13",
"version": "0.5.0-14",
"description": "fhEVM SDK for blockchain using TFHE",
"main": "lib/node.js",
"types": "lib/node/node.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions src/sdk/keypair.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe('token', () => {
expect(eip712.primaryType).toBe('Reencrypt');
expect(eip712.types.Reencrypt.length).toBe(1);
expect(eip712.types.Reencrypt[0].name).toBe('publicKey');
expect(eip712.types.Reencrypt[0].type).toBe('bytes32');
expect(eip712.types.Reencrypt[0].type).toBe('bytes');
});

it('create a valid EIP712 with delegated accunt', async () => {
Expand All @@ -64,7 +64,7 @@ describe('token', () => {
expect(eip712.primaryType).toBe('Reencrypt');
expect(eip712.types.Reencrypt.length).toBe(2);
expect(eip712.types.Reencrypt[0].name).toBe('publicKey');
expect(eip712.types.Reencrypt[0].type).toBe('bytes32');
expect(eip712.types.Reencrypt[0].type).toBe('bytes');
expect(eip712.types.Reencrypt[1].name).toBe('delegatedAccount');
expect(eip712.types.Reencrypt[1].type).toBe('address');
});
Expand Down
2 changes: 1 addition & 1 deletion src/sdk/keypair.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const createEIP712 =
{ name: 'verifyingContract', type: 'address' },
],
// Refer to primaryType.
Reencrypt: [{ name: 'publicKey', type: 'bytes32' }],
Reencrypt: [{ name: 'publicKey', type: 'bytes' }],
},
// This defines the message you're proposing the user to sign, is dapp-specific, and contains
// anything you want. There are no required fields. Be as explicit as possible when building out
Expand Down

0 comments on commit 8187baf

Please sign in to comment.