diff --git a/package.json b/package.json index 4bb08a6..707d1bd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@orionprotocol/sdk", - "version": "0.19.92-rc101", + "version": "0.19.92-rc102", "description": "Orion Protocol SDK", "main": "./lib/index.cjs", "module": "./lib/index.js", diff --git a/src/services/Aggregator/ws/index.ts b/src/services/Aggregator/ws/index.ts index 00f5ec8..352bb36 100644 --- a/src/services/Aggregator/ws/index.ts +++ b/src/services/Aggregator/ws/index.ts @@ -17,6 +17,7 @@ import unsubscriptionDoneSchema from './schemas/unsubscriptionDoneSchema.js'; import assetPairConfigSchema from './schemas/assetPairConfigSchema.js'; import type { fullOrderSchema, orderUpdateSchema } from './schemas/addressUpdateSchema.js'; import { objectKeys } from '../../../utils/objectKeys.js'; +import type { Factory } from '../../../Unit/Exchange/generateSwapCalldata.js'; // import assertError from '../../../utils/assertError.js'; // import errorSchema from './schemas/errorSchema'; @@ -507,7 +508,7 @@ class AggregatorWS { pool: path.p, assetIn: path.ai, assetOut: path.ao, - factory: path.f, + factory: path.f as Factory, })), poolOptimal: json.po, ...(json.oi) && { diff --git a/src/types.ts b/src/types.ts index 64449e8..d7a7b3f 100644 --- a/src/types.ts +++ b/src/types.ts @@ -4,6 +4,7 @@ import type subOrderStatuses from './constants/subOrderStatuses.js'; import type positionStatuses from './constants/positionStatuses.js'; import type { knownEnvs } from './config/schemas/index.js'; import type getHistory from './Orion/bridge/getHistory.js'; +import type { SingleSwap } from './Unit/Exchange/generateSwapCalldata.js'; export type DeepPartial = T extends object ? { [P in keyof T]?: DeepPartial; @@ -165,13 +166,6 @@ export type SwapInfoAlternative = { availableAmountOut?: number | undefined } -type ExchangeContractPath = { - pool: string - assetIn: string - assetOut: string - factory: string -} - export type SwapInfoBase = { swapRequestId: string assetIn: string @@ -182,7 +176,7 @@ export type SwapInfoBase = { minAmountOut: number path: string[] - exchangeContractPath: ExchangeContractPath[] + exchangeContractPath: SingleSwap[] exchanges?: string[] | undefined poolOptimal: boolean