11import { CONTRACT_VERSION } from "../contract/constants" ;
2+ import { getAssetId } from "../util/asset/assetUtils" ;
23import { InitiatorSigner , SignerTransaction } from "../util/commonTypes" ;
4+ import SwapQuoteError , { SwapQuoteErrorType } from "../util/error/SwapQuoteError" ;
35import { V1PoolInfo } from "../util/pool/poolTypes" ;
46import {
5- GetSwapQuoteBySwapTypeParams ,
7+ getBestQuote ,
8+ getSwapQuoteContractVersion ,
9+ isSwapQuoteErrorCausedByAmount
10+ } from "./common/utils" ;
11+ import { SwapType } from "./constants" ;
12+ import {
13+ ExecuteSwapCommonParams ,
614 GenerateSwapTxnsParams ,
15+ GetSwapQuoteBySwapTypeParams ,
716 GetSwapQuoteParams ,
817 SwapQuote ,
9- SwapQuoteType ,
10- ExecuteSwapCommonParams
18+ SwapQuoteType
1119} from "./types" ;
12- import { SwapType } from "./constants" ;
1320import { SwapV1_1 } from "./v1_1" ;
1421import { SwapV2 } from "./v2" ;
15- import {
16- getBestQuote ,
17- getSwapQuoteContractVersion ,
18- isSwapQuoteErrorCausedByAmount
19- } from "./common/utils" ;
20- import { getAssetId } from "../util/asset/assetUtils" ;
21- import SwapQuoteError , { SwapQuoteErrorType } from "../util/error/SwapQuoteError" ;
2222
2323/**
2424 * Gets the best quote for swap from the pools and swap router and returns the best option.
@@ -74,7 +74,7 @@ function validateQuotes(promises: Promise<SwapQuote>[]): Promise<SwapQuote[]> {
7474export async function getFixedInputSwapQuote (
7575 params : GetSwapQuoteBySwapTypeParams
7676) : Promise < SwapQuote > {
77- const { amount, assetIn, assetOut, isSwapRouterEnabled , pools} = params ;
77+ const { amount, assetIn, assetOut, pools} = params ;
7878
7979 const quotePromises : Promise < SwapQuote > [ ] = [ ] ;
8080
@@ -124,7 +124,6 @@ export async function getFixedInputSwapQuote(
124124 decimals : assetOut . decimals
125125 } ,
126126 pool : v2Pool ?. info ?? null ,
127- isSwapRouterEnabled,
128127 network : params . network ,
129128 slippage : params . slippage
130129 } )
@@ -142,7 +141,7 @@ export async function getFixedInputSwapQuote(
142141export async function getFixedOutputSwapQuote (
143142 params : GetSwapQuoteBySwapTypeParams
144143) : Promise < SwapQuote > {
145- const { amount, assetIn, assetOut, pools, isSwapRouterEnabled } = params ;
144+ const { amount, assetIn, assetOut, pools} = params ;
146145
147146 const quotePromises : Promise < SwapQuote > [ ] = [ ] ;
148147
@@ -192,7 +191,6 @@ export async function getFixedOutputSwapQuote(
192191 decimals : assetOut . decimals
193192 } ,
194193 pool : v2Pool ?. info ?? null ,
195- isSwapRouterEnabled,
196194 network : params . network ,
197195 slippage : params . slippage
198196 } )
0 commit comments