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 +6 -2
- package/dist/client.cjs.map +1 -1
- package/dist/client.js +6 -2
- package/dist/client.js.map +1 -1
- package/package.json +1 -1
package/dist/client.js
CHANGED
|
@@ -951,7 +951,8 @@ const usePerpsOperator = () => {
|
|
|
951
951
|
operator,
|
|
952
952
|
address,
|
|
953
953
|
signMessage: useMutation({ mutationFn: async () => {
|
|
954
|
-
if (!operator
|
|
954
|
+
if (!operator) throw new Error("Operator not initialized");
|
|
955
|
+
if (!userAddr) throw new Error("Wallet not connected");
|
|
955
956
|
const message = await operator.genAuthMessage(userAddr);
|
|
956
957
|
const signature = await signMessageAsync({ message });
|
|
957
958
|
saveSignature(userAddr, message, signature);
|
|
@@ -1046,7 +1047,10 @@ const useMintPerp = (marketAddr) => {
|
|
|
1046
1047
|
if (!operator || !operatorAddr) throw new Error("Operator address not found");
|
|
1047
1048
|
if (!tickSpacing || currentTick === void 0) throw new Error("Pool data not found");
|
|
1048
1049
|
if (optionAssetIsToken0 === void 0 || !payoutAsset) throw new Error("Market data not found");
|
|
1049
|
-
if (!operator.auth)
|
|
1050
|
+
if (!operator.auth) {
|
|
1051
|
+
console.log("here");
|
|
1052
|
+
await signMessage();
|
|
1053
|
+
}
|
|
1050
1054
|
if (!hasEnoughPerms) await setOperatorPerms({
|
|
1051
1055
|
operator: operatorAddr,
|
|
1052
1056
|
canMint: true,
|