11import {
22 ExtensionContractType ,
33 Orderbook ,
4+ RfqtRequestOpts ,
45 SwapQuote ,
56 SwapQuoteConsumer ,
67 SwapQuoter ,
78 SwapQuoterOpts ,
89} from '@0x/asset-swapper' ;
9- import { OrderPrunerPermittedFeeTypes } from '@0x/asset-swapper/lib/src/types' ;
10+ import { OrderPrunerPermittedFeeTypes , SwapQuoteRequestOpts } from '@0x/asset-swapper/lib/src/types' ;
1011import { getContractAddressesForChainOrThrow } from '@0x/contract-addresses' ;
1112import { ERC20TokenContract , WETH9Contract } from '@0x/contract-wrappers' ;
1213import { assetDataUtils , SupportedProvider } from '@0x/order-utils' ;
@@ -21,6 +22,7 @@ import {
2122 LIQUIDITY_POOL_REGISTRY_ADDRESS ,
2223 RFQT_API_KEY_WHITELIST ,
2324 RFQT_MAKER_ASSET_OFFERINGS ,
25+ RFQT_REQUEST_MAX_RESPONSE_MS ,
2426 RFQT_SKIP_BUY_REQUESTS ,
2527} from '../config' ;
2628import {
@@ -338,7 +340,7 @@ export class SwapService {
338340 rfqt,
339341 // tslint:disable-next-line:boolean-naming
340342 } = params ;
341- let _rfqt ;
343+ let _rfqt : RfqtRequestOpts | undefined ;
342344 if ( apiKey !== undefined && ( isETHSell || from !== undefined ) ) {
343345 _rfqt = {
344346 ...rfqt ,
@@ -348,11 +350,11 @@ export class SwapService {
348350 // forwarder contract. If it's not, then we want to request quotes with the taker set to the
349351 // API's takerAddress query parameter, which in this context is known as `from`.
350352 takerAddress : isETHSell ? this . _forwarderAddress : from || '' ,
353+ makerEndpointMaxResponseTimeMs : RFQT_REQUEST_MAX_RESPONSE_MS ,
351354 } ;
352355 }
353- const assetSwapperOpts = {
356+ const assetSwapperOpts : Partial < SwapQuoteRequestOpts > = {
354357 ...ASSET_SWAPPER_MARKET_ORDERS_OPTS ,
355- slippagePercentage,
356358 bridgeSlippage : slippagePercentage ,
357359 gasPrice : providedGasPrice ,
358360 excludedSources, // TODO(dave4506): overrides the excluded sources selected by chainId
0 commit comments