Added Factory type to ws path

This commit is contained in:
lomonoshka
2023-09-28 18:56:25 +04:00
parent 3c183f6cff
commit 823e9a8ad5
3 changed files with 5 additions and 10 deletions

View File

@@ -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",

View File

@@ -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) && {

View File

@@ -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> = T extends object ? {
[P in keyof T]?: DeepPartial<T[P]>;
@@ -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