Skip to content

Commit

Permalink
fix fork
Browse files Browse the repository at this point in the history
  • Loading branch information
barrasso committed Feb 20, 2024
1 parent 5775edc commit 51dcca5
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
5 changes: 3 additions & 2 deletions test/integration/behaviors/liquidations.behavior.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function itCanLiquidate({ ctx }) {
});

before('set permitted escrow creator', async () => {
if (RewardEscrowV2.setPermittedEscrowCreator)
if (!ctx.fork)
await RewardEscrowV2.setPermittedEscrowCreator(LiquidatorRewards.address, true);
});

Expand Down Expand Up @@ -418,7 +418,8 @@ function itCanLiquidate({ ctx }) {
liquidateReward = await Liquidator.liquidateReward();

await Synthetix.connect(owner).approve(RewardEscrowV2.address, ethers.constants.MaxUint256);
await RewardEscrowV2.setPermittedEscrowCreator(await owner.getAddress(), true);
if (!ctx.fork)
await RewardEscrowV2.setPermittedEscrowCreator(await owner.getAddress(), true);

// 100 entries is a somewhat realistic estimate for an account which as been escrowing for a while and
// hasnt claimed
Expand Down
2 changes: 1 addition & 1 deletion test/integration/behaviors/rewardEscrow.behavior.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ function itDoesRewardEscrow({ ctx, contract }) {
let newEntryId;

before('set owner as permitted escrow creator', async () => {
if (RewardEscrowV2.setPermittedEscrowCreator)
if (!ctx.fork)
await RewardEscrowV2.connect(owner).setPermittedEscrowCreator(owner.address, true);
});

Expand Down
3 changes: 2 additions & 1 deletion test/integration/dual/debtMigration.integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ describe('migrateDebt() integration tests (L1, L2)', () => {
});

before('create and append escrow entries', async () => {
await RewardEscrowV2.connect(owner).setPermittedEscrowCreator(user.address, true);
if (!ctx.fork)
await RewardEscrowV2.connect(owner).setPermittedEscrowCreator(user.address, true);

escrowEntriesData = await appendEscrows({
ctx: ctx.l1,
Expand Down
4 changes: 3 additions & 1 deletion test/integration/dual/depositAndMigrateEscrow.integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ describe('depositAndMigrateEscrow() integration tests (L1, L2)', () => {

before('create and append escrow entries', async () => {
user = ctx.l1.users.owner;
await RewardEscrowV2.connect(user).setPermittedEscrowCreator(user.address, true);

if (!ctx.fork)
await RewardEscrowV2.connect(user).setPermittedEscrowCreator(user.address, true);

escrowEntriesData = await appendEscrows({
ctx: ctx.l1,
Expand Down
4 changes: 3 additions & 1 deletion test/integration/dual/migrateEscrow.integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ describe('migrateEscrow() integration tests (L1, L2)', () => {

before('create and append escrow entries', async () => {
user = ctx.l1.users.owner;
await RewardEscrowV2.connect(user).setPermittedEscrowCreator(user.address, true);

if (!ctx.fork)
await RewardEscrowV2.connect(user).setPermittedEscrowCreator(user.address, true);

escrowEntriesData = await appendEscrows({
ctx: ctx.l1,
Expand Down

0 comments on commit 51dcca5

Please sign in to comment.