aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2018-09-15 20:14:19 +0800
committerBrandon Millman <brandon.millman@gmail.com>2018-09-15 20:14:55 +0800
commitc692115cdcbc761c0c4074db79f8c127b92da7e0 (patch)
tree26df225d4eb5fc0c3d76e382aa565e2b41c8998c
parentdfe58e4975e0ad3edf08fdc6d3441e83171096a9 (diff)
downloaddexon-sol-tools-c692115cdcbc761c0c4074db79f8c127b92da7e0.tar.gz
dexon-sol-tools-c692115cdcbc761c0c4074db79f8c127b92da7e0.tar.zst
dexon-sol-tools-c692115cdcbc761c0c4074db79f8c127b92da7e0.zip
Fix lint errors
-rw-r--r--packages/asset-buyer/src/asset_buyer.ts7
-rw-r--r--packages/asset-buyer/src/order_fetchers/provided_order_fetcher.ts11
-rw-r--r--packages/asset-buyer/src/order_fetchers/standard_relayer_api_order_fetcher.ts5
3 files changed, 5 insertions, 18 deletions
diff --git a/packages/asset-buyer/src/asset_buyer.ts b/packages/asset-buyer/src/asset_buyer.ts
index 9cbdd8df6..3b603d929 100644
--- a/packages/asset-buyer/src/asset_buyer.ts
+++ b/packages/asset-buyer/src/asset_buyer.ts
@@ -1,6 +1,5 @@
import { ContractWrappers } from '@0xproject/contract-wrappers';
-import { assetDataUtils, marketUtils } from '@0xproject/order-utils';
-import { SignedOrder } from '@0xproject/types';
+import { assetDataUtils } from '@0xproject/order-utils';
import { BigNumber } from '@0xproject/utils';
import { Web3Wrapper } from '@0xproject/web3-wrapper';
import { Provider } from 'ethereum-types';
@@ -29,7 +28,7 @@ export class AssetBuyer {
public readonly orderFetcher: OrderFetcher;
public readonly networkId: number;
public readonly orderRefreshIntervalMs: number;
- private _contractWrappers: ContractWrappers;
+ private readonly _contractWrappers: ContractWrappers;
private _lastRefreshTimeIfExists?: number;
private _currentOrdersAndFillableAmountsIfExists?: AssetBuyerOrdersAndFillableAmounts;
/**
@@ -188,7 +187,7 @@ export class AssetBuyer {
const requests = [targetOrderFetcherRequest, feeOrderFetcherRequest];
// fetch orders and possible fillable amounts
const [targetOrderFetcherResponse, feeOrderFetcherResponse] = await Promise.all(
- _.map(requests, request => this.orderFetcher.fetchOrdersAsync(request)),
+ _.map(requests, async request => this.orderFetcher.fetchOrdersAsync(request)),
);
// process the responses into one object
const ordersAndFillableAmounts = await orderFetcherResponseProcessor.processAsync(
diff --git a/packages/asset-buyer/src/order_fetchers/provided_order_fetcher.ts b/packages/asset-buyer/src/order_fetchers/provided_order_fetcher.ts
index 29b03f1c4..7a7ffcdfe 100644
--- a/packages/asset-buyer/src/order_fetchers/provided_order_fetcher.ts
+++ b/packages/asset-buyer/src/order_fetchers/provided_order_fetcher.ts
@@ -1,18 +1,9 @@
import { schemas } from '@0xproject/json-schemas';
import { SignedOrder } from '@0xproject/types';
-import { BigNumber } from '@0xproject/utils';
import * as _ from 'lodash';
-import { constants } from '../constants';
-import {
- AssetBuyerError,
- OrderFetcher,
- OrderFetcherRequest,
- OrderFetcherResponse,
- SignedOrderWithRemainingFillableMakerAssetAmount,
-} from '../types';
+import { OrderFetcher, OrderFetcherRequest, OrderFetcherResponse } from '../types';
import { assert } from '../utils/assert';
-import { orderUtils } from '../utils/order_utils';
export class ProvidedOrderFetcher implements OrderFetcher {
public readonly providedOrders: SignedOrder[];
diff --git a/packages/asset-buyer/src/order_fetchers/standard_relayer_api_order_fetcher.ts b/packages/asset-buyer/src/order_fetchers/standard_relayer_api_order_fetcher.ts
index 5688daf69..9fcd16ca1 100644
--- a/packages/asset-buyer/src/order_fetchers/standard_relayer_api_order_fetcher.ts
+++ b/packages/asset-buyer/src/order_fetchers/standard_relayer_api_order_fetcher.ts
@@ -1,9 +1,6 @@
import { APIOrder, HttpClient, OrderbookResponse } from '@0xproject/connect';
-import { SignedOrder } from '@0xproject/types';
-import { BigNumber } from '@0xproject/utils';
import * as _ from 'lodash';
-import { constants } from '../constants';
import {
AssetBuyerError,
OrderFetcher,
@@ -16,7 +13,7 @@ import { orderUtils } from '../utils/order_utils';
export class StandardRelayerAPIOrderFetcher implements OrderFetcher {
public readonly apiUrl: string;
- private _sraClient: HttpClient;
+ private readonly _sraClient: HttpClient;
/**
* Given an array of APIOrder objects from a standard relayer api, return an array
* of SignedOrderWithRemainingFillableMakerAssetAmounts