diff options
author | Ara Kevonian <ara@dextroid.io> | 2018-04-13 18:17:09 +0800 |
---|---|---|
committer | Ara Kevonian <ara@dextroid.io> | 2018-04-13 18:17:09 +0800 |
commit | 5355da6cad157bb67d1b55a2f8463efe3e072385 (patch) | |
tree | d2a4d0d718ea6b1b4dff6d5d138b7da54968568e /packages/0x.js/src/utils | |
parent | 38f7c4a0d2d9269b5fd185b303ede7a44ab78c99 (diff) | |
download | dexon-sol-tools-5355da6cad157bb67d1b55a2f8463efe3e072385.tar.gz dexon-sol-tools-5355da6cad157bb67d1b55a2f8463efe3e072385.tar.zst dexon-sol-tools-5355da6cad157bb67d1b55a2f8463efe3e072385.zip |
Rename BalanceAndAllowanceFetchers to BalanceAndProxyAllowanceFetchers
Diffstat (limited to 'packages/0x.js/src/utils')
-rw-r--r-- | packages/0x.js/src/utils/order_state_utils.ts | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/packages/0x.js/src/utils/order_state_utils.ts b/packages/0x.js/src/utils/order_state_utils.ts index d45b67dc2..d8d69185f 100644 --- a/packages/0x.js/src/utils/order_state_utils.ts +++ b/packages/0x.js/src/utils/order_state_utils.ts @@ -4,7 +4,7 @@ import * as _ from 'lodash'; import { ZeroEx } from '../0x'; import { ExchangeWrapper } from '../contract_wrappers/exchange_wrapper'; -import { BalanceAndAllowanceFetcher } from '../abstract/balance_and_allowance_fetcher'; +import { BalanceAndProxyAllowanceFetcher } from '../abstract/balance_and_proxy_allowance_fetcher'; import { OrderFilledCancelledFetcher } from '../abstract/order_filled_cancelled_fetcher'; import { RemainingFillableCalculator } from '../order_watcher/remaining_fillable_calculator'; import { ExchangeContractErrs, OrderRelevantState, OrderState, OrderStateInvalid, OrderStateValid } from '../types'; @@ -12,7 +12,7 @@ import { ExchangeContractErrs, OrderRelevantState, OrderState, OrderStateInvalid const ACCEPTABLE_RELATIVE_ROUNDING_ERROR = 0.0001; export class OrderStateUtils { - private _balanceAndAllowanceFetcher: BalanceAndAllowanceFetcher; + private _balanceAndProxyAllowanceFetcher: BalanceAndProxyAllowanceFetcher; private _orderFilledCancelledFetcher: OrderFilledCancelledFetcher; private static _validateIfOrderIsValid(signedOrder: SignedOrder, orderRelevantState: OrderRelevantState): void { const unavailableTakerTokenAmount = orderRelevantState.cancelledTakerTokenAmount.add( @@ -49,10 +49,10 @@ export class OrderStateUtils { } } constructor( - balanceAndProxyAllowanceFetcher: BalanceAndAllowanceFetcher, + balanceAndProxyAllowanceFetcher: BalanceAndProxyAllowanceFetcher, orderFilledCancelledFetcher: OrderFilledCancelledFetcher, ) { - this._balanceAndAllowanceFetcher = balanceAndProxyAllowanceFetcher; + this._balanceAndProxyAllowanceFetcher = balanceAndProxyAllowanceFetcher; this._orderFilledCancelledFetcher = orderFilledCancelledFetcher; } public async getOrderStateAsync(signedOrder: SignedOrder): Promise<OrderState> { @@ -83,19 +83,19 @@ export class OrderStateUtils { const exchange = (this._orderFilledCancelledFetcher as any)._exchange as ExchangeWrapper; const zrxTokenAddress = exchange.getZRXTokenAddress(); const orderHash = ZeroEx.getOrderHashHex(signedOrder); - const makerBalance = await this._balanceAndAllowanceFetcher.getBalanceAsync( + const makerBalance = await this._balanceAndProxyAllowanceFetcher.getBalanceAsync( signedOrder.makerTokenAddress, signedOrder.maker, ); - const makerProxyAllowance = await this._balanceAndAllowanceFetcher.getProxyAllowanceAsync( + const makerProxyAllowance = await this._balanceAndProxyAllowanceFetcher.getProxyAllowanceAsync( signedOrder.makerTokenAddress, signedOrder.maker, ); - const makerFeeBalance = await this._balanceAndAllowanceFetcher.getBalanceAsync( + const makerFeeBalance = await this._balanceAndProxyAllowanceFetcher.getBalanceAsync( zrxTokenAddress, signedOrder.maker, ); - const makerFeeProxyAllowance = await this._balanceAndAllowanceFetcher.getProxyAllowanceAsync( + const makerFeeProxyAllowance = await this._balanceAndProxyAllowanceFetcher.getProxyAllowanceAsync( zrxTokenAddress, signedOrder.maker, ); |