timelock-sdk 0.0.108 → 0.0.110
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--yJ0Oalw.d.ts} +5 -8
- package/dist/{client-_c3y1ZlX.d.ts → client-61tvmrlq.d.cts} +291 -294
- package/dist/client.cjs +47 -4
- 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 +47 -4
- 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
|
@@ -418,7 +418,17 @@ const useExerciseOption = (marketAddr) => {
|
|
|
418
418
|
]
|
|
419
419
|
});
|
|
420
420
|
await (0, viem_actions.waitForTransactionReceipt)(client, { hash });
|
|
421
|
-
queryClient.invalidateQueries({ queryKey: [
|
|
421
|
+
queryClient.invalidateQueries({ queryKey: [
|
|
422
|
+
"userOptions",
|
|
423
|
+
address === null || address === void 0 ? void 0 : address.toLowerCase(),
|
|
424
|
+
true
|
|
425
|
+
] });
|
|
426
|
+
queryClient.invalidateQueries({ queryKey: [
|
|
427
|
+
"userOptions",
|
|
428
|
+
address === null || address === void 0 ? void 0 : address.toLowerCase(),
|
|
429
|
+
false
|
|
430
|
+
] });
|
|
431
|
+
queryClient.invalidateQueries({ queryKey: ["readContract"] });
|
|
422
432
|
return hash;
|
|
423
433
|
};
|
|
424
434
|
return (0, __tanstack_react_query.useMutation)({ mutationFn: exerciseOption });
|
|
@@ -550,7 +560,17 @@ const useMintOption = (marketAddr) => {
|
|
|
550
560
|
]
|
|
551
561
|
});
|
|
552
562
|
await (0, viem_actions.waitForTransactionReceipt)(client, { hash });
|
|
553
|
-
queryClient.invalidateQueries({ queryKey: [
|
|
563
|
+
queryClient.invalidateQueries({ queryKey: [
|
|
564
|
+
"userOptions",
|
|
565
|
+
address === null || address === void 0 ? void 0 : address.toLowerCase(),
|
|
566
|
+
true
|
|
567
|
+
] });
|
|
568
|
+
queryClient.invalidateQueries({ queryKey: [
|
|
569
|
+
"userOptions",
|
|
570
|
+
address === null || address === void 0 ? void 0 : address.toLowerCase(),
|
|
571
|
+
false
|
|
572
|
+
] });
|
|
573
|
+
queryClient.invalidateQueries({ queryKey: ["readContract"] });
|
|
554
574
|
return hash;
|
|
555
575
|
};
|
|
556
576
|
return (0, __tanstack_react_query.useMutation)({ mutationFn: mintOption });
|
|
@@ -1081,7 +1101,17 @@ const useMintPerp = (marketAddr) => {
|
|
|
1081
1101
|
duration,
|
|
1082
1102
|
strikeTick: validStrikeTick
|
|
1083
1103
|
});
|
|
1084
|
-
queryClient.invalidateQueries({ queryKey: [
|
|
1104
|
+
queryClient.invalidateQueries({ queryKey: [
|
|
1105
|
+
"userOptions",
|
|
1106
|
+
address === null || address === void 0 ? void 0 : address.toLowerCase(),
|
|
1107
|
+
true
|
|
1108
|
+
] });
|
|
1109
|
+
queryClient.invalidateQueries({ queryKey: [
|
|
1110
|
+
"userOptions",
|
|
1111
|
+
address === null || address === void 0 ? void 0 : address.toLowerCase(),
|
|
1112
|
+
false
|
|
1113
|
+
] });
|
|
1114
|
+
queryClient.invalidateQueries({ queryKey: ["readContract"] });
|
|
1085
1115
|
};
|
|
1086
1116
|
return (0, __tanstack_react_query.useMutation)({ mutationFn: mintPerp });
|
|
1087
1117
|
};
|
|
@@ -1089,11 +1119,24 @@ const useMintPerp = (marketAddr) => {
|
|
|
1089
1119
|
//#endregion
|
|
1090
1120
|
//#region src/hooks/perps/useClosePerp.ts
|
|
1091
1121
|
const useClosePerp = () => {
|
|
1122
|
+
const queryClient = (0, __tanstack_react_query.useQueryClient)();
|
|
1123
|
+
const { address } = (0, wagmi.useAccount)();
|
|
1092
1124
|
const { operator, signMessage: { mutateAsync: signMessage } } = usePerpsOperator();
|
|
1093
1125
|
return (0, __tanstack_react_query.useMutation)({ mutationFn: async (body) => {
|
|
1094
1126
|
if (!operator) throw new Error("Operator not connected");
|
|
1095
1127
|
if (!operator.auth) await signMessage();
|
|
1096
|
-
|
|
1128
|
+
await operator.exercisePerp(body);
|
|
1129
|
+
queryClient.invalidateQueries({ queryKey: [
|
|
1130
|
+
"userOptions",
|
|
1131
|
+
address === null || address === void 0 ? void 0 : address.toLowerCase(),
|
|
1132
|
+
true
|
|
1133
|
+
] });
|
|
1134
|
+
queryClient.invalidateQueries({ queryKey: [
|
|
1135
|
+
"userOptions",
|
|
1136
|
+
address === null || address === void 0 ? void 0 : address.toLowerCase(),
|
|
1137
|
+
false
|
|
1138
|
+
] });
|
|
1139
|
+
queryClient.invalidateQueries({ queryKey: ["readContract"] });
|
|
1097
1140
|
} });
|
|
1098
1141
|
};
|
|
1099
1142
|
|