From c86c9eac0cdb3c0d42c1a27eb1ce5890d33ffc9f Mon Sep 17 00:00:00 2001 From: tommyzhao451 Date: Thu, 8 Aug 2024 16:19:39 -0700 Subject: [PATCH] fix test cases --- test/hardhat/viem/routing.test.ts | 4 ++-- test/hardhat/viem/slipstream-automan-transaction.test.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/hardhat/viem/routing.test.ts b/test/hardhat/viem/routing.test.ts index 002c0912..22971914 100644 --- a/test/hardhat/viem/routing.test.ts +++ b/test/hardhat/viem/routing.test.ts @@ -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); diff --git a/test/hardhat/viem/slipstream-automan-transaction.test.ts b/test/hardhat/viem/slipstream-automan-transaction.test.ts index c05fc702..38b55294 100644 --- a/test/hardhat/viem/slipstream-automan-transaction.test.ts +++ b/test/hardhat/viem/slipstream-automan-transaction.test.ts @@ -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,