Skip to content

Commit

Permalink
fix test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
tommyzhao451 committed Aug 8, 2024
1 parent 36a0c3d commit c86c9ea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions test/hardhat/viem/routing.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,8 @@ describe('Viem - Routing tests', function () {
expect(Number(resultV2[i].amount0.toString())).to.be.greaterThan(0);
expect(Number(resultV2[i].amount1.toString())).to.be.greaterThan(0);
expect(Number(resultV2[i].liquidity.toString())).to.be.greaterThan(0);
expect(Number(resultV2[i].feeUSD)).to.be.closeTo(0.156, 0.0003); // swap ~3.8 USDC, fee 0.156
expect(Number(resultV2[i].feeBips) / 1e18).to.be.closeTo(0.0176, 0.005); // position $8.87, bips 0.156/8.87 = ~0.0176
expect(Number(resultV2[i].feeUSD)).to.be.closeTo(0.1556, 0.0003); // swap ~3.8 USDC, fee 0.1556
expect(Number(resultV2[i].feeBips) / 1e18).to.be.closeTo(0.01754, 0.005); // position $8.87, bips 0.1556/8.87 = ~0.01754

expect(resultV2[i].swapData!).to.be.not.empty;
expect(resultV2[i].swapRoute?.length).to.be.greaterThan(0);
Expand Down
2 changes: 1 addition & 1 deletion test/hardhat/viem/slipstream-automan-transaction.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ describe('SlipStreamAutoman transaction tests', function () {
await getBasicPositionInfo(chainId, amm, positionId, publicClient)
).liquidity!;
expect(liquidityBeforeReinvest.toString()).to.equal('13589538797482293814');
expect(liquidityAfterReinvest.toString()).to.equal('14018556727424907792');
expect(liquidityAfterReinvest.toString()).to.equal('14018330155023986625');
expect(
generateAutoCompoundRequestPayload(
eoa,
Expand Down

0 comments on commit c86c9ea

Please sign in to comment.