timelock-sdk 0.0.46 → 0.0.47

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
@@ -395,7 +395,7 @@ const useOptionPnl = (option) => {
395
395
  const { exact: currentTick } = useCurrentTick(pool);
396
396
  const strikeSize = positionSizeCurrent * strikePrice / require_numberUtils.PRICE_PRECISION;
397
397
  const displayPnl = (0, react.useMemo)(() => {
398
- if (optionAssetIsToken0 === void 0 || currentTick === void 0 || !positionSizeCurrent || !payoutAssetDecimals) return {};
398
+ if (optionAssetIsToken0 === void 0 || currentTick === void 0 || !positionSizeCurrent || !payoutAssetDecimals) return void 0;
399
399
  const delta = (optionAssetIsToken0 ? require_numberUtils.token0ToToken1(positionSizeCurrent, currentTick) : require_numberUtils.token1ToToken0(positionSizeCurrent, currentTick)) - strikeSize;
400
400
  return require_numberUtils.wrapAmount(optionType === "CALL" ? delta : -delta, payoutAssetDecimals);
401
401
  }, [
@@ -407,7 +407,7 @@ const useOptionPnl = (option) => {
407
407
  ]);
408
408
  return {
409
409
  unrealizedPayout: (0, react.useMemo)(() => {
410
- if (!payoutAssetDecimals || !currentTick || !tickSpacing) return {};
410
+ if (!payoutAssetDecimals || !currentTick || !tickSpacing) return void 0;
411
411
  const [amount0, amount1] = require_numberUtils.liquiditiesToAmounts(option.liquiditiesCurrent, option.startTick, currentTick, tickSpacing);
412
412
  const delta = (optionAssetIsToken0 ? amount1 + require_numberUtils.token0ToToken1(amount0, currentTick) : amount0 + require_numberUtils.token1ToToken0(amount1, currentTick)) - strikeSize;
413
413
  const pnl = optionType === "CALL" ? delta : -delta;