@haven-fi/solauto-sdk 1.0.181 → 1.0.183

Sign up to get free protection for your applications and to get access to all the features.
@@ -42,7 +42,7 @@ async function getJupSwapTransaction(signer, swapDetails, attemptNum) {
42
42
  if (swapDetails.exactOut) {
43
43
  console.log(quoteResponse.inAmount);
44
44
  quoteResponse.inAmount = (parseInt(quoteResponse.inAmount) +
45
- parseInt(quoteResponse.inAmount) * (0, numberUtils_1.fromBps)(priceImpactBps)).toString();
45
+ Math.ceil(parseInt(quoteResponse.inAmount) * (0, numberUtils_1.fromBps)(finalPriceSlippageBps))).toString();
46
46
  console.log(quoteResponse.inAmount);
47
47
  }
48
48
  console.log("Getting jup instructions...");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haven-fi/solauto-sdk",
3
- "version": "1.0.181",
3
+ "version": "1.0.183",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "description": "Typescript SDK for the Solauto program on the Solana blockchain",
@@ -85,7 +85,7 @@ export async function getJupSwapTransaction(
85
85
  console.log(quoteResponse.inAmount);
86
86
  quoteResponse.inAmount = (
87
87
  parseInt(quoteResponse.inAmount) +
88
- parseInt(quoteResponse.inAmount) * fromBps(priceImpactBps)
88
+ Math.ceil(parseInt(quoteResponse.inAmount) * fromBps(finalPriceSlippageBps))
89
89
  ).toString();
90
90
  console.log(quoteResponse.inAmount);
91
91
  }