timelock-sdk 0.0.108 → 0.0.109
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-D71s6e9Z.d.cts → client-61tvmrlq.d.cts} +161 -164
- package/dist/{client-_c3y1ZlX.d.ts → client-BcsbWPvK.d.ts} +288 -291
- package/dist/client.cjs +8 -1
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +1 -1
- package/dist/client.d.ts +1 -1
- package/dist/client.js +8 -1
- package/dist/client.js.map +1 -1
- package/dist/package.d.cts +1 -1
- package/dist/package.d.ts +1 -1
- package/package.json +1 -1
package/dist/client.cjs
CHANGED
|
@@ -419,6 +419,7 @@ const useExerciseOption = (marketAddr) => {
|
|
|
419
419
|
});
|
|
420
420
|
await (0, viem_actions.waitForTransactionReceipt)(client, { hash });
|
|
421
421
|
queryClient.invalidateQueries({ queryKey: ["userOptions", address.toLowerCase()] });
|
|
422
|
+
queryClient.invalidateQueries({ queryKey: ["readContract"] });
|
|
422
423
|
return hash;
|
|
423
424
|
};
|
|
424
425
|
return (0, __tanstack_react_query.useMutation)({ mutationFn: exerciseOption });
|
|
@@ -551,6 +552,7 @@ const useMintOption = (marketAddr) => {
|
|
|
551
552
|
});
|
|
552
553
|
await (0, viem_actions.waitForTransactionReceipt)(client, { hash });
|
|
553
554
|
queryClient.invalidateQueries({ queryKey: ["userOptions", address.toLowerCase()] });
|
|
555
|
+
queryClient.invalidateQueries({ queryKey: ["readContract"] });
|
|
554
556
|
return hash;
|
|
555
557
|
};
|
|
556
558
|
return (0, __tanstack_react_query.useMutation)({ mutationFn: mintOption });
|
|
@@ -1082,6 +1084,7 @@ const useMintPerp = (marketAddr) => {
|
|
|
1082
1084
|
strikeTick: validStrikeTick
|
|
1083
1085
|
});
|
|
1084
1086
|
queryClient.invalidateQueries({ queryKey: ["userOptions", address.toLowerCase()] });
|
|
1087
|
+
queryClient.invalidateQueries({ queryKey: ["readContract"] });
|
|
1085
1088
|
};
|
|
1086
1089
|
return (0, __tanstack_react_query.useMutation)({ mutationFn: mintPerp });
|
|
1087
1090
|
};
|
|
@@ -1089,11 +1092,15 @@ const useMintPerp = (marketAddr) => {
|
|
|
1089
1092
|
//#endregion
|
|
1090
1093
|
//#region src/hooks/perps/useClosePerp.ts
|
|
1091
1094
|
const useClosePerp = () => {
|
|
1095
|
+
const queryClient = (0, __tanstack_react_query.useQueryClient)();
|
|
1096
|
+
const { address } = (0, wagmi.useAccount)();
|
|
1092
1097
|
const { operator, signMessage: { mutateAsync: signMessage } } = usePerpsOperator();
|
|
1093
1098
|
return (0, __tanstack_react_query.useMutation)({ mutationFn: async (body) => {
|
|
1094
1099
|
if (!operator) throw new Error("Operator not connected");
|
|
1095
1100
|
if (!operator.auth) await signMessage();
|
|
1096
|
-
|
|
1101
|
+
await operator.exercisePerp(body);
|
|
1102
|
+
queryClient.invalidateQueries({ queryKey: ["userOptions", address === null || address === void 0 ? void 0 : address.toLowerCase()] });
|
|
1103
|
+
queryClient.invalidateQueries({ queryKey: ["readContract"] });
|
|
1097
1104
|
} });
|
|
1098
1105
|
};
|
|
1099
1106
|
|