Skip to content

Commit

Permalink
auto-withdrawals: check trading is unpaused
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshDAO committed Dec 2, 2024
1 parent b85e25f commit cf6d141
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/contracts/test/LiquidityPoolDepositWithdraw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1167,6 +1167,7 @@ describe("Liquidity Pools Deposit Withdraw", async () => {
expect(pendingWithdrawAfter).to.eq(0)
expect(withdrawalEpochAfter).to.eq(withdrawalEpochBefore.add(1));
expect(depositEpochAfter).to.eq(depositEpochBefore.add(1));
expect(await liquidityPool.isTradingPaused()).to.be.false
})
it("Succeed: User 3: Initiates Withdraw for some more balance", async() => {
const user = await signers[2].getAddress()
Expand Down Expand Up @@ -1202,6 +1203,8 @@ describe("Liquidity Pools Deposit Withdraw", async () => {
expect(withdrawalReceiptAfter.epoch).to.equal(epochBefore).to.equal(epochAfter.sub(1))
expect(withdrawalReceiptAfter.shares).to.equal(0)
expect(pendingWithdrawAfter).to.eq(0)
expect(await liquidityPool.isTradingPaused()).to.be.false

})
it("Reverts: User 3: Initiates Withdraw for all balance but not enough funds in LiquidityPool", async() => {
const user = await signers[2].getAddress()
Expand Down Expand Up @@ -1258,6 +1261,8 @@ describe("Liquidity Pools Deposit Withdraw", async () => {
expect(withdrawalReceiptAfter.epoch).to.equal(epochBefore).to.equal(epochAfter.sub(1))
expect(withdrawalReceiptAfter.shares).to.equal(0)
expect(pendingWithdrawAfter).to.eq(0)
expect(await liquidityPool.isTradingPaused()).to.be.false

})
it("Reverts: pauses trading from unauthorised", async () => {
await expect(
Expand Down

0 comments on commit cf6d141

Please sign in to comment.