Skip to content

Commit 7e5d0d4

Browse files
authored
Merge pull request #336 from invariant-labs/fix-slippage-formatting
fix slippage formatting
2 parents 240bb3f + 4a1d771 commit 7e5d0d4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/Swap/Swap.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,7 @@ export const Swap: React.FC<ISwap> = ({
748748

749749
onSwap(
750750
simulateResult.poolKey,
751-
BigInt((+slippTolerance * Number(PERCENTAGE_DENOMINATOR)) / 100),
751+
BigInt(Math.round((+slippTolerance * Number(PERCENTAGE_DENOMINATOR)) / 100)),
752752
simulateResult.targetSqrtPrice,
753753
tokenFrom,
754754
tokenTo,
@@ -777,7 +777,7 @@ export const Swap: React.FC<ISwap> = ({
777777

778778
onSwap(
779779
simulateResult.poolKey,
780-
BigInt((+slippTolerance * Number(PERCENTAGE_DENOMINATOR)) / 100),
780+
BigInt(Math.round((+slippTolerance * Number(PERCENTAGE_DENOMINATOR)) / 100)),
781781
simulateResult.targetSqrtPrice,
782782
tokenFrom,
783783
tokenTo,

0 commit comments

Comments
 (0)