@pendle/sdk-boros 0.1.17 → 0.1.18

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.
@@ -23,7 +23,7 @@ class Market {
23
23
  const { orderRate, leverage, marginFactor, markRate, minMarginIndexRate, marketExpiry_s, minMarginIndexDuration_s, isMarketOrder, } = data;
24
24
  const timeToMaturity_y = (marketExpiry_s - Math.floor(Date.now() / 1000)) / SECONDS_PER_YEARS;
25
25
  const minTime_y = minMarginIndexDuration_s / SECONDS_PER_YEARS;
26
- const time = boros_offchain_math_1.FixedX18.fromNumber(Math.min(timeToMaturity_y, minTime_y));
26
+ const time = boros_offchain_math_1.FixedX18.fromNumber(Math.max(timeToMaturity_y, minTime_y));
27
27
  const contractRate = markRate.gt(minMarginIndexRate) ? markRate : minMarginIndexRate;
28
28
  const offchainRate = orderRate.gt(minMarginIndexRate) ? orderRate : minMarginIndexRate;
29
29
  const contractSuf = contractRate.mulDown(time).mulDown(marginFactor);
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@pendle/sdk-boros",
3
3
  "description": "Pendle SDK for Boros",
4
4
  "license": "MIT",
5
- "version": "0.1.17",
5
+ "version": "0.1.18",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "files": [