Skip to content

Commit

Permalink
fix() change check of 0 number
Browse files Browse the repository at this point in the history
  • Loading branch information
immortal-tofu committed Jul 15, 2023
1 parent 2990cb6 commit 76e8998
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/sdk/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,18 @@ export const createInstance = async (params: FhevmInstanceParams): Promise<Fhevm
return {
// Parameters
encrypt8(value) {
if (!value) throw new Error('Missing value');
if (value == null) throw new Error('Missing value');
if (typeof value !== 'number') throw new Error('Value must be a number');
return encrypt8(value, tfheCompactPublicKey);
},
encrypt16(value) {
if (!value) throw new Error('Missing value');
if (value == null) throw new Error('Missing value');
if (typeof value !== 'number') throw new Error('Value must be a number');
return encrypt16(value, tfheCompactPublicKey);
},

encrypt32(value) {
if (!value) throw new Error('Missing value');
if (value == null) throw new Error('Missing value');
if (typeof value !== 'number') throw new Error('Value must be a number');
return encrypt32(value, tfheCompactPublicKey);
},
Expand Down

0 comments on commit 76e8998

Please sign in to comment.