aboutsummaryrefslogtreecommitdiffstats
path: root/packages/order-utils/src
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-07-17 18:59:02 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-07-17 18:59:02 +0800
commitbf8ac3b9e6ee59f267f7850418febfe84dedceb8 (patch)
tree0617e583892f9a8fe96a55dcac3a7f9af1ddae10 /packages/order-utils/src
parentedcdc9b1b903158cc61529853d7e9028ecbc266a (diff)
downloaddexon-0x-contracts-bf8ac3b9e6ee59f267f7850418febfe84dedceb8.tar.gz
dexon-0x-contracts-bf8ac3b9e6ee59f267f7850418febfe84dedceb8.tar.zst
dexon-0x-contracts-bf8ac3b9e6ee59f267f7850418febfe84dedceb8.zip
Fix tslint issues
Diffstat (limited to 'packages/order-utils/src')
-rw-r--r--packages/order-utils/src/exchange_transfer_simulator.ts2
-rw-r--r--packages/order-utils/src/order_state_utils.ts4
-rw-r--r--packages/order-utils/src/order_validation_utils.ts2
-rw-r--r--packages/order-utils/src/remaining_fillable_calculator.ts14
-rw-r--r--packages/order-utils/src/store/balance_and_proxy_allowance_lazy_store.ts2
5 files changed, 12 insertions, 12 deletions
diff --git a/packages/order-utils/src/exchange_transfer_simulator.ts b/packages/order-utils/src/exchange_transfer_simulator.ts
index 72ed85406..c3a4f9c2a 100644
--- a/packages/order-utils/src/exchange_transfer_simulator.ts
+++ b/packages/order-utils/src/exchange_transfer_simulator.ts
@@ -34,7 +34,7 @@ const ERR_MSG_MAPPING = {
};
export class ExchangeTransferSimulator {
- private _store: AbstractBalanceAndProxyAllowanceLazyStore;
+ private readonly _store: AbstractBalanceAndProxyAllowanceLazyStore;
private static _throwValidationError(
failureReason: FailureReason,
tradeSide: TradeSide,
diff --git a/packages/order-utils/src/order_state_utils.ts b/packages/order-utils/src/order_state_utils.ts
index dd45a1298..189bf4180 100644
--- a/packages/order-utils/src/order_state_utils.ts
+++ b/packages/order-utils/src/order_state_utils.ts
@@ -27,8 +27,8 @@ interface SidedOrderRelevantState {
const ACCEPTABLE_RELATIVE_ROUNDING_ERROR = 0.0001;
export class OrderStateUtils {
- private _balanceAndProxyAllowanceFetcher: AbstractBalanceAndProxyAllowanceFetcher;
- private _orderFilledCancelledFetcher: AbstractOrderFilledCancelledFetcher;
+ private readonly _balanceAndProxyAllowanceFetcher: AbstractBalanceAndProxyAllowanceFetcher;
+ private readonly _orderFilledCancelledFetcher: AbstractOrderFilledCancelledFetcher;
private static _validateIfOrderIsValid(
signedOrder: SignedOrder,
sidedOrderRelevantState: SidedOrderRelevantState,
diff --git a/packages/order-utils/src/order_validation_utils.ts b/packages/order-utils/src/order_validation_utils.ts
index 94df3ef82..67d747081 100644
--- a/packages/order-utils/src/order_validation_utils.ts
+++ b/packages/order-utils/src/order_validation_utils.ts
@@ -13,7 +13,7 @@ import { isValidSignatureAsync } from './signature_utils';
import { utils } from './utils';
export class OrderValidationUtils {
- private _orderFilledCancelledFetcher: AbstractOrderFilledCancelledFetcher;
+ private readonly _orderFilledCancelledFetcher: AbstractOrderFilledCancelledFetcher;
public static isRoundingError(numerator: BigNumber, denominator: BigNumber, target: BigNumber): boolean {
// Solidity's mulmod() in JS
// Source: https://solidity.readthedocs.io/en/latest/units-and-global-variables.html#mathematical-and-cryptographic-functions
diff --git a/packages/order-utils/src/remaining_fillable_calculator.ts b/packages/order-utils/src/remaining_fillable_calculator.ts
index 29e19e5ab..7022aa979 100644
--- a/packages/order-utils/src/remaining_fillable_calculator.ts
+++ b/packages/order-utils/src/remaining_fillable_calculator.ts
@@ -1,14 +1,14 @@
import { BigNumber } from '@0xproject/utils';
export class RemainingFillableCalculator {
- private _isTraderAssetZRX: boolean;
+ private readonly _isTraderAssetZRX: boolean;
// Transferrable Amount is the minimum of Approval and Balance
- private _transferrableAssetAmount: BigNumber;
- private _transferrableFeeAmount: BigNumber;
- private _remainingOrderAssetAmount: BigNumber;
- private _remainingOrderFeeAmount: BigNumber;
- private _orderFee: BigNumber;
- private _orderAssetAmount: BigNumber;
+ private readonly _transferrableAssetAmount: BigNumber;
+ private readonly _transferrableFeeAmount: BigNumber;
+ private readonly _remainingOrderAssetAmount: BigNumber;
+ private readonly _remainingOrderFeeAmount: BigNumber;
+ private readonly _orderFee: BigNumber;
+ private readonly _orderAssetAmount: BigNumber;
constructor(
orderFee: BigNumber,
orderAssetAmount: BigNumber,
diff --git a/packages/order-utils/src/store/balance_and_proxy_allowance_lazy_store.ts b/packages/order-utils/src/store/balance_and_proxy_allowance_lazy_store.ts
index e7352119d..6d5a02adf 100644
--- a/packages/order-utils/src/store/balance_and_proxy_allowance_lazy_store.ts
+++ b/packages/order-utils/src/store/balance_and_proxy_allowance_lazy_store.ts
@@ -8,7 +8,7 @@ import { AbstractBalanceAndProxyAllowanceLazyStore } from '../abstract/abstract_
* Copy on read store for balances/proxyAllowances of tokens/accounts
*/
export class BalanceAndProxyAllowanceLazyStore implements AbstractBalanceAndProxyAllowanceLazyStore {
- private _balanceAndProxyAllowanceFetcher: AbstractBalanceAndProxyAllowanceFetcher;
+ private readonly _balanceAndProxyAllowanceFetcher: AbstractBalanceAndProxyAllowanceFetcher;
private _balance: {
[assetData: string]: {
[userAddress: string]: BigNumber;