Skip to content

Commit

Permalink
refactor: Swap out testUBAClient UMA dependencies (#955)
Browse files Browse the repository at this point in the history
  • Loading branch information
pxrl committed Sep 29, 2023
1 parent f7ea6fd commit b9e6566
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/scripts/testUBAClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@ import {
getSpokePoolClientEventSearchConfigsForFastDataworker,
} from "../dataworker/DataworkerClientHelper";
import { updateClients } from "../common";
import * as sdk from "@across-protocol/sdk-v2";
import { isDefined } from "@uma/financial-templates-lib/dist/types";
import { clients as sdkClients, utils as sdkUtils } from "@across-protocol/sdk-v2";
import { createDataworker } from "../dataworker";
import { RedisCache } from "../caching/RedisCache";
import { ConfigStoreClient } from "../clients";

config();

const { isDefined } = sdkUtils;

let logger: winston.Logger;

export async function testUBAClient(_logger: winston.Logger, baseSigner: Wallet): Promise<void> {
Expand Down Expand Up @@ -66,7 +68,7 @@ export async function testUBAClient(_logger: winston.Logger, baseSigner: Wallet)
const mockedUBAActivationBlock =
Number(process.env.UBA_ACTIVATION_BLOCK) ||
(await getBlockForTimestamp(1, Math.floor(Date.now() / 1000) - 12 * 60 * 60));
const mockConfigStoreClient = new sdk.clients.mocks.MockConfigStoreClient(
const mockConfigStoreClient = new sdkClients.mocks.MockConfigStoreClient(
logger,
configStoreClient.configStore,
configStoreClient.eventSearchConfig,
Expand Down Expand Up @@ -127,8 +129,8 @@ export async function testUBAClient(_logger: winston.Logger, baseSigner: Wallet)
error,
});
}
const ubaClient = new sdk.clients.UBAClient(
new sdk.clients.UBAClientConfig(),
const ubaClient = new sdkClients.UBAClient(
new sdkClients.UBAClientConfig(),
["WETH", "USDC"],
// clients.hubPoolClient.getL1Tokens().map((x) => x.symbol),
clients.hubPoolClient,
Expand Down

0 comments on commit b9e6566

Please sign in to comment.