From fe81e264281acb7a4da886abd338c11a4b2c172a Mon Sep 17 00:00:00 2001 From: pradyuman-verma Date: Thu, 24 Mar 2022 01:46:39 +0530 Subject: [PATCH] added DSA compound check --- test/mainnet/compound-import/compound-import.test.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/mainnet/compound-import/compound-import.test.ts b/test/mainnet/compound-import/compound-import.test.ts index 3646de7a..fb4585f5 100644 --- a/test/mainnet/compound-import/compound-import.test.ts +++ b/test/mainnet/compound-import/compound-import.test.ts @@ -243,5 +243,12 @@ describe("Import Compound", function () { const tx = await dsaWallet0.connect(wallet0).cast(...encodeSpells(spells), wallet0.address); const receipt = await tx.wait(); }); + + it("Should check DSA COMPOUND position", async () => { + const ethExchangeRate = (await cEth.connect(wallet0).callStatic.exchangeRateCurrent()) / 1e28; + expect(new BigNumber(await cEth.connect(wallet0).balanceOf(dsaWallet0.address)).dividedBy(1e8).toFixed(0)).to.eq( + new BigNumber(9).dividedBy(ethExchangeRate).toFixed(0) + ); + }); }); });