@pyratzlabs/react-fhevm-utils 3.4.2 → 3.4.3

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.
@@ -1,9 +1,9 @@
1
- import { Address } from "viem";
1
+ import type { Address } from "viem";
2
2
  interface Props {
3
3
  wrapper: Address;
4
4
  }
5
5
  export declare const useFinalizeUnwrap: ({ wrapper }: Props) => {
6
- finalizeUnwrap: (requestId: bigint, clearValues: Address, decryptionProof: Address) => void;
6
+ finalizeUnwrap: (burnAmount: Address, clearValues: bigint, decryptionProof: Address) => void;
7
7
  isFailed: boolean;
8
8
  isLoading: boolean;
9
9
  isSuccess: boolean;
@@ -1,6 +1,6 @@
1
- import { usePerformTransaction } from "./usePerformTransaction";
2
1
  import { WRAPPER_ABI } from "../../types/ABI/Wrapper.abi";
3
2
  import { useAccount } from "./useAccount";
3
+ import { usePerformTransaction } from "./usePerformTransaction";
4
4
  export const useFinalizeUnwrap = ({ wrapper }) => {
5
5
  const { address } = useAccount();
6
6
  const { perform, isFailed, isLoading, isSuccess } = usePerformTransaction({
@@ -8,11 +8,11 @@ export const useFinalizeUnwrap = ({ wrapper }) => {
8
8
  address: wrapper,
9
9
  functionName: "finalizeUnwrap",
10
10
  });
11
- const finalizeUnwrap = (requestId, clearValues, decryptionProof) => {
11
+ const finalizeUnwrap = (burnAmount, clearValues, decryptionProof) => {
12
12
  if (!address)
13
13
  throw new Error("UNWRAP: User is not connected");
14
14
  perform({
15
- args: [requestId, clearValues, decryptionProof],
15
+ args: [burnAmount, clearValues, decryptionProof],
16
16
  });
17
17
  };
18
18
  return { finalizeUnwrap, isFailed, isLoading, isSuccess };
@@ -1,4 +1,4 @@
1
- import { Abi, Address, ContractFunctionArgs, ContractFunctionName } from "viem";
1
+ import type { Abi, Address, ContractFunctionArgs, ContractFunctionName } from "viem";
2
2
  interface Props<TAbi extends Abi, TFunction extends ContractFunctionName<TAbi, "nonpayable" | "payable">> {
3
3
  abi: TAbi;
4
4
  address: Address;
@@ -7,8 +7,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import { useConfig, useWaitForTransactionReceipt, useWriteContract, } from "wagmi";
11
10
  import { simulateContract } from "@wagmi/core";
11
+ import { useConfig, useWaitForTransactionReceipt, useWriteContract, } from "wagmi";
12
12
  export const usePerformTransaction = ({ abi, address, functionName, }) => {
13
13
  const config = useConfig();
14
14
  const { writeContract, data: writeContractData, isError: isWriteError, error, } = useWriteContract();