mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-15 14:42:38 +03:00
Added Factory type to ws path
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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) && {
|
||||
|
||||
10
src/types.ts
10
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> = 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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user