diff --git a/package.json b/package.json index 43c5ed1..ad5c4c6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@orionprotocol/sdk", - "version": "0.10.0", + "version": "0.10.1", "description": "Orion Protocol SDK", "main": "./lib/esm/index.js", "module": "./lib/esm/index.js", diff --git a/src/OrionUnit/Exchange/swapMarket.ts b/src/OrionUnit/Exchange/swapMarket.ts index eaa43f5..d35e4d8 100644 --- a/src/OrionUnit/Exchange/swapMarket.ts +++ b/src/OrionUnit/Exchange/swapMarket.ts @@ -22,7 +22,6 @@ export type SwapMarketParams = { orionUnit: OrionUnit, options?: { logger?: (message: string) => void, - route?: 'pool' | 'aggregator', autoApprove?: boolean, } } @@ -50,7 +49,6 @@ export default async function swapMarket({ orionUnit, options, }: SwapMarketParams): Promise { - if (options?.route) options?.logger?.('Warning! You specified route in options. Please use only if you know what you are doing.'); if (amount === '') throw new Error('Amount can not be empty'); if (assetIn === '') throw new Error('AssetIn can not be empty'); if (assetOut === '') throw new Error('AssetOut can not be empty'); @@ -127,9 +125,7 @@ export default async function swapMarket({ const percent = new BigNumber(slippagePercent).div(100); - const isThroughPoolOptimal = options?.route - ? options?.route === 'pool' - : swapInfo.isThroughPoolOptimal; + const { isThroughPoolOptimal } = swapInfo; if (isThroughPoolOptimal) { options?.logger?.('Swap through pool');