timelock-sdk 0.0.148 → 0.0.150

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
@@ -1,8 +1,8 @@
1
1
  'use client';
2
2
 
3
3
 
4
- const require_optionUtils = require('./optionUtils-Cd3aDeDW.cjs');
5
- const require_optionsMarket = require('./optionsMarket-BvsHPNmm.cjs');
4
+ const require_optionUtils = require('./optionUtils-ChajfNR0.cjs');
5
+ const require_optionsMarket = require('./optionsMarket-XbnJNwMF.cjs');
6
6
  const require_singleOwnerVault = require('./singleOwnerVault-GCpQV7pN.cjs');
7
7
  let viem = require("viem");
8
8
  let react = require("react");
@@ -685,24 +685,24 @@ const useMarketVolume = (marketAddr) => {
685
685
 
686
686
  //#endregion
687
687
  //#region src/hooks/options/useMaxPositionSize.ts
688
- const useMaxPositionSize = (marketAddr, maxBorrowableRange = 100) => {
688
+ const useMaxPositionSize = (marketAddr, strikeTick, maxSteps = 100) => {
689
689
  const { timelockLens } = useLens();
690
690
  const { optionAssetDecimals } = useMarketData(marketAddr);
691
691
  const { data, ...rest } = (0, wagmi.useReadContract)({
692
692
  address: timelockLens === null || timelockLens === void 0 ? void 0 : timelockLens.address,
693
693
  abi: require_optionsMarket.lensAbi,
694
- functionName: "getMaxATMSizes",
695
- args: [marketAddr, maxBorrowableRange],
694
+ functionName: strikeTick ? "getMaxPositionSizes" : "getMaxATMPositionSizes",
695
+ args: marketAddr ? strikeTick ? [
696
+ marketAddr,
697
+ strikeTick,
698
+ maxSteps
699
+ ] : [marketAddr, maxSteps] : void 0,
696
700
  query: { enabled: !!marketAddr && !!timelockLens },
697
701
  gas: 100000000n
698
702
  });
699
- const { maxCallSize, maxPutSize } = (0, react.useMemo)(() => data && optionAssetDecimals ? {
700
- maxCallSize: require_optionUtils.wrapAmount(data[0], optionAssetDecimals),
701
- maxPutSize: require_optionUtils.wrapAmount(data[1], optionAssetDecimals)
702
- } : {}, [data, optionAssetDecimals]);
703
703
  return {
704
- maxCallSize,
705
- maxPutSize,
704
+ maxCallSize: data && optionAssetDecimals ? require_optionUtils.wrapAmount(data[0], optionAssetDecimals) : void 0,
705
+ maxPutSize: data && optionAssetDecimals ? require_optionUtils.wrapAmount(data[1], optionAssetDecimals) : void 0,
706
706
  ...rest
707
707
  };
708
708
  };