Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[No ticket] Remove "Paused" from PoolLifecycleState enum #165

Merged
merged 1 commit into from
Dec 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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