timelock-sdk 0.0.117 → 0.0.119

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.
package/dist/client.cjs CHANGED
@@ -487,7 +487,7 @@ const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
487
487
 
488
488
  //#endregion
489
489
  //#region src/hooks/options/useExerciseOption.ts
490
- const swapper = "0x2c79DD9797C35A3D966C2716739542a282BB5540";
490
+ const swapper = "0x877309663591ad974bE2c0C7fB453844c8D613D8";
491
491
  const useExerciseOption = (marketAddr) => {
492
492
  const { vault, pool } = useMarketData(marketAddr);
493
493
  const { fee } = usePoolData(pool);
@@ -1050,7 +1050,7 @@ const useSetOperatorPerms = (marketAddr) => {
1050
1050
  //#region src/hooks/perps/useMintPerp.ts
1051
1051
  const useMintPerp = (marketAddr) => {
1052
1052
  const queryClient = (0, __tanstack_react_query.useQueryClient)();
1053
- const client = (0, wagmi.usePublicClient)();
1053
+ const client = (0, wagmi.useClient)();
1054
1054
  const { address } = (0, wagmi.useAccount)();
1055
1055
  const { operator, address: operatorAddr, signMessage: { mutateAsync: signMessage } } = usePerpsOperator();
1056
1056
  const { askForApproval } = useApproval();
@@ -1088,14 +1088,13 @@ const useMintPerp = (marketAddr) => {
1088
1088
  spendingApproval: maxPremium
1089
1089
  });
1090
1090
  await askForApproval(payoutAsset, marketAddr, maxPremium);
1091
- const { txHash } = await operator.mintPerp({
1091
+ await operator.mintPerp({
1092
1092
  marketAddr,
1093
1093
  amount,
1094
1094
  optionType,
1095
1095
  duration,
1096
1096
  strikeTick: validStrikeTick
1097
1097
  });
1098
- await (0, viem_actions.waitForTransactionReceipt)(client, { hash: txHash });
1099
1098
  await sleep(200);
1100
1099
  queryClient.invalidateQueries({ queryKey: ["userOptions"] });
1101
1100
  queryClient.invalidateQueries({ queryKey: ["userOptions"] });
@@ -1108,14 +1107,11 @@ const useMintPerp = (marketAddr) => {
1108
1107
  //#region src/hooks/perps/useClosePerp.ts
1109
1108
  const useClosePerp = () => {
1110
1109
  const queryClient = (0, __tanstack_react_query.useQueryClient)();
1111
- const client = (0, wagmi.useClient)();
1112
1110
  const { operator, signMessage: { mutateAsync: signMessage } } = usePerpsOperator();
1113
1111
  return (0, __tanstack_react_query.useMutation)({ mutationFn: async (body) => {
1114
1112
  if (!operator) throw new Error("Operator not connected");
1115
- if (!client) throw new Error("No RPC client");
1116
1113
  if (!operator.auth) await signMessage();
1117
- const { txHash } = await operator.exercisePerp(body);
1118
- await (0, viem_actions.waitForTransactionReceipt)(client, { hash: txHash });
1114
+ await operator.exercisePerp(body);
1119
1115
  await sleep(200);
1120
1116
  queryClient.invalidateQueries({ queryKey: ["userOptions"] });
1121
1117
  queryClient.invalidateQueries({ queryKey: ["userOptions"] });