@crypticdot/defituna-client 3.1.8 → 3.1.9

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/index.js CHANGED
@@ -10439,7 +10439,7 @@ function getDecreaseSpotPositionQuote(args) {
10439
10439
  estimatedAmount = BigInt(
10440
10440
  Math.floor(posTokenIsA ? Number(increaseAmount) * price : Number(increaseAmount) / price)
10441
10441
  );
10442
- collateral = leverage > 1 ? BigInt(Math.floor(Number(increaseAmount) / leverage)) : estimatedAmount;
10442
+ collateral = BigInt(Math.floor(Number(increaseAmount) / leverage));
10443
10443
  borrow = increaseAmount - collateral;
10444
10444
  if (positionDebt > 0) {
10445
10445
  const swapQuote = (0, import_fusionamm_core4.swapQuoteByOutputToken)(positionDebt, !posTokenIsA, 0, fusionPool, tickArrays);
package/dist/index.mjs CHANGED
@@ -10608,7 +10608,7 @@ function getDecreaseSpotPositionQuote(args) {
10608
10608
  estimatedAmount = BigInt(
10609
10609
  Math.floor(posTokenIsA ? Number(increaseAmount) * price : Number(increaseAmount) / price)
10610
10610
  );
10611
- collateral = leverage > 1 ? BigInt(Math.floor(Number(increaseAmount) / leverage)) : estimatedAmount;
10611
+ collateral = BigInt(Math.floor(Number(increaseAmount) / leverage));
10612
10612
  borrow = increaseAmount - collateral;
10613
10613
  if (positionDebt > 0) {
10614
10614
  const swapQuote = swapQuoteByOutputToken(positionDebt, !posTokenIsA, 0, fusionPool, tickArrays);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@crypticdot/defituna-client",
3
3
  "description": "Typescript client to interact with DefiTuna's on-chain program.",
4
- "version": "3.1.8",
4
+ "version": "3.1.9",
5
5
  "private": false,
6
6
  "license": "SEE LICENSE IN LICENSE",
7
7
  "main": "./dist/index.js",