timelock-sdk 0.0.98 → 0.0.100

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
@@ -959,7 +959,8 @@ const usePerpsOperator = () => {
959
959
  operator,
960
960
  address,
961
961
  signMessage: (0, __tanstack_react_query.useMutation)({ mutationFn: async () => {
962
- if (!operator || !userAddr || !signMessageAsync) return;
962
+ if (!operator) throw new Error("Operator not initialized");
963
+ if (!userAddr) throw new Error("Wallet not connected");
963
964
  const message = await operator.genAuthMessage(userAddr);
964
965
  const signature = await signMessageAsync({ message });
965
966
  saveSignature(userAddr, message, signature);
@@ -1054,7 +1055,10 @@ const useMintPerp = (marketAddr) => {
1054
1055
  if (!operator || !operatorAddr) throw new Error("Operator address not found");
1055
1056
  if (!tickSpacing || currentTick === void 0) throw new Error("Pool data not found");
1056
1057
  if (optionAssetIsToken0 === void 0 || !payoutAsset) throw new Error("Market data not found");
1057
- if (!operator.auth) await signMessage();
1058
+ if (!operator.auth) {
1059
+ console.log("here");
1060
+ await signMessage();
1061
+ }
1058
1062
  if (!hasEnoughPerms) await setOperatorPerms({
1059
1063
  operator: operatorAddr,
1060
1064
  canMint: true,