From f4ffa6d71a5711db07f882b891aa667d1f49e602 Mon Sep 17 00:00:00 2001 From: Olga Kunyavskaya Date: Tue, 23 Jul 2024 16:14:10 +0300 Subject: [PATCH] fix tests --- eth-custodian/test/EthCustodianProxy.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eth-custodian/test/EthCustodianProxy.js b/eth-custodian/test/EthCustodianProxy.js index 158e31c..e1112ec 100644 --- a/eth-custodian/test/EthCustodianProxy.js +++ b/eth-custodian/test/EthCustodianProxy.js @@ -249,7 +249,7 @@ describe('EthCustodianProxy contract', () => { it('Should successfully withdraw and emit the event pre-migration with post-migration block height', async () => { await ethCustodianProxy.migrateToNewProofProducer(newProofProducerData, blockHeightFromProof + 1); - const balanceBefore = ethers.BigNumber.from(await ethers.provider.getBalance(user2.address)); + const balanceBefore = BigInt(await ethers.provider.getBalance(user2.address)); await expect( ethCustodianProxy.withdraw(borshifyOutcomeProof(proof), blockHeightFromProof + 2) @@ -257,8 +257,8 @@ describe('EthCustodianProxy contract', () => { .to.emit(ethCustodian, 'Withdrawn') .withArgs(user2.address, amount); - const balanceAfter = ethers.BigNumber.from(await ethers.provider.getBalance(user2.address)); - const balanceDiff = balanceAfter.sub(balanceBefore); + const balanceAfter = BigInt(await ethers.provider.getBalance(user2.address)); + const balanceDiff = balanceAfter - balanceBefore; expect(balanceDiff).to.equal(amount) });