asset-swapper: ensure takerAddress for indiciative

Ensure the presence of a taker address query parameter in the request to
market maker endpoints for indicative RFQ-T quotes.

Addresses review comment https://github.com/0xProject/0x-monorepo/pull/2684#pullrequestreview-477242367
This commit is contained in:
F. Eugene Aumson 2020-08-28 15:52:15 -04:00
parent f471e1a8a3
commit e738743c89
No known key found for this signature in database
GPG Key ID: 23E6737B1374A24A

View File

@ -214,6 +214,10 @@ export class QuoteRequestor {
): Promise<RFQTIndicativeQuote[]> { ): Promise<RFQTIndicativeQuote[]> {
const _opts: RfqtRequestOpts = { ...constants.DEFAULT_RFQT_REQUEST_OPTS, ...options }; const _opts: RfqtRequestOpts = { ...constants.DEFAULT_RFQT_REQUEST_OPTS, ...options };
if (!_opts.takerAddress) {
_opts.takerAddress = constants.NULL_ADDRESS;
}
const responsesWithStringInts = await this._getQuotesAsync<RFQTIndicativeQuote>( // not yet BigNumber const responsesWithStringInts = await this._getQuotesAsync<RFQTIndicativeQuote>( // not yet BigNumber
makerAssetData, makerAssetData,
takerAssetData, takerAssetData,