@pyratzlabs/react-fhevm-utils 3.6.0 → 3.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -23,7 +23,7 @@ export declare const useUnwrap: ({ encryptedErc20 }: Props) => {
23
23
  type: import("viem").TransactionType;
24
24
  chainId: number;
25
25
  } | undefined;
26
- unwrap: (handles: Uint8Array[], inputProof: Uint8Array) => void;
26
+ unwrap: (handles: Uint8Array[], inputProof?: Uint8Array) => void;
27
27
  isFailed: boolean;
28
28
  isLoading: boolean;
29
29
  isSuccess: boolean;
@@ -13,9 +13,12 @@ export const useUnwrap = ({ encryptedErc20 }) => {
13
13
  if (!address)
14
14
  throw new Error("UNWRAP: User is not connected");
15
15
  const handle = toHexString(handles[0]);
16
- const proof = toHexString(inputProof);
16
+ const proof = inputProof ? toHexString(inputProof) : undefined;
17
+ const args = proof
18
+ ? [address, address, handle, proof]
19
+ : [address, address, handle];
17
20
  perform({
18
- args: [address, address, handle, proof],
21
+ args,
19
22
  });
20
23
  };
21
24
  return { unwrapData: data, unwrap, isFailed, isLoading, isSuccess };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pyratzlabs/react-fhevm-utils",
3
- "version": "3.6.0",
3
+ "version": "3.6.1",
4
4
  "description": "React hooks and utilities for Fhevmjs",
5
5
  "main": "dist/index.js",
6
6
  "files": [