Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholaspai committed Sep 21, 2023
1 parent 90afd7f commit 36abc77
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
6 changes: 3 additions & 3 deletions test/HubPoolClient.Utilization.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { HubPoolClient } from "../src/clients";
import { clients } from "@across-protocol/sdk-v2";
import {
amountToLp,
destinationChainId,
Expand Down Expand Up @@ -29,7 +29,7 @@ import {

let configStore: Contract, hubPool: Contract;
let l1Token: Contract, l2Token: Contract, timer: Contract, weth: Contract;
let configStoreClient: MockConfigStoreClient, hubPoolClient: HubPoolClient;
let configStoreClient: MockConfigStoreClient, hubPoolClient: clients.HubPoolClient;
let owner: SignerWithAddress;

// Same rate model used for across-v1 tests:
Expand Down Expand Up @@ -96,7 +96,7 @@ describe("HubPool Utilization", async function () {

await configStoreClient.update();

hubPoolClient = new HubPoolClient(createSpyLogger().spyLogger, hubPool, configStoreClient);
hubPoolClient = new clients.HubPoolClient(createSpyLogger().spyLogger, hubPool, configStoreClient as unknown as clients.AcrossConfigStoreClient);

Check warning on line 99 in test/HubPoolClient.Utilization.ts

View workflow job for this annotation

GitHub Actions / Lint (16)

Replace `createSpyLogger().spyLogger,·hubPool,·configStoreClient·as·unknown·as·clients.AcrossConfigStoreClient` with `⏎······createSpyLogger().spyLogger,⏎······hubPool,⏎······configStoreClient·as·unknown·as·clients.AcrossConfigStoreClient⏎····`
await configStoreClient.update();
await hubPoolClient.update();
});
Expand Down
6 changes: 3 additions & 3 deletions test/SpokePoolClient.SpeedUp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ import {
toBNWei,
} from "./utils";

import { SpokePoolClient } from "../src/clients";
import { clients } from "@across-protocol/sdk-v2"

Check warning on line 17 in test/SpokePoolClient.SpeedUp.ts

View workflow job for this annotation

GitHub Actions / Lint (16)

Insert `;`
import { DepositWithBlock } from "../src/interfaces";

let spokePool: Contract, erc20: Contract, destErc20: Contract, weth: Contract;
let depositor: SignerWithAddress, deploymentBlock: number;
const destinationChainId2 = destinationChainId + 1;

let spokePoolClient: SpokePoolClient;
let spokePoolClient: clients.SpokePoolClient;

describe("SpokePoolClient: SpeedUp", async function () {
const ignoredFields = [
Expand All @@ -37,7 +37,7 @@ describe("SpokePoolClient: SpeedUp", async function () {
[, depositor] = await ethers.getSigners();
({ spokePool, erc20, destErc20, weth, deploymentBlock } = await deploySpokePoolWithToken(originChainId));
await enableRoutes(spokePool, [{ originToken: erc20.address, destinationChainId: destinationChainId2 }]);
spokePoolClient = new SpokePoolClient(createSpyLogger().spyLogger, spokePool, null, originChainId, deploymentBlock);
spokePoolClient = new clients.SpokePoolClient(createSpyLogger().spyLogger, spokePool, null, originChainId, deploymentBlock);

Check warning on line 40 in test/SpokePoolClient.SpeedUp.ts

View workflow job for this annotation

GitHub Actions / Lint (16)

Replace `createSpyLogger().spyLogger,·spokePool,·null,·originChainId,·deploymentBlock` with `⏎······createSpyLogger().spyLogger,⏎······spokePool,⏎······null,⏎······originChainId,⏎······deploymentBlock⏎····`

await setupTokensForWallet(spokePool, depositor, [erc20, destErc20], weth, 10);
});
Expand Down
18 changes: 9 additions & 9 deletions test/SpokePoolClient.ValidateFill.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ import {
sinon,
} from "./utils";

import { ConfigStoreClient, HubPoolClient, SpokePoolClient } from "../src/clients";
import { ConfigStoreClient } from "../src/clients";
import { queryHistoricalDepositForFill } from "../src/utils";
import { MockConfigStoreClient, MockSpokePoolClient } from "./mocks";
import { utils } from "@across-protocol/sdk-v2";
import { utils, clients } from "@across-protocol/sdk-v2";
import { CHAIN_ID_TEST_LIST, repaymentChainId } from "./constants";
const { validateFillForDeposit } = utils;

Expand All @@ -40,8 +40,8 @@ let spokePool1DeploymentBlock: number, spokePool2DeploymentBlock: number;
let l1Token: Contract, configStore: Contract;
let spy: sinon.SinonSpy, spyLogger: winston.Logger;

let spokePoolClient2: SpokePoolClient, hubPoolClient: HubPoolClient;
let spokePoolClient1: SpokePoolClient, configStoreClient: ConfigStoreClient;
let spokePoolClient2: clients.SpokePoolClient, hubPoolClient: clients.HubPoolClient;
let spokePoolClient1: clients.SpokePoolClient, configStoreClient: ConfigStoreClient;

describe("SpokePoolClient: Fill Validation", async function () {
beforeEach(async function () {
Expand Down Expand Up @@ -81,17 +81,17 @@ describe("SpokePoolClient: Fill Validation", async function () {
) as unknown as ConfigStoreClient;
await configStoreClient.update();

hubPoolClient = new HubPoolClient(spyLogger, hubPool, configStoreClient);
hubPoolClient = new clients.HubPoolClient(spyLogger, hubPool, configStoreClient as unknown as clients.AcrossConfigStoreClient);

Check warning on line 84 in test/SpokePoolClient.ValidateFill.ts

View workflow job for this annotation

GitHub Actions / Lint (16)

Replace `spyLogger,·hubPool,·configStoreClient·as·unknown·as·clients.AcrossConfigStoreClient` with `⏎······spyLogger,⏎······hubPool,⏎······configStoreClient·as·unknown·as·clients.AcrossConfigStoreClient⏎····`

await hubPoolClient.update();
spokePoolClient1 = new SpokePoolClient(
spokePoolClient1 = new clients.SpokePoolClient(
spyLogger,
spokePool_1,
hubPoolClient,
originChainId,
spokePool1DeploymentBlock
);
spokePoolClient2 = new SpokePoolClient(
spokePoolClient2 = new clients.SpokePoolClient(
createSpyLogger().spyLogger,
spokePool_2,
null,
Expand Down Expand Up @@ -132,7 +132,7 @@ describe("SpokePoolClient: Fill Validation", async function () {
it("Returns deposit matched with fill", async function () {
const deposit_1 = await buildDeposit(hubPoolClient, spokePool_1, erc20_1, l1Token, depositor, destinationChainId);
const fill_1 = await buildFill(spokePool_2, erc20_2, depositor, relayer, deposit_1, 0.5);
const spokePoolClientForDestinationChain = new SpokePoolClient(
const spokePoolClientForDestinationChain = new clients.SpokePoolClient(
createSpyLogger().spyLogger,
spokePool_1,
null,
Expand Down Expand Up @@ -488,7 +488,7 @@ describe("SpokePoolClient: Fill Validation", async function () {
const fill_1 = await buildFill(spokePool_2, erc20_2, depositor, relayer, expectedDeposit, 0.2);
const fill_2 = await buildModifiedFill(spokePool_2, depositor, relayer, fill_1, 2, 0.2, relayer.address, "0x12"); // Fill same % of deposit with 2x larger relayer fee pct.

const spokePoolClientForDestinationChain = new SpokePoolClient(
const spokePoolClientForDestinationChain = new clients.SpokePoolClient(
createSpyLogger().spyLogger,
spokePool_1,
null,
Expand Down
6 changes: 3 additions & 3 deletions test/SpokePoolClient.deposits.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SpokePoolClient } from "../src/clients";
import { clients } from "@across-protocol/sdk-v2"

Check warning on line 1 in test/SpokePoolClient.deposits.ts

View workflow job for this annotation

GitHub Actions / Lint (16)

Insert `;`
import {
Contract,
SignerWithAddress,
Expand All @@ -18,14 +18,14 @@ let depositor1: SignerWithAddress, depositor2: SignerWithAddress;
let deploymentBlock: number;
const destinationChainId2 = destinationChainId + 1;

let spokePoolClient: SpokePoolClient;
let spokePoolClient: clients.SpokePoolClient;

describe("SpokePoolClient: Deposits", async function () {
beforeEach(async function () {
[, depositor1, depositor2] = await ethers.getSigners();
({ spokePool, erc20, destErc20, weth, deploymentBlock } = await deploySpokePoolWithToken(originChainId));
await enableRoutes(spokePool, [{ originToken: erc20.address, destinationChainId: destinationChainId2 }]);
spokePoolClient = new SpokePoolClient(createSpyLogger().spyLogger, spokePool, null, originChainId, deploymentBlock);
spokePoolClient = new clients.SpokePoolClient(createSpyLogger().spyLogger, spokePool, null, originChainId, deploymentBlock);

Check warning on line 28 in test/SpokePoolClient.deposits.ts

View workflow job for this annotation

GitHub Actions / Lint (16)

Replace `createSpyLogger().spyLogger,·spokePool,·null,·originChainId,·deploymentBlock` with `⏎······createSpyLogger().spyLogger,⏎······spokePool,⏎······null,⏎······originChainId,⏎······deploymentBlock⏎····`

await setupTokensForWallet(spokePool, depositor1, [erc20, destErc20], weth, 10);
await setupTokensForWallet(spokePool, depositor2, [erc20, destErc20], weth, 10);
Expand Down

0 comments on commit 36abc77

Please sign in to comment.