Skip to content

Commit

Permalink
[No ticket] Remove "Paused" from PoolLifecycleState enum (#165)
Browse files Browse the repository at this point in the history
  • Loading branch information
ams9198 authored Dec 15, 2022
1 parent 5c8b1d3 commit 3cbc783
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion contracts/controllers/interfaces/IPoolController.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import "../../interfaces/IPool.sol";
enum IPoolLifeCycleState {
Initialized,
Active,
Paused,
Closed
}

Expand Down
12 changes: 6 additions & 6 deletions test/controllers/PoolController.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ describe("PoolController", () => {
// Move in the future
await time.increaseTo(now + 20);

expect(await poolController.state()).to.equal(3); // closed
expect(await poolController.state()).to.equal(2); // closed
expect(await poolController.withdrawGate()).to.equal(10_000); // 100%
});
});
Expand All @@ -374,7 +374,7 @@ describe("PoolController", () => {
const { endDate } = await poolController.settings();
await time.increaseTo(endDate);

expect(await poolController.state()).to.equal(3); // sanity check its closed
expect(await poolController.state()).to.equal(2); // sanity check its closed
expect(await poolController.withdrawRequestPeriodDuration()).to.equal(
86400
); // 1 day
Expand All @@ -395,7 +395,7 @@ describe("PoolController", () => {
const { endDate } = await newPoolController.settings();
await time.increaseTo(endDate);

expect(await newPoolController.state()).to.equal(3); // sanity check its closed
expect(await newPoolController.state()).to.equal(2); // sanity check its closed
expect(await newPoolController.withdrawRequestPeriodDuration()).to.equal(
overriddenPoolSettings.withdrawRequestPeriodDuration
); // Unchanged
Expand Down Expand Up @@ -578,7 +578,7 @@ describe("PoolController", () => {
const poolEndDate = (await poolController.settings()).endDate;
await time.increaseTo(poolEndDate);

expect(await poolController.state()).to.equal(3); // closed
expect(await poolController.state()).to.equal(2); // closed
});
});
describe("depositFirstLoss()", async () => {
Expand Down Expand Up @@ -733,7 +733,7 @@ describe("PoolController", () => {

// Fast forward past pool close
await time.increaseTo((await pool.settings()).endDate);
expect(await poolController.state()).to.equal(3); // Closed
expect(await poolController.state()).to.equal(2); // Closed

await expect(
poolController
Expand Down Expand Up @@ -1249,7 +1249,7 @@ describe("PoolController", () => {

// Fast forward to pool end date
await time.increaseTo((await pool.settings()).endDate);
expect(await pool.state()).to.equal(3); // Closed
expect(await pool.state()).to.equal(2); // Closed

// Default should proceed
await expect(poolController.connect(poolAdmin).defaultLoan(loan.address))
Expand Down
2 changes: 1 addition & 1 deletion test/scenarios/pool/crank-variations.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ describe("Snapshot Variations", () => {
await time.increaseTo(newCloseDate + 1);

// Check that the pool is closed
expect(await pool.state()).to.equal(3);
expect(await pool.state()).to.equal(2);

// Check that we're still in the same withdraw period, since it has only been a few seconds.
expect(await withdrawController.withdrawPeriod()).to.equal(0);
Expand Down

0 comments on commit 3cbc783

Please sign in to comment.