timelock-sdk 0.0.32 → 0.0.34
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 +5 -4
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +61 -61
- package/dist/client.d.ts +55 -55
- package/dist/client.js +5 -4
- package/dist/client.js.map +1 -1
- package/dist/{index-CA5kB-yT.d.cts → index-B7b3c8cu.d.cts} +92 -92
- package/dist/package.d.cts +1 -1
- package/package.json +1 -1
package/dist/client.cjs
CHANGED
|
@@ -420,8 +420,9 @@ const useOptionPremium = (marketAddr, optionType, optionAmount, duration, strike
|
|
|
420
420
|
const { exact: currentTick } = useCurrentTick(pool);
|
|
421
421
|
const strikeTickRounded = (0, react.useMemo)(() => {
|
|
422
422
|
if (!tickSpacing || currentTick === void 0) return;
|
|
423
|
-
|
|
424
|
-
if (optionType === "CALL" && optionAssetIsToken0 || optionType === "PUT" && !optionAssetIsToken0)
|
|
423
|
+
let strikeTickRounded$1 = require_numberUtils.roundTickDown(strikeTick ?? currentTick, tickSpacing);
|
|
424
|
+
if (optionType === "CALL" && optionAssetIsToken0 || optionType === "PUT" && !optionAssetIsToken0) strikeTickRounded$1 += tickSpacing;
|
|
425
|
+
return strikeTickRounded$1;
|
|
425
426
|
}, [
|
|
426
427
|
currentTick,
|
|
427
428
|
tickSpacing,
|
|
@@ -433,12 +434,12 @@ const useOptionPremium = (marketAddr, optionType, optionAmount, duration, strike
|
|
|
433
434
|
address: marketAddr,
|
|
434
435
|
abi: require_optionsMarket.optionsMarketAbi,
|
|
435
436
|
functionName: "calculatePremium",
|
|
436
|
-
args: [
|
|
437
|
+
args: strikeTickRounded !== void 0 ? [
|
|
437
438
|
optionType === "CALL" ? 0 : 1,
|
|
438
439
|
optionAmount,
|
|
439
440
|
strikeTickRounded,
|
|
440
441
|
BigInt(duration)
|
|
441
|
-
],
|
|
442
|
+
] : void 0,
|
|
442
443
|
query: { enabled: strikeTickRounded !== void 0 }
|
|
443
444
|
});
|
|
444
445
|
return (0, react.useMemo)(() => {
|