Skip to content

Commit

Permalink
Use const for max slippage
Browse files Browse the repository at this point in the history
  • Loading branch information
anxolin committed Aug 22, 2024
1 parent 11e8e93 commit ae99d07
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libs/services/src/SlippageService/SlippageServiceMain.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ describe('SlippageServiceMain', () => {
// Volatility Fair Settlement (Token) = 0.02236067977 / 1 = 0.02236067977
// Slippage BPS = ceil(0.02236067977 * 10000) = 224
// Adjusted Slippage = MAX = 200
expect(result).toBe(200);
expect(result).toBe(MAX_SLIPPAGE_BPS);
});
});

Expand Down Expand Up @@ -423,7 +423,7 @@ describe('SlippageServiceMain', () => {
});

// THEN: We get the minimum slippage
expect(result).toBe(200);
expect(result).toBe(MAX_SLIPPAGE_BPS);

// WHEN: Get slippage (inverting the tokens)
const resultInverted = await slippageService.getSlippageBps({
Expand All @@ -433,7 +433,7 @@ describe('SlippageServiceMain', () => {
});

// THEN: The result should be the same (worst of the two)
expect(resultInverted).toBe(200);
expect(resultInverted).toBe(MAX_SLIPPAGE_BPS);
});
});
});
Expand Down

0 comments on commit ae99d07

Please sign in to comment.