@pyratzlabs/react-fhevm-utils 3.4.4 → 3.4.6

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.
@@ -8,7 +8,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  });
9
9
  };
10
10
  import { useConfig, useWaitForTransactionReceipt, useWriteContract, } from "wagmi";
11
- import { simulateContract } from "@wagmi/core";
12
11
  export const usePerformTransaction = ({ abi, address, functionName, }) => {
13
12
  const config = useConfig();
14
13
  const { writeContract, data: writeContractData, isError: isWriteError, error, } = useWriteContract();
@@ -16,19 +15,14 @@ export const usePerformTransaction = ({ abi, address, functionName, }) => {
16
15
  hash: writeContractData,
17
16
  });
18
17
  const perform = (_a) => __awaiter(void 0, [_a], void 0, function* ({ args, value, }) {
19
- try {
20
- const result = yield simulateContract(config, {
21
- address,
22
- abi: abi,
23
- functionName,
24
- value,
25
- args: args,
26
- });
27
- writeContract(result.request);
28
- }
29
- catch (error) {
30
- throw error;
31
- }
18
+ // const result = await simulateContract(config, );
19
+ writeContract({
20
+ address,
21
+ abi: abi,
22
+ functionName,
23
+ value,
24
+ args: args,
25
+ });
32
26
  });
33
27
  return {
34
28
  data,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pyratzlabs/react-fhevm-utils",
3
- "version": "3.4.4",
3
+ "version": "3.4.6",
4
4
  "description": "React hooks and utilities for Fhevmjs",
5
5
  "main": "dist/index.js",
6
6
  "files": [