Skip to content

Commit

Permalink
fix: missing test check
Browse files Browse the repository at this point in the history
  • Loading branch information
veeso committed Jan 22, 2024
1 parent f8a60f1 commit 835083a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion ethereum/fly/test/Fly.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ describe("Fly", () => {
const fee = await token.swapFee();

await token.setFlyCanisterAddress(flyCanister.address);
const initialFlyCanisterBalance = await ethers.provider.getBalance(
flyCanister.address
);

const initialBalance = await ethers.provider.getBalance(owner.address);

Expand All @@ -93,8 +96,13 @@ describe("Fly", () => {
// check owner has paid FEE ethers
const finalBalance =
initialBalance - (await ethers.provider.getBalance(owner.address));

expect(finalBalance).to.greaterThan(fee);

// check fly canister has received the swap fee
const expectedFlyCanisterBalance = initialFlyCanisterBalance + fee;
expect(await ethers.provider.getBalance(flyCanister.address)).to.equal(
expectedFlyCanisterBalance
);
});

it("should fail swap if fly canister address is not set", async () => {
Expand Down

0 comments on commit 835083a

Please sign in to comment.