Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
olga24912 committed Jul 23, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent d5263f0 commit f4ffa6d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions eth-custodian/test/EthCustodianProxy.js
Original file line number Diff line number Diff line change
@@ -249,16 +249,16 @@ 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)
)
.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)
});

0 comments on commit f4ffa6d

Please sign in to comment.