timelock-sdk 0.0.102 → 0.0.103

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
@@ -835,7 +835,7 @@ var PerpsOperator = class {
835
835
  return address;
836
836
  }
837
837
  async genAuthMessage(userAddr) {
838
- const { message } = await this.#request("api/auth/message", { userAddr });
838
+ const { message } = await this.#request("api/auth/gen", { userAddr });
839
839
  return message;
840
840
  }
841
841
  async validateAuthMessage(authMessage, signature) {
@@ -958,14 +958,14 @@ const usePerpsOperator = () => {
958
958
  return {
959
959
  operator,
960
960
  address,
961
- signMessage: (0, __tanstack_react_query.useMutation)({ mutationFn: (0, react.useCallback)(async () => {
961
+ signMessage: (0, __tanstack_react_query.useMutation)({ mutationFn: async () => {
962
962
  if (!operator) throw new Error("Operator not initialized");
963
963
  if (!userAddr) throw new Error("Wallet not connected");
964
964
  const message = await operator.genAuthMessage(userAddr);
965
965
  const signature = await signMessageAsync({ message });
966
966
  saveSignature(userAddr, message, signature);
967
967
  operator.setAuth(message, signature);
968
- }, [operator, userAddr]) })
968
+ } })
969
969
  };
970
970
  };
971
971
 
@@ -1055,10 +1055,7 @@ const useMintPerp = (marketAddr) => {
1055
1055
  if (!operator || !operatorAddr) throw new Error("Operator address not found");
1056
1056
  if (!tickSpacing || currentTick === void 0) throw new Error("Pool data not found");
1057
1057
  if (optionAssetIsToken0 === void 0 || !payoutAsset) throw new Error("Market data not found");
1058
- if (!operator.auth) {
1059
- console.log("here");
1060
- await signMessage();
1061
- }
1058
+ if (!operator.auth) await signMessage();
1062
1059
  if (!hasEnoughPerms) await setOperatorPerms({
1063
1060
  operator: operatorAddr,
1064
1061
  canMint: true,