Merge pull request #2726 from 0xProject/fix/asset-swapper/rfqtMakerInteraction-with-blacklisting
asset-swapper: isBlacklisted in rfqtMakerInteraction
This commit is contained in:
commit
f7ae697475
@ -334,13 +334,6 @@ export class QuoteRequestor {
|
|||||||
options: RfqtRequestOpts,
|
options: RfqtRequestOpts,
|
||||||
quoteType: 'firm' | 'indicative',
|
quoteType: 'firm' | 'indicative',
|
||||||
): Promise<Array<{ response: ResponseT; makerUri: string }>> {
|
): Promise<Array<{ response: ResponseT; makerUri: string }>> {
|
||||||
const result: Array<{ response: ResponseT; makerUri: string }> = [];
|
|
||||||
await Promise.all(
|
|
||||||
Object.keys(this._rfqtAssetOfferings).map(async url => {
|
|
||||||
if (
|
|
||||||
this._makerSupportsPair(url, makerAssetData, takerAssetData) &&
|
|
||||||
!rfqMakerBlacklist.isMakerBlacklisted(url)
|
|
||||||
) {
|
|
||||||
const requestParamsWithBigNumbers = {
|
const requestParamsWithBigNumbers = {
|
||||||
takerAddress: options.takerAddress,
|
takerAddress: options.takerAddress,
|
||||||
...inferQueryParams(marketOperation, makerAssetData, takerAssetData, assetFillAmount),
|
...inferQueryParams(marketOperation, makerAssetData, takerAssetData, assetFillAmount),
|
||||||
@ -358,7 +351,14 @@ export class QuoteRequestor {
|
|||||||
: undefined,
|
: undefined,
|
||||||
};
|
};
|
||||||
|
|
||||||
const partialLogEntry = { url, quoteType, requestParams };
|
const result: Array<{ response: ResponseT; makerUri: string }> = [];
|
||||||
|
await Promise.all(
|
||||||
|
Object.keys(this._rfqtAssetOfferings).map(async url => {
|
||||||
|
const isBlacklisted = rfqMakerBlacklist.isMakerBlacklisted(url);
|
||||||
|
const partialLogEntry = { url, quoteType, requestParams, isBlacklisted };
|
||||||
|
if (isBlacklisted) {
|
||||||
|
this._infoLogger({ rfqtMakerInteraction: { ...partialLogEntry } });
|
||||||
|
} else if (this._makerSupportsPair(url, makerAssetData, takerAssetData)) {
|
||||||
const timeBeforeAwait = Date.now();
|
const timeBeforeAwait = Date.now();
|
||||||
const maxResponseTimeMs =
|
const maxResponseTimeMs =
|
||||||
options.makerEndpointMaxResponseTimeMs === undefined
|
options.makerEndpointMaxResponseTimeMs === undefined
|
||||||
|
Loading…
x
Reference in New Issue
Block a user