Skip to content

Commit

Permalink
test(integration): fix unbuffered flow
Browse files Browse the repository at this point in the history
  • Loading branch information
tamtamchik committed Nov 29, 2024
1 parent 9b7eaf0 commit e6f6fcf
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions test/integration/protocol-happy-path.integration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ describe("Protocol Happy Path", () => {
const depositNorReceipt = await trace<ContractTransactionReceipt>("lido.deposit (Curated Module)", depositNorTx);

const unbufferedEventNor = ctx.getEvents(depositNorReceipt, "Unbuffered")[0];
const unbufferedAmountNor = unbufferedEventNor.args[0];
const unbufferedAmountNor = unbufferedEventNor?.args[0] || 0n; // 0 if no deposit was made to the curated module

const depositCountsNor = unbufferedAmountNor / ether("32");
let expectedBufferedEtherAfterDeposit = bufferedEtherBeforeDeposit - unbufferedAmountNor;
Expand All @@ -234,15 +234,12 @@ describe("Protocol Happy Path", () => {
const depositCountsTotal = depositCountsNor + unbufferedAmountSdvt / ether("32");
expectedBufferedEtherAfterDeposit -= unbufferedAmountSdvt;

expect(depositCountsTotal).to.be.gt(0n, "Deposit counts");
expect(newValidatorsCountSdvt).to.equal(
depositedValidatorsBefore + depositCountsTotal,
"New validators count after deposit",
);

const bufferedEtherAfterDeposit = await lido.getBufferedEther();

expect(depositCountsNor).to.be.gt(0n, "Deposit counts");
expect(bufferedEtherAfterDeposit).to.equal(expectedBufferedEtherAfterDeposit, "Buffered ether after deposit");

log.debug("After deposit", {
Expand Down
File renamed without changes.

0 comments on commit e6f6fcf

Please sign in to comment.